diff --git a/README.md b/README.md
index 1db8858b7..6591c45b0 100644
--- a/README.md
+++ b/README.md
@@ -5,14 +5,15 @@ npm run setup
npm start
```
-- @nativescript/canvas
-- @nativescript/canvas-babylon
-- @nativescript/canvas-media
-- @nativescript/canvas-phaser
-- @nativescript/canvas-phaser-ce
-- @nativescript/canvas-pixi
-- @nativescript/canvas-polyfill
-- @nativescript/canvas-three
+- [@nativescript/canvas](packages/canvas/README.md)
+- [@nativescript/canvas-babylon](packages/canvas-babylon/README.md)
+- [@nativescript/canvas-chartjs](packages/canvas-chartjs/README.md)
+- [@nativescript/canvas-media](packages/canvas-media/README.md)
+- [@nativescript/canvas-phaser](packages/canvas-phaser/README.md)
+- [@nativescript/canvas-phaser-ce](packages/canvas-phaser-ce/README.md)
+- [@nativescript/canvas-pixi](packages/canvas-pixi/README.md)
+- [@nativescript/canvas-polyfill](packages/canvas-polyfill/README.md)
+- [@nativescript/canvas-three](packages/canvas-three/README.md)
# How to use?
diff --git a/apps/demo-angular/package.json b/apps/demo-angular/package.json
index 8cb61c5d1..d45e52469 100644
--- a/apps/demo-angular/package.json
+++ b/apps/demo-angular/package.json
@@ -1,19 +1,20 @@
{
- "main": "./src/main.ts",
- "dependencies": {
- "@nativescript/canvas": "file:../../dist/packages/canvas",
- "@nativescript/canvas-babylon": "file:../../dist/packages/canvas-babylon",
- "@nativescript/canvas-media": "file:../../dist/packages/canvas-media",
- "@nativescript/canvas-phaser": "file:../../dist/packages/canvas-phaser",
- "@nativescript/canvas-phaser-ce": "file:../../dist/packages/canvas-phaser-ce",
- "@nativescript/canvas-pixi": "file:../../dist/packages/canvas-pixi",
- "@nativescript/canvas-polyfill": "file:../../dist/packages/canvas-polyfill",
- "@nativescript/canvas-three": "file:../../dist/packages/canvas-three",
- "@nativescript/core": "file:../../node_modules/@nativescript/core",
- "three": "file:../../node_modules/three"
- },
- "devDependencies": {
- "@nativescript/android": "~8.5.0",
- "@nativescript/ios": "8.5.1-dev.0"
- }
+ "main": "./src/main.ts",
+ "dependencies": {
+ "@nativescript/canvas": "file:../../dist/packages/canvas",
+ "@nativescript/canvas-babylon": "file:../../dist/packages/canvas-babylon",
+ "@nativescript/canvas-media": "file:../../dist/packages/canvas-media",
+ "@nativescript/canvas-phaser": "file:../../dist/packages/canvas-phaser",
+ "@nativescript/canvas-phaser-ce": "file:../../dist/packages/canvas-phaser-ce",
+ "@nativescript/canvas-pixi": "file:../../dist/packages/canvas-pixi",
+ "@nativescript/canvas-polyfill": "file:../../dist/packages/canvas-polyfill",
+ "@nativescript/canvas-three": "file:../../dist/packages/canvas-three",
+ "@nativescript/core": "file:../../node_modules/@nativescript/core",
+ "three": "file:../../node_modules/three",
+ "@nativescript/canvas-chartjs": "file:../../dist/packages/canvas-chartjs"
+ },
+ "devDependencies": {
+ "@nativescript/android": "~8.5.0",
+ "@nativescript/ios": "8.5.1-dev.0"
+ }
}
diff --git a/apps/demo-angular/src/app-routing.module.ts b/apps/demo-angular/src/app-routing.module.ts
index ef3578032..5b1c933ac 100644
--- a/apps/demo-angular/src/app-routing.module.ts
+++ b/apps/demo-angular/src/app-routing.module.ts
@@ -9,6 +9,7 @@ const routes: Routes = [
{ path: 'home', component: HomeComponent },
{ path: 'canvas', loadChildren: () => import('./plugin-demos/canvas.module').then(m => m.CanvasModule) },
{ path: 'canvas-babylon', loadChildren: () => import('./plugin-demos/canvas-babylon.module').then(m => m.CanvasBabylonModule) },
+ { path: 'canvas-chartjs', loadChildren: () => import('./plugin-demos/canvas-chartjs.module').then(m => m.CanvasChartjsModule) },
{ path: 'canvas-media', loadChildren: () => import('./plugin-demos/canvas-media.module').then(m => m.CanvasMediaModule) },
{ path: 'canvas-phaser', loadChildren: () => import('./plugin-demos/canvas-phaser.module').then(m => m.CanvasPhaserModule) },
{ path: 'canvas-phaser-ce', loadChildren: () => import('./plugin-demos/canvas-phaser-ce.module').then(m => m.CanvasPhaserCeModule) },
diff --git a/apps/demo-angular/src/home.component.ts b/apps/demo-angular/src/home.component.ts
index e351d431e..9dbe641be 100644
--- a/apps/demo-angular/src/home.component.ts
+++ b/apps/demo-angular/src/home.component.ts
@@ -9,34 +9,32 @@ export class HomeComponent {
constructor(private router: RouterExtensions){}
demos = [
- {
- name: 'canvas',
- },
- {
- name: 'canvas-babylon',
- },
- {
- name: 'canvas-media',
- },
- {
- name: 'canvas-phaser',
- },
- {
- name: 'canvas-phaser-ce',
- },
- {
- name: 'canvas-pixi',
- },
- {
- name: 'canvas-polyfill',
- },
- {
- name: 'canvas-three',
- },
- ];
-
- onTap(event){
- const item = this.demos[event.index];
- this.router.navigate(['/' + item.name]);
+ {
+ name: 'canvas'
+ },
+ {
+ name: 'canvas-babylon'
+ },
+ {
+ name: 'canvas-chartjs'
+ },
+ {
+ name: 'canvas-media'
+ },
+ {
+ name: 'canvas-phaser'
+ },
+ {
+ name: 'canvas-phaser-ce'
+ },
+ {
+ name: 'canvas-pixi'
+ },
+ {
+ name: 'canvas-polyfill'
+ },
+ {
+ name: 'canvas-three'
}
-}
+];
+}
\ No newline at end of file
diff --git a/apps/demo-angular/src/plugin-demos/canvas-chartjs.component.html b/apps/demo-angular/src/plugin-demos/canvas-chartjs.component.html
new file mode 100644
index 000000000..ae852df04
--- /dev/null
+++ b/apps/demo-angular/src/plugin-demos/canvas-chartjs.component.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/apps/demo-angular/src/plugin-demos/canvas-chartjs.component.ts b/apps/demo-angular/src/plugin-demos/canvas-chartjs.component.ts
new file mode 100644
index 000000000..77b350cfa
--- /dev/null
+++ b/apps/demo-angular/src/plugin-demos/canvas-chartjs.component.ts
@@ -0,0 +1,19 @@
+import { Component, NgZone } from '@angular/core';
+import { DemoSharedCanvasChartjs } from '@demo/shared';
+import { } from '@nativescript/canvas-chartjs';
+
+@Component({
+ selector: 'demo-canvas-chartjs',
+ templateUrl: 'canvas-chartjs.component.html',
+})
+export class CanvasChartjsComponent {
+
+ demoShared: DemoSharedCanvasChartjs;
+
+ constructor(private _ngZone: NgZone) {}
+
+ ngOnInit() {
+ this.demoShared = new DemoSharedCanvasChartjs();
+ }
+
+}
\ No newline at end of file
diff --git a/apps/demo-angular/src/plugin-demos/canvas-chartjs.module.ts b/apps/demo-angular/src/plugin-demos/canvas-chartjs.module.ts
new file mode 100644
index 000000000..004afb2ff
--- /dev/null
+++ b/apps/demo-angular/src/plugin-demos/canvas-chartjs.module.ts
@@ -0,0 +1,10 @@
+import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
+import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
+import { CanvasChartjsComponent } from './canvas-chartjs.component';
+
+@NgModule({
+ imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: CanvasChartjsComponent }])],
+ declarations: [CanvasChartjsComponent],
+ schemas: [ NO_ERRORS_SCHEMA]
+})
+export class CanvasChartjsModule {}
diff --git a/apps/demo-vue/app/plugin-demos/canvas-chartjs.vue b/apps/demo-vue/app/plugin-demos/canvas-chartjs.vue
new file mode 100644
index 000000000..18ce9c8a1
--- /dev/null
+++ b/apps/demo-vue/app/plugin-demos/canvas-chartjs.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/demo-vue/package.json b/apps/demo-vue/package.json
index 13b993060..bf2306b00 100644
--- a/apps/demo-vue/package.json
+++ b/apps/demo-vue/package.json
@@ -1,19 +1,20 @@
{
- "main": "./app/app.ts",
- "dependencies": {
- "nativescript-vue": "file:../../node_modules/nativescript-vue",
- "@nativescript/core": "file:../../node_modules/@nativescript/core",
- "@nativescript/canvas-media": "file:../../packages/canvas-media",
- "@nativescript/canvas": "file:../../packages/canvas",
- "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon",
- "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser",
- "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce",
- "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi",
- "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill",
- "@nativescript/canvas-three": "file:../../packages/canvas-three"
- },
- "devDependencies": {
- "@nativescript/android": "~8.5.0",
- "@nativescript/ios": "8.5.1-dev.0"
- }
+ "main": "./app/app.ts",
+ "dependencies": {
+ "nativescript-vue": "file:../../node_modules/nativescript-vue",
+ "@nativescript/core": "file:../../node_modules/@nativescript/core",
+ "@nativescript/canvas-media": "file:../../packages/canvas-media",
+ "@nativescript/canvas": "file:../../packages/canvas",
+ "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon",
+ "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser",
+ "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce",
+ "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi",
+ "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill",
+ "@nativescript/canvas-three": "file:../../packages/canvas-three",
+ "@nativescript/canvas-chartjs": "file:../../packages/canvas-chartjs"
+ },
+ "devDependencies": {
+ "@nativescript/android": "~8.5.0",
+ "@nativescript/ios": "8.5.1-dev.0"
+ }
}
diff --git a/apps/demo/package.json b/apps/demo/package.json
index 58f99aa70..1c42a7989 100644
--- a/apps/demo/package.json
+++ b/apps/demo/package.json
@@ -1,32 +1,33 @@
{
- "main": "./src/app.ts",
- "description": "NativeScript Application",
- "license": "SEE LICENSE IN ",
- "repository": "",
- "dependencies": {
- "@nativescript/canvas": "file:../../packages/canvas",
- "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon",
- "@nativescript/canvas-media": "file:../../packages/canvas-media",
- "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser",
- "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce",
- "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi",
- "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill",
- "@nativescript/canvas-three": "file:../../packages/canvas-three",
- "@nativescript/core": "file:../../node_modules/@nativescript/core",
- "babylonjs": "file:../../node_modules/babylonjs",
- "babylonjs-materials": "file:../../node_modules/babylonjs-materials",
- "chart.js": "file:../../node_modules/chart.js",
- "d3": "file:../../node_modules/d3",
- "matter-js": "file:../../node_modules/matter-js",
- "phaser": "file:../../node_modules/phaser",
- "phaser-ce": "file:../../node_modules/phaser-ce",
- "pixi.js": "file:../../node_modules/pixi.js",
- "three": "file:../../node_modules/three",
- "vexflow": "file:../../node_modules/vexflow",
- "zen-3d": "file:../../node_modules/zen-3d"
- },
- "devDependencies": {
- "@nativescript/android": "8.5.4",
- "@nativescript/ios": "8.5.2"
- }
+ "main": "./src/app.ts",
+ "description": "NativeScript Application",
+ "license": "SEE LICENSE IN ",
+ "repository": "",
+ "dependencies": {
+ "@nativescript/canvas": "file:../../packages/canvas",
+ "@nativescript/canvas-babylon": "file:../../packages/canvas-babylon",
+ "@nativescript/canvas-media": "file:../../packages/canvas-media",
+ "@nativescript/canvas-phaser": "file:../../packages/canvas-phaser",
+ "@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce",
+ "@nativescript/canvas-pixi": "file:../../packages/canvas-pixi",
+ "@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill",
+ "@nativescript/canvas-three": "file:../../packages/canvas-three",
+ "@nativescript/core": "file:../../node_modules/@nativescript/core",
+ "babylonjs": "file:../../node_modules/babylonjs",
+ "babylonjs-materials": "file:../../node_modules/babylonjs-materials",
+ "chart.js": "file:../../node_modules/chart.js",
+ "d3": "file:../../node_modules/d3",
+ "matter-js": "file:../../node_modules/matter-js",
+ "phaser": "file:../../node_modules/phaser",
+ "phaser-ce": "file:../../node_modules/phaser-ce",
+ "pixi.js": "file:../../node_modules/pixi.js",
+ "three": "file:../../node_modules/three",
+ "vexflow": "file:../../node_modules/vexflow",
+ "zen-3d": "file:../../node_modules/zen-3d",
+ "@nativescript/canvas-chartjs": "file:../../packages/canvas-chartjs"
+ },
+ "devDependencies": {
+ "@nativescript/android": "8.6.2",
+ "@nativescript/ios": "8.6.1"
+ }
}
diff --git a/apps/demo/src/app.ts b/apps/demo/src/app.ts
index 97e5b0a0c..661ffc3dd 100644
--- a/apps/demo/src/app.ts
+++ b/apps/demo/src/app.ts
@@ -49,7 +49,7 @@ Application.on('uncaughtError', (args) => {
console.log('uncaughtError: platform error', args.android ?? args.ios);
});
Application.on('launch', (args) => {
- require('@nativescript/canvas-polyfill');
+ //require('@nativescript/canvas-polyfill');
if (global.isAndroid) {
jp.wasabeef.takt.Takt.stock(Utils.android.getApplicationContext()).seat(jp.wasabeef.takt.Seat.TOP_CENTER).color(-65536);
} else {
diff --git a/apps/demo/src/main-page.xml b/apps/demo/src/main-page.xml
index f1187ceb5..fe995b678 100644
--- a/apps/demo/src/main-page.xml
+++ b/apps/demo/src/main-page.xml
@@ -13,6 +13,7 @@
+
diff --git a/apps/demo/src/plugin-demos/canvas-chartjs.ts b/apps/demo/src/plugin-demos/canvas-chartjs.ts
new file mode 100644
index 000000000..2c6312a95
--- /dev/null
+++ b/apps/demo/src/plugin-demos/canvas-chartjs.ts
@@ -0,0 +1,12 @@
+import { Observable, EventData, Page } from '@nativescript/core';
+import { DemoSharedCanvasChartjs } from '@demo/shared';
+import { } from '@nativescript/canvas-chartjs';
+
+export function navigatingTo(args: EventData) {
+ const page = args.object;
+ page.bindingContext = new DemoModel();
+}
+
+export class DemoModel extends DemoSharedCanvasChartjs {
+
+}
diff --git a/apps/demo/src/plugin-demos/canvas-chartjs.xml b/apps/demo/src/plugin-demos/canvas-chartjs.xml
new file mode 100644
index 000000000..576870798
--- /dev/null
+++ b/apps/demo/src/plugin-demos/canvas-chartjs.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 43020b828..664a3b27b 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
},
"private": true,
"devDependencies": {
+ "@angular-devkit/build-angular": "^15.0.0",
"@angular/animations": "^15.0.0",
"@angular/common": "^15.0.0",
"@angular/compiler": "^15.0.0",
@@ -37,36 +38,36 @@
"@nativescript/types": "~8.5.0",
"@nativescript/webpack": "~5.0.5",
"@ngtools/webpack": "^15.0.0",
+ "@types/three": "^0.157.0",
"babylonjs": "^6.0.0",
"babylonjs-materials": "^6.0.0",
"canvg": "^4.0.1",
- "chart.js": "^4.2.1",
+ "chart.js": "^4.4.0",
"d3": "^7.8.4",
"dotenv": "~16.0.3",
"eslint": "~8.38.0",
"eslint-config-prettier": "~8.8.0",
"husky": "^8.0.0",
- "matter-js": "^0.14.2",
+ "matter-js": "^0.19.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-vue": "~2.9.0",
"nativescript-vue-template-compiler": "~2.9.0",
"ng-packagr": "^15.0.0",
"phaser": "^3.55.2",
"phaser-ce": "^2.20.0",
- "pixi.js": "^7.2.3",
- "playcanvas": "^1.62.0",
+ "pixi.js": "^7.3.1",
+ "playcanvas": "^1.66.1",
+ "query-selector": "2.0.0",
"react-nativescript": "^4.0.0",
"rimraf": "^3.0.2",
"rxjs": "~7.8.0",
"svelte-native": "^1.0.5",
- "three": "^0.151.3",
+ "three": "^0.157.0",
"typescript": "~4.8.0",
- "vexflow": "^3.0.9",
+ "vexflow": "^4.2.3",
"xmldom": "~0.6.0",
- "query-selector": "2.0.0",
"zen-3d": "0.0.3",
- "zone.js": "~0.13.0",
- "@angular-devkit/build-angular": "^15.0.0"
+ "zone.js": "~0.13.0"
},
"lint-staged": {
"**/*.{js,ts,scss,json,html}": [
diff --git a/packages/canvas-babylon/package.json b/packages/canvas-babylon/package.json
index ceb11965b..7ab056e9b 100644
--- a/packages/canvas-babylon/package.json
+++ b/packages/canvas-babylon/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-babylon",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "",
"main": "index",
"typings": "index.d.ts",
@@ -33,9 +33,7 @@
"readmeFilename": "README.md",
"bootstrapper": "@nativescript/plugin-seed",
"dependencies": {
- "@nativescript/canvas-polyfill": "alpha"
- },
- "peerDependencies": {
- "babylonjs": "^5.53.0"
+ "@nativescript/canvas-polyfill": "alpha",
+ "babylonjs": "~6.24.0"
}
}
diff --git a/packages/canvas-chartjs/.eslintrc.json b/packages/canvas-chartjs/.eslintrc.json
new file mode 100644
index 000000000..53c06c8db
--- /dev/null
+++ b/packages/canvas-chartjs/.eslintrc.json
@@ -0,0 +1,18 @@
+{
+ "extends": ["../../.eslintrc.json"],
+ "ignorePatterns": ["!**/*", "node_modules/**/*"],
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.js", "*.jsx"],
+ "rules": {}
+ }
+ ]
+}
diff --git a/packages/canvas-chartjs/README.md b/packages/canvas-chartjs/README.md
new file mode 100644
index 000000000..59947c7df
--- /dev/null
+++ b/packages/canvas-chartjs/README.md
@@ -0,0 +1,13 @@
+# @nativescript/canvas-chartjs
+
+```javascript
+npm install @nativescript/canvas-chartjs
+```
+
+## Usage
+
+// TODO
+
+## License
+
+Apache License Version 2.0
diff --git a/packages/canvas-chartjs/common.ts b/packages/canvas-chartjs/common.ts
new file mode 100644
index 000000000..fc0698600
--- /dev/null
+++ b/packages/canvas-chartjs/common.ts
@@ -0,0 +1,4 @@
+import { Observable } from '@nativescript/core';
+
+export class CanvasChartjsCommon extends Observable {
+}
diff --git a/packages/canvas-chartjs/index.android.ts b/packages/canvas-chartjs/index.android.ts
new file mode 100644
index 000000000..376d206f0
--- /dev/null
+++ b/packages/canvas-chartjs/index.android.ts
@@ -0,0 +1,5 @@
+import { CanvasChartjsCommon } from './common';
+
+export class CanvasChartjs extends CanvasChartjsCommon {
+
+}
diff --git a/packages/canvas-chartjs/index.d.ts b/packages/canvas-chartjs/index.d.ts
new file mode 100644
index 000000000..e94a29814
--- /dev/null
+++ b/packages/canvas-chartjs/index.d.ts
@@ -0,0 +1,5 @@
+import { CanvasChartjsCommon } from './common';
+
+export declare class CanvasChartjs extends CanvasChartjsCommon {
+
+}
diff --git a/packages/canvas-chartjs/index.ios.ts b/packages/canvas-chartjs/index.ios.ts
new file mode 100644
index 000000000..2caa478b8
--- /dev/null
+++ b/packages/canvas-chartjs/index.ios.ts
@@ -0,0 +1,5 @@
+import { CanvasChartjsCommon } from './common';
+
+export class CanvasChartjs extends CanvasChartjsCommon {
+
+}
diff --git a/packages/canvas-chartjs/package.json b/packages/canvas-chartjs/package.json
new file mode 100644
index 000000000..3d4139d64
--- /dev/null
+++ b/packages/canvas-chartjs/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@nativescript/canvas-chartjs",
+ "version": "2.0.0-alpha.21",
+ "description": "ChartJS",
+ "main": "index",
+ "typings": "index.d.ts",
+ "nativescript": {
+ "platforms": {
+ "ios": "6.0.0",
+ "android": "6.0.0"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/NativeScript/plugins.git"
+ },
+ "keywords": [
+ "NativeScript",
+ "JavaScript",
+ "TypeScript",
+ "iOS",
+ "Android"
+ ],
+ "author": {
+ "name": "NativeScript",
+ "email": "oss@nativescript.org"
+ },
+ "bugs": {
+ "url": "https://github.com/NativeScript/plugins/issues"
+ },
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/NativeScript/plugins",
+ "readmeFilename": "README.md",
+ "bootstrapper": "@nativescript/plugin-seed",
+ "dependencies": {
+ "@nativescript/canvas-polyfill": "alpha",
+ "chart.js": "~4.4.0"
+ }
+}
diff --git a/packages/canvas-chartjs/project.json b/packages/canvas-chartjs/project.json
new file mode 100644
index 000000000..b470e8123
--- /dev/null
+++ b/packages/canvas-chartjs/project.json
@@ -0,0 +1,73 @@
+{
+ "name": "canvas-chartjs",
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
+ "projectType": "library",
+ "sourceRoot": "packages/canvas-chartjs",
+ "targets": {
+ "build": {
+ "executor": "@nrwl/js:tsc",
+ "options": {
+ "outputPath": "dist/packages/canvas-chartjs",
+ "tsConfig": "packages/canvas-chartjs/tsconfig.json",
+ "packageJson": "packages/canvas-chartjs/package.json",
+ "main": "packages/canvas-chartjs/index.d.ts",
+ "assets": [
+ "packages/canvas-chartjs/*.md",
+ "packages/canvas-chartjs/index.d.ts",
+ "LICENSE",
+ {
+ "glob": "**/*",
+ "input": "packages/canvas-chartjs/platforms/",
+ "output": "./platforms/"
+ }
+ ],
+ "dependsOn": [
+ {
+ "target": "build.all",
+ "projects": "dependencies"
+ }
+ ]
+ }
+ },
+ "build.all": {
+ "executor": "nx:run-commands",
+ "options": {
+ "commands": [
+ "node tools/scripts/build-finish.ts canvas-chartjs"
+ ],
+ "parallel": false
+ },
+ "outputs": [
+ "dist/packages/canvas-chartjs"
+ ],
+ "dependsOn": [
+ {
+ "target": "build.all",
+ "projects": "dependencies"
+ },
+ {
+ "target": "build",
+ "projects": "self"
+ }
+ ]
+ },
+ "focus": {
+ "executor": "nx:run-commands",
+ "options": {
+ "commands": [
+ "nx g @nativescript/plugin-tools:focus-packages canvas-chartjs"
+ ],
+ "parallel": false
+ }
+ },
+ "lint": {
+ "executor": "@nrwl/linter:eslint",
+ "options": {
+ "lintFilePatterns": [
+ "packages/canvas-chartjs/**/*.ts"
+ ]
+ }
+ }
+ },
+ "tags": []
+}
diff --git a/packages/canvas-chartjs/references.d.ts b/packages/canvas-chartjs/references.d.ts
new file mode 100644
index 000000000..98c5393d2
--- /dev/null
+++ b/packages/canvas-chartjs/references.d.ts
@@ -0,0 +1 @@
+///
\ No newline at end of file
diff --git a/packages/canvas-chartjs/tsconfig.json b/packages/canvas-chartjs/tsconfig.json
new file mode 100644
index 000000000..aed7323d7
--- /dev/null
+++ b/packages/canvas-chartjs/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "../../dist/out-tsc",
+ "rootDir": "."
+ },
+ "exclude": ["**/*.spec.ts", "**/*.test.ts", "angular"],
+ "include": ["**/*.ts", "references.d.ts"]
+}
diff --git a/packages/canvas-media/package.json b/packages/canvas-media/package.json
index f8513ef5e..b42fd5dbb 100644
--- a/packages/canvas-media/package.json
+++ b/packages/canvas-media/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-media",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "Canvas media",
"main": "index",
"typings": "index.d.ts",
diff --git a/packages/canvas-media/platforms/android/canvas_media.aar b/packages/canvas-media/platforms/android/canvas_media.aar
index 271ba6c51..1568ace76 100644
Binary files a/packages/canvas-media/platforms/android/canvas_media.aar and b/packages/canvas-media/platforms/android/canvas_media.aar differ
diff --git a/packages/canvas-phaser-ce/package.json b/packages/canvas-phaser-ce/package.json
index 604a23260..db05dc24d 100644
--- a/packages/canvas-phaser-ce/package.json
+++ b/packages/canvas-phaser-ce/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-phaser-ce",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "Tools for using Phaser-ce to build native 2D games in NativeScript 👾",
"main": "index",
"typings": "index.d.ts",
@@ -33,9 +33,7 @@
"readmeFilename": "README.md",
"bootstrapper": "@nativescript/plugin-seed",
"dependencies": {
- "@nativescript/canvas-polyfill": "alpha"
- },
- "peerDependencies": {
+ "@nativescript/canvas-polyfill": "alpha",
"phaser-ce": "2.20.0"
}
}
diff --git a/packages/canvas-phaser/package.json b/packages/canvas-phaser/package.json
index 87c54e0a7..6c30fca93 100644
--- a/packages/canvas-phaser/package.json
+++ b/packages/canvas-phaser/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-phaser",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "Build awesome 2D games with Phaser.js and NativeScript",
"main": "index",
"typings": "index.d.ts",
@@ -33,9 +33,7 @@
"readmeFilename": "README.md",
"bootstrapper": "@nativescript/plugin-seed",
"dependencies": {
- "@nativescript/canvas-polyfill": "alpha"
- },
- "peerDependencies": {
- "phaser": "^3.24.1"
+ "@nativescript/canvas-polyfill": "alpha",
+ "phaser": "~3.60.0"
}
}
diff --git a/packages/canvas-pixi/package.json b/packages/canvas-pixi/package.json
index d5e938eff..aaa4565f1 100644
--- a/packages/canvas-pixi/package.json
+++ b/packages/canvas-pixi/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-pixi",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "Plugin for using pixi.js in NativeScript",
"main": "index",
"typings": "index.d.ts",
@@ -33,9 +33,7 @@
"readmeFilename": "README.md",
"bootstrapper": "nativescript-plugin-seed",
"dependencies": {
- "@nativescript/canvas-polyfill": "alpha"
- },
- "peerDependencies": {
- "pixi.js": "^7.2.3"
+ "@nativescript/canvas-polyfill": "alpha",
+ "pixi.js": "~7.3.1"
}
}
diff --git a/packages/canvas-polyfill/package.json b/packages/canvas-polyfill/package.json
index c8f6b697b..6e35dc1a8 100644
--- a/packages/canvas-polyfill/package.json
+++ b/packages/canvas-polyfill/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-polyfill",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "Polyfill for making NativeScript compatible with web libs like pixi.js, three.js, phaser.js, babylon.js, etc....",
"main": "index",
"typings": "index.d.ts",
diff --git a/packages/canvas-polyfill/platforms/android/canvas_polyfill.aar b/packages/canvas-polyfill/platforms/android/canvas_polyfill.aar
index 821c83f26..fb01dc54e 100644
Binary files a/packages/canvas-polyfill/platforms/android/canvas_polyfill.aar and b/packages/canvas-polyfill/platforms/android/canvas_polyfill.aar differ
diff --git a/packages/canvas-three/package.json b/packages/canvas-three/package.json
index 4b769c231..5af607a2b 100644
--- a/packages/canvas-three/package.json
+++ b/packages/canvas-three/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-three",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "Utilities for using THREE.js on NativeScript",
"main": "index",
"typings": "index.d.ts",
@@ -33,9 +33,7 @@
"readmeFilename": "README.md",
"bootstrapper": "@nativescript/plugin-seed",
"dependencies": {
- "@nativescript/canvas-polyfill": "alpha"
- },
- "peerDependencies": {
- "three": "^0.151.3"
+ "@nativescript/canvas-polyfill": "alpha",
+ "three": "~0.157.0"
}
}
diff --git a/packages/canvas/WebGL/WebGLRenderingContext/index.ts b/packages/canvas/WebGL/WebGLRenderingContext/index.ts
index 9740edcfd..519a8bf13 100644
--- a/packages/canvas/WebGL/WebGLRenderingContext/index.ts
+++ b/packages/canvas/WebGL/WebGLRenderingContext/index.ts
@@ -45,7 +45,7 @@ import { Helpers } from '../../helpers';
let ctor;
export class WebGLRenderingContext extends WebGLRenderingContextBase {
- public static isDebug = true;
+ public static isDebug = false;
public static filter: 'both' | 'error' | 'args' = 'both';
_context;
diff --git a/packages/canvas/package.json b/packages/canvas/package.json
index b61a4ab1d..7758b564b 100644
--- a/packages/canvas/package.json
+++ b/packages/canvas/package.json
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas",
- "version": "2.0.0-alpha.20",
+ "version": "2.0.0-alpha.21",
"description": "DOM Canvas API for NativeScript",
"main": "index",
"typings": "index.d.ts",
diff --git a/packages/canvas/platforms/android/canvas-release.aar b/packages/canvas/platforms/android/canvas-release.aar
index 344991ef1..b2d844638 100644
Binary files a/packages/canvas/platforms/android/canvas-release.aar and b/packages/canvas/platforms/android/canvas-release.aar differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative
index 1e18a35d5..9d1aa73c9 100755
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
index a0fd69102..2f9c459f5 100644
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative
index c08573580..e37f8cd96 100644
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative
index 5d8a9e0a9..1ee0d1318 100755
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo
index fd4d1589f..ae65451c5 100644
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo
index 002618f9c..3f3abae23 100644
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo differ
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources
index 607becb5d..dcfcc6fc5 100644
--- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources
+++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources
@@ -26,11 +26,11 @@
Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo
- 204esojqKbAD0l6NaFsf16L39Go=
+ ePAowlczAp5HJpTw2x1X4+QPbXI=
Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo
- VaXP9gsiEL68cygtyXTpSv6pd54=
+ nNOxlc4WyDn3qBIS0haTpXjmNw8=
Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json
@@ -115,14 +115,14 @@
hash2
- +TL0tv+RJdwUM1m9WA5LYGS62wIJtogLIn7qHHf6mHI=
+ XXNQyzWBPNQc0LabYVFSq1+6FgiCA1PYg3CVpz1A/Ao=
Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo
hash2
- cDISfqanYqzJVnqnxypUw+tozwSO6gEvJJQihjeGHZc=
+ MxYisuRzDnLJu8bdCdbZ+bLSCKuVjNrePs2w2NFQu8M=
Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json
diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative
index 4dcc85558..5f273c43c 100644
Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ
diff --git a/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp b/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp
index cbea4f679..4b873d5e3 100644
--- a/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp
+++ b/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp
@@ -150,8 +150,8 @@ void CanvasJSIModule::CreateImageBitmap(const v8::FunctionCallbackInfoIsObject()) {
auto imageObject = image.As();
auto isArrayBuffer = imageObject->IsArrayBuffer();
- auto isTypedArray = imageObject->IsTypedArray();
- if (isArrayBuffer || isTypedArray) {
+ auto IsArrayBufferView = imageObject->IsArrayBufferView();
+ if (isArrayBuffer || IsArrayBufferView) {
if (len == 1 || len == 2) {
if (len == 2) {
@@ -256,20 +256,20 @@ void CanvasJSIModule::CreateImageBitmap(const v8::FunctionCallbackInfo();
+ auto ta = imageObject.As();
auto array = ta->Buffer();
auto offset = ta->ByteOffset();
- auto size = ta->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = ta->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
- v8::Global ab(isolate, ta);
+ v8::Global ab(isolate, ta);
std::thread thread(
[jsi_callback, &options, shared_asset, data_ptr, size](
- v8::Global ab) {
+ v8::Global ab) {
auto done = canvas_native_image_bitmap_create_from_encoded_bytes_with_output(
data_ptr, size,
@@ -373,21 +373,21 @@ void CanvasJSIModule::CreateImageBitmap(const v8::FunctionCallbackInfo();
+ auto ta = imageObject.As();
auto array = ta->Buffer();
auto offset = ta->ByteOffset();
- auto size = ta->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = ta->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
- v8::Global ab(isolate, ta);
+ v8::Global ab(isolate, ta);
std::thread thread(
[jsi_callback, &options, shared_asset, data_ptr, size, current_queue](
- v8::Global ab
+ v8::Global ab
) {
auto done = canvas_native_image_bitmap_create_from_encoded_bytes_with_output(
@@ -564,22 +564,22 @@ void CanvasJSIModule::CreateImageBitmap(const v8::FunctionCallbackInfo();
+ auto ta = bufferValue.As();
auto array = ta->Buffer();
auto offset = ta->ByteOffset();
- auto size = ta->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = ta->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
- v8::Global ab(isolate, ta);
+ v8::Global ab(isolate, ta);
std::thread thread(
[jsi_callback, &options, shared_asset, data_ptr, size](
float sx_or_options,
float sy,
float sw,
float sh,
- v8::Global ab
+ v8::Global ab
) {
auto done = canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(
@@ -702,23 +702,23 @@ void CanvasJSIModule::CreateImageBitmap(const v8::FunctionCallbackInfo();
+ auto ta = bufferValue.As();
auto array = ta->Buffer();
auto offset = ta->ByteOffset();
- auto size = ta->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto size = ta->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
- v8::Global ab(isolate, ta);
+ v8::Global ab(isolate, ta);
std::thread thread(
[jsi_callback, &options, data_ptr, size, shared_asset, current_queue](
float sx_or_options,
float sy,
float sw,
float sh,
- v8::Global ab
+ v8::Global ab
) {
auto done = canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(
diff --git a/packages/canvas/platforms/ios/src/cpp/TextDecoderImpl.cpp b/packages/canvas/platforms/ios/src/cpp/TextDecoderImpl.cpp
index 700752934..929980325 100644
--- a/packages/canvas/platforms/ios/src/cpp/TextDecoderImpl.cpp
+++ b/packages/canvas/platforms/ios/src/cpp/TextDecoderImpl.cpp
@@ -109,6 +109,7 @@ void TextDecoderImpl::Decode(const v8::FunctionCallbackInfo &args) {
return;
}
auto isolate = args.GetIsolate();
+ auto context = isolate->GetCurrentContext();
if (args.Length() == 1) {
auto value = args[0];
@@ -142,13 +143,28 @@ void TextDecoderImpl::Decode(const v8::FunctionCallbackInfo &args) {
}
- if (buf->IsTypedArray()) {
+ if (buf->IsArrayBufferView()) {
- auto buffer = buf.As();
+ auto buffer = buf.As();
+
auto store = buffer->Buffer()->GetBackingStore();
- auto buffer_data = static_cast(store->Data()) + buffer->ByteOffset();
- auto len = buffer->Length();
+ auto buffer_data = static_cast(store->Data()) + buffer->ByteOffset();
+
+ auto len = buffer->ByteLength();
+
+// v8::Local size;
+//
+// buf->Get(context, ConvertToV8String(isolate, "BYTES_PER_ELEMENT")).ToLocal(&size);
+//
+// size_t len = 0;
+//
+// if(!size.IsEmpty()){
+// len = buffer->Length() * (size_t)size->NumberValue(context).FromMaybe(0);
+// }
+
+ // auto len = buffer->ByteLength();
+
auto decoded = canvas_native_text_decoder_decode(
ptr->GetTextDecoder(),
buffer_data, len);
diff --git a/packages/canvas/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp b/packages/canvas/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp
index f83ba0938..8103e3d05 100644
--- a/packages/canvas/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp
+++ b/packages/canvas/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp
@@ -663,12 +663,12 @@ void WebGLRenderingContext::BufferData(const v8::FunctionCallbackInfo
auto sizeOrBuf = args[1];
if (sizeOrBuf->IsArrayBufferView()) {
if (sizeOrBuf->IsUint16Array()) {
- auto buf = sizeOrBuf.As();
+ auto buf = sizeOrBuf.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
canvas_native_webgl_buffer_data_u16(
@@ -678,12 +678,12 @@ void WebGLRenderingContext::BufferData(const v8::FunctionCallbackInfo
ptr->GetState()
);
} else if (sizeOrBuf->IsFloat32Array()) {
- auto buf = sizeOrBuf.As();
+ auto buf = sizeOrBuf.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
canvas_native_webgl_buffer_data_f32(
@@ -693,12 +693,12 @@ void WebGLRenderingContext::BufferData(const v8::FunctionCallbackInfo
ptr->GetState()
);
} else {
- auto buf = sizeOrBuf.As();
+ auto buf = sizeOrBuf.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -762,13 +762,13 @@ void WebGLRenderingContext::BufferSubData(const v8::FunctionCallbackInfoIsObject()) {
auto buf = args[2];
- if (buf->IsTypedArray()) {
- auto buff = buf.As();
+ if (buf->IsArrayBufferView()) {
+ auto buff = buf.As();
auto array = buff->Buffer();
auto os = buff->ByteOffset();
- auto size = buff->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + os;
+ auto size = buff->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + os;
auto data = static_cast((void *) data_ptr);
@@ -995,13 +995,13 @@ void WebGLRenderingContext::CompressedTexImage2D(const v8::FunctionCallbackInfo<
auto border = (int32_t) args[5]->NumberValue(context).ToChecked();
auto pixels = args[6];
if (pixels->IsObject()) {
- if (pixels->IsTypedArray()) {
- auto buf = pixels.As();
+ if (pixels->IsArrayBufferView()) {
+ auto buf = pixels.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -1060,12 +1060,12 @@ WebGLRenderingContext::CompressedTexSubImage2D(const v8::FunctionCallbackInfoNumberValue(context).ToChecked();
if (args[7]->IsObject()) {
auto pixels = args[7];
- if (pixels->IsTypedArray()) {
- auto buf = pixels.As();
+ if (pixels->IsArrayBufferView()) {
+ auto buf = pixels.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = array->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
canvas_native_webgl_compressed_tex_sub_image2d(
@@ -3447,13 +3447,13 @@ WebGLRenderingContext::ReadPixels(const v8::FunctionCallbackInfo &arg
context).ToChecked();
auto pixels = args[6];
- if (pixels->IsTypedArray()) {
- auto buf = pixels.As();
+ if (pixels->IsArrayBufferView()) {
+ auto buf = pixels.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = array->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -3945,13 +3945,13 @@ WebGLRenderingContext::TexImage2D(const v8::FunctionCallbackInfo &arg
type,
ptr->GetState()
);
- } else if (value->IsTypedArray()) {
- auto buf = value.As();
+ } else if (value->IsArrayBufferView()) {
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = array->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4170,13 +4170,13 @@ WebGLRenderingContext::TexSubImage2D(const v8::FunctionCallbackInfo &
auto pixels = args[8];
- if (pixels->IsTypedArray()) {
- auto buf = pixels.As();
+ if (pixels->IsArrayBufferView()) {
+ auto buf = pixels.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto size = array->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4332,12 +4332,12 @@ WebGLRenderingContext::VertexAttrib1fv(const v8::FunctionCallbackInfo
auto value = args[1];
if (value->IsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4364,12 +4364,12 @@ WebGLRenderingContext::VertexAttrib2fv(const v8::FunctionCallbackInfo
auto value = args[1];
if (value->IsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4396,12 +4396,12 @@ WebGLRenderingContext::VertexAttrib3fv(const v8::FunctionCallbackInfo
auto value = args[1];
if (value->IsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4428,12 +4428,12 @@ WebGLRenderingContext::VertexAttrib4fv(const v8::FunctionCallbackInfo
auto value = args[1];
if (value->IsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4619,12 +4619,12 @@ WebGLRenderingContext::Uniform1fv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsFloat32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4681,12 +4681,12 @@ WebGLRenderingContext::Uniform2fv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsFloat32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4743,12 +4743,12 @@ WebGLRenderingContext::Uniform3fv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsFloat32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4804,12 +4804,12 @@ WebGLRenderingContext::Uniform4fv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsFloat32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -4992,12 +4992,12 @@ WebGLRenderingContext::Uniform1iv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsInt32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -5050,12 +5050,12 @@ WebGLRenderingContext::Uniform2iv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsInt32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
canvas_native_webgl_uniform2iv(
@@ -5107,11 +5107,11 @@ WebGLRenderingContext::Uniform3iv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsInt32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -5165,11 +5165,11 @@ WebGLRenderingContext::Uniform4iv(const v8::FunctionCallbackInfo &arg
if (location != nullptr) {
if (v0Value->IsInt32Array()) {
- auto buf = v0Value.As();
+ auto buf = v0Value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
@@ -5222,11 +5222,11 @@ WebGLRenderingContext::UniformMatrix2fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
canvas_native_webgl_uniform_matrix2fv(
@@ -5283,12 +5283,12 @@ WebGLRenderingContext::UniformMatrix3fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
canvas_native_webgl_uniform_matrix3fv(
@@ -5346,12 +5346,12 @@ WebGLRenderingContext::UniformMatrix4fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = value.As();
+ auto buf = value.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t *) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void *) data_ptr);
diff --git a/packages/canvas/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp b/packages/canvas/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp
index 9675413fb..469e17edb 100644
--- a/packages/canvas/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp
+++ b/packages/canvas/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp
@@ -18,7 +18,6 @@ void OES_vertex_array_objectImpl::CreateVertexArrayOES(
return;
}
auto isolate = args.GetIsolate();
- auto context = isolate->GetCurrentContext();
auto ret = canvas_native_webgl_oes_vertex_array_object_create_vertex_array_oes(
ptr->GetVertexArrayObject());
diff --git a/packages/canvas/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp b/packages/canvas/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp
index a3d2bb01e..77f5aa24e 100644
--- a/packages/canvas/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp
+++ b/packages/canvas/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp
@@ -310,11 +310,11 @@ void WebGL2RenderingContext::ClearBufferfv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = values.As();
+ auto buf = values.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -368,12 +368,12 @@ void WebGL2RenderingContext::ClearBufferiv(const v8::FunctionCallbackInfoIsInt32Array()) {
- auto buf = values.As();
+ auto buf = values.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -457,11 +457,11 @@ void WebGL2RenderingContext::ClearBufferuiv(const v8::FunctionCallbackInfoIsUint32Array()) {
- auto buf = values.As();
+ auto buf = values.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -530,12 +530,12 @@ WebGL2RenderingContext::CompressedTexSubImage3D(const v8::FunctionCallbackInfoIsObject()) {
- if (imageSizeOrBufValue->IsTypedArray()) {
- auto buf = imageSizeOrBufValue.As();
+ if (imageSizeOrBufValue->IsArrayBufferView()) {
+ auto buf = imageSizeOrBufValue.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
size_t srcOffset = 0;
@@ -1272,9 +1272,9 @@ void WebGL2RenderingContext::GetBufferSubData(const v8::FunctionCallbackInfoNumberValue(context).ToChecked();
auto srcByteOffset = args[1]->NumberValue(context).ToChecked();
- if (dstDataObject->IsTypedArray()) {
+ if (dstDataObject->IsArrayBufferView()) {
- auto array = dstDataObject.As();
+ auto array = dstDataObject.As();
auto buf = array->Buffer();
auto offset = array->ByteOffset();
@@ -2230,13 +2230,13 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfoIsTypedArray()) {
- auto buf = imageOrPixelsOrOffset.As();
+ if (imageOrPixelsOrOffset->IsArrayBufferView()) {
+ auto buf = imageOrPixelsOrOffset.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -2336,13 +2336,13 @@ void WebGL2RenderingContext::TexImage3D(const v8::FunctionCallbackInfoIsTypedArray()) {
- auto buf = imageOrPixelsOrOffset.As();
+ if (imageOrPixelsOrOffset->IsArrayBufferView()) {
+ auto buf = imageOrPixelsOrOffset.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
srcOffsetValue =
@@ -2491,13 +2491,13 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfoIsTypedArray()) {
- auto buf = imageOrPixelsOrOffsetObject.As();
+ if (imageOrPixelsOrOffsetObject->IsArrayBufferView()) {
+ auto buf = imageOrPixelsOrOffsetObject.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -2576,13 +2576,13 @@ void WebGL2RenderingContext::TexSubImage3D(const v8::FunctionCallbackInfoIsTypedArray()) {
- auto buf = imageOrPixelsOrOffsetObject.As();
+ if (imageOrPixelsOrOffsetObject->IsArrayBufferView()) {
+ auto buf = imageOrPixelsOrOffsetObject.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
- auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto size = buf->ByteLength();
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -2826,11 +2826,11 @@ void WebGL2RenderingContext::Uniform1uiv(const v8::FunctionCallbackInfoIsUint32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -2884,11 +2884,11 @@ void WebGL2RenderingContext::Uniform2uiv(const v8::FunctionCallbackInfoIsUint32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -2942,12 +2942,12 @@ void WebGL2RenderingContext::Uniform3uiv(const v8::FunctionCallbackInfoIsUint32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -3000,12 +3000,12 @@ void WebGL2RenderingContext::Uniform4uiv(const v8::FunctionCallbackInfoIsUint32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -3091,11 +3091,11 @@ void WebGL2RenderingContext::UniformMatrix2x3fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -3156,12 +3156,12 @@ void WebGL2RenderingContext::UniformMatrix2x4fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -3223,13 +3223,13 @@ void WebGL2RenderingContext::UniformMatrix3x2fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -3291,11 +3291,11 @@ void WebGL2RenderingContext::UniformMatrix3x4fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
@@ -3357,12 +3357,12 @@ void WebGL2RenderingContext::UniformMatrix4x2fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast((void*) data_ptr);
canvas_native_webgl2_uniform_matrix4x2fv(
@@ -3423,11 +3423,11 @@ void WebGL2RenderingContext::UniformMatrix4x3fv(const v8::FunctionCallbackInfoIsFloat32Array()) {
- auto buf = data.As();
+ auto buf = data.As();
auto array = buf->Buffer();
auto offset = buf->ByteOffset();
auto size = buf->Length();
- auto data_ptr = (uint8_t*) array->GetBackingStore()->Data() + offset;
+ auto data_ptr = static_cast(array->GetBackingStore()->Data()) + offset;
auto data = static_cast