@shopify/react-native-skia 2.0.6 → 2.1.0
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/JsiSkPath.h +2 -1
- package/cpp/api/JsiSkPathFactory.h +1 -1
- 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 +16 -0
- package/cpp/api/recorder/Drawings.h +23 -0
- package/cpp/api/recorder/JsiRecorder.h +6 -0
- package/cpp/api/recorder/RNRecorder.h +9 -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 +5 -1
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +2 -1
- package/lib/commonjs/dom/types/NodeType.js +2 -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/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/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 +1 -0
- package/lib/commonjs/renderer/components/index.js +11 -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 +2 -1
- package/lib/commonjs/sksg/Elements.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 +1 -1
- 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 +5 -1
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +2 -1
- package/lib/module/dom/types/NodeType.js +2 -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/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/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 +1 -0
- package/lib/module/renderer/components/index.js +1 -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 +2 -1
- package/lib/module/sksg/Elements.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 +1 -1
- package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -1
- 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 +7 -0
- package/lib/typescript/lib/module/renderer/components/Skottie.d.ts +2 -0
- package/lib/typescript/lib/module/renderer/components/index.d.ts +1 -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 +5 -1
- package/lib/typescript/src/dom/types/NodeType.d.ts +2 -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/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/Skottie.d.ts +4 -0
- package/lib/typescript/src/renderer/components/index.d.ts +1 -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 +2 -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 +9 -9
- package/libs/apple/libskia.xcframework/Info.plist +14 -14
- package/libs/apple/libskottie.xcframework/Info.plist +13 -13
- package/libs/apple/libskparagraph.xcframework/Info.plist +15 -15
- package/libs/apple/libsksg.xcframework/Info.plist +13 -13
- package/libs/apple/libskshaper.xcframework/Info.plist +15 -15
- package/libs/apple/libskunicode_core.xcframework/Info.plist +9 -9
- package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +13 -13
- package/libs/apple/libsvg.xcframework/Info.plist +15 -15
- 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 +6 -0
- package/src/dom/types/NodeType.ts +2 -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/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 +23 -0
- package/src/renderer/components/Skottie.tsx +8 -0
- package/src/renderer/components/index.ts +1 -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 +2 -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 +1 -1
- package/cpp/skia/include/pathops/SkPathOps.h +0 -17
@@ -5,7 +5,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
5
5
|
translateX: number;
|
6
6
|
translateY: number;
|
7
7
|
translateZ: number;
|
8
|
-
translate: readonly [number, number] |
|
8
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
9
9
|
scale: number;
|
10
10
|
scaleX: number;
|
11
11
|
scaleY: number;
|
@@ -21,7 +21,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
21
21
|
translateX: number;
|
22
22
|
translateY: number;
|
23
23
|
translateZ: number;
|
24
|
-
translate: readonly [number, number] |
|
24
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
25
25
|
scale: number;
|
26
26
|
scaleX: number;
|
27
27
|
scaleY: number;
|
@@ -37,7 +37,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
37
37
|
translateX: number;
|
38
38
|
translateY: number;
|
39
39
|
translateZ: number;
|
40
|
-
translate: readonly [number, number] |
|
40
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
41
41
|
scale: number;
|
42
42
|
scaleX: number;
|
43
43
|
scaleY: number;
|
@@ -53,7 +53,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
53
53
|
translateX: number;
|
54
54
|
translateY: number;
|
55
55
|
translateZ: number;
|
56
|
-
translate: readonly [number, number] |
|
56
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
57
57
|
scale: number;
|
58
58
|
scaleX: number;
|
59
59
|
scaleY: number;
|
@@ -69,7 +69,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
69
69
|
translateX: number;
|
70
70
|
translateY: number;
|
71
71
|
translateZ: number;
|
72
|
-
translate: readonly [number, number] |
|
72
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
73
73
|
scale: number;
|
74
74
|
scaleX: number;
|
75
75
|
scaleY: number;
|
@@ -85,7 +85,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
85
85
|
translateX: number;
|
86
86
|
translateY: number;
|
87
87
|
translateZ: number;
|
88
|
-
translate: readonly [number, number] |
|
88
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
89
89
|
scale: number;
|
90
90
|
scaleX: number;
|
91
91
|
scaleY: number;
|
@@ -101,7 +101,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
101
101
|
translateX: number;
|
102
102
|
translateY: number;
|
103
103
|
translateZ: number;
|
104
|
-
translate: readonly [number, number] |
|
104
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
105
105
|
scale: number;
|
106
106
|
scaleX: number;
|
107
107
|
scaleY: number;
|
@@ -117,7 +117,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
117
117
|
translateX: number;
|
118
118
|
translateY: number;
|
119
119
|
translateZ: number;
|
120
|
-
translate: readonly [number, number] |
|
120
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
121
121
|
scale: number;
|
122
122
|
scaleX: number;
|
123
123
|
scaleY: number;
|
@@ -133,7 +133,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
133
133
|
translateX: number;
|
134
134
|
translateY: number;
|
135
135
|
translateZ: number;
|
136
|
-
translate: readonly [number, number] |
|
136
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
137
137
|
scale: number;
|
138
138
|
scaleX: number;
|
139
139
|
scaleY: number;
|
@@ -149,7 +149,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
149
149
|
translateX: number;
|
150
150
|
translateY: number;
|
151
151
|
translateZ: number;
|
152
|
-
translate: readonly [number, number] |
|
152
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
153
153
|
scale: number;
|
154
154
|
scaleX: number;
|
155
155
|
scaleY: number;
|
@@ -165,7 +165,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
165
165
|
translateX: number;
|
166
166
|
translateY: number;
|
167
167
|
translateZ: number;
|
168
|
-
translate: readonly [number, number] |
|
168
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
169
169
|
scale: number;
|
170
170
|
scaleX: number;
|
171
171
|
scaleY: number;
|
@@ -181,7 +181,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
181
181
|
translateX: number;
|
182
182
|
translateY: number;
|
183
183
|
translateZ: number;
|
184
|
-
translate: readonly [number, number] |
|
184
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
185
185
|
scale: number;
|
186
186
|
scaleX: number;
|
187
187
|
scaleY: number;
|
@@ -197,7 +197,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
197
197
|
translateX: number;
|
198
198
|
translateY: number;
|
199
199
|
translateZ: number;
|
200
|
-
translate: readonly [number, number] |
|
200
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
201
201
|
scale: number;
|
202
202
|
scaleX: number;
|
203
203
|
scaleY: number;
|
@@ -213,7 +213,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
213
213
|
translateX: number;
|
214
214
|
translateY: number;
|
215
215
|
translateZ: number;
|
216
|
-
translate: readonly [number, number] |
|
216
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
217
217
|
scale: number;
|
218
218
|
scaleX: number;
|
219
219
|
scaleY: number;
|
@@ -229,7 +229,7 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
229
229
|
translateX: number;
|
230
230
|
translateY: number;
|
231
231
|
translateZ: number;
|
232
|
-
translate: readonly [number, number] |
|
232
|
+
translate: readonly [number, number] | import("../../../skia/types").Vec3;
|
233
233
|
scale: number;
|
234
234
|
scaleX: number;
|
235
235
|
scaleY: number;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { FillType, SkImage, StrokeOpts, Vector, Color, SkPoint, BlendMode, PointMode, VertexMode, SkFont, SkRRect, SkTextBlob, SkPicture, SkSVG, SkPaint, SkRect, SkRSXform, SkColor, SamplingOptions } from "../../skia/types";
|
1
|
+
import type { FillType, SkImage, StrokeOpts, Vector, Color, SkPoint, BlendMode, PointMode, VertexMode, SkFont, SkRRect, SkTextBlob, SkPicture, SkSVG, SkPaint, SkRect, SkRSXform, SkColor, SamplingOptions, SkSkottieAnimation } from "../../skia/types";
|
2
2
|
import type { CircleDef, Fit, GroupProps, PathDef, RectDef, RRectDef, SkEnum } from "./Common";
|
3
3
|
export interface DrawingNodeProps extends GroupProps {
|
4
4
|
paint?: SkPaint;
|
@@ -62,6 +62,10 @@ export interface ImageSVGProps extends DrawingNodeProps {
|
|
62
62
|
height?: number;
|
63
63
|
rect?: SkRect;
|
64
64
|
}
|
65
|
+
export interface SkottieProps extends DrawingNodeProps {
|
66
|
+
animation: SkSkottieAnimation;
|
67
|
+
frame: number;
|
68
|
+
}
|
65
69
|
export interface PictureProps extends DrawingNodeProps {
|
66
70
|
picture: SkPicture;
|
67
71
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["Drawings.ts"],"sourcesContent":["import type {\n FillType,\n SkImage,\n StrokeOpts,\n Vector,\n Color,\n SkPoint,\n BlendMode,\n PointMode,\n VertexMode,\n SkFont,\n SkRRect,\n SkTextBlob,\n SkPicture,\n SkSVG,\n SkPaint,\n SkRect,\n SkRSXform,\n SkColor,\n SamplingOptions,\n} from \"../../skia/types\";\n\nimport type {\n CircleDef,\n Fit,\n GroupProps,\n PathDef,\n RectDef,\n RRectDef,\n SkEnum,\n} from \"./Common\";\n\nexport interface DrawingNodeProps extends GroupProps {\n paint?: SkPaint;\n}\n\nexport type ImageProps = DrawingNodeProps &\n RectDef & {\n fit?: Fit;\n image: SkImage | null;\n sampling?: SamplingOptions;\n };\n\nexport type CircleProps = CircleDef & DrawingNodeProps;\n\nexport interface PathProps extends DrawingNodeProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nexport interface LineProps extends DrawingNodeProps {\n p1: Vector;\n p2: Vector;\n}\n\nexport type OvalProps = RectDef & DrawingNodeProps;\n\nexport type RectProps = RectDef & DrawingNodeProps;\n\nexport type RoundedRectProps = RRectDef & DrawingNodeProps;\n\nexport interface AtlasProps extends DrawingNodeProps {\n image: SkImage | null;\n sprites: SkRect[];\n transforms: SkRSXform[];\n colors?: SkColor[];\n sampling?: SamplingOptions;\n}\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends DrawingNodeProps {\n colors?: Color[];\n patch: [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nexport interface VerticesProps extends DrawingNodeProps {\n colors?: string[];\n vertices: SkPoint[];\n textures?: SkPoint[];\n mode: SkEnum<typeof VertexMode>;\n blendMode?: SkEnum<typeof BlendMode>;\n indices?: number[];\n}\n\nexport interface ImageSVGProps extends DrawingNodeProps {\n svg: SkSVG | null;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rect?: SkRect;\n}\n\nexport interface PictureProps extends DrawingNodeProps {\n picture: SkPicture;\n}\n\nexport interface PointsProps extends DrawingNodeProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nexport interface DiffRectProps extends DrawingNodeProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nexport interface TextProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n x: number;\n y: number;\n}\n\nexport interface TextPathProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n path: PathDef;\n initialOffset: number;\n}\n\nexport interface TextBlobProps extends DrawingNodeProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nexport interface Glyph {\n id: number;\n pos: SkPoint;\n}\n\nexport interface GlyphsProps extends DrawingNodeProps {\n font: SkFont | null;\n x: number;\n y: number;\n glyphs: Glyph[];\n}\n\nexport interface BoxProps extends DrawingNodeProps {\n box: SkRRect | SkRect;\n}\n\nexport interface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
1
|
+
{"version":3,"names":[],"sources":["Drawings.ts"],"sourcesContent":["import type {\n FillType,\n SkImage,\n StrokeOpts,\n Vector,\n Color,\n SkPoint,\n BlendMode,\n PointMode,\n VertexMode,\n SkFont,\n SkRRect,\n SkTextBlob,\n SkPicture,\n SkSVG,\n SkPaint,\n SkRect,\n SkRSXform,\n SkColor,\n SamplingOptions,\n SkSkottieAnimation,\n} from \"../../skia/types\";\n\nimport type {\n CircleDef,\n Fit,\n GroupProps,\n PathDef,\n RectDef,\n RRectDef,\n SkEnum,\n} from \"./Common\";\n\nexport interface DrawingNodeProps extends GroupProps {\n paint?: SkPaint;\n}\n\nexport type ImageProps = DrawingNodeProps &\n RectDef & {\n fit?: Fit;\n image: SkImage | null;\n sampling?: SamplingOptions;\n };\n\nexport type CircleProps = CircleDef & DrawingNodeProps;\n\nexport interface PathProps extends DrawingNodeProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nexport interface LineProps extends DrawingNodeProps {\n p1: Vector;\n p2: Vector;\n}\n\nexport type OvalProps = RectDef & DrawingNodeProps;\n\nexport type RectProps = RectDef & DrawingNodeProps;\n\nexport type RoundedRectProps = RRectDef & DrawingNodeProps;\n\nexport interface AtlasProps extends DrawingNodeProps {\n image: SkImage | null;\n sprites: SkRect[];\n transforms: SkRSXform[];\n colors?: SkColor[];\n sampling?: SamplingOptions;\n}\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends DrawingNodeProps {\n colors?: Color[];\n patch: [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nexport interface VerticesProps extends DrawingNodeProps {\n colors?: string[];\n vertices: SkPoint[];\n textures?: SkPoint[];\n mode: SkEnum<typeof VertexMode>;\n blendMode?: SkEnum<typeof BlendMode>;\n indices?: number[];\n}\n\nexport interface ImageSVGProps extends DrawingNodeProps {\n svg: SkSVG | null;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rect?: SkRect;\n}\n\nexport interface SkottieProps extends DrawingNodeProps {\n animation: SkSkottieAnimation;\n frame: number;\n}\n\nexport interface PictureProps extends DrawingNodeProps {\n picture: SkPicture;\n}\n\nexport interface PointsProps extends DrawingNodeProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nexport interface DiffRectProps extends DrawingNodeProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nexport interface TextProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n x: number;\n y: number;\n}\n\nexport interface TextPathProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n path: PathDef;\n initialOffset: number;\n}\n\nexport interface TextBlobProps extends DrawingNodeProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nexport interface Glyph {\n id: number;\n pos: SkPoint;\n}\n\nexport interface GlyphsProps extends DrawingNodeProps {\n font: SkFont | null;\n x: number;\n y: number;\n glyphs: Glyph[];\n}\n\nexport interface BoxProps extends DrawingNodeProps {\n box: SkRRect | SkRect;\n}\n\nexport interface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -64,6 +64,8 @@ export let NodeType = /*#__PURE__*/function (NodeType) {
|
|
64
64
|
NodeType["Atlas"] = "skAtlas";
|
65
65
|
// Paragraph
|
66
66
|
NodeType["Paragraph"] = "skParagraph";
|
67
|
+
// Skottie
|
68
|
+
NodeType["Skottie"] = "skSkottie";
|
67
69
|
return NodeType;
|
68
70
|
}({});
|
69
71
|
//# sourceMappingURL=NodeType.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["NodeType"],"sources":["NodeType.ts"],"sourcesContent":["export const enum NodeType {\n // Shaders\n Layer = \"skLayer\",\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n Atlas = \"skAtlas\",\n\n // Paragraph\n Paragraph = \"skParagraph\",\n}\n"],"mappings":"AAAA,WAAkBA,QAAQ,0BAARA,QAAQ;EACxB;EADgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAaxB;EAbgBA,QAAQ;EAgBxB;EAhBgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAyBxB;EAzBgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAiCxB;EAjCgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EA0CxB;EA1CgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAgDxB;EAhDgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAuExB;EAvEgBA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["NodeType"],"sources":["NodeType.ts"],"sourcesContent":["export const enum NodeType {\n // Shaders\n Layer = \"skLayer\",\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n Atlas = \"skAtlas\",\n\n // Paragraph\n Paragraph = \"skParagraph\",\n // Skottie\n Skottie = \"skSkottie\",\n}\n"],"mappings":"AAAA,WAAkBA,QAAQ,0BAARA,QAAQ;EACxB;EADgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAaxB;EAbgBA,QAAQ;EAgBxB;EAhBgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAyBxB;EAzBgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAiCxB;EAjCgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EA0CxB;EA1CgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAgDxB;EAhDgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAuExB;EAvEgBA,QAAQ;EAyExB;EAzEgBA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { SkPath, SkRect, Vec3 } from "../../../skia/types";
|
2
|
+
import { Matrix4 } from "../../../skia/types";
|
3
|
+
declare enum Path3Command {
|
4
|
+
Move = 0,
|
5
|
+
Line = 1,
|
6
|
+
Quad = 2,
|
7
|
+
Cubic = 3,
|
8
|
+
Close = 4
|
9
|
+
}
|
10
|
+
export declare class Path3 {
|
11
|
+
commands: [Path3Command, ...number[]][];
|
12
|
+
constructor();
|
13
|
+
moveTo(to: Vec3): this;
|
14
|
+
lineTo(to: Vec3): this;
|
15
|
+
quadTo(control: Vec3, to: Vec3): this;
|
16
|
+
cubicTo(control1: Vec3, control2: Vec3, to: Vec3): this;
|
17
|
+
close(): this;
|
18
|
+
addHRect(rect: SkRect, z: number): this;
|
19
|
+
project(output: SkPath, tr?: Matrix4): this;
|
20
|
+
}
|
21
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -23,6 +23,11 @@ export declare let fonts: {
|
|
23
23
|
UberMoveMediumMono: SkFont;
|
24
24
|
DinMedium: SkFont;
|
25
25
|
};
|
26
|
+
export declare let dataAssets: {
|
27
|
+
NotoSansSCRegular: Uint8Array;
|
28
|
+
img_0: Uint8Array;
|
29
|
+
AvenirHeavy: Uint8Array;
|
30
|
+
};
|
26
31
|
export declare const wait: (ms: number) => Promise<unknown>;
|
27
32
|
export declare const resolveFile: (uri: string) => Buffer<ArrayBufferLike>;
|
28
33
|
export declare const resolveFont: (uri: string) => number[];
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","Skottie","props","createElement"],"sources":["Skottie.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkottieProps } from \"../../dom/types\";\nimport type { SkiaProps } from \"../processors\";\n\nexport const Skottie = (props: SkiaProps<SkottieProps>) => {\n return <skSkottie {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAKzB,OAAO,MAAMC,OAAO,GAAIC,KAA8B,IAAK;EACzD,oBAAOF,KAAA,CAAAG,aAAA,cAAeD,KAAQ,CAAC;AACjC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Blend\";\n\nexport * from \"./paragraph\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,WAAW;AAEzB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Blend\";\nexport * from \"./Skottie\";\n\nexport * from \"./paragraph\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,WAAW;AAEzB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,WAAW;AAEzB,cAAc,aAAa","ignoreList":[]}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import type { SkColor } from "../Color";
|
2
2
|
import type { SkColorFilter } from "../ColorFilter/ColorFilter";
|
3
|
+
import type { FilterMode, MipmapMode, SkImage } from "../Image/Image";
|
4
|
+
import type { SkMatrix } from "../Matrix";
|
3
5
|
import type { BlendMode } from "../Paint";
|
6
|
+
import type { SkPicture } from "../Picture";
|
4
7
|
import type { SkRect } from "../Rect";
|
5
8
|
import type { SkRuntimeShaderBuilder } from "../RuntimeEffect";
|
6
9
|
import type { SkShader } from "../Shader";
|
@@ -18,8 +21,9 @@ export interface ImageFilterFactory {
|
|
18
21
|
* @param dx - Offset along the X axis
|
19
22
|
* @param dy - Offset along the X axis
|
20
23
|
* @param input - if null, it will use the dynamic source image
|
24
|
+
* @param cropRect - Optional rectangle that crops the input and output
|
21
25
|
*/
|
22
|
-
MakeOffset(dx: number, dy: number, input
|
26
|
+
MakeOffset(dx: number, dy: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
23
27
|
/**
|
24
28
|
* Spatially displace pixel values of the filtered image
|
25
29
|
*
|
@@ -28,31 +32,36 @@ export interface ImageFilterFactory {
|
|
28
32
|
* @param scale - Scale factor to be used in the displacement
|
29
33
|
* @param in1 - Source image filter to use for the displacement
|
30
34
|
* @param input - if null, it will use the dynamic source image
|
35
|
+
* @param cropRect - Optional rectangle that crops the input and output
|
31
36
|
*/
|
32
|
-
MakeDisplacementMap(channelX: ColorChannel, channelY: ColorChannel, scale: number, in1: SkImageFilter, input
|
37
|
+
MakeDisplacementMap(channelX: ColorChannel, channelY: ColorChannel, scale: number, in1: SkImageFilter, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
33
38
|
/**
|
34
39
|
* Transforms a shader into an impage filter
|
35
40
|
*
|
36
41
|
* @param shader - The Shader to be transformed
|
37
|
-
* @param
|
42
|
+
* @param dither - Whether to apply dithering to the shader
|
43
|
+
* @param cropRect - Optional rectangle that crops the input and output
|
38
44
|
*/
|
39
|
-
MakeShader(shader: SkShader,
|
45
|
+
MakeShader(shader: SkShader, dither?: boolean, cropRect?: SkRect | null): SkImageFilter;
|
40
46
|
/**
|
41
47
|
* Create a filter that blurs its input by the separate X and Y sigmas. The provided tile mode
|
42
48
|
* is used when the blur kernel goes outside the input image.
|
43
49
|
*
|
44
50
|
* @param sigmaX - The Gaussian sigma value for blurring along the X axis.
|
45
51
|
* @param sigmaY - The Gaussian sigma value for blurring along the Y axis.
|
46
|
-
* @param mode
|
52
|
+
* @param mode - The tile mode to use when blur kernel goes outside the image
|
47
53
|
* @param input - if null, it will use the dynamic source image (e.g. a saved layer)
|
54
|
+
* @param cropRect - Optional rectangle that crops the input and output
|
48
55
|
*/
|
49
|
-
MakeBlur(sigmaX: number, sigmaY: number, mode: TileMode, input
|
56
|
+
MakeBlur(sigmaX: number, sigmaY: number, mode: TileMode, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
50
57
|
/**
|
51
58
|
* Create a filter that applies the color filter to the input filter results.
|
52
|
-
*
|
59
|
+
*
|
60
|
+
* @param colorFilter - The color filter to apply
|
53
61
|
* @param input - if null, it will use the dynamic source image (e.g. a saved layer)
|
62
|
+
* @param cropRect - Optional rectangle that crops the input and output
|
54
63
|
*/
|
55
|
-
MakeColorFilter(
|
64
|
+
MakeColorFilter(colorFilter: SkColorFilter, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
56
65
|
/**
|
57
66
|
* Create a filter that composes 'inner' with 'outer', such that the results of 'inner' are
|
58
67
|
* treated as the source bitmap passed to 'outer'.
|
@@ -72,7 +81,7 @@ export interface ImageFilterFactory {
|
|
72
81
|
* @param input The input filter, or will use the source bitmap if this is null.
|
73
82
|
* @param cropRect Optional rectangle that crops the input and output.
|
74
83
|
*/
|
75
|
-
MakeDropShadow: (dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input
|
84
|
+
MakeDropShadow: (dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input?: SkImageFilter | null, cropRect?: SkRect | null) => SkImageFilter;
|
76
85
|
/**
|
77
86
|
* Create a filter that renders a drop shadow, in exactly the same manner as ::DropShadow, except
|
78
87
|
* that the resulting image does not include the input content.
|
@@ -85,7 +94,7 @@ export interface ImageFilterFactory {
|
|
85
94
|
* @param input The input filter, or will use the source bitmap if this is null.
|
86
95
|
* @param cropRect Optional rectangle that crops the input and output.
|
87
96
|
*/
|
88
|
-
MakeDropShadowOnly: (dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input
|
97
|
+
MakeDropShadowOnly: (dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input?: SkImageFilter | null, cropRect?: SkRect | null) => SkImageFilter;
|
89
98
|
/**
|
90
99
|
* Create a filter that erodes each input pixel's channel values to the minimum channel value
|
91
100
|
* within the given radii along the x and y axes.
|
@@ -94,7 +103,7 @@ export interface ImageFilterFactory {
|
|
94
103
|
* @param input The image filter that is eroded, using source bitmap if this is null.
|
95
104
|
* @param cropRect Optional rectangle that crops the input and output.
|
96
105
|
*/
|
97
|
-
MakeErode: (rx: number, ry: number, input
|
106
|
+
MakeErode: (rx: number, ry: number, input?: SkImageFilter | null, cropRect?: SkRect | null) => SkImageFilter;
|
98
107
|
/**
|
99
108
|
* Create a filter that dilates each input pixel's channel values to the max value within the
|
100
109
|
* given radii along the x and y axes.
|
@@ -103,15 +112,15 @@ export interface ImageFilterFactory {
|
|
103
112
|
* @param input The image filter that is dilated, using source bitmap if this is null.
|
104
113
|
* @param cropRect Optional rectangle that crops the input and output.
|
105
114
|
*/
|
106
|
-
MakeDilate: (rx: number, ry: number, input
|
115
|
+
MakeDilate: (rx: number, ry: number, input?: SkImageFilter | null, cropRect?: SkRect | null) => SkImageFilter;
|
107
116
|
/**
|
108
117
|
* This filter takes an SkBlendMode and uses it to composite the two filters together.
|
109
118
|
* @param mode The blend mode that defines the compositing operation
|
110
119
|
* @param background The Dst pixels used in blending, if null the source bitmap is used.
|
111
120
|
* @param foreground The Src pixels used in blending, if null the source bitmap is used.
|
112
|
-
* @cropRect
|
121
|
+
* @param cropRect Optional rectangle to crop input and output.
|
113
122
|
*/
|
114
|
-
MakeBlend: (mode: BlendMode, background: SkImageFilter, foreground
|
123
|
+
MakeBlend: (mode: BlendMode, background: SkImageFilter, foreground?: SkImageFilter | null, cropRect?: SkRect | null) => SkImageFilter;
|
115
124
|
/**
|
116
125
|
* Create a filter that fills the output with the per-pixel evaluation of the SkShader produced
|
117
126
|
* by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate
|
@@ -126,5 +135,233 @@ export interface ImageFilterFactory {
|
|
126
135
|
* @param input The image filter that will be provided as input to the runtime
|
127
136
|
* shader. If null the implicit source image is used instead
|
128
137
|
*/
|
129
|
-
MakeRuntimeShader: (builder: SkRuntimeShaderBuilder, childShaderName: string | null, input
|
138
|
+
MakeRuntimeShader: (builder: SkRuntimeShaderBuilder, childShaderName: string | null, input?: SkImageFilter | null) => SkImageFilter;
|
139
|
+
/**
|
140
|
+
* Create a filter that implements a custom blend mode. Each output pixel is the result of
|
141
|
+
* combining the corresponding background and foreground pixels using the 4 coefficients:
|
142
|
+
* k1 * foreground * background + k2 * foreground + k3 * background + k4
|
143
|
+
*
|
144
|
+
* @param k1, k2, k3, k4 The four coefficients used to combine the foreground and background.
|
145
|
+
* @param enforcePMColor If true, the RGB channels will be clamped to the calculated alpha.
|
146
|
+
* @param background The background content, using the source bitmap when this is null.
|
147
|
+
* @param foreground The foreground content, using the source bitmap when this is null.
|
148
|
+
* @param cropRect Optional rectangle that crops the inputs and output.
|
149
|
+
*/
|
150
|
+
MakeArithmetic(k1: number, k2: number, k3: number, k4: number, enforcePMColor: boolean, background?: SkImageFilter | null, foreground?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
151
|
+
/**
|
152
|
+
* Create a filter that applies a crop to the result of the 'input' filter. Pixels within the
|
153
|
+
* crop rectangle are unmodified from what 'input' produced. Pixels outside of crop match the
|
154
|
+
* provided SkTileMode (defaulting to kDecal).
|
155
|
+
*
|
156
|
+
* NOTE: The optional CropRect argument for many of the factories is equivalent to creating the
|
157
|
+
* filter without a CropRect and then wrapping it in ::Crop(rect, kDecal). Explicitly adding
|
158
|
+
* Crop filters lets you control their tiling and use different geometry for the input and the
|
159
|
+
* output of another filter.
|
160
|
+
*
|
161
|
+
* @param rect The cropping rect
|
162
|
+
* @param tileMode The TileMode applied to pixels *outside* of 'crop' @default TileMode.Decal
|
163
|
+
* @param input The input filter that is cropped, uses source image if this is null
|
164
|
+
*/
|
165
|
+
MakeCrop(rect: SkRect, tileMode?: TileMode | null, input?: SkImageFilter | null): SkImageFilter;
|
166
|
+
/**
|
167
|
+
* Create a filter that always produces transparent black.
|
168
|
+
*/
|
169
|
+
MakeEmpty(): SkImageFilter;
|
170
|
+
/**
|
171
|
+
* Create a filter that draws the 'srcRect' portion of image into 'dstRect' using the given
|
172
|
+
* filter quality. Similar to SkCanvas::drawImageRect. The returned image filter evaluates
|
173
|
+
* to transparent black if 'image' is null.
|
174
|
+
*
|
175
|
+
* @param image The image that is output by the filter, subset by 'srcRect'.
|
176
|
+
* @param srcRect The source pixels sampled into 'dstRect', if null the image bounds are used.
|
177
|
+
* @param dstRect The local rectangle to draw the image into, if null the srcRect is used.
|
178
|
+
* @param filterMode The filter mode to use when sampling the image @default FilterMode.Nearest
|
179
|
+
* @param mipmap The mipmap mode to use when sampling the image @default MipmapMode.None
|
180
|
+
*/
|
181
|
+
MakeImage(image: SkImage, srcRect?: SkRect | null, dstRect?: SkRect | null, filterMode?: FilterMode, mipmap?: MipmapMode): SkImageFilter;
|
182
|
+
/**
|
183
|
+
* Create a filter that fills 'lensBounds' with a magnification of the input.
|
184
|
+
*
|
185
|
+
* @param lensBounds The outer bounds of the magnifier effect
|
186
|
+
* @param zoomAmount The amount of magnification applied to the input image
|
187
|
+
* @param inset The size or width of the fish-eye distortion around the magnified content
|
188
|
+
* @param filterMode The filter mode to use when sampling the image @default FilterMode.Nearest
|
189
|
+
* @param mipmap The mipmap mode to use when sampling the image @default MipmapMode.None
|
190
|
+
* @param input The input filter that is magnified; if null the source bitmap is used
|
191
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
192
|
+
*/
|
193
|
+
MakeMagnifier(lensBounds: SkRect, zoomAmount: number, inset: number, filterMode?: FilterMode, mipmap?: MipmapMode, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
194
|
+
/**
|
195
|
+
* Create a filter that applies an NxM image processing kernel to the input image. This can be
|
196
|
+
* used to produce effects such as sharpening, blurring, edge detection, etc.
|
197
|
+
* @param kernelSizeX The width of the kernel. Must be greater than zero.
|
198
|
+
* @param kernelSizeY The height of the kernel. Must be greater than zero.
|
199
|
+
* @param kernel The image processing kernel. Must contain kernelSizeX * kernelSizeY elements, in row order.
|
200
|
+
* @param gain A scale factor applied to each pixel after convolution. This can be
|
201
|
+
* used to normalize the kernel, if it does not already sum to 1.
|
202
|
+
* @param bias A bias factor added to each pixel after convolution.
|
203
|
+
* @param kernelOffsetX An offset applied to each pixel coordinate before convolution.
|
204
|
+
* This can be used to center the kernel over the image
|
205
|
+
* (e.g., a 3x3 kernel should have an offset of {1, 1}).
|
206
|
+
* @param kernelOffsetY An offset applied to each pixel coordinate before convolution.
|
207
|
+
* This can be used to center the kernel over the image
|
208
|
+
* (e.g., a 3x3 kernel should have an offset of {1, 1}).
|
209
|
+
* @param tileMode How accesses outside the image are treated. TileMode.Mirror is not supported.
|
210
|
+
* @param convolveAlpha If true, all channels are convolved. If false, only the RGB channels
|
211
|
+
* are convolved, and alpha is copied from the source image.
|
212
|
+
* @param input The input image filter, if null the source bitmap is used instead.
|
213
|
+
* @param cropRect Optional rectangle to which the output processing will be limited.
|
214
|
+
*/
|
215
|
+
MakeMatrixConvolution(kernelSizeX: number, kernelSizeY: number, kernel: number[], gain: number, bias: number, kernelOffsetX: number, kernelOffsetY: number, tileMode: TileMode, convolveAlpha: boolean, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
216
|
+
/**
|
217
|
+
* Create a filter that transforms the input image by 'matrix'. This matrix transforms the
|
218
|
+
* local space, which means it effectively happens prior to any transformation coming from the
|
219
|
+
* SkCanvas initiating the filtering.
|
220
|
+
* @param matrix The matrix to apply to the original content.
|
221
|
+
* @param filterMode The filter mode to use when sampling the image @default FilterMode.Nearest
|
222
|
+
* @param mipmap The mipmap mode to use when sampling the image @default MipmapMode.None
|
223
|
+
* @param input The image filter to transform, or null to use the source image.
|
224
|
+
*/
|
225
|
+
MakeMatrixTransform(matrix: SkMatrix, filterMode?: FilterMode, mipmap?: MipmapMode, input?: SkImageFilter | null): SkImageFilter;
|
226
|
+
/**
|
227
|
+
* Create a filter that merges filters together by drawing their results in order
|
228
|
+
* with src-over blending.
|
229
|
+
* @param filters The input filter array to merge. Any null
|
230
|
+
* filter pointers will use the source bitmap instead.
|
231
|
+
* @param cropRect Optional rectangle that crops all input filters and the output.
|
232
|
+
*/
|
233
|
+
MakeMerge(filters: Array<SkImageFilter | null>, cropRect?: SkRect | null): SkImageFilter;
|
234
|
+
/**
|
235
|
+
* Create a filter that produces the SkPicture as its output, clipped to both 'targetRect' and
|
236
|
+
* the picture's internal cull rect.
|
237
|
+
*
|
238
|
+
* If 'pic' is null, the returned image filter produces transparent black.
|
239
|
+
*
|
240
|
+
* @param picture The picture that is drawn for the filter output.
|
241
|
+
* @param targetRect The drawing region for the picture. If null, the picture's bounds are used.
|
242
|
+
*/
|
243
|
+
MakePicture(picture: SkPicture, targetRect?: SkRect | null): SkImageFilter;
|
244
|
+
/**
|
245
|
+
* Create a filter that fills the output with the per-pixel evaluation of the SkShader produced
|
246
|
+
* by the SkRuntimeEffectBuilder. The shader is defined in the image filter's local coordinate
|
247
|
+
* system, so it will automatically be affected by SkCanvas' transform.
|
248
|
+
*
|
249
|
+
* This requires a GPU backend or SkSL to be compiled in.
|
250
|
+
*
|
251
|
+
* @param builder The builder used to produce the runtime shader, that will in turn
|
252
|
+
* fill the result image
|
253
|
+
* @param sampleRadius defines the sampling radius of 'childShaderName' relative to
|
254
|
+
* the runtime shader produced by 'builder'.
|
255
|
+
* If greater than 0, the coordinate passed to childShader.eval() will
|
256
|
+
* be up to 'sampleRadius' away (maximum absolute offset in 'x' or 'y')
|
257
|
+
* from the coordinate passed into the runtime shader.
|
258
|
+
* @param childShaderNames The names of the child shaders defined in the builder that will be
|
259
|
+
* bound to the input params (or the source image if the input param
|
260
|
+
* is null). If any name is null, or appears more than once, factory
|
261
|
+
* fails and returns nullptr.
|
262
|
+
* @param inputs The image filters that will be provided as input to the runtime
|
263
|
+
* shader. If any are null, the implicit source image is used instead.
|
264
|
+
*/
|
265
|
+
MakeRuntimeShaderWithChildren: (builder: SkRuntimeShaderBuilder, sampleRadius: number, childShaderNames: string[], inputs: Array<SkImageFilter | null>) => SkImageFilter;
|
266
|
+
/**
|
267
|
+
* Create a tile image filter.
|
268
|
+
* @param src Defines the pixels to tile
|
269
|
+
* @param dst Defines the pixel region that the tiles will be drawn to
|
270
|
+
* @param input The input that will be tiled, if null the source bitmap is used instead.
|
271
|
+
*/
|
272
|
+
MakeTile(src: SkRect, dst: SkRect, input?: SkImageFilter | null): SkImageFilter;
|
273
|
+
/**
|
274
|
+
* Create a filter that calculates the diffuse illumination from a distant light source,
|
275
|
+
* interpreting the alpha channel of the input as the height profile of the surface (to
|
276
|
+
* approximate normal vectors).
|
277
|
+
* @param direction The direction to the distance light.
|
278
|
+
* @param lightColor The color of the diffuse light source.
|
279
|
+
* @param surfaceScale Scale factor to transform from alpha values to physical height.
|
280
|
+
* @param kd Diffuse reflectance coefficient.
|
281
|
+
* @param input The input filter that defines surface normals (as alpha), or uses the
|
282
|
+
* source bitmap when null.
|
283
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
284
|
+
*/
|
285
|
+
MakeDistantLitDiffuse(direction: SkPoint3, lightColor: SkColor, surfaceScale: number, kd: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
286
|
+
/**
|
287
|
+
* Create a filter that calculates the diffuse illumination from a point light source, using
|
288
|
+
* alpha channel of the input as the height profile of the surface (to approximate normal
|
289
|
+
* vectors).
|
290
|
+
* @param location The location of the point light.
|
291
|
+
* @param lightColor The color of the diffuse light source.
|
292
|
+
* @param surfaceScale Scale factor to transform from alpha values to physical height.
|
293
|
+
* @param kd Diffuse reflectance coefficient.
|
294
|
+
* @param input The input filter that defines surface normals (as alpha), or uses the
|
295
|
+
* source bitmap when null.
|
296
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
297
|
+
*/
|
298
|
+
MakePointLitDiffuse(location: SkPoint3, lightColor: SkColor, surfaceScale: number, kd: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
299
|
+
/**
|
300
|
+
* Create a filter that calculates the diffuse illumination from a spot light source, using
|
301
|
+
* alpha channel of the input as the height profile of the surface (to approximate normal
|
302
|
+
* vectors). The spot light is restricted to be within 'cutoffAngle' of the vector between
|
303
|
+
* the location and target.
|
304
|
+
* @param location The location of the spot light.
|
305
|
+
* @param target The location that the spot light is point towards
|
306
|
+
* @param falloffExponent Exponential falloff parameter for illumination outside of cutoffAngle
|
307
|
+
* @param cutoffAngle Maximum angle from lighting direction that receives full light
|
308
|
+
* @param lightColor The color of the diffuse light source.
|
309
|
+
* @param surfaceScale Scale factor to transform from alpha values to physical height.
|
310
|
+
* @param kd Diffuse reflectance coefficient.
|
311
|
+
* @param input The input filter that defines surface normals (as alpha), or uses the
|
312
|
+
* source bitmap when null.
|
313
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
314
|
+
*/
|
315
|
+
MakeSpotLitDiffuse(location: SkPoint3, target: SkPoint3, falloffExponent: number, cutoffAngle: number, lightColor: SkColor, surfaceScale: number, kd: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
316
|
+
/**
|
317
|
+
* Create a filter that calculates the specular illumination from a distant light source,
|
318
|
+
* interpreting the alpha channel of the input as the height profile of the surface (to
|
319
|
+
* approximate normal vectors).
|
320
|
+
* @param direction The direction to the distance light.
|
321
|
+
* @param lightColor The color of the specular light source.
|
322
|
+
* @param surfaceScale Scale factor to transform from alpha values to physical height.
|
323
|
+
* @param ks Specular reflectance coefficient.
|
324
|
+
* @param shininess The specular exponent determining how shiny the surface is.
|
325
|
+
* @param input The input filter that defines surface normals (as alpha), or uses the
|
326
|
+
* source bitmap when null.
|
327
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
328
|
+
*/
|
329
|
+
MakeDistantLitSpecular(direction: SkPoint3, lightColor: SkColor, surfaceScale: number, ks: number, shininess: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
330
|
+
/**
|
331
|
+
* Create a filter that calculates the specular illumination from a point light source, using
|
332
|
+
* alpha channel of the input as the height profile of the surface (to approximate normal
|
333
|
+
* vectors).
|
334
|
+
* @param location The location of the point light.
|
335
|
+
* @param lightColor The color of the specular light source.
|
336
|
+
* @param surfaceScale Scale factor to transform from alpha values to physical height.
|
337
|
+
* @param ks Specular reflectance coefficient.
|
338
|
+
* @param shininess The specular exponent determining how shiny the surface is.
|
339
|
+
* @param input The input filter that defines surface normals (as alpha), or uses the
|
340
|
+
* source bitmap when null.
|
341
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
342
|
+
*/
|
343
|
+
MakePointLitSpecular(location: SkPoint3, lightColor: SkColor, surfaceScale: number, ks: number, shininess: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
344
|
+
/**
|
345
|
+
* Create a filter that calculates the specular illumination from a spot light source, using
|
346
|
+
* alpha channel of the input as the height profile of the surface (to approximate normal
|
347
|
+
* vectors). The spot light is restricted to be within 'cutoffAngle' of the vector between
|
348
|
+
* the location and target.
|
349
|
+
* @param location The location of the spot light.
|
350
|
+
* @param target The location that the spot light is point towards
|
351
|
+
* @param falloffExponent Exponential falloff parameter for illumination outside of cutoffAngle
|
352
|
+
* @param cutoffAngle Maximum angle from lighting direction that receives full light
|
353
|
+
* @param lightColor The color of the specular light source.
|
354
|
+
* @param surfaceScale Scale factor to transform from alpha values to physical height.
|
355
|
+
* @param ks Specular reflectance coefficient.
|
356
|
+
* @param shininess The specular exponent determining how shiny the surface is.
|
357
|
+
* @param input The input filter that defines surface normals (as alpha), or uses the
|
358
|
+
* source bitmap when null.
|
359
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
360
|
+
*/
|
361
|
+
MakeSpotLitSpecular(location: SkPoint3, target: SkPoint3, falloffExponent: number, cutoffAngle: number, lightColor: SkColor, surfaceScale: number, ks: number, shininess: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
|
130
362
|
}
|
363
|
+
export type SkPoint3 = {
|
364
|
+
x: number;
|
365
|
+
y: number;
|
366
|
+
z: number;
|
367
|
+
};
|