@shopify/react-native-skia 2.0.7 → 2.1.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/android/CMakeLists.txt +20 -1
- package/cpp/api/JsiSkApi.h +3 -0
- package/cpp/api/JsiSkImageFilterFactory.h +478 -39
- package/cpp/api/JsiSkSkottie.h +590 -0
- package/cpp/api/JsiSkottieFactory.h +65 -0
- package/cpp/api/recorder/Command.h +1 -0
- package/cpp/api/recorder/Convertor.h +32 -0
- package/cpp/api/recorder/Drawings.h +23 -0
- package/cpp/api/recorder/ImageFilters.h +20 -0
- package/cpp/api/recorder/JsiRecorder.h +6 -0
- package/cpp/api/recorder/RNRecorder.h +15 -0
- package/cpp/api/third_party/SkottieUtils.cpp +333 -0
- package/cpp/api/third_party/SkottieUtils.h +172 -0
- package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +980 -0
- package/cpp/skia/modules/jsonreader/SkJSONReader.h +389 -0
- package/cpp/skia/modules/skottie/include/ExternalLayer.h +56 -0
- package/cpp/skia/modules/skottie/include/Skottie.h +313 -0
- package/cpp/skia/modules/skottie/include/SkottieProperty.h +190 -0
- package/cpp/skia/modules/skottie/include/SlotManager.h +113 -0
- package/cpp/skia/modules/skottie/include/TextShaper.h +200 -0
- package/cpp/skia/modules/skottie/src/SkottieValue.h +56 -0
- package/cpp/skia/modules/skottie/src/animator/Animator.h +89 -0
- package/cpp/skia/modules/skottie/src/text/Font.h +82 -0
- package/cpp/skia/modules/skottie/src/text/TextAdapter.h +155 -0
- package/cpp/skia/modules/skottie/src/text/TextAnimator.h +121 -0
- package/cpp/skia/modules/skottie/src/text/TextValue.h +28 -0
- package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +61 -0
- package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +135 -0
- package/cpp/skia/modules/sksg/include/SkSGDraw.h +57 -0
- package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +50 -0
- package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +181 -0
- package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +54 -0
- package/cpp/skia/modules/sksg/include/SkSGGradient.h +108 -0
- package/cpp/skia/modules/sksg/include/SkSGGroup.h +65 -0
- package/cpp/skia/modules/sksg/include/SkSGImage.h +59 -0
- package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +46 -0
- package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +65 -0
- package/cpp/skia/modules/sksg/include/SkSGMerge.h +74 -0
- package/cpp/skia/modules/sksg/include/SkSGNode.h +128 -0
- package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +54 -0
- package/cpp/skia/modules/sksg/include/SkSGPaint.h +112 -0
- package/cpp/skia/modules/sksg/include/SkSGPath.h +68 -0
- package/cpp/skia/modules/sksg/include/SkSGPlane.h +47 -0
- package/cpp/skia/modules/sksg/include/SkSGRect.h +122 -0
- package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +283 -0
- package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +157 -0
- package/cpp/skia/modules/sksg/include/SkSGScene.h +47 -0
- package/cpp/skia/modules/sksg/include/SkSGText.h +82 -0
- package/cpp/skia/modules/sksg/include/SkSGTransform.h +127 -0
- package/cpp/skia/src/base/SkArenaAlloc.h +371 -0
- package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +15 -15
- package/lib/commonjs/dom/types/Drawings.d.ts +8 -1
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +3 -1
- package/lib/commonjs/dom/types/NodeType.js +4 -0
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
- package/lib/commonjs/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -0
- package/lib/commonjs/renderer/components/ImageFilter.d.ts +4 -0
- package/lib/commonjs/renderer/components/ImageFilter.js +13 -0
- package/lib/commonjs/renderer/components/ImageFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/Skottie.d.ts +4 -0
- package/lib/commonjs/renderer/components/Skottie.js +13 -0
- package/lib/commonjs/renderer/components/Skottie.js.map +1 -0
- package/lib/commonjs/renderer/components/index.d.ts +2 -0
- package/lib/commonjs/renderer/components/index.js +22 -0
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix4.d.ts +11 -2
- package/lib/commonjs/skia/types/Matrix4.js +42 -1
- package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
- package/lib/commonjs/skia/types/Recorder.d.ts +2 -1
- package/lib/commonjs/skia/types/Recorder.js.map +1 -1
- package/lib/commonjs/skia/types/Skia.d.ts +2 -0
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/types/Skottie.d.ts +223 -0
- package/lib/commonjs/skia/types/Skottie.js +73 -0
- package/lib/commonjs/skia/types/Skottie.js.map +1 -0
- package/lib/commonjs/skia/types/index.d.ts +1 -0
- package/lib/commonjs/skia/types/index.js +11 -0
- package/lib/commonjs/skia/types/index.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +88 -19
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkia.js +2 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkottieAnimation.d.ts +59 -0
- package/lib/commonjs/skia/web/JsiSkottieAnimation.js +243 -0
- package/lib/commonjs/skia/web/JsiSkottieAnimation.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkottieFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkottieFactory.js +26 -0
- package/lib/commonjs/skia/web/JsiSkottieFactory.js.map +1 -0
- package/lib/commonjs/sksg/Elements.d.ts +3 -1
- package/lib/commonjs/sksg/Elements.js.map +1 -1
- package/lib/commonjs/sksg/Node.d.ts +1 -1
- package/lib/commonjs/sksg/Node.js +1 -1
- package/lib/commonjs/sksg/Node.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Core.d.ts +4 -2
- package/lib/commonjs/sksg/Recorder/Core.js +1 -0
- package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Player.js +2 -0
- package/lib/commonjs/sksg/Recorder/Player.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
- package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js +4 -0
- package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Recorder.d.ts +2 -1
- package/lib/commonjs/sksg/Recorder/Recorder.js +6 -0
- package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Visitor.js +3 -0
- package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +2 -2
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js +11 -4
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +12 -2
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.d.ts +15 -15
- package/lib/module/dom/types/Drawings.d.ts +8 -1
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +3 -1
- package/lib/module/dom/types/NodeType.js +4 -0
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
- package/lib/module/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/setup.d.ts +5 -0
- package/lib/module/renderer/components/ImageFilter.d.ts +4 -0
- package/lib/module/renderer/components/ImageFilter.js +5 -0
- package/lib/module/renderer/components/ImageFilter.js.map +1 -0
- package/lib/module/renderer/components/Skottie.d.ts +4 -0
- package/lib/module/renderer/components/Skottie.js +5 -0
- package/lib/module/renderer/components/Skottie.js.map +1 -0
- package/lib/module/renderer/components/index.d.ts +2 -0
- package/lib/module/renderer/components/index.js +2 -0
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
- package/lib/module/skia/types/Matrix4.d.ts +11 -2
- package/lib/module/skia/types/Matrix4.js +40 -0
- package/lib/module/skia/types/Matrix4.js.map +1 -1
- package/lib/module/skia/types/Recorder.d.ts +2 -1
- package/lib/module/skia/types/Recorder.js.map +1 -1
- package/lib/module/skia/types/Skia.d.ts +2 -0
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/types/Skottie.d.ts +223 -0
- package/lib/module/skia/types/Skottie.js +74 -0
- package/lib/module/skia/types/Skottie.js.map +1 -0
- package/lib/module/skia/types/index.d.ts +1 -0
- package/lib/module/skia/types/index.js +1 -0
- package/lib/module/skia/types/index.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
- package/lib/module/skia/web/JsiSkImageFilterFactory.js +88 -19
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkia.js +2 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/skia/web/JsiSkottieAnimation.d.ts +59 -0
- package/lib/module/skia/web/JsiSkottieAnimation.js +236 -0
- package/lib/module/skia/web/JsiSkottieAnimation.js.map +1 -0
- package/lib/module/skia/web/JsiSkottieFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkottieFactory.js +19 -0
- package/lib/module/skia/web/JsiSkottieFactory.js.map +1 -0
- package/lib/module/sksg/Elements.d.ts +3 -1
- package/lib/module/sksg/Elements.js.map +1 -1
- package/lib/module/sksg/Node.d.ts +1 -1
- package/lib/module/sksg/Node.js +1 -1
- package/lib/module/sksg/Node.js.map +1 -1
- package/lib/module/sksg/Recorder/Core.d.ts +4 -2
- package/lib/module/sksg/Recorder/Core.js +1 -0
- package/lib/module/sksg/Recorder/Core.js.map +1 -1
- package/lib/module/sksg/Recorder/Player.js +3 -1
- package/lib/module/sksg/Recorder/Player.js.map +1 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js +4 -0
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Recorder.d.ts +2 -1
- package/lib/module/sksg/Recorder/Recorder.js +6 -0
- package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Visitor.js +3 -0
- package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Drawing.d.ts +2 -2
- package/lib/module/sksg/Recorder/commands/Drawing.js +9 -2
- package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/ImageFilters.js +12 -2
- package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -1
- package/lib/typescript/lib/commonjs/renderer/components/ImageFilter.d.ts +2 -0
- package/lib/typescript/lib/commonjs/renderer/components/Skottie.d.ts +2 -0
- package/lib/typescript/lib/commonjs/skia/types/Matrix4.d.ts +1 -0
- package/lib/typescript/lib/commonjs/skia/types/Skottie.d.ts +6 -0
- package/lib/typescript/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +22 -5
- package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +2 -0
- package/lib/typescript/lib/commonjs/skia/web/JsiSkottieAnimation.d.ts +48 -0
- package/lib/typescript/lib/commonjs/skia/web/JsiSkottieFactory.d.ts +6 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/Recorder.d.ts +1 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +1 -1
- package/lib/typescript/lib/module/mock/index.d.ts +8 -0
- package/lib/typescript/lib/module/renderer/components/ImageFilter.d.ts +2 -0
- package/lib/typescript/lib/module/renderer/components/Skottie.d.ts +2 -0
- package/lib/typescript/lib/module/renderer/components/index.d.ts +2 -0
- package/lib/typescript/lib/module/skia/Skia.web.d.ts +1 -0
- package/lib/typescript/lib/module/skia/types/Matrix4.d.ts +1 -0
- package/lib/typescript/lib/module/skia/types/Skottie.d.ts +5 -0
- package/lib/typescript/lib/module/skia/types/index.d.ts +1 -0
- package/lib/typescript/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +22 -5
- package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +2 -0
- package/lib/typescript/lib/module/skia/web/JsiSkottieAnimation.d.ts +47 -0
- package/lib/typescript/lib/module/skia/web/JsiSkottieFactory.d.ts +5 -0
- package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/Drawing.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/datatypes/Gradient.d.ts +15 -15
- package/lib/typescript/src/dom/types/Drawings.d.ts +8 -1
- package/lib/typescript/src/dom/types/NodeType.d.ts +3 -1
- package/lib/typescript/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
- package/lib/typescript/src/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -0
- package/lib/typescript/src/renderer/components/ImageFilter.d.ts +4 -0
- package/lib/typescript/src/renderer/components/Skottie.d.ts +4 -0
- package/lib/typescript/src/renderer/components/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
- package/lib/typescript/src/skia/types/Matrix4.d.ts +11 -2
- package/lib/typescript/src/skia/types/Recorder.d.ts +2 -1
- package/lib/typescript/src/skia/types/Skia.d.ts +2 -0
- package/lib/typescript/src/skia/types/Skottie.d.ts +223 -0
- package/lib/typescript/src/skia/types/index.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
- package/lib/typescript/src/skia/web/JsiSkottieAnimation.d.ts +59 -0
- package/lib/typescript/src/skia/web/JsiSkottieFactory.d.ts +9 -0
- package/lib/typescript/src/sksg/Elements.d.ts +3 -1
- package/lib/typescript/src/sksg/Node.d.ts +1 -1
- package/lib/typescript/src/sksg/Recorder/Core.d.ts +4 -2
- package/lib/typescript/src/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
- package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +2 -1
- package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +2 -2
- package/libs/android/arm64-v8a/libjsonreader.a +0 -0
- package/libs/android/armeabi-v7a/libjsonreader.a +0 -0
- package/libs/android/x86/libjsonreader.a +0 -0
- package/libs/android/x86_64/libjsonreader.a +0 -0
- package/libs/apple/libpathops.xcframework/Info.plist +8 -8
- package/libs/apple/libskia.xcframework/Info.plist +14 -14
- package/libs/apple/libskottie.xcframework/Info.plist +14 -14
- package/libs/apple/libskparagraph.xcframework/Info.plist +16 -16
- package/libs/apple/libsksg.xcframework/Info.plist +5 -5
- package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
- package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +14 -14
- package/libs/apple/libsvg.xcframework/Info.plist +14 -14
- package/package.json +1 -1
- package/react-native-skia.podspec +4 -2
- package/src/__tests__/snapshots/matrix4/camera-corner.png +0 -0
- package/src/__tests__/snapshots/matrix4/camera-offset.png +0 -0
- package/src/__tests__/snapshots/matrix4/camera-top-left-center.png +0 -0
- package/src/__tests__/snapshots/matrix4/camera-zoom-out.png +0 -0
- package/src/__tests__/snapshots/matrix4/full-rect.png +0 -0
- package/src/__tests__/snapshots/matrix4/rect.png +0 -0
- package/src/__tests__/snapshots/matrix4/scaled-rect.png +0 -0
- package/src/__tests__/snapshots/matrix4/test-perspective.png +0 -0
- package/src/__tests__/snapshots/matrix4/test-perspective2.png +0 -0
- package/src/dom/types/Drawings.ts +11 -0
- package/src/dom/types/NodeType.ts +4 -0
- package/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.tsx +492 -0
- package/src/renderer/__tests__/e2e/Camera.spec.tsx +475 -0
- package/src/renderer/__tests__/e2e/ImageFilter.spec.tsx +99 -0
- package/src/renderer/__tests__/e2e/LightingImageFilters.spec.tsx +1478 -0
- package/src/renderer/__tests__/e2e/Skottie.spec.tsx +440 -0
- package/src/renderer/__tests__/e2e/setup/skottie/basic_slots.json +1118 -0
- package/src/renderer/__tests__/e2e/setup/skottie/color-props.json +1 -0
- package/src/renderer/__tests__/e2e/setup/skottie/confetti.json +5899 -0
- package/src/renderer/__tests__/e2e/setup/skottie/drinks.json +43857 -0
- package/src/renderer/__tests__/e2e/setup/skottie/fingerprint.json +1 -0
- package/src/renderer/__tests__/e2e/setup/skottie/lego_loader.json +29540 -0
- package/src/renderer/__tests__/e2e/setup/skottie/new-drop.json +1 -0
- package/src/renderer/__tests__/e2e/setup/skottie/onboarding.json +1 -0
- package/src/renderer/__tests__/e2e/setup/skottie/text-layer.json +1 -0
- package/src/renderer/__tests__/setup.tsx +31 -0
- package/src/renderer/components/ImageFilter.tsx +8 -0
- package/src/renderer/components/Skottie.tsx +8 -0
- package/src/renderer/components/index.ts +2 -0
- package/src/skia/__tests__/assets/Avenir-Heavy.ttf +0 -0
- package/src/skia/types/ImageFilter/ImageFilterFactory.ts +391 -21
- package/src/skia/types/Matrix4.ts +108 -2
- package/src/skia/types/Recorder.ts +2 -0
- package/src/skia/types/Skia.ts +2 -0
- package/src/skia/types/Skottie.ts +266 -0
- package/src/skia/types/index.ts +1 -0
- package/src/skia/web/JsiSkImageFilterFactory.ts +266 -31
- package/src/skia/web/JsiSkia.ts +2 -0
- package/src/skia/web/JsiSkottieAnimation.ts +259 -0
- package/src/skia/web/JsiSkottieFactory.ts +25 -0
- package/src/sksg/Elements.tsx +4 -0
- package/src/sksg/Node.ts +1 -0
- package/src/sksg/Recorder/Core.ts +3 -0
- package/src/sksg/Recorder/Player.ts +3 -0
- package/src/sksg/Recorder/ReanimatedRecorder.ts +6 -0
- package/src/sksg/Recorder/Recorder.ts +5 -0
- package/src/sksg/Recorder/Visitor.ts +3 -0
- package/src/sksg/Recorder/commands/Drawing.ts +7 -3
- package/src/sksg/Recorder/commands/ImageFilters.ts +15 -2
@@ -5,65 +5,134 @@ export class JsiSkImageFilterFactory extends Host {
|
|
5
5
|
constructor(CanvasKit) {
|
6
6
|
super(CanvasKit);
|
7
7
|
}
|
8
|
-
|
9
|
-
|
8
|
+
MakeRuntimeShaderWithChildren(_builder, _sampleRadius, _childShaderNames, _inputs) {
|
9
|
+
throw throwNotImplementedOnRNWeb();
|
10
|
+
}
|
11
|
+
MakeArithmetic(_k1, _k2, _k3, _k4, _enforcePMColor, _background, _foreground, _cropRect) {
|
12
|
+
throw throwNotImplementedOnRNWeb();
|
13
|
+
}
|
14
|
+
MakeCrop(_rect, _tileMode, _input) {
|
15
|
+
throw throwNotImplementedOnRNWeb();
|
16
|
+
}
|
17
|
+
MakeEmpty() {
|
18
|
+
throw throwNotImplementedOnRNWeb();
|
19
|
+
}
|
20
|
+
MakeImage(_image, _srcRect, _dstRect, _filterMode, _mipmap) {
|
21
|
+
throw throwNotImplementedOnRNWeb();
|
22
|
+
}
|
23
|
+
MakeMagnifier(_lensBounds, _zoomAmount, _inset, _filterMode, _mipmap, _input, _cropRect) {
|
24
|
+
throw throwNotImplementedOnRNWeb();
|
25
|
+
}
|
26
|
+
MakeMatrixConvolution(_kernelSizeX, _kernelSizeY, _kernel, _gain, _bias, _kernelOffsetX, _kernelOffsetY, _tileMode, _convolveAlpha, _input, _cropRect) {
|
27
|
+
throw throwNotImplementedOnRNWeb();
|
28
|
+
}
|
29
|
+
MakeMatrixTransform(_matrix, _filterMode, _mipmap, _input) {
|
30
|
+
throw throwNotImplementedOnRNWeb();
|
31
|
+
}
|
32
|
+
MakeMerge(_filters, _cropRect) {
|
33
|
+
throw throwNotImplementedOnRNWeb();
|
34
|
+
}
|
35
|
+
MakePicture(_picture, _targetRect) {
|
36
|
+
throw throwNotImplementedOnRNWeb();
|
37
|
+
}
|
38
|
+
MakeTile(_src, _dst, _input) {
|
39
|
+
throw throwNotImplementedOnRNWeb();
|
40
|
+
}
|
41
|
+
MakeDistantLitDiffuse(_direction, _lightColor, _surfaceScale, _kd, _input, _cropRect) {
|
42
|
+
throw throwNotImplementedOnRNWeb();
|
43
|
+
}
|
44
|
+
MakePointLitDiffuse(_location, _lightColor, _surfaceScale, _kd, _input, _cropRect) {
|
45
|
+
throw throwNotImplementedOnRNWeb();
|
46
|
+
}
|
47
|
+
MakeSpotLitDiffuse(_location, _target, _falloffExponent, _cutoffAngle, _lightColor, _surfaceScale, _kd, _input, _cropRect) {
|
48
|
+
throw throwNotImplementedOnRNWeb();
|
49
|
+
}
|
50
|
+
MakeDistantLitSpecular(_direction, _lightColor, _surfaceScale, _ks, _shininess, _input, _cropRect) {
|
51
|
+
throw throwNotImplementedOnRNWeb();
|
52
|
+
}
|
53
|
+
MakePointLitSpecular(_location, _lightColor, _surfaceScale, _ks, _shininess, _input, _cropRect) {
|
54
|
+
throw throwNotImplementedOnRNWeb();
|
55
|
+
}
|
56
|
+
MakeSpotLitSpecular(_location, _target, _falloffExponent, _cutoffAngle, _lightColor, _surfaceScale, _ks, _shininess, _input, _cropRect) {
|
57
|
+
throw throwNotImplementedOnRNWeb();
|
58
|
+
}
|
59
|
+
MakeOffset(dx, dy, input, cropRect) {
|
60
|
+
const inputFilter = input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input);
|
61
|
+
if (cropRect) {
|
62
|
+
console.warn("cropRect is not supported on React Native Web for MakeOffset");
|
63
|
+
}
|
10
64
|
const filter = this.CanvasKit.ImageFilter.MakeOffset(dx, dy, inputFilter);
|
11
65
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
12
66
|
}
|
13
|
-
MakeDisplacementMap(channelX, channelY, scale, in1, input) {
|
14
|
-
const inputFilter = input === null ? null : JsiSkImageFilter.fromValue(input);
|
67
|
+
MakeDisplacementMap(channelX, channelY, scale, in1, input, cropRect) {
|
68
|
+
const inputFilter = input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input);
|
69
|
+
if (cropRect) {
|
70
|
+
console.warn("cropRect is not supported on React Native Web for MakeDisplacementMap");
|
71
|
+
}
|
15
72
|
const filter = this.CanvasKit.ImageFilter.MakeDisplacementMap(getEnum(this.CanvasKit, "ColorChannel", channelX), getEnum(this.CanvasKit, "ColorChannel", channelY), scale, JsiSkImageFilter.fromValue(in1), inputFilter);
|
16
73
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
17
74
|
}
|
18
|
-
MakeShader(shader,
|
75
|
+
MakeShader(shader, dither, cropRect) {
|
76
|
+
if (dither !== undefined) {
|
77
|
+
console.warn("dither parameter is not supported on React Native Web for MakeShader");
|
78
|
+
}
|
79
|
+
if (cropRect) {
|
80
|
+
console.warn("cropRect is not supported on React Native Web for MakeShader");
|
81
|
+
}
|
19
82
|
const filter = this.CanvasKit.ImageFilter.MakeShader(JsiSkImageFilter.fromValue(shader));
|
20
83
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
21
84
|
}
|
22
|
-
MakeBlur(sigmaX, sigmaY, mode, input) {
|
23
|
-
|
85
|
+
MakeBlur(sigmaX, sigmaY, mode, input, cropRect) {
|
86
|
+
if (cropRect) {
|
87
|
+
console.warn("cropRect is not supported on React Native Web for MakeBlur");
|
88
|
+
}
|
89
|
+
return new JsiSkImageFilter(this.CanvasKit, this.CanvasKit.ImageFilter.MakeBlur(sigmaX, sigmaY, getEnum(this.CanvasKit, "TileMode", mode), input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input)));
|
24
90
|
}
|
25
|
-
MakeColorFilter(
|
26
|
-
|
91
|
+
MakeColorFilter(colorFilter, input, cropRect) {
|
92
|
+
if (cropRect) {
|
93
|
+
console.warn("cropRect is not supported on React Native Web for MakeColorFilter");
|
94
|
+
}
|
95
|
+
return new JsiSkImageFilter(this.CanvasKit, this.CanvasKit.ImageFilter.MakeColorFilter(JsiSkColorFilter.fromValue(colorFilter), input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input)));
|
27
96
|
}
|
28
97
|
MakeCompose(outer, inner) {
|
29
98
|
return new JsiSkImageFilter(this.CanvasKit, this.CanvasKit.ImageFilter.MakeCompose(outer === null ? null : JsiSkImageFilter.fromValue(outer), inner === null ? null : JsiSkImageFilter.fromValue(inner)));
|
30
99
|
}
|
31
100
|
MakeDropShadow(dx, dy, sigmaX, sigmaY, color, input, cropRect) {
|
32
|
-
const inputFilter = input === null ? null : JsiSkImageFilter.fromValue(input);
|
101
|
+
const inputFilter = input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input);
|
33
102
|
if (cropRect) {
|
34
|
-
|
103
|
+
console.warn("cropRect is not supported on React Native Web for MakeDropShadow");
|
35
104
|
}
|
36
105
|
const filter = this.CanvasKit.ImageFilter.MakeDropShadow(dx, dy, sigmaX, sigmaY, color, inputFilter);
|
37
106
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
38
107
|
}
|
39
108
|
MakeDropShadowOnly(dx, dy, sigmaX, sigmaY, color, input, cropRect) {
|
40
|
-
const inputFilter = input === null ? null : JsiSkImageFilter.fromValue(input);
|
109
|
+
const inputFilter = input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input);
|
41
110
|
if (cropRect) {
|
42
|
-
|
111
|
+
console.warn("cropRect is not supported on React Native Web for MakeDropShadowOnly");
|
43
112
|
}
|
44
113
|
const filter = this.CanvasKit.ImageFilter.MakeDropShadowOnly(dx, dy, sigmaX, sigmaY, color, inputFilter);
|
45
114
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
46
115
|
}
|
47
116
|
MakeErode(rx, ry, input, cropRect) {
|
48
|
-
const inputFilter = input === null ? null : JsiSkImageFilter.fromValue(input);
|
117
|
+
const inputFilter = input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input);
|
49
118
|
if (cropRect) {
|
50
|
-
|
119
|
+
console.warn("cropRect is not supported on React Native Web for MakeErode");
|
51
120
|
}
|
52
121
|
const filter = this.CanvasKit.ImageFilter.MakeErode(rx, ry, inputFilter);
|
53
122
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
54
123
|
}
|
55
124
|
MakeDilate(rx, ry, input, cropRect) {
|
56
|
-
const inputFilter = input === null ? null : JsiSkImageFilter.fromValue(input);
|
125
|
+
const inputFilter = input === null || input === undefined ? null : JsiSkImageFilter.fromValue(input);
|
57
126
|
if (cropRect) {
|
58
|
-
|
127
|
+
console.warn("cropRect is not supported on React Native Web for MakeDilate");
|
59
128
|
}
|
60
129
|
const filter = this.CanvasKit.ImageFilter.MakeDilate(rx, ry, inputFilter);
|
61
130
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
62
131
|
}
|
63
132
|
MakeBlend(mode, background, foreground, cropRect) {
|
64
|
-
const inputFilter = foreground === null ? null : JsiSkImageFilter.fromValue(foreground);
|
133
|
+
const inputFilter = foreground === null || foreground === undefined ? null : JsiSkImageFilter.fromValue(foreground);
|
65
134
|
if (cropRect) {
|
66
|
-
|
135
|
+
console.warn("cropRect is not supported on React Native Web for MakeBlend");
|
67
136
|
}
|
68
137
|
const filter = this.CanvasKit.ImageFilter.MakeBlend(getEnum(this.CanvasKit, "BlendMode", mode), JsiSkImageFilter.fromValue(background), inputFilter);
|
69
138
|
return new JsiSkImageFilter(this.CanvasKit, filter);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Host","throwNotImplementedOnRNWeb","getEnum","JsiSkImageFilter","JsiSkColorFilter","JsiSkImageFilterFactory","constructor","CanvasKit","MakeOffset","dx","dy","input","inputFilter","fromValue","filter","ImageFilter","MakeDisplacementMap","channelX","channelY","scale","in1","MakeShader","shader","_input","MakeBlur","sigmaX","sigmaY","mode","MakeColorFilter","cf","MakeCompose","outer","inner","MakeDropShadow","color","cropRect","MakeDropShadowOnly","MakeErode","rx","ry","MakeDilate","MakeBlend","background","foreground","MakeRuntimeShader","_builder","_childShaderName"],"sources":["JsiSkImageFilterFactory.ts"],"sourcesContent":["import type { CanvasKit, ImageFilter } from \"canvaskit-wasm\";\n\nimport type {\n ColorChannel,\n ImageFilterFactory,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n BlendMode,\n SkRect,\n SkRuntimeShaderBuilder,\n SkShader,\n TileMode,\n} from \"../types\";\n\nimport { Host, throwNotImplementedOnRNWeb, getEnum } from \"./Host\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\n\nexport class JsiSkImageFilterFactory\n extends Host\n implements ImageFilterFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n MakeOffset(dx: number, dy: number, input: SkImageFilter | null) {\n const inputFilter =\n input === null ? null : JsiSkImageFilter.fromValue<ImageFilter>(input);\n const filter = this.CanvasKit.ImageFilter.MakeOffset(dx, dy, inputFilter);\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeDisplacementMap(\n channelX: ColorChannel,\n channelY: ColorChannel,\n scale: number,\n in1: SkImageFilter,\n input: SkImageFilter | null\n ): SkImageFilter {\n const inputFilter =\n input === null ? null : JsiSkImageFilter.fromValue<ImageFilter>(input);\n const filter = this.CanvasKit.ImageFilter.MakeDisplacementMap(\n getEnum(this.CanvasKit, \"ColorChannel\", channelX),\n getEnum(this.CanvasKit, \"ColorChannel\", channelY),\n scale,\n JsiSkImageFilter.fromValue(in1),\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeShader(shader: SkShader, _input: SkImageFilter | null): SkImageFilter {\n const filter = this.CanvasKit.ImageFilter.MakeShader(\n JsiSkImageFilter.fromValue(shader)\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeBlur(\n sigmaX: number,\n sigmaY: number,\n mode: TileMode,\n input: SkImageFilter | null\n ) {\n return new JsiSkImageFilter(\n this.CanvasKit,\n this.CanvasKit.ImageFilter.MakeBlur(\n sigmaX,\n sigmaY,\n getEnum(this.CanvasKit, \"TileMode\", mode),\n input === null ? null : JsiSkImageFilter.fromValue(input)\n )\n );\n }\n\n MakeColorFilter(cf: SkColorFilter, input: SkImageFilter | null) {\n return new JsiSkImageFilter(\n this.CanvasKit,\n this.CanvasKit.ImageFilter.MakeColorFilter(\n JsiSkColorFilter.fromValue(cf),\n input === null ? null : JsiSkImageFilter.fromValue(input)\n )\n );\n }\n\n MakeCompose(outer: SkImageFilter | null, inner: SkImageFilter | null) {\n return new JsiSkImageFilter(\n this.CanvasKit,\n this.CanvasKit.ImageFilter.MakeCompose(\n outer === null ? null : JsiSkImageFilter.fromValue(outer),\n inner === null ? null : JsiSkImageFilter.fromValue(inner)\n )\n );\n }\n\n MakeDropShadow(\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ): SkImageFilter {\n const inputFilter =\n input === null ? null : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n const filter = this.CanvasKit.ImageFilter.MakeDropShadow(\n dx,\n dy,\n sigmaX,\n sigmaY,\n color,\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeDropShadowOnly(\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ): SkImageFilter {\n const inputFilter =\n input === null ? null : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n const filter = this.CanvasKit.ImageFilter.MakeDropShadowOnly(\n dx,\n dy,\n sigmaX,\n sigmaY,\n color,\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeErode(\n rx: number,\n ry: number,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ): SkImageFilter {\n const inputFilter =\n input === null ? null : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n const filter = this.CanvasKit.ImageFilter.MakeErode(rx, ry, inputFilter);\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeDilate(\n rx: number,\n ry: number,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ): SkImageFilter {\n const inputFilter =\n input === null ? null : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n const filter = this.CanvasKit.ImageFilter.MakeDilate(rx, ry, inputFilter);\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeBlend(\n mode: BlendMode,\n background: SkImageFilter,\n foreground: SkImageFilter | null,\n cropRect?: SkRect\n ): SkImageFilter {\n const inputFilter =\n foreground === null\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(foreground);\n if (cropRect) {\n throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n const filter = this.CanvasKit.ImageFilter.MakeBlend(\n getEnum(this.CanvasKit, \"BlendMode\", mode),\n JsiSkImageFilter.fromValue(background),\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeRuntimeShader(\n _builder: SkRuntimeShaderBuilder,\n _childShaderName: string | null,\n _input: SkImageFilter | null\n ) {\n return throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n}\n"],"mappings":"AAeA,SAASA,IAAI,EAAEC,0BAA0B,EAAEC,OAAO,QAAQ,QAAQ;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,OAAO,MAAMC,uBAAuB,SAC1BL,IAAI,CAEd;EACEM,WAAWA,CAACC,SAAoB,EAAE;IAChC,KAAK,CAACA,SAAS,CAAC;EAClB;EAEAC,UAAUA,CAACC,EAAU,EAAEC,EAAU,EAAEC,KAA2B,EAAE;IAC9D,MAAMC,WAAW,GACfD,KAAK,KAAK,IAAI,GAAG,IAAI,GAAGR,gBAAgB,CAACU,SAAS,CAAcF,KAAK,CAAC;IACxE,MAAMG,MAAM,GAAG,IAAI,CAACP,SAAS,CAACQ,WAAW,CAACP,UAAU,CAACC,EAAE,EAAEC,EAAE,EAAEE,WAAW,CAAC;IACzE,OAAO,IAAIT,gBAAgB,CAAC,IAAI,CAACI,SAAS,EAAEO,MAAM,CAAC;EACrD;EAEAE,mBAAmBA,CACjBC,QAAsB,EACtBC,QAAsB,EACtBC,KAAa,EACbC,GAAkB,E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;IACf,MAAMvB,WAAW,GACf+B,UAAU,KAAK,IAAI,GACf,IAAI,GACJxC,gBAAgB,CAACU,SAAS,CAAc8B,UAAU,CAAC;IACzD,IAAIR,QAAQ,EAAE;MACZlC,0BAA0B,CAAgB,CAAC;IAC7C;IACA,MAAMa,MAAM,GAAG,IAAI,CAACP,SAAS,CAACQ,WAAW,CAAC0B,SAAS,CACjDvC,OAAO,CAAC,IAAI,CAACK,SAAS,EAAE,WAAW,EAAEoB,IAAI,CAAC,EAC1CxB,gBAAgB,CAACU,SAAS,CAAC6B,UAAU,CAAC,EACtC9B,WACF,CAAC;IACD,OAAO,IAAIT,gBAAgB,CAAC,IAAI,CAACI,SAAS,EAAEO,MAAM,CAAC;EACrD;EAEA8B,iBAAiBA,CACfC,QAAgC,EAChCC,gBAA+B,EAC/BvB,MAA4B,EAC5B;IACA,OAAOtB,0BAA0B,CAAgB,CAAC;EACpD;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["Host","throwNotImplementedOnRNWeb","getEnum","JsiSkImageFilter","JsiSkColorFilter","JsiSkImageFilterFactory","constructor","CanvasKit","MakeRuntimeShaderWithChildren","_builder","_sampleRadius","_childShaderNames","_inputs","MakeArithmetic","_k1","_k2","_k3","_k4","_enforcePMColor","_background","_foreground","_cropRect","MakeCrop","_rect","_tileMode","_input","MakeEmpty","MakeImage","_image","_srcRect","_dstRect","_filterMode","_mipmap","MakeMagnifier","_lensBounds","_zoomAmount","_inset","MakeMatrixConvolution","_kernelSizeX","_kernelSizeY","_kernel","_gain","_bias","_kernelOffsetX","_kernelOffsetY","_convolveAlpha","MakeMatrixTransform","_matrix","MakeMerge","_filters","MakePicture","_picture","_targetRect","MakeTile","_src","_dst","MakeDistantLitDiffuse","_direction","_lightColor","_surfaceScale","_kd","MakePointLitDiffuse","_location","MakeSpotLitDiffuse","_target","_falloffExponent","_cutoffAngle","MakeDistantLitSpecular","_ks","_shininess","MakePointLitSpecular","MakeSpotLitSpecular","MakeOffset","dx","dy","input","cropRect","inputFilter","undefined","fromValue","console","warn","filter","ImageFilter","MakeDisplacementMap","channelX","channelY","scale","in1","MakeShader","shader","dither","MakeBlur","sigmaX","sigmaY","mode","MakeColorFilter","colorFilter","MakeCompose","outer","inner","MakeDropShadow","color","MakeDropShadowOnly","MakeErode","rx","ry","MakeDilate","MakeBlend","background","foreground","MakeRuntimeShader","_childShaderName"],"sources":["JsiSkImageFilterFactory.ts"],"sourcesContent":["import type { CanvasKit, ImageFilter } from \"canvaskit-wasm\";\n\nimport type {\n ColorChannel,\n ImageFilterFactory,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n BlendMode,\n SkRect,\n SkRuntimeShaderBuilder,\n SkShader,\n TileMode,\n FilterMode,\n MipmapMode,\n SkImage,\n SkMatrix,\n SkPicture,\n SkPoint3,\n} from \"../types\";\n\nimport { Host, throwNotImplementedOnRNWeb, getEnum } from \"./Host\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\n\nexport class JsiSkImageFilterFactory\n extends Host\n implements ImageFilterFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n MakeRuntimeShaderWithChildren(\n _builder: SkRuntimeShaderBuilder,\n _sampleRadius: number,\n _childShaderNames: string[],\n _inputs: Array<SkImageFilter | null>\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeArithmetic(\n _k1: number,\n _k2: number,\n _k3: number,\n _k4: number,\n _enforcePMColor: boolean,\n _background?: SkImageFilter | null,\n _foreground?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeCrop(\n _rect: SkRect,\n _tileMode?: TileMode | null,\n _input?: SkImageFilter | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeEmpty(): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeImage(\n _image: SkImage,\n _srcRect?: SkRect | null,\n _dstRect?: SkRect | null,\n _filterMode?: FilterMode,\n _mipmap?: MipmapMode\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeMagnifier(\n _lensBounds: SkRect,\n _zoomAmount: number,\n _inset: number,\n _filterMode?: FilterMode,\n _mipmap?: MipmapMode,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeMatrixConvolution(\n _kernelSizeX: number,\n _kernelSizeY: number,\n _kernel: number[],\n _gain: number,\n _bias: number,\n _kernelOffsetX: number,\n _kernelOffsetY: number,\n _tileMode: TileMode,\n _convolveAlpha: boolean,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeMatrixTransform(\n _matrix: SkMatrix,\n _filterMode?: FilterMode,\n _mipmap?: MipmapMode,\n _input?: SkImageFilter | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeMerge(\n _filters: Array<SkImageFilter | null>,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakePicture(_picture: SkPicture, _targetRect?: SkRect | null): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeTile(\n _src: SkRect,\n _dst: SkRect,\n _input?: SkImageFilter | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeDistantLitDiffuse(\n _direction: SkPoint3,\n _lightColor: SkColor,\n _surfaceScale: number,\n _kd: number,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakePointLitDiffuse(\n _location: SkPoint3,\n _lightColor: SkColor,\n _surfaceScale: number,\n _kd: number,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeSpotLitDiffuse(\n _location: SkPoint3,\n _target: SkPoint3,\n _falloffExponent: number,\n _cutoffAngle: number,\n _lightColor: SkColor,\n _surfaceScale: number,\n _kd: number,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeDistantLitSpecular(\n _direction: SkPoint3,\n _lightColor: SkColor,\n _surfaceScale: number,\n _ks: number,\n _shininess: number,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakePointLitSpecular(\n _location: SkPoint3,\n _lightColor: SkColor,\n _surfaceScale: number,\n _ks: number,\n _shininess: number,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n MakeSpotLitSpecular(\n _location: SkPoint3,\n _target: SkPoint3,\n _falloffExponent: number,\n _cutoffAngle: number,\n _lightColor: SkColor,\n _surfaceScale: number,\n _ks: number,\n _shininess: number,\n _input?: SkImageFilter | null,\n _cropRect?: SkRect | null\n ): SkImageFilter {\n throw throwNotImplementedOnRNWeb();\n }\n\n MakeOffset(\n dx: number,\n dy: number,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ) {\n const inputFilter =\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeOffset\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeOffset(dx, dy, inputFilter);\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeDisplacementMap(\n channelX: ColorChannel,\n channelY: ColorChannel,\n scale: number,\n in1: SkImageFilter,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ): SkImageFilter {\n const inputFilter =\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeDisplacementMap\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeDisplacementMap(\n getEnum(this.CanvasKit, \"ColorChannel\", channelX),\n getEnum(this.CanvasKit, \"ColorChannel\", channelY),\n scale,\n JsiSkImageFilter.fromValue(in1),\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeShader(\n shader: SkShader,\n dither?: boolean,\n cropRect?: SkRect | null\n ): SkImageFilter {\n if (dither !== undefined) {\n console.warn(\n \"dither parameter is not supported on React Native Web for MakeShader\"\n );\n }\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeShader\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeShader(\n JsiSkImageFilter.fromValue(shader)\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeBlur(\n sigmaX: number,\n sigmaY: number,\n mode: TileMode,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ) {\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeBlur\"\n );\n }\n return new JsiSkImageFilter(\n this.CanvasKit,\n this.CanvasKit.ImageFilter.MakeBlur(\n sigmaX,\n sigmaY,\n getEnum(this.CanvasKit, \"TileMode\", mode),\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue(input)\n )\n );\n }\n\n MakeColorFilter(\n colorFilter: SkColorFilter,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ) {\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeColorFilter\"\n );\n }\n return new JsiSkImageFilter(\n this.CanvasKit,\n this.CanvasKit.ImageFilter.MakeColorFilter(\n JsiSkColorFilter.fromValue(colorFilter),\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue(input)\n )\n );\n }\n\n MakeCompose(outer: SkImageFilter | null, inner: SkImageFilter | null) {\n return new JsiSkImageFilter(\n this.CanvasKit,\n this.CanvasKit.ImageFilter.MakeCompose(\n outer === null ? null : JsiSkImageFilter.fromValue(outer),\n inner === null ? null : JsiSkImageFilter.fromValue(inner)\n )\n );\n }\n\n MakeDropShadow(\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ): SkImageFilter {\n const inputFilter =\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeDropShadow\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeDropShadow(\n dx,\n dy,\n sigmaX,\n sigmaY,\n color,\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeDropShadowOnly(\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ): SkImageFilter {\n const inputFilter =\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeDropShadowOnly\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeDropShadowOnly(\n dx,\n dy,\n sigmaX,\n sigmaY,\n color,\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeErode(\n rx: number,\n ry: number,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ): SkImageFilter {\n const inputFilter =\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeErode\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeErode(rx, ry, inputFilter);\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeDilate(\n rx: number,\n ry: number,\n input?: SkImageFilter | null,\n cropRect?: SkRect | null\n ): SkImageFilter {\n const inputFilter =\n input === null || input === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(input);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeDilate\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeDilate(rx, ry, inputFilter);\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeBlend(\n mode: BlendMode,\n background: SkImageFilter,\n foreground?: SkImageFilter | null,\n cropRect?: SkRect | null\n ): SkImageFilter {\n const inputFilter =\n foreground === null || foreground === undefined\n ? null\n : JsiSkImageFilter.fromValue<ImageFilter>(foreground);\n if (cropRect) {\n console.warn(\n \"cropRect is not supported on React Native Web for MakeBlend\"\n );\n }\n const filter = this.CanvasKit.ImageFilter.MakeBlend(\n getEnum(this.CanvasKit, \"BlendMode\", mode),\n JsiSkImageFilter.fromValue(background),\n inputFilter\n );\n return new JsiSkImageFilter(this.CanvasKit, filter);\n }\n\n MakeRuntimeShader(\n _builder: SkRuntimeShaderBuilder,\n _childShaderName: string | null,\n _input?: SkImageFilter | null\n ) {\n return throwNotImplementedOnRNWeb<SkImageFilter>();\n }\n}\n"],"mappings":"AAqBA,SAASA,IAAI,EAAEC,0BAA0B,EAAEC,OAAO,QAAQ,QAAQ;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,OAAO,MAAMC,uBAAuB,SAC1BL,IAAI,CAEd;EACEM,WAAWA,CAACC,SAAoB,EAAE;IAChC,KAAK,CAACA,SAAS,CAAC;EAClB;EACAC,6BAA6BA,CAC3BC,QAAgC,EAChCC,aAAqB,EACrBC,iBAA2B,EAC3BC,OAAoC,EACrB;IACf,MAAMX,0BAA0B,CAAC,CAAC;EACpC;EACAY,cAAcA,CACZC,GAAW,EACXC,GAAW,EACXC,GAAW,EACXC,GAAW,EACXC,eAAwB,EACxBC,WAAkC,EAClCC,WAAkC,EAClCC,SAAyB,EACV;IACf,MAAMpB,0BAA0B,CAAC,CAAC;EACpC;EACAqB,QAAQA,CACNC,KAAa,EACbC,SAA2B,EAC3BC,MAA6B,EACd;IACf,MAAMx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8B,UAAU,CAAC,EACtChC,WACF,CAAC;IACD,OAAO,IAAI1E,gBAAgB,CAAC,IAAI,CAACI,SAAS,EAAE2E,MAAM,CAAC;EACrD;EAEA6B,iBAAiBA,CACftG,QAAgC,EAChCuG,gBAA+B,EAC/BvF,MAA6B,EAC7B;IACA,OAAOxB,0BAA0B,CAAgB,CAAC;EACpD;AACF","ignoreList":[]}
|
@@ -32,6 +32,7 @@ import { JsiSkParagraphBuilderFactory } from "./JsiSkParagraphBuilderFactory";
|
|
32
32
|
import { JsiSkNativeBufferFactory } from "./JsiSkNativeBufferFactory";
|
33
33
|
import { createVideo } from "./JsiVideo";
|
34
34
|
import { throwNotImplementedOnRNWeb } from "./Host";
|
35
|
+
import { JsiSkottieFactory } from "./JsiSkottieFactory";
|
35
36
|
export const JsiSkApi = CanvasKit => ({
|
36
37
|
Point: (x, y) => new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),
|
37
38
|
RuntimeShaderBuilder: _ => {
|
@@ -77,6 +78,7 @@ export const JsiSkApi = CanvasKit => ({
|
|
77
78
|
FontMgr: new JsiSkFontMgrFactory(CanvasKit),
|
78
79
|
ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit),
|
79
80
|
NativeBuffer: new JsiSkNativeBufferFactory(CanvasKit),
|
81
|
+
Skottie: new JsiSkottieFactory(CanvasKit),
|
80
82
|
Video: createVideo.bind(null, CanvasKit),
|
81
83
|
Context: (_surface, _width, _height) => {
|
82
84
|
return throwNotImplementedOnRNWeb();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JsiSkPoint","JsiSkPaint","JsiSkRect","Color","JsiSkSurfaceFactory","JsiSkRRect","JsiSkRSXform","JsiSkContourMeasureIter","JsiSkPictureRecorder","JsiSkPictureFactory","JsiSkPathFactory","JsiSkMatrix","JsiSkColorFilterFactory","JsiSkTypefaceFactory","JsiSkMaskFilterFactory","JsiSkRuntimeEffectFactory","JsiSkImageFilterFactory","JsiSkShaderFactory","JsiSkPathEffectFactory","JsiSkDataFactory","JsiSkImageFactory","JsiSkSVGFactory","JsiSkTextBlobFactory","JsiSkFont","MakeVertices","JsiSkPath","JsiSkTypeface","JsiSkTypefaceFontProviderFactory","JsiSkFontMgrFactory","JsiSkAnimatedImageFactory","JsiSkParagraphBuilderFactory","JsiSkNativeBufferFactory","createVideo","throwNotImplementedOnRNWeb","JsiSkApi","CanvasKit","Point","x","y","Float32Array","of","RuntimeShaderBuilder","_","RRectXY","rect","rx","ry","RSXform","scos","ssin","tx","ty","RSXformFromRadians","scale","r","px","py","s","Math","sin","c","cos","ContourMeasureIter","path","forceClosed","resScale","fromValue","Paint","paint","setAntiAlias","PictureRecorder","Picture","Path","Matrix","matrix","identity","ColorFilter","Font","typeface","size","undefined","Typeface","MaskFilter","RuntimeEffect","ImageFilter","Shader","PathEffect","bind","Data","Image","AnimatedImage","SVG","TextBlob","XYWHRect","width","height","Surface","TypefaceFontProvider","FontMgr","ParagraphBuilder","NativeBuffer","Video","Context","_surface","_width","_height","Recorder"],"sources":["JsiSkia.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n JsiRecorder,\n SkContourMeasureIter,\n Skia,\n SkiaContext,\n SkPath,\n SkRect,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n SkTypeface,\n} from \"../types\";\n\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkRSXform } from \"./JsiSkRSXform\";\nimport { JsiSkContourMeasureIter } from \"./JsiSkContourMeasureIter\";\nimport { JsiSkPictureRecorder } from \"./JsiSkPictureRecorder\";\nimport { JsiSkPictureFactory } from \"./JsiSkPictureFactory\";\nimport { JsiSkPathFactory } from \"./JsiSkPathFactory\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkColorFilterFactory } from \"./JsiSkColorFilterFactory\";\nimport { JsiSkTypefaceFactory } from \"./JsiSkTypefaceFactory\";\nimport { JsiSkMaskFilterFactory } from \"./JsiSkMaskFilterFactory\";\nimport { JsiSkRuntimeEffectFactory } from \"./JsiSkRuntimeEffectFactory\";\nimport { JsiSkImageFilterFactory } from \"./JsiSkImageFilterFactory\";\nimport { JsiSkShaderFactory } from \"./JsiSkShaderFactory\";\nimport { JsiSkPathEffectFactory } from \"./JsiSkPathEffectFactory\";\nimport { JsiSkDataFactory } from \"./JsiSkDataFactory\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\nimport { JsiSkSVGFactory } from \"./JsiSkSVGFactory\";\nimport { JsiSkTextBlobFactory } from \"./JsiSkTextBlobFactory\";\nimport { JsiSkFont } from \"./JsiSkFont\";\nimport { MakeVertices } from \"./JsiSkVerticesFactory\";\nimport { JsiSkPath } from \"./JsiSkPath\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { JsiSkTypefaceFontProviderFactory } from \"./JsiSkTypefaceFontProviderFactory\";\nimport { JsiSkFontMgrFactory } from \"./JsiSkFontMgrFactory\";\nimport { JsiSkAnimatedImageFactory } from \"./JsiSkAnimatedImageFactory\";\nimport { JsiSkParagraphBuilderFactory } from \"./JsiSkParagraphBuilderFactory\";\nimport { JsiSkNativeBufferFactory } from \"./JsiSkNativeBufferFactory\";\nimport { createVideo } from \"./JsiVideo\";\nimport { throwNotImplementedOnRNWeb } from \"./Host\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({\n Point: (x: number, y: number) =>\n new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),\n RuntimeShaderBuilder: (_: SkRuntimeEffect) => {\n return throwNotImplementedOnRNWeb<SkRuntimeShaderBuilder>();\n },\n RRectXY: (rect: SkRect, rx: number, ry: number) =>\n new JsiSkRRect(CanvasKit, rect, rx, ry),\n RSXform: (scos: number, ssin: number, tx: number, ty: number) =>\n new JsiSkRSXform(CanvasKit, Float32Array.of(scos, ssin, tx, ty)),\n RSXformFromRadians: (\n scale: number,\n r: number,\n tx: number,\n ty: number,\n px: number,\n py: number\n ) => {\n const s = Math.sin(r) * scale;\n const c = Math.cos(r) * scale;\n return new JsiSkRSXform(\n CanvasKit,\n Float32Array.of(c, s, tx - c * px + s * py, ty - s * px - c * py)\n );\n },\n Color,\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ): SkContourMeasureIter =>\n new JsiSkContourMeasureIter(\n CanvasKit,\n new CanvasKit.ContourMeasureIter(\n JsiSkPath.fromValue(path),\n forceClosed,\n resScale\n )\n ),\n Paint: () => {\n const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());\n paint.setAntiAlias(true);\n return paint;\n },\n PictureRecorder: () =>\n new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),\n Picture: new JsiSkPictureFactory(CanvasKit),\n Path: new JsiSkPathFactory(CanvasKit),\n Matrix: (matrix?: readonly number[]) =>\n new JsiSkMatrix(\n CanvasKit,\n matrix\n ? Float32Array.of(...matrix)\n : Float32Array.of(...CanvasKit.Matrix.identity())\n ),\n ColorFilter: new JsiSkColorFilterFactory(CanvasKit),\n Font: (typeface?: SkTypeface, size?: number) =>\n new JsiSkFont(\n CanvasKit,\n new CanvasKit.Font(\n typeface === undefined ? null : JsiSkTypeface.fromValue(typeface),\n size\n )\n ),\n Typeface: new JsiSkTypefaceFactory(CanvasKit),\n MaskFilter: new JsiSkMaskFilterFactory(CanvasKit),\n RuntimeEffect: new JsiSkRuntimeEffectFactory(CanvasKit),\n ImageFilter: new JsiSkImageFilterFactory(CanvasKit),\n Shader: new JsiSkShaderFactory(CanvasKit),\n PathEffect: new JsiSkPathEffectFactory(CanvasKit),\n MakeVertices: MakeVertices.bind(null, CanvasKit),\n Data: new JsiSkDataFactory(CanvasKit),\n Image: new JsiSkImageFactory(CanvasKit),\n AnimatedImage: new JsiSkAnimatedImageFactory(CanvasKit),\n SVG: new JsiSkSVGFactory(CanvasKit),\n TextBlob: new JsiSkTextBlobFactory(CanvasKit),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),\n FontMgr: new JsiSkFontMgrFactory(CanvasKit),\n ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit),\n NativeBuffer: new JsiSkNativeBufferFactory(CanvasKit),\n Video: createVideo.bind(null, CanvasKit),\n Context: (_surface: bigint, _width: number, _height: number) => {\n return throwNotImplementedOnRNWeb<SkiaContext>();\n },\n Recorder: () => {\n return throwNotImplementedOnRNWeb<JsiRecorder>();\n },\n});\n"],"mappings":"AAcA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,KAAK,QAAQ,cAAc;AACpC,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE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AAC,CAAC;EAC1E,CAAC;EACDC,OAAO,EAAE,IAAI5F,mBAAmB,CAAC+B,SAAS,CAAC;EAC3C8D,oBAAoB,EAAE,IAAItE,gCAAgC,CAACQ,SAAS,CAAC;EACrE+D,OAAO,EAAE,IAAItE,mBAAmB,CAACO,SAAS,CAAC;EAC3CgE,gBAAgB,EAAE,IAAIrE,4BAA4B,CAACK,SAAS,CAAC;EAC7DiE,YAAY,EAAE,IAAIrE,wBAAwB,CAACI,SAAS,CAAC;EACrDkE,KAAK,EAAErE,WAAW,CAACuD,IAAI,CAAC,IAAI,EAAEpD,SAAS,CAAC;EACxCmE,OAAO,EAAEA,CAACC,QAAgB,EAAEC,MAAc,EAAEC,OAAe,KAAK;IAC9D,OAAOxE,0BAA0B,CAAc,CAAC;EAClD,CAAC;EACDyE,QAAQ,EAAEA,CAAA,KAAM;IACd,OAAOzE,0BAA0B,CAAc,CAAC;EAClD;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["JsiSkPoint","JsiSkPaint","JsiSkRect","Color","JsiSkSurfaceFactory","JsiSkRRect","JsiSkRSXform","JsiSkContourMeasureIter","JsiSkPictureRecorder","JsiSkPictureFactory","JsiSkPathFactory","JsiSkMatrix","JsiSkColorFilterFactory","JsiSkTypefaceFactory","JsiSkMaskFilterFactory","JsiSkRuntimeEffectFactory","JsiSkImageFilterFactory","JsiSkShaderFactory","JsiSkPathEffectFactory","JsiSkDataFactory","JsiSkImageFactory","JsiSkSVGFactory","JsiSkTextBlobFactory","JsiSkFont","MakeVertices","JsiSkPath","JsiSkTypeface","JsiSkTypefaceFontProviderFactory","JsiSkFontMgrFactory","JsiSkAnimatedImageFactory","JsiSkParagraphBuilderFactory","JsiSkNativeBufferFactory","createVideo","throwNotImplementedOnRNWeb","JsiSkottieFactory","JsiSkApi","CanvasKit","Point","x","y","Float32Array","of","RuntimeShaderBuilder","_","RRectXY","rect","rx","ry","RSXform","scos","ssin","tx","ty","RSXformFromRadians","scale","r","px","py","s","Math","sin","c","cos","ContourMeasureIter","path","forceClosed","resScale","fromValue","Paint","paint","setAntiAlias","PictureRecorder","Picture","Path","Matrix","matrix","identity","ColorFilter","Font","typeface","size","undefined","Typeface","MaskFilter","RuntimeEffect","ImageFilter","Shader","PathEffect","bind","Data","Image","AnimatedImage","SVG","TextBlob","XYWHRect","width","height","Surface","TypefaceFontProvider","FontMgr","ParagraphBuilder","NativeBuffer","Skottie","Video","Context","_surface","_width","_height","Recorder"],"sources":["JsiSkia.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n JsiRecorder,\n SkContourMeasureIter,\n Skia,\n SkiaContext,\n SkPath,\n SkRect,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n SkTypeface,\n} from \"../types\";\n\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkRSXform } from \"./JsiSkRSXform\";\nimport { JsiSkContourMeasureIter } from \"./JsiSkContourMeasureIter\";\nimport { JsiSkPictureRecorder } from \"./JsiSkPictureRecorder\";\nimport { JsiSkPictureFactory } from \"./JsiSkPictureFactory\";\nimport { JsiSkPathFactory } from \"./JsiSkPathFactory\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkColorFilterFactory } from \"./JsiSkColorFilterFactory\";\nimport { JsiSkTypefaceFactory } from \"./JsiSkTypefaceFactory\";\nimport { JsiSkMaskFilterFactory } from \"./JsiSkMaskFilterFactory\";\nimport { JsiSkRuntimeEffectFactory } from \"./JsiSkRuntimeEffectFactory\";\nimport { JsiSkImageFilterFactory } from \"./JsiSkImageFilterFactory\";\nimport { JsiSkShaderFactory } from \"./JsiSkShaderFactory\";\nimport { JsiSkPathEffectFactory } from \"./JsiSkPathEffectFactory\";\nimport { JsiSkDataFactory } from \"./JsiSkDataFactory\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\nimport { JsiSkSVGFactory } from \"./JsiSkSVGFactory\";\nimport { JsiSkTextBlobFactory } from \"./JsiSkTextBlobFactory\";\nimport { JsiSkFont } from \"./JsiSkFont\";\nimport { MakeVertices } from \"./JsiSkVerticesFactory\";\nimport { JsiSkPath } from \"./JsiSkPath\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { JsiSkTypefaceFontProviderFactory } from \"./JsiSkTypefaceFontProviderFactory\";\nimport { JsiSkFontMgrFactory } from \"./JsiSkFontMgrFactory\";\nimport { JsiSkAnimatedImageFactory } from \"./JsiSkAnimatedImageFactory\";\nimport { JsiSkParagraphBuilderFactory } from \"./JsiSkParagraphBuilderFactory\";\nimport { JsiSkNativeBufferFactory } from \"./JsiSkNativeBufferFactory\";\nimport { createVideo } from \"./JsiVideo\";\nimport { throwNotImplementedOnRNWeb } from \"./Host\";\nimport { JsiSkottieFactory } from \"./JsiSkottieFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({\n Point: (x: number, y: number) =>\n new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),\n RuntimeShaderBuilder: (_: SkRuntimeEffect) => {\n return throwNotImplementedOnRNWeb<SkRuntimeShaderBuilder>();\n },\n RRectXY: (rect: SkRect, rx: number, ry: number) =>\n new JsiSkRRect(CanvasKit, rect, rx, ry),\n RSXform: (scos: number, ssin: number, tx: number, ty: number) =>\n new JsiSkRSXform(CanvasKit, Float32Array.of(scos, ssin, tx, ty)),\n RSXformFromRadians: (\n scale: number,\n r: number,\n tx: number,\n ty: number,\n px: number,\n py: number\n ) => {\n const s = Math.sin(r) * scale;\n const c = Math.cos(r) * scale;\n return new JsiSkRSXform(\n CanvasKit,\n Float32Array.of(c, s, tx - c * px + s * py, ty - s * px - c * py)\n );\n },\n Color,\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ): SkContourMeasureIter =>\n new JsiSkContourMeasureIter(\n CanvasKit,\n new CanvasKit.ContourMeasureIter(\n JsiSkPath.fromValue(path),\n forceClosed,\n resScale\n )\n ),\n Paint: () => {\n const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());\n paint.setAntiAlias(true);\n return paint;\n },\n PictureRecorder: () =>\n new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),\n Picture: new JsiSkPictureFactory(CanvasKit),\n Path: new JsiSkPathFactory(CanvasKit),\n Matrix: (matrix?: readonly number[]) =>\n new JsiSkMatrix(\n CanvasKit,\n matrix\n ? Float32Array.of(...matrix)\n : Float32Array.of(...CanvasKit.Matrix.identity())\n ),\n ColorFilter: new JsiSkColorFilterFactory(CanvasKit),\n Font: (typeface?: SkTypeface, size?: number) =>\n new JsiSkFont(\n CanvasKit,\n new CanvasKit.Font(\n typeface === undefined ? null : JsiSkTypeface.fromValue(typeface),\n size\n )\n ),\n Typeface: new JsiSkTypefaceFactory(CanvasKit),\n MaskFilter: new JsiSkMaskFilterFactory(CanvasKit),\n RuntimeEffect: new JsiSkRuntimeEffectFactory(CanvasKit),\n ImageFilter: new JsiSkImageFilterFactory(CanvasKit),\n Shader: new JsiSkShaderFactory(CanvasKit),\n PathEffect: new JsiSkPathEffectFactory(CanvasKit),\n MakeVertices: MakeVertices.bind(null, CanvasKit),\n Data: new JsiSkDataFactory(CanvasKit),\n Image: new JsiSkImageFactory(CanvasKit),\n AnimatedImage: new JsiSkAnimatedImageFactory(CanvasKit),\n SVG: new JsiSkSVGFactory(CanvasKit),\n TextBlob: new JsiSkTextBlobFactory(CanvasKit),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),\n FontMgr: new JsiSkFontMgrFactory(CanvasKit),\n ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit),\n NativeBuffer: new JsiSkNativeBufferFactory(CanvasKit),\n Skottie: new JsiSkottieFactory(CanvasKit),\n Video: createVideo.bind(null, CanvasKit),\n Context: (_surface: bigint, _width: number, _height: number) => {\n return throwNotImplementedOnRNWeb<SkiaContext>();\n },\n Recorder: () => {\n return throwNotImplementedOnRNWeb<JsiRecorder>();\n },\n});\n"],"mappings":"AAcA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,KAAK,QAAQ,cAAc;AACpC,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,aAAa,QAAQ,iBAA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E,4BAA4B,CAACM,SAAS,CAAC;EAC7DiE,YAAY,EAAE,IAAItE,wBAAwB,CAACK,SAAS,CAAC;EACrDkE,OAAO,EAAE,IAAIpE,iBAAiB,CAACE,SAAS,CAAC;EACzCmE,KAAK,EAAEvE,WAAW,CAACwD,IAAI,CAAC,IAAI,EAAEpD,SAAS,CAAC;EACxCoE,OAAO,EAAEA,CAACC,QAAgB,EAAEC,MAAc,EAAEC,OAAe,KAAK;IAC9D,OAAO1E,0BAA0B,CAAc,CAAC;EAClD,CAAC;EACD2E,QAAQ,EAAEA,CAAA,KAAM;IACd,OAAO3E,0BAA0B,CAAc,CAAC;EAClD;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import type { CanvasKit, ManagedSkottieAnimation } from "canvaskit-wasm";
|
2
|
+
import type { SkSkottieAnimation, SlotInfo, SlottableTextProperty } from "../types/Skottie";
|
3
|
+
import type { SkColor, SkPoint, SkRect } from "../types";
|
4
|
+
import { HostObject } from "./Host";
|
5
|
+
import type { JsiSkCanvas } from "./JsiSkCanvas";
|
6
|
+
import { JsiSkRect } from "./JsiSkRect";
|
7
|
+
export declare class JsiSkottieAnimation extends HostObject<ManagedSkottieAnimation, "SkottieAnimation"> implements SkSkottieAnimation {
|
8
|
+
constructor(CanvasKit: CanvasKit, ref: ManagedSkottieAnimation);
|
9
|
+
getOpacityProps(): import("canvaskit-wasm").OpacityProperty[];
|
10
|
+
getTextProps(): import("canvaskit-wasm").TextProperty[];
|
11
|
+
getColorProps(): {
|
12
|
+
key: string;
|
13
|
+
value: SkColor;
|
14
|
+
}[];
|
15
|
+
getTransformProps(): {
|
16
|
+
key: string;
|
17
|
+
value: {
|
18
|
+
anchor: {
|
19
|
+
x: number;
|
20
|
+
y: number;
|
21
|
+
};
|
22
|
+
position: {
|
23
|
+
x: number;
|
24
|
+
y: number;
|
25
|
+
};
|
26
|
+
scale: {
|
27
|
+
x: number;
|
28
|
+
y: number;
|
29
|
+
};
|
30
|
+
rotation: number;
|
31
|
+
skew: number;
|
32
|
+
skewAxis: number;
|
33
|
+
};
|
34
|
+
}[];
|
35
|
+
setColor(key: string, color: SkColor): boolean;
|
36
|
+
setText(key: string, text: string, size: number): boolean;
|
37
|
+
setOpacity(key: string, opacity: number): boolean;
|
38
|
+
setTransform(key: string, anchor: SkPoint, position: SkPoint, scale: SkPoint, rotation: number, skew: number, skewAxis: number): boolean;
|
39
|
+
getSlotInfo(): SlotInfo;
|
40
|
+
setColorSlot(key: string, color: SkColor): boolean;
|
41
|
+
setScalarSlot(key: string, scalar: number): boolean;
|
42
|
+
setVec2Slot(key: string, vec2: SkPoint): boolean;
|
43
|
+
setTextSlot(key: string, text: SlottableTextProperty): boolean;
|
44
|
+
setImageSlot(key: string, assetName: string): boolean;
|
45
|
+
getColorSlot(key: string): SkColor | null;
|
46
|
+
getScalarSlot(key: string): number | null;
|
47
|
+
getVec2Slot(key: string): SkPoint | null;
|
48
|
+
getTextSlot(key: string): SlottableTextProperty | null;
|
49
|
+
duration(): number;
|
50
|
+
fps(): number;
|
51
|
+
render(canvas: JsiSkCanvas, dstRect?: SkRect): void;
|
52
|
+
seekFrame(frame: number, damageRect?: JsiSkRect): void;
|
53
|
+
size(): {
|
54
|
+
width: number;
|
55
|
+
height: number;
|
56
|
+
};
|
57
|
+
version(): string;
|
58
|
+
dispose(): void;
|
59
|
+
}
|
@@ -0,0 +1,236 @@
|
|
1
|
+
import { HostObject } from "./Host";
|
2
|
+
import { JsiSkTypeface } from "./JsiSkTypeface";
|
3
|
+
import { Color } from "./JsiSkColor";
|
4
|
+
import { JsiSkRect } from "./JsiSkRect";
|
5
|
+
export class JsiSkottieAnimation extends HostObject {
|
6
|
+
constructor(CanvasKit, ref) {
|
7
|
+
super(CanvasKit, ref, "SkottieAnimation");
|
8
|
+
}
|
9
|
+
getOpacityProps() {
|
10
|
+
return this.ref.getOpacityProps();
|
11
|
+
}
|
12
|
+
getTextProps() {
|
13
|
+
return this.ref.getTextProps();
|
14
|
+
}
|
15
|
+
getColorProps() {
|
16
|
+
return this.ref.getColorProps().map(({
|
17
|
+
key,
|
18
|
+
value
|
19
|
+
}) => ({
|
20
|
+
key,
|
21
|
+
value: Color(value)
|
22
|
+
}));
|
23
|
+
}
|
24
|
+
getTransformProps() {
|
25
|
+
return this.ref.getTransformProps().map(({
|
26
|
+
key,
|
27
|
+
value
|
28
|
+
}) => ({
|
29
|
+
key,
|
30
|
+
value: {
|
31
|
+
anchor: {
|
32
|
+
x: value.anchor[0],
|
33
|
+
y: value.anchor[1]
|
34
|
+
},
|
35
|
+
position: {
|
36
|
+
x: value.position[0],
|
37
|
+
y: value.position[1]
|
38
|
+
},
|
39
|
+
scale: {
|
40
|
+
x: value.scale[0],
|
41
|
+
y: value.scale[1]
|
42
|
+
},
|
43
|
+
rotation: value.rotation,
|
44
|
+
skew: value.skew,
|
45
|
+
skewAxis: value.skew_axis
|
46
|
+
}
|
47
|
+
}));
|
48
|
+
}
|
49
|
+
setColor(key, color) {
|
50
|
+
return this.ref.setColor(key, color);
|
51
|
+
}
|
52
|
+
setText(key, text, size) {
|
53
|
+
return this.ref.setText(key, text, size);
|
54
|
+
}
|
55
|
+
setOpacity(key, opacity) {
|
56
|
+
return this.ref.setOpacity(key, opacity);
|
57
|
+
}
|
58
|
+
setTransform(key, anchor, position, scale, rotation, skew, skewAxis) {
|
59
|
+
const a = Float32Array.of(anchor.x, anchor.y);
|
60
|
+
const p = Float32Array.of(position.x, position.y);
|
61
|
+
const s = Float32Array.of(scale.x, scale.y);
|
62
|
+
return this.ref.setTransform(key, a, p, s, rotation, skew, skewAxis);
|
63
|
+
}
|
64
|
+
getSlotInfo() {
|
65
|
+
return this.ref.getSlotInfo();
|
66
|
+
}
|
67
|
+
setColorSlot(key, color) {
|
68
|
+
return this.ref.setColorSlot(key, color);
|
69
|
+
}
|
70
|
+
setScalarSlot(key, scalar) {
|
71
|
+
return this.ref.setScalarSlot(key, scalar);
|
72
|
+
}
|
73
|
+
setVec2Slot(key, vec2) {
|
74
|
+
return this.ref.setVec2Slot(key, Float32Array.of(vec2.x, vec2.y));
|
75
|
+
}
|
76
|
+
setTextSlot(key, text) {
|
77
|
+
var _text$text, _text$textSize, _text$minTextSize, _text$maxTextSize, _text$strokeWidth, _text$lineHeight, _text$lineShift;
|
78
|
+
const txt = {
|
79
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
80
|
+
// @ts-expect-error
|
81
|
+
typeface: text.typeface && text.typeface instanceof JsiSkTypeface ? text.typeface.ref : null,
|
82
|
+
text: (_text$text = text.text) !== null && _text$text !== void 0 ? _text$text : "",
|
83
|
+
textSize: (_text$textSize = text.textSize) !== null && _text$textSize !== void 0 ? _text$textSize : 0,
|
84
|
+
minTextSize: (_text$minTextSize = text.minTextSize) !== null && _text$minTextSize !== void 0 ? _text$minTextSize : 0,
|
85
|
+
maxTextSize: (_text$maxTextSize = text.maxTextSize) !== null && _text$maxTextSize !== void 0 ? _text$maxTextSize : Number.MAX_VALUE,
|
86
|
+
strokeWidth: (_text$strokeWidth = text.strokeWidth) !== null && _text$strokeWidth !== void 0 ? _text$strokeWidth : 0,
|
87
|
+
lineHeight: (_text$lineHeight = text.lineHeight) !== null && _text$lineHeight !== void 0 ? _text$lineHeight : 0,
|
88
|
+
lineShift: (_text$lineShift = text.lineShift) !== null && _text$lineShift !== void 0 ? _text$lineShift : 0,
|
89
|
+
ascent: text.ascent,
|
90
|
+
maxLines: text.maxLines,
|
91
|
+
// TODO: implement
|
92
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
93
|
+
//@ts-expect-error
|
94
|
+
horizAlign: this.CanvasKit.TextAlign.Left,
|
95
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
96
|
+
//@ts-expect-error
|
97
|
+
vertAlign: this.CanvasKit.VerticalTextAlign.Top,
|
98
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
99
|
+
//@ts-expect-error
|
100
|
+
strokeJoin: this.CanvasKit.StrokeJoin.Miter,
|
101
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
102
|
+
//@ts-expect-error
|
103
|
+
direction: this.CanvasKit.TextDirection.LTR,
|
104
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
105
|
+
// @ts-expect-error
|
106
|
+
linebreak: this.CanvasKit.LineBreakType.HardLineBreak,
|
107
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
108
|
+
// @ts-expect-error
|
109
|
+
resize: this.CanvasKit.ResizePolicy.None,
|
110
|
+
boundingBox: text.boundingBox ? this.CanvasKit.XYWHRect(text.boundingBox.x, text.boundingBox.y, text.boundingBox.width, text.boundingBox.height) : [0, 0, 0, 0],
|
111
|
+
fillColor: text.fillColor ? Color(text.fillColor) : this.CanvasKit.TRANSPARENT,
|
112
|
+
strokeColor: text.strokeColor ? Color(text.strokeColor) : this.CanvasKit.TRANSPARENT
|
113
|
+
};
|
114
|
+
return this.ref.setTextSlot(key, txt);
|
115
|
+
}
|
116
|
+
setImageSlot(key, assetName) {
|
117
|
+
return this.ref.setImageSlot(key, assetName);
|
118
|
+
}
|
119
|
+
getColorSlot(key) {
|
120
|
+
const color = this.ref.getColorSlot(key);
|
121
|
+
return color;
|
122
|
+
}
|
123
|
+
getScalarSlot(key) {
|
124
|
+
return this.ref.getScalarSlot(key);
|
125
|
+
}
|
126
|
+
getVec2Slot(key) {
|
127
|
+
const vec2 = this.ref.getVec2Slot(key);
|
128
|
+
if (!vec2) {
|
129
|
+
return null;
|
130
|
+
}
|
131
|
+
return {
|
132
|
+
x: vec2[0],
|
133
|
+
y: vec2[1]
|
134
|
+
};
|
135
|
+
}
|
136
|
+
getTextSlot(key) {
|
137
|
+
const result = this.ref.getTextSlot(key);
|
138
|
+
const textSlot = {};
|
139
|
+
if (result) {
|
140
|
+
if (result.typeface) {
|
141
|
+
textSlot.typeface = new JsiSkTypeface(this.CanvasKit, result.typeface);
|
142
|
+
}
|
143
|
+
if (result.text) {
|
144
|
+
textSlot.text = result.text;
|
145
|
+
}
|
146
|
+
if (result.textSize) {
|
147
|
+
textSlot.textSize = result.textSize;
|
148
|
+
}
|
149
|
+
if (result.minTextSize) {
|
150
|
+
textSlot.minTextSize = result.minTextSize;
|
151
|
+
}
|
152
|
+
if (result.maxTextSize) {
|
153
|
+
textSlot.maxTextSize = result.maxTextSize;
|
154
|
+
}
|
155
|
+
if (result.strokeWidth) {
|
156
|
+
textSlot.strokeWidth = result.strokeWidth;
|
157
|
+
}
|
158
|
+
if (result.lineHeight) {
|
159
|
+
textSlot.lineHeight = result.lineHeight;
|
160
|
+
}
|
161
|
+
if (result.lineShift) {
|
162
|
+
textSlot.lineShift = result.lineShift;
|
163
|
+
}
|
164
|
+
if (result.ascent) {
|
165
|
+
textSlot.ascent = result.ascent;
|
166
|
+
}
|
167
|
+
if (result.maxLines) {
|
168
|
+
textSlot.maxLines = result.maxLines;
|
169
|
+
}
|
170
|
+
// if (result.horizAlign) {
|
171
|
+
// textSlot.horizAlign = result.horizAlign;
|
172
|
+
// }
|
173
|
+
// if (result.vertAlign) {
|
174
|
+
// textSlot.vertAlign = result.vertAlign;
|
175
|
+
// }
|
176
|
+
// if (result.strokeJoin) {
|
177
|
+
// textSlot.strokeJoin = result.strokeJoin;
|
178
|
+
// }
|
179
|
+
// if (result.direction) {
|
180
|
+
// textSlot.direction = result.direction;
|
181
|
+
// }
|
182
|
+
// if (result.linebreak) {
|
183
|
+
// textSlot.linebreak = result.linebreak;
|
184
|
+
// }
|
185
|
+
// if (result.resize) {
|
186
|
+
// textSlot.resize = result.resize;
|
187
|
+
// }
|
188
|
+
// if (result.boundingBox) {
|
189
|
+
// textSlot.boundingBox = new JsiSkRect(
|
190
|
+
// this.CanvasKit,
|
191
|
+
// result.boundingBox
|
192
|
+
// );
|
193
|
+
// }
|
194
|
+
// if (result.fillColor) {
|
195
|
+
// textSlot.fillColor = Color(result.fillColor);
|
196
|
+
// }
|
197
|
+
// if (result.strokeColor) {
|
198
|
+
// textSlot.strokeColor = Color(result.strokeColor);
|
199
|
+
// }
|
200
|
+
}
|
201
|
+
return textSlot;
|
202
|
+
}
|
203
|
+
duration() {
|
204
|
+
return this.ref.duration();
|
205
|
+
}
|
206
|
+
fps() {
|
207
|
+
return this.ref.fps();
|
208
|
+
}
|
209
|
+
render(canvas, dstRect) {
|
210
|
+
const [width, height] = this.ref.size();
|
211
|
+
this.ref.render(canvas.ref, dstRect && dstRect instanceof JsiSkRect ? dstRect.ref : Float32Array.of(0, 0, width, height));
|
212
|
+
}
|
213
|
+
seekFrame(frame, damageRect) {
|
214
|
+
const result = this.ref.seekFrame(frame);
|
215
|
+
if (damageRect && damageRect instanceof JsiSkRect) {
|
216
|
+
damageRect.ref[0] = result[0];
|
217
|
+
damageRect.ref[1] = result[1];
|
218
|
+
damageRect.ref[2] = result[2];
|
219
|
+
damageRect.ref[3] = result[3];
|
220
|
+
}
|
221
|
+
}
|
222
|
+
size() {
|
223
|
+
const [width, height] = this.ref.size();
|
224
|
+
return {
|
225
|
+
width,
|
226
|
+
height
|
227
|
+
};
|
228
|
+
}
|
229
|
+
version() {
|
230
|
+
return this.ref.version();
|
231
|
+
}
|
232
|
+
dispose() {
|
233
|
+
this.ref.delete();
|
234
|
+
}
|
235
|
+
}
|
236
|
+
//# sourceMappingURL=JsiSkottieAnimation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["HostObject","JsiSkTypeface","Color","JsiSkRect","JsiSkottieAnimation","constructor","CanvasKit","ref","getOpacityProps","getTextProps","getColorProps","map","key","value","getTransformProps","anchor","x","y","position","scale","rotation","skew","skewAxis","skew_axis","setColor","color","setText","text","size","setOpacity","opacity","setTransform","a","Float32Array","of","p","s","getSlotInfo","setColorSlot","setScalarSlot","scalar","setVec2Slot","vec2","setTextSlot","_text$text","_text$textSize","_text$minTextSize","_text$maxTextSize","_text$strokeWidth","_text$lineHeight","_text$lineShift","txt","typeface","textSize","minTextSize","maxTextSize","Number","MAX_VALUE","strokeWidth","lineHeight","lineShift","ascent","maxLines","horizAlign","TextAlign","Left","vertAlign","VerticalTextAlign","Top","strokeJoin","StrokeJoin","Miter","direction","TextDirection","LTR","linebreak","LineBreakType","HardLineBreak","resize","ResizePolicy","None","boundingBox","XYWHRect","width","height","fillColor","TRANSPARENT","strokeColor","setImageSlot","assetName","getColorSlot","getScalarSlot","getVec2Slot","getTextSlot","result","textSlot","duration","fps","render","canvas","dstRect","seekFrame","frame","damageRect","version","dispose","delete"],"sources":["JsiSkottieAnimation.ts"],"sourcesContent":["import type {\n CanvasKit,\n ManagedSkottieAnimation,\n SlottableTextProperty as CKSlottableTextProperty,\n} from \"canvaskit-wasm\";\n\nimport type {\n SkSkottieAnimation,\n SlotInfo,\n SlottableTextProperty,\n} from \"../types/Skottie\";\nimport type { SkColor, SkPoint, SkRect } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport type { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkottieAnimation\n extends HostObject<ManagedSkottieAnimation, \"SkottieAnimation\">\n implements SkSkottieAnimation\n{\n constructor(CanvasKit: CanvasKit, ref: ManagedSkottieAnimation) {\n super(CanvasKit, ref, \"SkottieAnimation\");\n }\n getOpacityProps() {\n return this.ref.getOpacityProps();\n }\n getTextProps() {\n return this.ref.getTextProps();\n }\n getColorProps() {\n return this.ref\n .getColorProps()\n .map(({ key, value }) => ({ key, value: Color(value) }));\n }\n getTransformProps() {\n return this.ref.getTransformProps().map(({ key, value }) => ({\n key,\n value: {\n anchor: { x: value.anchor[0], y: value.anchor[1] },\n position: { x: value.position[0], y: value.position[1] },\n scale: { x: value.scale[0], y: value.scale[1] },\n rotation: value.rotation,\n skew: value.skew,\n skewAxis: value.skew_axis,\n },\n }));\n }\n setColor(key: string, color: SkColor) {\n return this.ref.setColor(key, color);\n }\n setText(key: string, text: string, size: number) {\n return this.ref.setText(key, text, size);\n }\n setOpacity(key: string, opacity: number) {\n return this.ref.setOpacity(key, opacity);\n }\n setTransform(\n key: string,\n anchor: SkPoint,\n position: SkPoint,\n scale: SkPoint,\n rotation: number,\n skew: number,\n skewAxis: number\n ) {\n const a = Float32Array.of(anchor.x, anchor.y);\n const p = Float32Array.of(position.x, position.y);\n const s = Float32Array.of(scale.x, scale.y);\n return this.ref.setTransform(key, a, p, s, rotation, skew, skewAxis);\n }\n\n getSlotInfo(): SlotInfo {\n return this.ref.getSlotInfo();\n }\n setColorSlot(key: string, color: SkColor) {\n return this.ref.setColorSlot(key, color);\n }\n setScalarSlot(key: string, scalar: number) {\n return this.ref.setScalarSlot(key, scalar);\n }\n setVec2Slot(key: string, vec2: SkPoint) {\n return this.ref.setVec2Slot(key, Float32Array.of(vec2.x, vec2.y));\n }\n setTextSlot(key: string, text: SlottableTextProperty): boolean {\n const txt: CKSlottableTextProperty = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n typeface:\n text.typeface && text.typeface instanceof JsiSkTypeface\n ? text.typeface.ref\n : null,\n text: text.text ?? \"\",\n textSize: text.textSize ?? 0,\n minTextSize: text.minTextSize ?? 0,\n maxTextSize: text.maxTextSize ?? Number.MAX_VALUE,\n strokeWidth: text.strokeWidth ?? 0,\n lineHeight: text.lineHeight ?? 0,\n lineShift: text.lineShift ?? 0,\n ascent: text.ascent,\n maxLines: text.maxLines,\n // TODO: implement\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n horizAlign: this.CanvasKit.TextAlign.Left,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n vertAlign: this.CanvasKit.VerticalTextAlign.Top,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n strokeJoin: this.CanvasKit.StrokeJoin.Miter,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n direction: this.CanvasKit.TextDirection.LTR,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n linebreak: this.CanvasKit.LineBreakType.HardLineBreak,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n resize: this.CanvasKit.ResizePolicy.None,\n boundingBox: text.boundingBox\n ? this.CanvasKit.XYWHRect(\n text.boundingBox.x,\n text.boundingBox.y,\n text.boundingBox.width,\n text.boundingBox.height\n )\n : [0, 0, 0, 0],\n fillColor: text.fillColor\n ? Color(text.fillColor)\n : this.CanvasKit.TRANSPARENT,\n strokeColor: text.strokeColor\n ? Color(text.strokeColor)\n : this.CanvasKit.TRANSPARENT,\n };\n return this.ref.setTextSlot(key, txt);\n }\n setImageSlot(key: string, assetName: string) {\n return this.ref.setImageSlot(key, assetName);\n }\n getColorSlot(key: string): SkColor | null {\n const color = this.ref.getColorSlot(key);\n return color;\n }\n getScalarSlot(key: string) {\n return this.ref.getScalarSlot(key);\n }\n getVec2Slot(key: string): SkPoint | null {\n const vec2 = this.ref.getVec2Slot(key);\n if (!vec2) {\n return null;\n }\n return { x: vec2[0], y: vec2[1] };\n }\n getTextSlot(key: string): SlottableTextProperty | null {\n const result = this.ref.getTextSlot(key);\n const textSlot: SlottableTextProperty = {};\n if (result) {\n if (result.typeface) {\n textSlot.typeface = new JsiSkTypeface(this.CanvasKit, result.typeface);\n }\n if (result.text) {\n textSlot.text = result.text;\n }\n if (result.textSize) {\n textSlot.textSize = result.textSize;\n }\n if (result.minTextSize) {\n textSlot.minTextSize = result.minTextSize;\n }\n if (result.maxTextSize) {\n textSlot.maxTextSize = result.maxTextSize;\n }\n if (result.strokeWidth) {\n textSlot.strokeWidth = result.strokeWidth;\n }\n if (result.lineHeight) {\n textSlot.lineHeight = result.lineHeight;\n }\n if (result.lineShift) {\n textSlot.lineShift = result.lineShift;\n }\n if (result.ascent) {\n textSlot.ascent = result.ascent;\n }\n if (result.maxLines) {\n textSlot.maxLines = result.maxLines;\n }\n // if (result.horizAlign) {\n // textSlot.horizAlign = result.horizAlign;\n // }\n // if (result.vertAlign) {\n // textSlot.vertAlign = result.vertAlign;\n // }\n // if (result.strokeJoin) {\n // textSlot.strokeJoin = result.strokeJoin;\n // }\n // if (result.direction) {\n // textSlot.direction = result.direction;\n // }\n // if (result.linebreak) {\n // textSlot.linebreak = result.linebreak;\n // }\n // if (result.resize) {\n // textSlot.resize = result.resize;\n // }\n // if (result.boundingBox) {\n // textSlot.boundingBox = new JsiSkRect(\n // this.CanvasKit,\n // result.boundingBox\n // );\n // }\n // if (result.fillColor) {\n // textSlot.fillColor = Color(result.fillColor);\n // }\n // if (result.strokeColor) {\n // textSlot.strokeColor = Color(result.strokeColor);\n // }\n }\n return textSlot;\n }\n\n duration() {\n return this.ref.duration();\n }\n fps() {\n return this.ref.fps();\n }\n render(canvas: JsiSkCanvas, dstRect?: SkRect) {\n const [width, height] = this.ref.size();\n this.ref.render(\n canvas.ref,\n dstRect && dstRect instanceof JsiSkRect\n ? dstRect.ref\n : Float32Array.of(0, 0, width, height)\n );\n }\n seekFrame(frame: number, damageRect?: JsiSkRect) {\n const result = this.ref.seekFrame(frame);\n if (damageRect && damageRect instanceof JsiSkRect) {\n damageRect.ref[0] = result[0];\n damageRect.ref[1] = result[1];\n damageRect.ref[2] = result[2];\n damageRect.ref[3] = result[3];\n }\n }\n size() {\n const [width, height] = this.ref.size();\n return { width, height };\n }\n version() {\n return this.ref.version();\n }\n dispose() {\n this.ref.delete();\n }\n}\n"],"mappings":"AAaA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,KAAK,QAAQ,cAAc;AACpC,SAASC,SAAS,QAAQ,aAAa;AAEvC,OAAO,MAAMC,mBAAmB,SACtBJ,UAAU,CAEpB;EACEK,WAAWA,CAACC,SAAoB,EAAEC,GAA4B,EAAE;IAC9D,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,kBA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