Skip to content

Commit

Permalink
chore: alpha 22
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Oct 21, 2023
1 parent abb9f0a commit 15edc67
Show file tree
Hide file tree
Showing 26 changed files with 2,797 additions and 2,629 deletions.
2 changes: 1 addition & 1 deletion packages/canvas-babylon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-babylon",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-chartjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-chartjs",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "ChartJS",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-media/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-media",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "Canvas media",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-phaser-ce/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-phaser-ce",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "Tools for using Phaser-ce to build native 2D games in NativeScript 👾",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-phaser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-phaser",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "Build awesome 2D games with Phaser.js and NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-pixi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-pixi",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "Plugin for using pixi.js in NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/canvas-polyfill/DOM/HTMLImageElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class HTMLImageElement extends Element {
let async = this.decoding !== 'sync';
if (this.src.startsWith('http')) {
if (!async) {
const loaded = this._asset.loadUrlSync(this.src);
const loaded = this._asset.fromUrlSync(this.src);
if (loaded) {
this.width = this._asset.width;
this.height = this._asset.height;
Expand All @@ -163,7 +163,7 @@ export class HTMLImageElement extends Element {
}
} else {
this._asset
.loadUrlAsync(this.src)
.fromUrl(this.src)
.then(() => {
this.width = this._asset.width;
this.height = this._asset.height;
Expand Down
21 changes: 19 additions & 2 deletions packages/canvas-polyfill/async/xhr/TNSXMLHttpRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,25 @@ export class TNSXMLHttpRequest {
this._response = (ArrayBuffer as any).from(res.content);
}
} else if (this.responseType === XMLHttpRequestResponseType.blob) {
const buffer = (ArrayBuffer as any).from(res.content);
this._response = new Blob([buffer]);
if ((global as any).isIOS) {
if (typeof res.content === 'string') {
const encoder = new TextEncoder();
const buffer = encoder.encode(res.content);
this._response = new Blob([buffer]);
} else {
const buffer = interop.bufferFromData(res.content);
this._response = new Blob([buffer]);
}
} else {
if (typeof res.content === 'string') {
const encoder = new TextEncoder();
const buffer = encoder.encode(res.content);
this._response = new Blob([buffer]);
} else {
const buffer = (ArrayBuffer as any).from(res.content);
this._response = new Blob([buffer]);
}
}
}

this._addToStringOnResponse();
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-polyfill/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-polyfill",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"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",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-three/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-three",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "Utilities for using THREE.js on NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22",
"description": "DOM Canvas API for NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
Binary file modified packages/canvas/platforms/android/canvas-release.aar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 15edc67

Please sign in to comment.