Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Oct 31, 2021
1 parent b70139d commit 37d0916
Show file tree
Hide file tree
Showing 67 changed files with 9,654 additions and 1,259 deletions.
8 changes: 4 additions & 4 deletions CanvasNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|

s.name = "CanvasNative"

s.version = "1.0.0-alpha.3"
s.version = "1.0.0-alpha.11"

s.summary = "A Canvas library"

Expand All @@ -18,11 +18,11 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/nativescript/canvas.git", :tag => "#{s.version}" }

s.pod_target_xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/CanvasNative/Dist"',
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/dist"',
'ENABLE_BITCODE' => 'YES',
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => '"arm64"',
}
s.swift_versions = ['4.0','4.2', '5.0']
s.vendored_frameworks = 'packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework'
s.preserve_paths = 'packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework'
s.vendored_frameworks = 'packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework'
s.preserve_paths = 'packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework'
end
2 changes: 0 additions & 2 deletions apps/demo/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require('@nativescript/canvas-polyfill');
import { init } from '@nativescript/canvas';
init();
import { Application } from '@nativescript/core';
Application.run({ moduleName: 'app-root' });
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"@angular/platform-browser": "^12.0.0",
"@angular/platform-browser-dynamic": "^12.0.0",
"@angular/router": "^12.0.0",
"@nativescript-community/gesturehandler": "^0.1.45",
"@nativescript/angular": "^12.0.0",
"@nativescript/core": "~8.1.0",
"@nativescript/plugin-tools": "2.1.0",
Expand Down
8 changes: 0 additions & 8 deletions packages/canvas-polyfill/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ if (!((global as any).TextEncoder instanceof TextEncoder)) {
});
}

if (!((global as any).ImageBitmap instanceof ImageBitmap)) {
Object.defineProperty(global, 'ImageBitmap', {
value: ImageBitmap,
configurable: true,
writable: true,
});
}

if (!((global as any).URL instanceof URL)) {
Object.defineProperty(global, 'URL', {
value: URL,
Expand Down
4 changes: 2 additions & 2 deletions packages/canvas-polyfill/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HTMLCanvasElement } from './DOM/HTMLCanvasElement';
import { HTMLVideoElement } from './DOM/HTMLVideoElement';
import { XMLDocument } from './DOM/XMLDocument';
import { Device, fromObject, View } from '@nativescript/core';
import { CanvasRenderingContext2D, WebGLRenderingContext, WebGL2RenderingContext, ImageData } from '@nativescript/canvas';
import { CanvasRenderingContext2D, WebGLRenderingContext, WebGL2RenderingContext, ImageData, ImageBitmap } from '@nativescript/canvas';

(global as any).CANVAS_RENDERER = 'true';
(global as any).WEBGL_RENDERER = 'true';
Expand All @@ -17,7 +17,7 @@ import { CanvasRenderingContext2D, WebGLRenderingContext, WebGL2RenderingContext
(global as any).window.self = (global as any).self = (global as any).self || window;
(global as any).window.HTMLImageElement = (global as any).HTMLImageElement = (global as any).HTMLImageElement || HTMLImageElement;
(global as any).window.Image = (global as any).Image = (global as any).Image || HTMLImageElement;
(global as any).window.ImageBitmap = (global as any).ImageBitmap = (global as any).ImageBitmap || HTMLImageElement;
(global as any).window.ImageBitmap = (global as any).ImageBitmap = (global as any).ImageBitmap || ImageBitmap;
(global as any).window.HTMLVideoElement = (global as any).HTMLVideoElement = (global as any).HTMLVideoElement || HTMLVideoElement;
(global as any).window.Video = (global as any).Video = (global as any).Video || HTMLVideoElement;
(global as any).window.HTMLCanvasElement = (global as any).HTMLCanvasElement = (global as any).HTMLCanvasElement || HTMLCanvasElement;
Expand Down
Loading

0 comments on commit 37d0916

Please sign in to comment.