@nativescript/canvas 2.0.0-alpha.9 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +213 -25
- package/Canvas/common.js +705 -452
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +10 -1
- package/Canvas/index.android.js +155 -52
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +8 -0
- package/Canvas/index.ios.d.ts +7 -4
- package/Canvas/index.ios.js +159 -106
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasGradient/index.d.ts +1 -3
- package/Canvas2D/CanvasGradient/index.js +1 -10
- package/Canvas2D/CanvasGradient/index.js.map +1 -1
- package/Canvas2D/CanvasPattern/index.d.ts +1 -3
- package/Canvas2D/CanvasPattern/index.js +1 -10
- package/Canvas2D/CanvasPattern/index.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +11 -5
- package/Canvas2D/CanvasRenderingContext2D/index.js +183 -245
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.js +5 -3
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +6 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.d.ts +0 -2
- package/Canvas2D/Path2D/index.js +32 -42
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Dom.js +7 -2
- package/Dom/Dom.js.map +1 -1
- package/Dom/Group.d.ts +7 -7
- package/Dom/Group.js +47 -21
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.js +2 -3
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.d.ts +1 -0
- package/Dom/Paint.js +10 -5
- package/Dom/Paint.js.map +1 -1
- package/Dom/Text.js +3 -4
- package/Dom/Text.js.map +1 -1
- package/Dom/shapes/Circle.js +2 -3
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Path.js +1 -0
- package/Dom/shapes/Path.js.map +1 -1
- package/Dom/shapes/Points.js +1 -2
- package/Dom/shapes/Points.js.map +1 -1
- package/Dom/shapes/Rect.js +2 -2
- package/Dom/shapes/Rect.js.map +1 -1
- package/Dom/shapes/RoundedRect.js +8 -9
- package/Dom/shapes/RoundedRect.js.map +1 -1
- package/ImageAsset/index.d.ts +2 -2
- package/ImageAsset/index.js +33 -37
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.d.ts +0 -2
- package/ImageBitmap/index.js +47 -33
- package/ImageBitmap/index.js.map +1 -1
- package/LICENSE +201 -0
- package/SVG/SVG.js +1 -1
- package/SVG/SVG.js.map +1 -1
- package/TextDecoder/index.d.ts +0 -2
- package/TextDecoder/index.js +3 -12
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.d.ts +0 -2
- package/TextEncoder/index.js +4 -13
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.d.ts +4 -12
- package/WebGL/WebGLExtensions/index.js +27 -77
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLProgram.d.ts +0 -1
- package/WebGL/WebGLProgram.js +0 -3
- package/WebGL/WebGLProgram.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.d.ts +1 -3
- package/WebGL/WebGLRenderingContext/common.js +3 -13
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +19 -17
- package/WebGL/WebGLRenderingContext/index.js +354 -728
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/common.d.ts +2 -2
- package/WebGL2/WebGL2RenderingContext/common.js +2 -2
- package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +116 -285
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/angular/esm2020/index.mjs +4 -4
- package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
- package/angular/package.json +2 -2
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/android/include.gradle +15 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +132 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +144 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2808 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +5847 -2633
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +264 -136
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +144 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2808 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +5847 -2633
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5847 -2633
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +43 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/Podfile +5 -2
- package/platforms/ios/build.xcconfig +3 -3
- package/platforms/ios/src/CanvasModule.h +0 -2
- package/platforms/ios/src/CanvasModule.mm +4 -4
- package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
- package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
- package/platforms/ios/src/cpp/Caches.cpp +35 -0
- package/platforms/ios/src/cpp/Caches.h +190 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1593 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.h +16 -34
- package/platforms/ios/src/cpp/Common.h +30 -0
- package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
- package/platforms/ios/src/cpp/Helpers.h +336 -38
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.h +46 -12
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +42 -16
- package/platforms/ios/src/cpp/JSICallback.h +83 -5
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
- package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
- package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
- package/platforms/ios/src/cpp/ObjectWrapperImpl.h +33 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +55 -0
- package/platforms/ios/src/cpp/OneByteStringResource.h +36 -0
- package/platforms/ios/src/cpp/PerIsolateData.cpp +49 -0
- package/platforms/ios/src/cpp/PerIsolateData.h +54 -0
- package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
- package/platforms/ios/src/cpp/RafImpl.h +11 -8
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +193 -0
- package/platforms/ios/src/cpp/TextDecoderImpl.h +23 -13
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
- package/platforms/ios/src/cpp/TextEncoderImpl.h +21 -12
- package/platforms/ios/src/cpp/URLImpl.cpp +464 -0
- package/platforms/ios/src/cpp/URLImpl.h +121 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +29 -13
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +49 -12
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2837 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +1334 -21
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +207 -0
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +27 -13
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +807 -0
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +173 -13
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +499 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +422 -12
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +51 -12
- package/platforms/ios/src/cpp/gl.h +57 -7
- package/platforms/ios/src/cpp/gl3stub.c +425 -0
- package/platforms/ios/src/cpp/gl3stub.h +665 -0
- package/platforms/ios/src/cpp/gles3jni.h +37 -0
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +91 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +42 -7
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +47 -11
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +41 -6
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6845 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +3217 -388
- package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +18 -17
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +16 -36
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +67 -12
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +45 -9
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +136 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +88 -12
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +26 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +26 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +306 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +41 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +39 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +42 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +110 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +149 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +38 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +157 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -13
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4564 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1790 -342
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +41 -4
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +45 -11
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +43 -4
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +44 -4
- package/platforms/ios/src/module.modulemap +1 -0
- package/{pods → src-native/ios}/NativeScript.podspec +12 -25
- package/typings/objc!CanvasNative.d.ts +2038 -0
- package/typings/objc!CanvasNative.js +1 -0
- package/typings/objc!CanvasNative.js.map +1 -0
- package/utils.d.ts +3 -1
- package/utils.js +7 -20
- package/utils.js.map +1 -1
- package/angular/nativescript-canvas-angular.d.ts +0 -5
- package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
- package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
- package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
- package/platforms/ios/src/cpp/RafImpl.mm +0 -10
- package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
- package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
- package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6156
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2867
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1972
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
- package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
- package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
- package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4543
- package/pods/Headers/jsi/decorator.h +0 -770
- package/pods/Headers/jsi/instrumentation.h +0 -117
- package/pods/Headers/jsi/jsi-inl.h +0 -338
- package/pods/Headers/jsi/jsi.h +0 -1571
- package/pods/Headers/jsi/jsilib.h +0 -59
- package/pods/Headers/jsi/threadsafe.h +0 -79
- package/pods/Headers/v8runtime/HostProxy.h +0 -71
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -74
- package/pods/Headers/v8runtime/V8PointerValue.h +0 -44
- package/pods/Headers/v8runtime/V8Runtime.h +0 -240
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
- /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
- /package/{pods → src-native/ios}/Headers/include/APIDesign.md +0 -0
- /package/{pods → src-native/ios}/Headers/include/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/DIR_METADATA +0 -0
- /package/{pods → src-native/ios}/Headers/include/OWNERS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/OWNERS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/README.md +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/allocation.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/common.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/custom-space.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/default-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/ephemeron-pair.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/explicit-management.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/garbage-collected.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-consistency.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-state.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/api-constants.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/gc-info.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/logging.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/name-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/persistent-node.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/write-barrier.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/liveness-broker.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/macros.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/member.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/name-provider.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/object-size-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/persistent.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/prefinalizer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/process-heap-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/sentinel-pointer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/source-location.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/testing.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/trace-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/type-traits.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/visitor.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol-1.2.json +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol-1.3.json +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol.pdl +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffitarget.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform-export.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/v8-tracing.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-array-buffer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-callbacks.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-container.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-context.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-cppgc.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-data.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-date.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-debug.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-embedder-heap.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-embedder-state-scope.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-exception.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-extension.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-external.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-fast-api-calls.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-forward.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-function-callback.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-function.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-initialization.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-inspector-protocol.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-inspector.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-internal.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-isolate.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-json.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-local-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-locker.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-maybe.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-memory-span.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-message.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-metrics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-microtask-queue.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-microtask.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-object.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-persistent-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-primitive-object.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-primitive.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-profiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-promise.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-proxy.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-regexp.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-snapshot.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-template.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-traced-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-typed-array.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-unwinder-state.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-unwinder.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value-serializer-version.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value-serializer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-version-string.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-version.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-weak-callback-info.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8config.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/InspectorServer.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/JsV8InspectorClient.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/base64.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/address-region.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomic-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/base-export.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/bits.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/build_config.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/compiler-specific.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/export-template.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/flags.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/immediate-crash.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/lazy-instance.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/logging.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/macros.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/memory.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/once.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/optional.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/mutex.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/semaphore.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/v8-time.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/wrappers.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/template-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/common/checks.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/common/globals.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/debug/debug-interface.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/debug/interface-types.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/init/v8.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/custom-preview.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/injected-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/inspected-context.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/search-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-16.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-regex.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/value-mirror.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/libplatform/default-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/logging/tracing-flags.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/numbers/conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/tracing/trace-event.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/utils/allocation.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/utils/vector.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/v8-inspector-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ArgConverter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ArrayAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Caches.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ClassBuilder.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Common.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ConcurrentMap.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ConcurrentQueue.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Console.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Constants.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/DataWrapper.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/DictionaryAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ExtVector.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FFICall.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FastEnumerationAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FunctionReference.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Helpers.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/InlineFunctions.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Interop.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/KnownUnknownClassPair.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Metadata.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/MetadataBuilder.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/MetadataInlines.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ModuleInternal.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/NSDataAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/NativeScriptException.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ObjectManager.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/OneByteStringResource.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Pointer.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/PromiseProxy.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Reference.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Runtime.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/RuntimeConfig.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SetTimeout.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SimpleAllocator.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/StringHasher.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SymbolIterator.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SymbolLoader.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/TNSDerivedClass.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/TSHelpers.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Tasks.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/UnmanagedType.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/WeakRef.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Worker.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/robin_hood.h +0 -0
package/Canvas/common.js
CHANGED
|
@@ -7,65 +7,720 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { CSSType, PercentLength, View,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
import { CSSType, PercentLength, View, Utils, Property, booleanConverter } from '@nativescript/core';
|
|
11
|
+
const defaultGLOptions = {
|
|
12
|
+
alpha: true,
|
|
13
|
+
antialias: true,
|
|
14
|
+
depth: true,
|
|
15
|
+
failIfMajorPerformanceCaveat: false,
|
|
16
|
+
powerPreference: 'default',
|
|
17
|
+
premultipliedAlpha: true,
|
|
18
|
+
preserveDrawingBuffer: false,
|
|
19
|
+
stencil: false,
|
|
20
|
+
desynchronized: false,
|
|
21
|
+
xrCompatible: false,
|
|
22
|
+
};
|
|
23
|
+
const default2DOptions = {
|
|
24
|
+
alpha: true,
|
|
25
|
+
antialias: true,
|
|
26
|
+
depth: true,
|
|
27
|
+
failIfMajorPerformanceCaveat: false,
|
|
28
|
+
powerPreference: 'default',
|
|
29
|
+
premultipliedAlpha: true,
|
|
30
|
+
preserveDrawingBuffer: false,
|
|
31
|
+
stencil: false,
|
|
32
|
+
desynchronized: false,
|
|
33
|
+
xrCompatible: false,
|
|
34
|
+
};
|
|
35
|
+
export class DOMRectReadOnly {
|
|
36
|
+
constructor(x, y, width, height, top, right, bottom, left) {
|
|
37
|
+
this.x = x;
|
|
38
|
+
this.y = y;
|
|
39
|
+
this.width = width;
|
|
40
|
+
this.height = height;
|
|
41
|
+
this.left = left ?? x;
|
|
42
|
+
this.top = top ?? y;
|
|
43
|
+
this.right = right ?? x + width;
|
|
44
|
+
this.bottom = bottom ?? y + height;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export class DOMRect extends DOMRectReadOnly {
|
|
48
|
+
constructor(x, y, width, height, top, right, bottom, left) {
|
|
49
|
+
super(x, y, width, height, top, right, bottom, left);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export class Event {
|
|
53
|
+
constructor(type, options) {
|
|
54
|
+
this.bubbles = false;
|
|
55
|
+
this.cancelable = false;
|
|
56
|
+
this.composed = false;
|
|
57
|
+
this.type = type;
|
|
58
|
+
this.bubbles = options?.bubbles ?? false;
|
|
59
|
+
this.cancelable = options?.cancelable ?? false;
|
|
60
|
+
this.cancelable = options?.cancelable ?? false;
|
|
61
|
+
this.composed = options?.composed ?? false;
|
|
19
62
|
}
|
|
20
63
|
preventDefault() { }
|
|
21
64
|
stopPropagation() { }
|
|
22
65
|
}
|
|
23
|
-
export class
|
|
24
|
-
constructor(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
66
|
+
export class UIEvent extends Event {
|
|
67
|
+
constructor(type, options) {
|
|
68
|
+
super(type, options);
|
|
69
|
+
this.detail = options?.detail ?? 0;
|
|
70
|
+
this.view = options?.view ?? null;
|
|
71
|
+
this.sourceCapabilities = options.sourceCapabilities ?? {};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class MouseEvent extends UIEvent {
|
|
75
|
+
constructor(type, options) {
|
|
76
|
+
super(type, options);
|
|
77
|
+
this.screenX = options?.screenX ?? 0;
|
|
78
|
+
this.screenY = options?.screenY ?? 0;
|
|
79
|
+
this.clientX = options?.clientX ?? 0;
|
|
80
|
+
this.clientY = options?.clientY ?? 0;
|
|
81
|
+
this.ctrlKey = options?.ctrlKey ?? false;
|
|
82
|
+
this.shiftKey = options?.ctrlKey ?? false;
|
|
83
|
+
this.altKey = options?.ctrlKey ?? false;
|
|
84
|
+
this.metaKey = options?.ctrlKey ?? false;
|
|
85
|
+
this.button = options?.button ?? 0;
|
|
86
|
+
this.buttons = options?.buttons ?? 0;
|
|
87
|
+
this.relatedTarget = options?.relatedTarget ?? null;
|
|
88
|
+
this.region = options?.region ?? null;
|
|
89
|
+
this.movementX = options?.movementX ?? 0;
|
|
90
|
+
this.movementY = options?.movementY ?? 0;
|
|
91
|
+
this.pageX = options?.pageX ?? 0;
|
|
92
|
+
this.pageY = options?.pageY ?? 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export class PointerEvent extends MouseEvent {
|
|
96
|
+
constructor(type, options) {
|
|
97
|
+
super(type, options);
|
|
98
|
+
this.pointerType = options?.pointerType ?? '';
|
|
99
|
+
this.type = type;
|
|
100
|
+
this.pointerId = options?.pointerId ?? 0;
|
|
101
|
+
this.width = options?.width ?? 1;
|
|
102
|
+
this.height = options?.height ?? 1;
|
|
103
|
+
this.pressure = options?.pressure ?? 0;
|
|
104
|
+
this.tangentialPressure = options?.tangentialPressure ?? 0;
|
|
105
|
+
this.tiltX = options?.tiltX ?? 0;
|
|
106
|
+
this.tiltY = options?.tiltY ?? 0;
|
|
107
|
+
this.twist = options?.twist ?? 0;
|
|
108
|
+
this.isPrimary = options?.isPrimary ?? false;
|
|
109
|
+
}
|
|
110
|
+
preventDefault() { }
|
|
111
|
+
stopPropagation() { }
|
|
112
|
+
}
|
|
113
|
+
export class Touch {
|
|
114
|
+
constructor(options) {
|
|
115
|
+
this.identifier = options.identifier;
|
|
116
|
+
this.target = options.target;
|
|
117
|
+
this.clientX = options?.clientX ?? 0;
|
|
118
|
+
this.clientY = options?.clientY ?? 0;
|
|
119
|
+
this.screenX = options?.screenX ?? 0;
|
|
120
|
+
this.screenY = options?.screenY ?? 0;
|
|
121
|
+
this.pageX = options?.pageX ?? 0;
|
|
122
|
+
this.pageY = options?.pageY ?? 0;
|
|
123
|
+
this.radiusX = options?.radiusX ?? 0;
|
|
124
|
+
this.radiusY = options?.radiusY ?? 0;
|
|
125
|
+
this.rotationAngle = options?.rotationAngle ?? 0;
|
|
126
|
+
this.force = options?.force ?? 0;
|
|
127
|
+
}
|
|
128
|
+
preventDefault() { }
|
|
129
|
+
stopPropagation() { }
|
|
130
|
+
}
|
|
131
|
+
export class TouchList {
|
|
132
|
+
static fromList(list) {
|
|
133
|
+
const ret = new TouchList();
|
|
134
|
+
ret._list = list;
|
|
135
|
+
return ret;
|
|
136
|
+
}
|
|
137
|
+
static empty() {
|
|
138
|
+
const ret = new TouchList();
|
|
139
|
+
ret._list = [];
|
|
140
|
+
return ret;
|
|
141
|
+
}
|
|
142
|
+
item(index) {
|
|
143
|
+
return this._list[index];
|
|
144
|
+
}
|
|
145
|
+
get length() {
|
|
146
|
+
return this._list.length;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export class TouchEvent extends UIEvent {
|
|
150
|
+
constructor(type, options) {
|
|
151
|
+
super(type, options);
|
|
152
|
+
this.touches = options?.touches ?? TouchList.empty();
|
|
153
|
+
this.targetTouches = options?.touches ?? TouchList.empty();
|
|
154
|
+
this.changedTouches = options?.changedTouches ?? [];
|
|
155
|
+
this.altKey = options?.altKey ?? false;
|
|
156
|
+
this.metaKey = options?.metaKey ?? false;
|
|
157
|
+
this.ctrlKey = options?.ctrlKey ?? false;
|
|
158
|
+
this.shiftKey = options?.shiftKey ?? false;
|
|
31
159
|
}
|
|
32
160
|
preventDefault() { }
|
|
33
161
|
stopPropagation() { }
|
|
34
162
|
}
|
|
35
|
-
|
|
163
|
+
export class WheelEvent extends UIEvent {
|
|
164
|
+
constructor(type, options) {
|
|
165
|
+
super('wheel', options);
|
|
166
|
+
this.deltaX = options?.deltaX ?? 0;
|
|
167
|
+
this.deltaY = options?.deltaY ?? 0;
|
|
168
|
+
this.deltaZ = options?.deltaZ ?? 0;
|
|
169
|
+
this.deltaMode = options?.deltaMode ?? 0;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
class Rectangle {
|
|
173
|
+
constructor(top, left, width, height) {
|
|
174
|
+
this.top = top;
|
|
175
|
+
this.left = left;
|
|
176
|
+
// check name of fields!
|
|
177
|
+
this.width = width;
|
|
178
|
+
this.height = height;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
36
181
|
export const ignorePixelScalingProperty = new Property({
|
|
37
182
|
name: 'ignorePixelScaling',
|
|
38
183
|
defaultValue: false,
|
|
39
184
|
valueConverter: booleanConverter,
|
|
40
185
|
});
|
|
41
|
-
|
|
186
|
+
export const upscaleProperty = new Property({
|
|
187
|
+
name: 'upscale',
|
|
188
|
+
defaultValue: false,
|
|
189
|
+
valueConverter: booleanConverter,
|
|
190
|
+
});
|
|
191
|
+
export const ignoreTouchEventsProperty = new Property({
|
|
192
|
+
name: 'ignoreTouchEvents',
|
|
193
|
+
defaultValue: false,
|
|
194
|
+
valueConverter: booleanConverter,
|
|
195
|
+
});
|
|
196
|
+
export const doc = {
|
|
197
|
+
defaultView: {
|
|
198
|
+
getComputedStyle: function () {
|
|
199
|
+
return null;
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
};
|
|
42
203
|
let CanvasBase = class CanvasBase extends View {
|
|
43
204
|
constructor() {
|
|
44
205
|
super();
|
|
45
206
|
this._isCustom = false;
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
207
|
+
this._pointerMoveCallbacks = [];
|
|
208
|
+
this._pointerUpCallbacks = [];
|
|
209
|
+
this._pointerDownCallbacks = [];
|
|
210
|
+
this._pointerCancelCallbacks = [];
|
|
211
|
+
// For mouse compat because wtf
|
|
212
|
+
this._mouseMoveCallbacks = [];
|
|
213
|
+
this._mouseUpCallbacks = [];
|
|
214
|
+
this._mouseDownCallbacks = [];
|
|
215
|
+
this._mouseCancelCallbacks = [];
|
|
216
|
+
this._mouseWheelCallbacks = [];
|
|
217
|
+
this._touchStartCallbacks = new Array();
|
|
218
|
+
this._touchEndCallbacks = new Array();
|
|
219
|
+
this._touchMoveCallbacks = new Array();
|
|
220
|
+
this._touchCancelCallbacks = new Array();
|
|
221
|
+
this._touches = [];
|
|
222
|
+
this._touchesById = [];
|
|
223
|
+
this._lastPointerEventById = new Array();
|
|
53
224
|
this._classList = new Set();
|
|
54
225
|
}
|
|
226
|
+
get ownerDocument() {
|
|
227
|
+
return window?.document ?? doc;
|
|
228
|
+
}
|
|
55
229
|
addEventListener(arg, callback, thisArg) {
|
|
56
230
|
super.addEventListener(arg, callback, thisArg);
|
|
57
|
-
if (
|
|
58
|
-
|
|
231
|
+
if (typeof arg !== 'string') {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const eventtype = arg.toLowerCase();
|
|
235
|
+
switch (eventtype) {
|
|
236
|
+
case 'mousemove':
|
|
237
|
+
this._mouseMoveCallbacks.push(callback);
|
|
238
|
+
break;
|
|
239
|
+
case 'pointermove':
|
|
240
|
+
this._pointerMoveCallbacks.push(callback);
|
|
241
|
+
break;
|
|
242
|
+
case 'mousedown':
|
|
243
|
+
this._mouseDownCallbacks.push(callback);
|
|
244
|
+
break;
|
|
245
|
+
case 'pointerdown':
|
|
246
|
+
this._pointerDownCallbacks.push(callback);
|
|
247
|
+
break;
|
|
248
|
+
case 'mouseup':
|
|
249
|
+
this._mouseUpCallbacks.push(callback);
|
|
250
|
+
break;
|
|
251
|
+
case 'pointerup':
|
|
252
|
+
this._pointerUpCallbacks.push(callback);
|
|
253
|
+
break;
|
|
254
|
+
case 'moveout':
|
|
255
|
+
case 'mousecancel':
|
|
256
|
+
this._mouseCancelCallbacks.push(callback);
|
|
257
|
+
break;
|
|
258
|
+
case 'pointercancel':
|
|
259
|
+
this._pointerCancelCallbacks.push(callback);
|
|
260
|
+
break;
|
|
261
|
+
case 'touchstart':
|
|
262
|
+
this._touchStartCallbacks.push(callback);
|
|
263
|
+
break;
|
|
264
|
+
case 'touchend':
|
|
265
|
+
this._touchEndCallbacks.push(callback);
|
|
266
|
+
break;
|
|
267
|
+
case 'touchmove':
|
|
268
|
+
this._touchMoveCallbacks.push(callback);
|
|
269
|
+
break;
|
|
270
|
+
case 'touchcancel':
|
|
271
|
+
this._touchCancelCallbacks.push(callback);
|
|
272
|
+
break;
|
|
273
|
+
case 'wheel':
|
|
274
|
+
case 'mousewheel':
|
|
275
|
+
case 'dommousescroll':
|
|
276
|
+
this._mouseWheelCallbacks.push(callback);
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
_removeItemFromArray(array, item) {
|
|
281
|
+
const index = array.indexOf(item);
|
|
282
|
+
if (index !== -1) {
|
|
283
|
+
array.splice(index, 1);
|
|
59
284
|
}
|
|
60
285
|
}
|
|
61
286
|
removeEventListener(arg, callback, thisArg) {
|
|
62
287
|
super.removeEventListener(arg, callback, thisArg);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
this.
|
|
288
|
+
const eventtype = arg.toLowerCase();
|
|
289
|
+
switch (eventtype) {
|
|
290
|
+
case 'mousemove':
|
|
291
|
+
this._removeItemFromArray(this._mouseMoveCallbacks, callback);
|
|
292
|
+
break;
|
|
293
|
+
case 'pointermove':
|
|
294
|
+
this._removeItemFromArray(this._pointerMoveCallbacks, callback);
|
|
295
|
+
break;
|
|
296
|
+
case 'mousedown':
|
|
297
|
+
this._removeItemFromArray(this._mouseDownCallbacks, callback);
|
|
298
|
+
break;
|
|
299
|
+
case 'pointerdown':
|
|
300
|
+
this._removeItemFromArray(this._pointerDownCallbacks, callback);
|
|
301
|
+
break;
|
|
302
|
+
case 'mouseup':
|
|
303
|
+
this._removeItemFromArray(this._mouseUpCallbacks, callback);
|
|
304
|
+
break;
|
|
305
|
+
case 'pointerup':
|
|
306
|
+
this._removeItemFromArray(this._pointerUpCallbacks, callback);
|
|
307
|
+
break;
|
|
308
|
+
case 'moveout':
|
|
309
|
+
case 'mousecancel':
|
|
310
|
+
this._removeItemFromArray(this._mouseCancelCallbacks, callback);
|
|
311
|
+
break;
|
|
312
|
+
case 'pointercancel':
|
|
313
|
+
this._removeItemFromArray(this._pointerCancelCallbacks, callback);
|
|
314
|
+
break;
|
|
315
|
+
case 'touchstart':
|
|
316
|
+
this._removeItemFromArray(this._touchStartCallbacks, callback);
|
|
317
|
+
break;
|
|
318
|
+
case 'touchend':
|
|
319
|
+
this._removeItemFromArray(this._touchEndCallbacks, callback);
|
|
320
|
+
break;
|
|
321
|
+
case 'touchmove':
|
|
322
|
+
this._removeItemFromArray(this._touchMoveCallbacks, callback);
|
|
323
|
+
break;
|
|
324
|
+
case 'touchcancel':
|
|
325
|
+
this._removeItemFromArray(this._touchCancelCallbacks, callback);
|
|
326
|
+
break;
|
|
327
|
+
case 'wheel':
|
|
328
|
+
case 'mousewheel':
|
|
329
|
+
case 'dommousescroll':
|
|
330
|
+
this._removeItemFromArray(this._mouseWheelCallbacks, callback);
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
_moveCallback(pointers) {
|
|
335
|
+
const hasPointerCallbacks = this._pointerMoveCallbacks.length > 0;
|
|
336
|
+
const hasMouseCallbacks = this._mouseMoveCallbacks.length > 0;
|
|
337
|
+
if (hasPointerCallbacks || hasMouseCallbacks) {
|
|
338
|
+
for (const pointer of pointers) {
|
|
339
|
+
const pointerId = pointer.ptrId;
|
|
340
|
+
const index = this._lastPointerEventById.findIndex((item) => {
|
|
341
|
+
return item?.pointerId === pointerId;
|
|
342
|
+
});
|
|
343
|
+
let previousEvent;
|
|
344
|
+
if (index > -1) {
|
|
345
|
+
previousEvent = this._lastPointerEventById[index];
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
previousEvent = { pointerId, x: 0, y: 0 };
|
|
349
|
+
}
|
|
350
|
+
if (hasPointerCallbacks) {
|
|
351
|
+
const event = new PointerEvent('pointermove', {
|
|
352
|
+
pointerType: 'touch',
|
|
353
|
+
pointerId,
|
|
354
|
+
clientX: pointer.x,
|
|
355
|
+
clientY: pointer.y,
|
|
356
|
+
screenX: pointer.x,
|
|
357
|
+
screenY: pointer.y,
|
|
358
|
+
pageX: pointer.x,
|
|
359
|
+
pageY: pointer.y,
|
|
360
|
+
movementX: pointer.x - previousEvent.x,
|
|
361
|
+
movementY: pointer.y - previousEvent.y,
|
|
362
|
+
isPrimary: pointer.isPrimary,
|
|
363
|
+
button: -1,
|
|
364
|
+
});
|
|
365
|
+
for (const callback of this._pointerMoveCallbacks) {
|
|
366
|
+
callback(event);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
if (hasMouseCallbacks) {
|
|
370
|
+
const event = new MouseEvent('mousemove', {
|
|
371
|
+
clientX: pointer.x,
|
|
372
|
+
clientY: pointer.y,
|
|
373
|
+
screenX: pointer.x,
|
|
374
|
+
screenY: pointer.y,
|
|
375
|
+
pageX: pointer.x,
|
|
376
|
+
pageY: pointer.y,
|
|
377
|
+
movementX: pointer.x - previousEvent.x,
|
|
378
|
+
movementY: pointer.y - previousEvent.y,
|
|
379
|
+
button: -1,
|
|
380
|
+
});
|
|
381
|
+
for (const callback of this._mouseMoveCallbacks) {
|
|
382
|
+
callback(event);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (index > -1) {
|
|
386
|
+
this._lastPointerEventById[index] = { pointerId, x: pointer.x, y: pointer.y };
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (this._touchMoveCallbacks.length > 0) {
|
|
391
|
+
const changedTouches = [];
|
|
392
|
+
for (const pointer of pointers) {
|
|
393
|
+
changedTouches.push(new Touch({
|
|
394
|
+
identifier: pointer.ptrId,
|
|
395
|
+
target: null,
|
|
396
|
+
clientX: pointer.x,
|
|
397
|
+
clientY: pointer.y,
|
|
398
|
+
screenX: pointer.x,
|
|
399
|
+
screenY: pointer.y,
|
|
400
|
+
pageX: pointer.x,
|
|
401
|
+
pageY: pointer.y,
|
|
402
|
+
}));
|
|
403
|
+
}
|
|
404
|
+
const touches = TouchList.fromList(this._touches);
|
|
405
|
+
const event = new TouchEvent('touchmove', {
|
|
406
|
+
touches,
|
|
407
|
+
targetTouches: touches,
|
|
408
|
+
changedTouches,
|
|
409
|
+
});
|
|
410
|
+
for (const callback of this._touchMoveCallbacks) {
|
|
411
|
+
callback(event);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
_upCallback(ptrId, x, y, isPrimary) {
|
|
416
|
+
const hasPointerCallbacks = this._pointerUpCallbacks.length > 0;
|
|
417
|
+
const hasMouseCallbacks = this._mouseUpCallbacks.length > 0;
|
|
418
|
+
if (hasPointerCallbacks || hasMouseCallbacks) {
|
|
419
|
+
const pointerId = ptrId;
|
|
420
|
+
if (hasPointerCallbacks) {
|
|
421
|
+
const event = new PointerEvent('pointerup', {
|
|
422
|
+
pointerType: 'touch',
|
|
423
|
+
pointerId,
|
|
424
|
+
clientX: x,
|
|
425
|
+
clientY: y,
|
|
426
|
+
screenX: x,
|
|
427
|
+
screenY: y,
|
|
428
|
+
isPrimary,
|
|
429
|
+
pageX: x,
|
|
430
|
+
pageY: y,
|
|
431
|
+
});
|
|
432
|
+
for (const callback of this._pointerUpCallbacks) {
|
|
433
|
+
callback(event);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
if (hasMouseCallbacks) {
|
|
437
|
+
const event = new MouseEvent('mouseup', {
|
|
438
|
+
clientX: x,
|
|
439
|
+
clientY: y,
|
|
440
|
+
screenX: x,
|
|
441
|
+
screenY: y,
|
|
442
|
+
pageX: x,
|
|
443
|
+
pageY: y,
|
|
444
|
+
});
|
|
445
|
+
for (const callback of this._mouseUpCallbacks) {
|
|
446
|
+
callback(event);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
const index = this._lastPointerEventById.findIndex((item) => {
|
|
450
|
+
return item?.pointerId === pointerId;
|
|
451
|
+
});
|
|
452
|
+
if (index > -1) {
|
|
453
|
+
this._lastPointerEventById.splice(index, 1);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const length = this._touches.length;
|
|
457
|
+
for (let i = 0; i < length; i++) {
|
|
458
|
+
if (this._touches[i].identifier == ptrId) {
|
|
459
|
+
this._touches.splice(i, 1);
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (this._touchEndCallbacks.length > 0) {
|
|
464
|
+
const touches = TouchList.fromList(this._touches);
|
|
465
|
+
const changedTouches = [
|
|
466
|
+
new Touch({
|
|
467
|
+
identifier: ptrId,
|
|
468
|
+
target: null,
|
|
469
|
+
clientX: x,
|
|
470
|
+
clientY: y,
|
|
471
|
+
screenX: x,
|
|
472
|
+
screenY: y,
|
|
473
|
+
pageX: x,
|
|
474
|
+
pageY: y,
|
|
475
|
+
}),
|
|
476
|
+
];
|
|
477
|
+
const event = new TouchEvent('touchend', {
|
|
478
|
+
touches,
|
|
479
|
+
targetTouches: touches,
|
|
480
|
+
changedTouches,
|
|
481
|
+
});
|
|
482
|
+
for (const callback of this._touchEndCallbacks) {
|
|
483
|
+
callback(event);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
_downCallback(ptrId, x, y, isPrimary = false) {
|
|
488
|
+
const hasPointerCallbacks = this._pointerDownCallbacks.length > 0;
|
|
489
|
+
const hasMouseCallbacks = this._mouseDownCallbacks.length > 0;
|
|
490
|
+
if (hasPointerCallbacks || hasMouseCallbacks) {
|
|
491
|
+
const pointerId = ptrId;
|
|
492
|
+
if (hasPointerCallbacks) {
|
|
493
|
+
const event = new PointerEvent('pointerdown', {
|
|
494
|
+
pointerType: 'touch',
|
|
495
|
+
pointerId,
|
|
496
|
+
clientX: x,
|
|
497
|
+
clientY: y,
|
|
498
|
+
screenX: x,
|
|
499
|
+
screenY: y,
|
|
500
|
+
isPrimary,
|
|
501
|
+
pageX: x,
|
|
502
|
+
pageY: y,
|
|
503
|
+
});
|
|
504
|
+
for (const callback of this._pointerDownCallbacks) {
|
|
505
|
+
callback(event);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
if (hasMouseCallbacks) {
|
|
509
|
+
const event = new MouseEvent('mousedown', {
|
|
510
|
+
clientX: x,
|
|
511
|
+
clientY: y,
|
|
512
|
+
screenX: x,
|
|
513
|
+
screenY: y,
|
|
514
|
+
pageX: x,
|
|
515
|
+
pageY: y,
|
|
516
|
+
});
|
|
517
|
+
for (const callback of this._mouseDownCallbacks) {
|
|
518
|
+
callback(event);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
this._lastPointerEventById.push({ pointerId, x, y });
|
|
522
|
+
}
|
|
523
|
+
if (this._touchStartCallbacks.length > 0) {
|
|
524
|
+
const touch = new Touch({
|
|
525
|
+
identifier: ptrId,
|
|
526
|
+
target: this,
|
|
527
|
+
clientX: x,
|
|
528
|
+
clientY: y,
|
|
529
|
+
screenX: x,
|
|
530
|
+
screenY: y,
|
|
531
|
+
pageX: x,
|
|
532
|
+
pageY: y,
|
|
533
|
+
});
|
|
534
|
+
this._touches.push(touch);
|
|
535
|
+
this._touchesById[ptrId] = touch;
|
|
536
|
+
const touches = TouchList.fromList(this._touches);
|
|
537
|
+
const touchEvent = new TouchEvent('touchstart', {
|
|
538
|
+
touches,
|
|
539
|
+
targetTouches: touches,
|
|
540
|
+
changedTouches: this._touches,
|
|
541
|
+
});
|
|
542
|
+
for (const callback of this._touchStartCallbacks) {
|
|
543
|
+
callback(touchEvent);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
_cancelCallback(ptrid, x, y, isPrimary = false) {
|
|
548
|
+
const hasPointerCallbacks = this._pointerCancelCallbacks.length > 0;
|
|
549
|
+
const hasMouseCallbacks = this._mouseCancelCallbacks.length > 0;
|
|
550
|
+
if (hasPointerCallbacks || hasMouseCallbacks) {
|
|
551
|
+
const pointerId = ptrid;
|
|
552
|
+
if (hasPointerCallbacks) {
|
|
553
|
+
const event = new PointerEvent('pointercancel', {
|
|
554
|
+
pointerType: 'touch',
|
|
555
|
+
pointerId,
|
|
556
|
+
clientX: x,
|
|
557
|
+
clientY: y,
|
|
558
|
+
screenX: x,
|
|
559
|
+
screenY: y,
|
|
560
|
+
pageX: x,
|
|
561
|
+
pageY: y,
|
|
562
|
+
isPrimary,
|
|
563
|
+
});
|
|
564
|
+
for (const callback of this._pointerCancelCallbacks) {
|
|
565
|
+
callback(event);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
if (hasMouseCallbacks) {
|
|
569
|
+
const event = new MouseEvent('mouseout', {
|
|
570
|
+
clientX: x,
|
|
571
|
+
clientY: y,
|
|
572
|
+
screenX: x,
|
|
573
|
+
screenY: y,
|
|
574
|
+
pageX: x,
|
|
575
|
+
pageY: y,
|
|
576
|
+
});
|
|
577
|
+
for (const callback of this._mouseCancelCallbacks) {
|
|
578
|
+
callback(event);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
if (this._touchCancelCallbacks.length > 0) {
|
|
583
|
+
const touch = new Touch({
|
|
584
|
+
identifier: ptrid,
|
|
585
|
+
target: this,
|
|
586
|
+
clientX: x,
|
|
587
|
+
clientY: y,
|
|
588
|
+
screenX: x,
|
|
589
|
+
screenY: y,
|
|
590
|
+
pageX: x,
|
|
591
|
+
pageY: y,
|
|
592
|
+
});
|
|
593
|
+
const touchesList = [touch];
|
|
594
|
+
const touchesById = [];
|
|
595
|
+
touchesById[ptrid] = touch;
|
|
596
|
+
const touches = TouchList.fromList(touchesList);
|
|
597
|
+
const touchEvent = new TouchEvent('touchcancel', {
|
|
598
|
+
touches,
|
|
599
|
+
targetTouches: touches,
|
|
600
|
+
changedTouches: touchesList,
|
|
601
|
+
});
|
|
602
|
+
for (const callback of this._touchCancelCallbacks) {
|
|
603
|
+
callback(touchEvent);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
_pinchCallback(data) {
|
|
608
|
+
// move callback
|
|
609
|
+
const hasPointerCallbacks = this._pointerMoveCallbacks.length > 0;
|
|
610
|
+
const hasMouseCallbacks = this._mouseMoveCallbacks.length > 0;
|
|
611
|
+
const hasMouseWheel = this._mouseWheelCallbacks.length > 0;
|
|
612
|
+
if (hasPointerCallbacks || hasMouseCallbacks || hasMouseWheel) {
|
|
613
|
+
for (const pointer of data.pointers) {
|
|
614
|
+
const pointerId = pointer.ptrId;
|
|
615
|
+
const index = this._lastPointerEventById.findIndex((item) => {
|
|
616
|
+
return item?.pointerId === pointerId;
|
|
617
|
+
});
|
|
618
|
+
let previousEvent;
|
|
619
|
+
if (index > -1) {
|
|
620
|
+
previousEvent = this._lastPointerEventById[index];
|
|
621
|
+
}
|
|
622
|
+
else {
|
|
623
|
+
previousEvent = { pointerId, x: 0, y: 0 };
|
|
624
|
+
}
|
|
625
|
+
if (hasPointerCallbacks) {
|
|
626
|
+
const event = new PointerEvent('pointermove', {
|
|
627
|
+
pointerType: 'touch',
|
|
628
|
+
pointerId,
|
|
629
|
+
clientX: pointer.x,
|
|
630
|
+
clientY: pointer.y,
|
|
631
|
+
screenX: pointer.x,
|
|
632
|
+
screenY: pointer.y,
|
|
633
|
+
pageX: pointer.x,
|
|
634
|
+
pageY: pointer.y,
|
|
635
|
+
movementX: pointer.x - previousEvent.x,
|
|
636
|
+
movementY: pointer.y - previousEvent.y,
|
|
637
|
+
button: -1,
|
|
638
|
+
});
|
|
639
|
+
for (const callback of this._pointerMoveCallbacks) {
|
|
640
|
+
callback(event);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
if (hasMouseCallbacks) {
|
|
644
|
+
const event = new MouseEvent('mousemove', {
|
|
645
|
+
clientX: pointer.x,
|
|
646
|
+
clientY: pointer.y,
|
|
647
|
+
screenX: pointer.x,
|
|
648
|
+
screenY: pointer.y,
|
|
649
|
+
pageX: pointer.x,
|
|
650
|
+
pageY: pointer.y,
|
|
651
|
+
movementX: pointer.x - previousEvent.x,
|
|
652
|
+
movementY: pointer.y - previousEvent.y,
|
|
653
|
+
button: -1,
|
|
654
|
+
});
|
|
655
|
+
for (const callback of this._mouseMoveCallbacks) {
|
|
656
|
+
callback(event);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
if (hasMouseWheel) {
|
|
660
|
+
const event = new WheelEvent('wheel', {
|
|
661
|
+
deltaX: data.deltaX,
|
|
662
|
+
deltaY: data.deltaY,
|
|
663
|
+
deltaZ: 0,
|
|
664
|
+
deltaMode: data.deltaMode,
|
|
665
|
+
});
|
|
666
|
+
for (const callback of this._mouseWheelCallbacks) {
|
|
667
|
+
callback(event);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
if (index > -1) {
|
|
671
|
+
this._lastPointerEventById[index] = { pointerId, x: pointer.x, y: pointer.y };
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
if (this._touchMoveCallbacks.length > 0) {
|
|
676
|
+
const changedTouches = [];
|
|
677
|
+
for (const pointer of data.pointers) {
|
|
678
|
+
changedTouches.push(new Touch({
|
|
679
|
+
identifier: pointer.ptrId,
|
|
680
|
+
target: this,
|
|
681
|
+
clientX: pointer.x,
|
|
682
|
+
clientY: pointer.y,
|
|
683
|
+
screenX: pointer.x,
|
|
684
|
+
screenY: pointer.y,
|
|
685
|
+
pageX: pointer.x,
|
|
686
|
+
pageY: pointer.y,
|
|
687
|
+
}));
|
|
688
|
+
}
|
|
689
|
+
const touches = TouchList.fromList(this._touches);
|
|
690
|
+
const event = new TouchEvent('touchmove', {
|
|
691
|
+
touches,
|
|
692
|
+
targetTouches: touches,
|
|
693
|
+
changedTouches,
|
|
694
|
+
});
|
|
695
|
+
for (const callback of this._touchMoveCallbacks) {
|
|
696
|
+
callback(event);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
_handleEvents(event) {
|
|
701
|
+
try {
|
|
702
|
+
const data = JSON.parse(event);
|
|
703
|
+
switch (data.event) {
|
|
704
|
+
case 'down':
|
|
705
|
+
this._downCallback(data.ptrId, data.x, data.y, data.isPrimary);
|
|
706
|
+
break;
|
|
707
|
+
case 'move':
|
|
708
|
+
this._moveCallback(data.pointers);
|
|
709
|
+
break;
|
|
710
|
+
case 'up':
|
|
711
|
+
this._upCallback(data.ptrId, data.x, data.y, data.isPrimary);
|
|
712
|
+
break;
|
|
713
|
+
case 'scale':
|
|
714
|
+
this._pinchCallback(data);
|
|
715
|
+
break;
|
|
716
|
+
case 'cancel':
|
|
717
|
+
this._cancelCallback(data.ptrId, data.x, data.y, data.isPrimary);
|
|
718
|
+
break;
|
|
719
|
+
default:
|
|
720
|
+
break;
|
|
67
721
|
}
|
|
68
722
|
}
|
|
723
|
+
catch (error) { }
|
|
69
724
|
}
|
|
70
725
|
get classList() {
|
|
71
726
|
return this._classList;
|
|
@@ -77,35 +732,12 @@ let CanvasBase = class CanvasBase extends View {
|
|
|
77
732
|
};
|
|
78
733
|
}
|
|
79
734
|
_handleContextOptions(type, contextOpts) {
|
|
80
|
-
const defaultGLOptions = {
|
|
81
|
-
alpha: true,
|
|
82
|
-
antialias: true,
|
|
83
|
-
depth: true,
|
|
84
|
-
failIfMajorPerformanceCaveat: false,
|
|
85
|
-
powerPreference: 'default',
|
|
86
|
-
premultipliedAlpha: true,
|
|
87
|
-
preserveDrawingBuffer: false,
|
|
88
|
-
stencil: false,
|
|
89
|
-
desynchronized: false,
|
|
90
|
-
xrCompatible: false,
|
|
91
|
-
};
|
|
92
735
|
if (!contextOpts) {
|
|
93
736
|
if (type === '2d') {
|
|
94
|
-
return {
|
|
95
|
-
alpha: true,
|
|
96
|
-
antialias: true,
|
|
97
|
-
depth: true,
|
|
98
|
-
failIfMajorPerformanceCaveat: false,
|
|
99
|
-
powerPreference: 'default',
|
|
100
|
-
premultipliedAlpha: true,
|
|
101
|
-
preserveDrawingBuffer: false,
|
|
102
|
-
stencil: false,
|
|
103
|
-
desynchronized: false,
|
|
104
|
-
xrCompatible: false,
|
|
105
|
-
};
|
|
737
|
+
return { ...default2DOptions };
|
|
106
738
|
}
|
|
107
739
|
if (type.indexOf('webgl') > -1) {
|
|
108
|
-
return defaultGLOptions;
|
|
740
|
+
return { ...defaultGLOptions };
|
|
109
741
|
}
|
|
110
742
|
}
|
|
111
743
|
if (type === '2d') {
|
|
@@ -116,10 +748,11 @@ let CanvasBase = class CanvasBase extends View {
|
|
|
116
748
|
return { alpha: true };
|
|
117
749
|
}
|
|
118
750
|
}
|
|
751
|
+
const glOptions = { ...defaultGLOptions };
|
|
119
752
|
const setIfDefined = (prop, value) => {
|
|
120
|
-
const property =
|
|
753
|
+
const property = glOptions[prop];
|
|
121
754
|
if (property !== undefined && typeof value === typeof property) {
|
|
122
|
-
|
|
755
|
+
glOptions[prop] = value;
|
|
123
756
|
}
|
|
124
757
|
};
|
|
125
758
|
if (type.indexOf('webgl') > -1) {
|
|
@@ -132,7 +765,7 @@ let CanvasBase = class CanvasBase extends View {
|
|
|
132
765
|
setIfDefined('preserveDrawingBuffer', contextOpts.preserveDrawingBuffer);
|
|
133
766
|
setIfDefined('stencil', contextOpts.stencil);
|
|
134
767
|
setIfDefined('desynchronized', contextOpts.desynchronized);
|
|
135
|
-
return
|
|
768
|
+
return glOptions;
|
|
136
769
|
}
|
|
137
770
|
return null;
|
|
138
771
|
}
|
|
@@ -170,417 +803,36 @@ let CanvasBase = class CanvasBase extends View {
|
|
|
170
803
|
}
|
|
171
804
|
}
|
|
172
805
|
getSize(value, measuredSize, type) {
|
|
173
|
-
var _a;
|
|
174
806
|
if (typeof value === 'string') {
|
|
175
807
|
value = PercentLength.parse(value);
|
|
176
808
|
}
|
|
177
809
|
if (typeof value === 'number') {
|
|
178
|
-
if (global.
|
|
810
|
+
if (global.isAndroid) {
|
|
179
811
|
return Utils.layout.toDevicePixels(value) || 0;
|
|
180
812
|
}
|
|
181
813
|
return value || 0;
|
|
182
814
|
}
|
|
183
815
|
else if ((value !== null || true) && typeof value === 'object' && typeof value.value && typeof value.unit) {
|
|
184
816
|
if (value.unit === 'px') {
|
|
817
|
+
if (global.isIOS) {
|
|
818
|
+
return Utils.layout.toDeviceIndependentPixels(value.value || 0);
|
|
819
|
+
}
|
|
185
820
|
return value.value || 0;
|
|
186
821
|
}
|
|
187
822
|
else if (value.unit === 'dip') {
|
|
188
|
-
|
|
823
|
+
if (global.isAndroid) {
|
|
824
|
+
return Utils.layout.toDevicePixels(value.value) || 0;
|
|
825
|
+
}
|
|
826
|
+
return value.value || 0;
|
|
189
827
|
}
|
|
190
828
|
else if (value.unit === '%') {
|
|
191
|
-
|
|
192
|
-
if (orientation === 'portrait' || orientation === 'landscape') {
|
|
193
|
-
return (_a = (measuredSize !== null && measuredSize !== void 0 ? measuredSize : (type === 'width' ? Screen.mainScreen.widthPixels : Screen.mainScreen.heightPixels)) * value.value) !== null && _a !== void 0 ? _a : 0;
|
|
194
|
-
}
|
|
829
|
+
return Utils.layout.toDeviceIndependentPixels(measuredSize * value.value ?? 0);
|
|
195
830
|
}
|
|
196
831
|
}
|
|
197
832
|
return 0;
|
|
198
833
|
}
|
|
199
|
-
setPointerCapture() { }
|
|
200
|
-
releasePointerCapture() { }
|
|
201
|
-
__ensureGestures() {
|
|
202
|
-
if (!this._gesturesRegistered) {
|
|
203
|
-
this._gesturesRegistered = true;
|
|
204
|
-
this.on(global.isAndroid ? 'touch, pan, pinch' : 'touch, pan, pinch', this._touchEvent, this);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
__unregisterGestures() {
|
|
208
|
-
if (this._gesturesRegistered) {
|
|
209
|
-
this._gesturesRegistered = false;
|
|
210
|
-
this.off(global.isAndroid ? 'touch, pan' : 'touch, pan, pinch', this._touchEvent, this);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
_pointerCountFromEvent(event) {
|
|
214
|
-
var _a, _b, _c, _d;
|
|
215
|
-
let count = 0;
|
|
216
|
-
if (global.isIOS) {
|
|
217
|
-
count = (_a = event.ios.numberOfTouches) !== null && _a !== void 0 ? _a : 0;
|
|
218
|
-
}
|
|
219
|
-
else if (global.isAndroid) {
|
|
220
|
-
count = (_d = (_c = (_b = (event.android.current || event.android.initial || event.android)).getPointerCount) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : 0;
|
|
221
|
-
}
|
|
222
|
-
return count;
|
|
223
|
-
}
|
|
224
|
-
_positionsFromEvent(event) {
|
|
225
|
-
var _a, _b, _c, _d;
|
|
226
|
-
const positions = [];
|
|
227
|
-
if (global.isIOS) {
|
|
228
|
-
const set = (_a = event === null || event === void 0 ? void 0 : event.ios) === null || _a === void 0 ? void 0 : _a.touches;
|
|
229
|
-
if (((_b = event === null || event === void 0 ? void 0 : event.ios) === null || _b === void 0 ? void 0 : _b.touches) instanceof NSSet) {
|
|
230
|
-
const objects = set.allObjects;
|
|
231
|
-
for (let i = 0; i < set.count; i++) {
|
|
232
|
-
const touch = objects.objectAtIndex(i);
|
|
233
|
-
const point = touch.locationInView(touch.view);
|
|
234
|
-
positions.push(point.x, point.y);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
const count = event.ios.numberOfTouches;
|
|
239
|
-
const rec = event.ios;
|
|
240
|
-
for (let i = 0; i < count; i++) {
|
|
241
|
-
const point = rec.locationOfTouchInView(i, rec.view);
|
|
242
|
-
positions.push(point.x, point.y);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
else if (global.isAndroid) {
|
|
247
|
-
const motionEvent = (_d = (_c = event.android) === null || _c === void 0 ? void 0 : _c.current) !== null && _d !== void 0 ? _d : event.android;
|
|
248
|
-
const count = motionEvent.getPointerCount();
|
|
249
|
-
const coords = new android.view.MotionEvent.PointerCoords();
|
|
250
|
-
for (let i = 0; i < count; i++) {
|
|
251
|
-
motionEvent.getPointerCoords(i, coords);
|
|
252
|
-
positions.push(coords.x / Screen.mainScreen.scale, coords.y / Screen.mainScreen.scale);
|
|
253
|
-
coords.clear();
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return positions;
|
|
257
|
-
}
|
|
258
|
-
_touchEvent(event) {
|
|
259
|
-
let extraData;
|
|
260
|
-
let hasPointerDown = false;
|
|
261
|
-
let hasTouchStart = false;
|
|
262
|
-
let hasPointerMove = false;
|
|
263
|
-
let hasTouchMove = false;
|
|
264
|
-
let hasPointerUp = false;
|
|
265
|
-
let hasTouchEnd = false;
|
|
266
|
-
let hasPointerCancel = false;
|
|
267
|
-
let hasTouchCancel = false;
|
|
268
|
-
if (event.eventName === 'touch') {
|
|
269
|
-
switch (event.action) {
|
|
270
|
-
case 'down':
|
|
271
|
-
hasPointerDown = this.hasListeners('pointerdown');
|
|
272
|
-
hasTouchStart = this.hasListeners('touchstart');
|
|
273
|
-
if (hasPointerDown || hasTouchStart) {
|
|
274
|
-
const numberOfPointers = event.getPointerCount();
|
|
275
|
-
const positions = this._positionsFromEvent(event);
|
|
276
|
-
const x = event.getX();
|
|
277
|
-
const y = event.getY();
|
|
278
|
-
extraData = {
|
|
279
|
-
numberOfPointers,
|
|
280
|
-
positions,
|
|
281
|
-
x,
|
|
282
|
-
y,
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
if (hasPointerDown && this._previousPointerCount !== extraData.numberOfPointers) {
|
|
286
|
-
this._previousPointerCount = extraData.numberOfPointers;
|
|
287
|
-
pointerId++;
|
|
288
|
-
this._pointers[this._previousPointerCount - 1] = {
|
|
289
|
-
id: pointerId,
|
|
290
|
-
coords: {
|
|
291
|
-
x: extraData.x,
|
|
292
|
-
y: extraData.y,
|
|
293
|
-
},
|
|
294
|
-
};
|
|
295
|
-
this.notify(Object.assign(Object.assign({}, this._createPointerEvent('pointerdown', extraData)), { pointerId: pointerId }));
|
|
296
|
-
}
|
|
297
|
-
if (hasTouchStart) {
|
|
298
|
-
this.notify(this._createTouchEvent('touchstart', extraData));
|
|
299
|
-
}
|
|
300
|
-
break;
|
|
301
|
-
case 'up':
|
|
302
|
-
hasPointerUp = this.hasListeners('pointerup');
|
|
303
|
-
hasTouchEnd = this.hasListeners('touchend');
|
|
304
|
-
if (hasPointerUp || hasTouchEnd) {
|
|
305
|
-
const numberOfPointers = event.getPointerCount();
|
|
306
|
-
const positions = this._positionsFromEvent(event);
|
|
307
|
-
const x = event.getX();
|
|
308
|
-
const y = event.getY();
|
|
309
|
-
extraData = {
|
|
310
|
-
numberOfPointers,
|
|
311
|
-
positions,
|
|
312
|
-
x,
|
|
313
|
-
y,
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
if (hasPointerUp) {
|
|
317
|
-
this._previousPointerCount -= extraData.numberOfPointers;
|
|
318
|
-
for (let i = 0; i < extraData.numberOfPointers; i++) {
|
|
319
|
-
const x = extraData.positions[i];
|
|
320
|
-
const y = extraData.positions[i + 1];
|
|
321
|
-
this.notify(Object.assign(Object.assign({}, this._createPointerEvent('pointerup', Object.assign(Object.assign({}, extraData), { x, y }))), { pointerId: this._pointers[i].id }));
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
if (hasTouchEnd) {
|
|
325
|
-
this.notify(this._createTouchEvent('touchend', extraData));
|
|
326
|
-
}
|
|
327
|
-
break;
|
|
328
|
-
case 'cancel':
|
|
329
|
-
hasPointerCancel = this.hasListeners('pointercancel');
|
|
330
|
-
hasTouchCancel = this.hasListeners('touchcancel');
|
|
331
|
-
if (hasPointerCancel || hasTouchCancel) {
|
|
332
|
-
const numberOfPointers = event.getPointerCount();
|
|
333
|
-
const positions = this._positionsFromEvent(event);
|
|
334
|
-
const x = event.getX();
|
|
335
|
-
const y = event.getY();
|
|
336
|
-
extraData = {
|
|
337
|
-
numberOfPointers,
|
|
338
|
-
positions,
|
|
339
|
-
x,
|
|
340
|
-
y,
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
if (hasPointerCancel) {
|
|
344
|
-
if (global.isAndroid) {
|
|
345
|
-
this._previousPointerCount -= extraData.numberOfPointers;
|
|
346
|
-
}
|
|
347
|
-
else if (global.isIOS) {
|
|
348
|
-
this._previousPointerCount -= 1;
|
|
349
|
-
}
|
|
350
|
-
for (let i = 0; i < extraData.numberOfPointers; i++) {
|
|
351
|
-
const x = extraData.positions[i];
|
|
352
|
-
const y = extraData.positions[i + 1];
|
|
353
|
-
this.notify(Object.assign(Object.assign({}, this._createPointerEvent('pointercancel', Object.assign(Object.assign({}, extraData), { x, y }))), { pointerId: this._pointers[i].id }));
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
if (hasTouchCancel) {
|
|
357
|
-
this.notify(this._createTouchEvent('touchcancel', extraData));
|
|
358
|
-
}
|
|
359
|
-
break;
|
|
360
|
-
case 'move':
|
|
361
|
-
if (this._isPinching && global.isAndroid) {
|
|
362
|
-
const numberOfPointers = this._pointerCountFromEvent(event);
|
|
363
|
-
hasPointerMove = this.hasListeners('pointermove');
|
|
364
|
-
hasTouchMove = this.hasListeners('touchmove');
|
|
365
|
-
let data = {};
|
|
366
|
-
if (hasPointerMove || hasTouchMove) {
|
|
367
|
-
const positions = this._positionsFromEvent(event);
|
|
368
|
-
extraData = {
|
|
369
|
-
numberOfPointers,
|
|
370
|
-
positions,
|
|
371
|
-
x: positions[0],
|
|
372
|
-
y: positions[1],
|
|
373
|
-
};
|
|
374
|
-
const dx = extraData.positions[2] - extraData.positions[0];
|
|
375
|
-
const dy = extraData.positions[3] - extraData.positions[1];
|
|
376
|
-
let delta = 0;
|
|
377
|
-
var distance = Math.sqrt(dx * dx + dy * dy);
|
|
378
|
-
if (this._previousPinchDistance) {
|
|
379
|
-
delta = this._previousPinchDistance - distance;
|
|
380
|
-
}
|
|
381
|
-
this._previousPinchDistance = distance;
|
|
382
|
-
const x = dx; //event.getFocusX();
|
|
383
|
-
const y = dy; //event.getFocusY();
|
|
384
|
-
const scale = event.scale;
|
|
385
|
-
data = {
|
|
386
|
-
deltaMode: 0,
|
|
387
|
-
clientX: x,
|
|
388
|
-
clientY: y,
|
|
389
|
-
screenX: x,
|
|
390
|
-
screenY: y,
|
|
391
|
-
deltaX: 0,
|
|
392
|
-
deltaY: delta,
|
|
393
|
-
deltaZ: 0,
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
if (hasPointerMove) {
|
|
397
|
-
const count = extraData.numberOfPointers;
|
|
398
|
-
const positions = extraData.positions;
|
|
399
|
-
for (let i = 0; i < count; i++) {
|
|
400
|
-
let x = positions[i] - extraData.x;
|
|
401
|
-
let y = positions[i + 1] - extraData.y;
|
|
402
|
-
this.notify(Object.assign(Object.assign({}, this._createPointerEvent('pointermove', Object.assign(Object.assign({}, extraData), { x, y }))), { pointerId: this._pointers[i].id }));
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
if (hasTouchMove) {
|
|
406
|
-
this.notify(this._createTouchEvent('touchmove', Object.assign(Object.assign({}, extraData), { data })));
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
break;
|
|
410
|
-
default:
|
|
411
|
-
break;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
else if (event.eventName === 'pinch') {
|
|
415
|
-
if (global.isAndroid) {
|
|
416
|
-
if (event.state === GestureStateTypes.began || event.state === GestureStateTypes.changed) {
|
|
417
|
-
this._isPinching = true;
|
|
418
|
-
this._previousPinchDistance = 0;
|
|
419
|
-
}
|
|
420
|
-
if (event.state === GestureStateTypes.ended || event.state === GestureStateTypes.cancelled) {
|
|
421
|
-
this._isPinching = false;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
const numberOfPointers = this._pointerCountFromEvent(event);
|
|
426
|
-
if (!this._isPinching && numberOfPointers >= 2 && (event.state === GestureStateTypes.began || event.state === GestureStateTypes.changed)) {
|
|
427
|
-
this._previousPinchDistance = 0;
|
|
428
|
-
this._isPinching = true;
|
|
429
|
-
}
|
|
430
|
-
if (event.state === GestureStateTypes.ended || event.state === GestureStateTypes.cancelled) {
|
|
431
|
-
this._isPinching = false;
|
|
432
|
-
}
|
|
433
|
-
if (this._isPinching && numberOfPointers >= 2) {
|
|
434
|
-
if (global.isIOS) {
|
|
435
|
-
hasPointerMove = this.hasListeners('pointermove');
|
|
436
|
-
hasTouchMove = this.hasListeners('touchmove');
|
|
437
|
-
let data = {};
|
|
438
|
-
let delta = 0;
|
|
439
|
-
if (hasPointerMove || hasTouchMove) {
|
|
440
|
-
const positions = this._positionsFromEvent(event);
|
|
441
|
-
extraData = {
|
|
442
|
-
numberOfPointers,
|
|
443
|
-
positions,
|
|
444
|
-
x: positions[0],
|
|
445
|
-
y: positions[1],
|
|
446
|
-
};
|
|
447
|
-
const dx = extraData.positions[2] - extraData.positions[0];
|
|
448
|
-
const dy = extraData.positions[3] - extraData.positions[1];
|
|
449
|
-
var distance = Math.sqrt(dx * dx + dy * dy);
|
|
450
|
-
if (this._previousPinchDistance) {
|
|
451
|
-
delta = this._previousPinchDistance - distance;
|
|
452
|
-
}
|
|
453
|
-
this._previousPinchDistance = distance;
|
|
454
|
-
const x = event.getFocusX();
|
|
455
|
-
const y = event.getFocusY();
|
|
456
|
-
const scale = event.scale;
|
|
457
|
-
data = {
|
|
458
|
-
deltaMode: 0,
|
|
459
|
-
clientX: x,
|
|
460
|
-
clientY: y,
|
|
461
|
-
screenX: x,
|
|
462
|
-
screenY: y,
|
|
463
|
-
deltaX: 0,
|
|
464
|
-
deltaY: delta,
|
|
465
|
-
deltaZ: 0,
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
if (hasPointerMove) {
|
|
469
|
-
const count = extraData.numberOfPointers;
|
|
470
|
-
const positions = extraData.positions;
|
|
471
|
-
for (let i = 0; i < count; i++) {
|
|
472
|
-
let x = positions[i] - extraData.x;
|
|
473
|
-
let y = positions[i + 1] - extraData.y;
|
|
474
|
-
this.notify(Object.assign(Object.assign({}, this._createPointerEvent('pointermove', Object.assign(Object.assign({}, extraData), { x, y }))), { pointerId: this._pointers[i].id }));
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
if (hasTouchMove) {
|
|
478
|
-
this.notify(this._createTouchEvent('touchmove', Object.assign(Object.assign({}, extraData), { data })));
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
else if (event.eventName === 'pan') {
|
|
485
|
-
if (this._isPinching) {
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
if (event.state === GestureStateTypes.began || event.state === GestureStateTypes.changed) {
|
|
489
|
-
hasPointerMove = this.hasListeners('pointermove');
|
|
490
|
-
hasTouchMove = this.hasListeners('touchmove');
|
|
491
|
-
if (hasPointerMove || hasTouchMove) {
|
|
492
|
-
const numberOfPointers = this._pointerCountFromEvent(event);
|
|
493
|
-
const positions = this._positionsFromEvent(event);
|
|
494
|
-
const x = positions[0];
|
|
495
|
-
const y = positions[1];
|
|
496
|
-
extraData = {
|
|
497
|
-
numberOfPointers,
|
|
498
|
-
positions,
|
|
499
|
-
x,
|
|
500
|
-
y,
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
if (hasPointerMove) {
|
|
504
|
-
const positions = extraData.positions;
|
|
505
|
-
for (let i = 0; i < extraData.numberOfPointers; i++) {
|
|
506
|
-
const x = positions[i];
|
|
507
|
-
const y = positions[i + 1];
|
|
508
|
-
this.notify(Object.assign(Object.assign({}, this._createPointerEvent('pointermove', { numberOfPointers: extraData.numberOfPointers, positions, x, y })), { pointerId: this._pointers[i].id }));
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
if (hasTouchMove) {
|
|
512
|
-
this.notify(this._createTouchEvent('touchmove', extraData));
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
_createTouchEvent(name, extraData) {
|
|
518
|
-
const count = extraData.numberOfPointers;
|
|
519
|
-
const point = extraData.positions;
|
|
520
|
-
if (!point) {
|
|
521
|
-
return null;
|
|
522
|
-
}
|
|
523
|
-
const x = extraData.x;
|
|
524
|
-
const y = extraData.y;
|
|
525
|
-
const activePointer = {
|
|
526
|
-
clientX: x,
|
|
527
|
-
clientY: y,
|
|
528
|
-
force: 0.0,
|
|
529
|
-
identifier: 0,
|
|
530
|
-
pageX: x,
|
|
531
|
-
pageY: y,
|
|
532
|
-
radiusX: 0,
|
|
533
|
-
radiusY: 0,
|
|
534
|
-
rotationAngle: 0,
|
|
535
|
-
screenX: x,
|
|
536
|
-
screenY: y,
|
|
537
|
-
};
|
|
538
|
-
const pointers = [];
|
|
539
|
-
for (let i = 0; i < count; i++) {
|
|
540
|
-
const x = extraData.positions[i];
|
|
541
|
-
const y = extraData.positions[i + 1];
|
|
542
|
-
pointers.push({
|
|
543
|
-
clientX: x,
|
|
544
|
-
clientY: y,
|
|
545
|
-
force: 0.0,
|
|
546
|
-
identifier: i,
|
|
547
|
-
pageX: x,
|
|
548
|
-
pageY: y,
|
|
549
|
-
radiusX: 0,
|
|
550
|
-
radiusY: 0,
|
|
551
|
-
rotationAngle: 0,
|
|
552
|
-
screenX: x,
|
|
553
|
-
screenY: y,
|
|
554
|
-
target: this,
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
return Object.assign(new TouchEvent(name), Object.assign({ eventName: name, defaultPrevented: false, cancelable: false, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, target: this, changedTouches: pointers, targetTouches: pointers, touches: pointers }, activePointer));
|
|
558
|
-
}
|
|
559
|
-
_createPointerEvent(name, extraData) {
|
|
560
|
-
const x = extraData.x;
|
|
561
|
-
const y = extraData.y;
|
|
562
|
-
const activePointer = {
|
|
563
|
-
clientX: x,
|
|
564
|
-
clientY: y,
|
|
565
|
-
force: 0.0,
|
|
566
|
-
identifier: 0,
|
|
567
|
-
pageX: x,
|
|
568
|
-
pageY: y,
|
|
569
|
-
radiusX: 0,
|
|
570
|
-
radiusY: 0,
|
|
571
|
-
rotationAngle: 0,
|
|
572
|
-
screenX: x,
|
|
573
|
-
screenY: y,
|
|
574
|
-
pointerId: 0,
|
|
575
|
-
pointerType: 'touch',
|
|
576
|
-
x,
|
|
577
|
-
y,
|
|
578
|
-
width: 23.4375,
|
|
579
|
-
height: 23.4375,
|
|
580
|
-
isPrimary: true,
|
|
581
|
-
};
|
|
582
|
-
return Object.assign(new PointerEvent(name), Object.assign({ eventName: name, defaultPrevented: false, cancelable: false, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, target: this }, activePointer));
|
|
583
|
-
}
|
|
834
|
+
setPointerCapture(id) { }
|
|
835
|
+
releasePointerCapture(id) { }
|
|
584
836
|
};
|
|
585
837
|
CanvasBase.readyEvent = 'ready';
|
|
586
838
|
CanvasBase = __decorate([
|
|
@@ -589,4 +841,5 @@ CanvasBase = __decorate([
|
|
|
589
841
|
], CanvasBase);
|
|
590
842
|
export { CanvasBase };
|
|
591
843
|
ignorePixelScalingProperty.register(CanvasBase);
|
|
844
|
+
upscaleProperty.register(CanvasBase);
|
|
592
845
|
//# sourceMappingURL=common.js.map
|