@shopify/react-native-skia 0.1.225 → 0.1.228
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.h +3 -3
- package/cpp/api/JsiSkCanvas.h +2 -1
- package/cpp/api/JsiSkMatrix.h +35 -13
- package/cpp/api/JsiSkPictureRecorder.h +10 -3
- package/cpp/api/JsiSkTypeface.h +1 -0
- package/cpp/rnskia/dom/props/MatrixProp.h +19 -0
- package/cpp/rnskia/dom/props/TransformProp.h +76 -9
- package/lib/commonjs/animation/spring/runSpring.d.ts +3 -0
- package/lib/commonjs/animation/spring/runSpring.js +3 -0
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
- package/lib/commonjs/animation/spring/useSpring.d.ts +3 -0
- package/lib/commonjs/animation/spring/useSpring.js +3 -0
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
- package/lib/commonjs/animation/timing/runTiming.d.ts +3 -0
- package/lib/commonjs/animation/timing/runTiming.js +3 -0
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/useLoop.d.ts +3 -0
- package/lib/commonjs/animation/timing/useLoop.js +3 -0
- package/lib/commonjs/animation/timing/useLoop.js.map +1 -1
- package/lib/commonjs/animation/timing/useTiming.d.ts +3 -0
- package/lib/commonjs/animation/timing/useTiming.js +3 -0
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +2 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Fitting.d.ts +5 -5
- package/lib/commonjs/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +235 -75
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/commonjs/dom/types/Common.d.ts +3 -3
- package/lib/commonjs/dom/types/Common.js.map +1 -1
- package/lib/commonjs/external/reanimated/interpolators.d.ts +1 -0
- package/lib/commonjs/external/reanimated/interpolators.js +24 -5
- package/lib/commonjs/external/reanimated/interpolators.js.map +1 -1
- package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +2 -1
- package/lib/commonjs/external/reanimated/moduleWrapper.js +9 -7
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +34 -28
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/components/Drawing.d.ts +5 -0
- package/lib/commonjs/renderer/components/Drawing.js +5 -0
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.d.ts +5 -5
- package/lib/commonjs/skia/core/Matrix.d.ts +2 -2
- package/lib/commonjs/skia/core/Matrix.js.map +1 -1
- package/lib/commonjs/skia/core/Picture.d.ts +2 -2
- package/lib/commonjs/skia/core/Picture.js +12 -2
- package/lib/commonjs/skia/core/Picture.js.map +1 -1
- package/lib/commonjs/skia/core/Vector.d.ts +0 -5
- package/lib/commonjs/skia/core/Vector.js +1 -17
- package/lib/commonjs/skia/core/Vector.js.map +1 -1
- package/lib/commonjs/skia/types/Canvas.d.ts +1 -1
- package/lib/commonjs/skia/types/Canvas.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.d.ts +4 -20
- package/lib/commonjs/skia/types/Matrix.js +4 -70
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix4.d.ts +90 -0
- package/lib/commonjs/skia/types/Matrix4.js +312 -0
- package/lib/commonjs/skia/types/Matrix4.js.map +1 -0
- package/lib/commonjs/skia/types/Path/Path.d.ts +1 -1
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/Picture/PictureRecorder.d.ts +1 -1
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/types/Rect.d.ts +1 -0
- package/lib/commonjs/skia/types/Rect.js +18 -0
- package/lib/commonjs/skia/types/Rect.js.map +1 -1
- package/lib/commonjs/skia/types/index.d.ts +1 -0
- package/lib/commonjs/skia/types/index.js +13 -0
- package/lib/commonjs/skia/types/index.js.map +1 -1
- package/lib/commonjs/skia/web/Host.d.ts +2 -3
- package/lib/commonjs/skia/web/Host.js +4 -12
- package/lib/commonjs/skia/web/Host.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.js +13 -13
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkFont.js +2 -2
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.js +6 -6
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +2 -2
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +3 -3
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +2 -2
- package/lib/commonjs/skia/web/JsiSkMatrix.js +6 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.js +3 -3
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.js +5 -5
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +5 -5
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +3 -3
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/commonjs/values/api.d.ts +23 -2
- package/lib/commonjs/values/api.js +44 -1
- package/lib/commonjs/values/api.js.map +1 -1
- package/lib/commonjs/values/hooks/useClockValue.d.ts +3 -0
- package/lib/commonjs/values/hooks/useClockValue.js +3 -0
- package/lib/commonjs/values/hooks/useClockValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useComputedValue.d.ts +3 -0
- package/lib/commonjs/values/hooks/useComputedValue.js +3 -0
- package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValue.d.ts +3 -0
- package/lib/commonjs/values/hooks/useValue.js +3 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValueEffect.d.ts +3 -0
- package/lib/commonjs/values/hooks/useValueEffect.js +3 -0
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
- package/lib/commonjs/values/types.d.ts +4 -4
- package/lib/commonjs/values/types.js.map +1 -1
- package/lib/commonjs/views/SkiaView.d.ts +5 -0
- package/lib/commonjs/views/SkiaView.js +9 -0
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/module/animation/spring/runSpring.d.ts +3 -0
- package/lib/module/animation/spring/runSpring.js +3 -0
- package/lib/module/animation/spring/runSpring.js.map +1 -1
- package/lib/module/animation/spring/useSpring.d.ts +3 -0
- package/lib/module/animation/spring/useSpring.js +3 -0
- package/lib/module/animation/spring/useSpring.js.map +1 -1
- package/lib/module/animation/timing/runTiming.d.ts +3 -0
- package/lib/module/animation/timing/runTiming.js +3 -0
- package/lib/module/animation/timing/runTiming.js.map +1 -1
- package/lib/module/animation/timing/useLoop.d.ts +3 -0
- package/lib/module/animation/timing/useLoop.js +3 -0
- package/lib/module/animation/timing/useLoop.js.map +1 -1
- package/lib/module/animation/timing/useTiming.d.ts +3 -0
- package/lib/module/animation/timing/useTiming.js +3 -0
- package/lib/module/animation/timing/useTiming.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +2 -0
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Fitting.d.ts +5 -5
- package/lib/module/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.d.ts +235 -75
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/module/dom/types/Common.d.ts +3 -3
- package/lib/module/dom/types/Common.js.map +1 -1
- package/lib/module/external/reanimated/interpolators.d.ts +1 -0
- package/lib/module/external/reanimated/interpolators.js +22 -6
- package/lib/module/external/reanimated/interpolators.js.map +1 -1
- package/lib/module/external/reanimated/moduleWrapper.d.ts +2 -1
- package/lib/module/external/reanimated/moduleWrapper.js +7 -6
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/module/renderer/Canvas.js +35 -29
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/components/Drawing.d.ts +5 -0
- package/lib/module/renderer/components/Drawing.js +6 -0
- package/lib/module/renderer/components/Drawing.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.d.ts +5 -5
- package/lib/module/skia/core/Matrix.d.ts +2 -2
- package/lib/module/skia/core/Matrix.js.map +1 -1
- package/lib/module/skia/core/Picture.d.ts +2 -2
- package/lib/module/skia/core/Picture.js +12 -3
- package/lib/module/skia/core/Picture.js.map +1 -1
- package/lib/module/skia/core/Vector.d.ts +0 -5
- package/lib/module/skia/core/Vector.js +0 -13
- package/lib/module/skia/core/Vector.js.map +1 -1
- package/lib/module/skia/types/Canvas.d.ts +1 -1
- package/lib/module/skia/types/Canvas.js.map +1 -1
- package/lib/module/skia/types/Matrix.d.ts +4 -20
- package/lib/module/skia/types/Matrix.js +3 -71
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Matrix4.d.ts +90 -0
- package/lib/module/skia/types/Matrix4.js +274 -0
- package/lib/module/skia/types/Matrix4.js.map +1 -0
- package/lib/module/skia/types/Path/Path.d.ts +1 -1
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/Picture/PictureRecorder.d.ts +1 -1
- package/lib/module/skia/types/Picture/PictureRecorder.js.map +1 -1
- package/lib/module/skia/types/Rect.d.ts +1 -0
- package/lib/module/skia/types/Rect.js +9 -0
- package/lib/module/skia/types/Rect.js.map +1 -1
- 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/Host.d.ts +2 -3
- package/lib/module/skia/web/Host.js +2 -7
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.d.ts +1 -1
- package/lib/module/skia/web/JsiSkCanvas.js +14 -14
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +2 -2
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.js +3 -3
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js +7 -7
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFactory.js +3 -3
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilterFactory.js +4 -4
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +2 -2
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.d.ts +2 -2
- package/lib/module/skia/web/JsiSkMatrix.js +6 -1
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js +4 -4
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.js +6 -6
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +2 -2
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathFactory.js +2 -2
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.js +2 -2
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.js +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/module/skia/web/JsiSkShaderFactory.js +6 -6
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkVerticesFactory.js +2 -2
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/module/values/api.d.ts +23 -2
- package/lib/module/values/api.js +44 -1
- package/lib/module/values/api.js.map +1 -1
- package/lib/module/values/hooks/useClockValue.d.ts +3 -0
- package/lib/module/values/hooks/useClockValue.js +3 -0
- package/lib/module/values/hooks/useClockValue.js.map +1 -1
- package/lib/module/values/hooks/useComputedValue.d.ts +3 -0
- package/lib/module/values/hooks/useComputedValue.js +3 -0
- package/lib/module/values/hooks/useComputedValue.js.map +1 -1
- package/lib/module/values/hooks/useValue.d.ts +3 -0
- package/lib/module/values/hooks/useValue.js +3 -0
- package/lib/module/values/hooks/useValue.js.map +1 -1
- package/lib/module/values/hooks/useValueEffect.d.ts +3 -0
- package/lib/module/values/hooks/useValueEffect.js +3 -0
- package/lib/module/values/hooks/useValueEffect.js.map +1 -1
- package/lib/module/values/types.d.ts +4 -4
- package/lib/module/values/types.js.map +1 -1
- package/lib/module/views/SkiaView.d.ts +5 -0
- package/lib/module/views/SkiaView.js +10 -0
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/typescript/src/animation/spring/runSpring.d.ts +3 -0
- package/lib/typescript/src/animation/spring/useSpring.d.ts +3 -0
- package/lib/typescript/src/animation/timing/runTiming.d.ts +3 -0
- package/lib/typescript/src/animation/timing/useLoop.d.ts +3 -0
- package/lib/typescript/src/animation/timing/useTiming.d.ts +3 -0
- package/lib/typescript/src/dom/nodes/datatypes/Fitting.d.ts +5 -5
- package/lib/typescript/src/dom/nodes/datatypes/Gradient.d.ts +235 -75
- package/lib/typescript/src/dom/types/Common.d.ts +3 -3
- package/lib/typescript/src/external/reanimated/interpolators.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +2 -1
- package/lib/typescript/src/renderer/components/Drawing.d.ts +5 -0
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +5 -5
- package/lib/typescript/src/skia/core/Matrix.d.ts +2 -2
- package/lib/typescript/src/skia/core/Picture.d.ts +2 -2
- package/lib/typescript/src/skia/core/Vector.d.ts +0 -5
- package/lib/typescript/src/skia/types/Canvas.d.ts +1 -1
- package/lib/typescript/src/skia/types/Matrix.d.ts +4 -20
- package/lib/typescript/src/skia/types/Matrix4.d.ts +90 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +1 -1
- package/lib/typescript/src/skia/types/Picture/PictureRecorder.d.ts +1 -1
- package/lib/typescript/src/skia/types/Rect.d.ts +1 -0
- package/lib/typescript/src/skia/types/index.d.ts +1 -0
- package/lib/typescript/src/skia/web/Host.d.ts +2 -3
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +2 -2
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +1 -1
- package/lib/typescript/src/values/api.d.ts +23 -2
- package/lib/typescript/src/values/hooks/useClockValue.d.ts +3 -0
- package/lib/typescript/src/values/hooks/useComputedValue.d.ts +3 -0
- package/lib/typescript/src/values/hooks/useValue.d.ts +3 -0
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +3 -0
- package/lib/typescript/src/values/types.d.ts +4 -4
- package/lib/typescript/src/views/SkiaView.d.ts +5 -0
- package/package.json +2 -1
- package/src/animation/spring/runSpring.ts +3 -0
- package/src/animation/spring/useSpring.ts +3 -0
- package/src/animation/timing/runTiming.ts +3 -0
- package/src/animation/timing/useLoop.ts +3 -0
- package/src/animation/timing/useTiming.ts +3 -0
- package/src/dom/nodes/JsiSkDOM.ts +4 -0
- package/src/dom/nodes/datatypes/Fitting.ts +10 -2
- package/src/dom/nodes/datatypes/Gradient.ts +2 -2
- package/src/dom/types/Common.ts +5 -3
- package/src/external/reanimated/interpolators.ts +30 -7
- package/src/external/reanimated/moduleWrapper.ts +6 -0
- package/src/renderer/Canvas.tsx +41 -30
- package/src/renderer/components/Drawing.tsx +5 -0
- package/src/skia/core/Matrix.ts +2 -2
- package/src/skia/core/Picture.ts +11 -3
- package/src/skia/core/Vector.ts +0 -4
- package/src/skia/types/Canvas.ts +1 -1
- package/src/skia/types/Matrix.ts +7 -85
- package/src/skia/types/Matrix4.ts +344 -0
- package/src/skia/types/Path/Path.ts +1 -1
- package/src/skia/types/Picture/PictureRecorder.ts +1 -1
- package/src/skia/types/Rect.ts +14 -0
- package/src/skia/types/index.ts +1 -0
- package/src/skia/web/Host.ts +4 -3
- package/src/skia/web/JsiSkCanvas.ts +24 -17
- package/src/skia/web/JsiSkColorFilterFactory.ts +5 -2
- package/src/skia/web/JsiSkFont.ts +3 -3
- package/src/skia/web/JsiSkImage.ts +14 -11
- package/src/skia/web/JsiSkImageFactory.ts +3 -3
- package/src/skia/web/JsiSkImageFilterFactory.ts +5 -5
- package/src/skia/web/JsiSkMaskFilterFactory.ts +6 -2
- package/src/skia/web/JsiSkMatrix.ts +14 -3
- package/src/skia/web/JsiSkPaint.ts +4 -4
- package/src/skia/web/JsiSkPath.ts +9 -6
- package/src/skia/web/JsiSkPathEffectFactory.ts +2 -2
- package/src/skia/web/JsiSkPathFactory.ts +2 -2
- package/src/skia/web/JsiSkPicture.ts +4 -4
- package/src/skia/web/JsiSkPictureRecorder.ts +6 -2
- package/src/skia/web/JsiSkShaderFactory.ts +6 -6
- package/src/skia/web/JsiSkVerticesFactory.ts +2 -2
- package/src/values/api.ts +55 -2
- package/src/values/hooks/useClockValue.ts +3 -0
- package/src/values/hooks/useComputedValue.ts +3 -0
- package/src/values/hooks/useValue.ts +3 -0
- package/src/values/hooks/useValueEffect.ts +3 -0
- package/src/values/types.ts +6 -6
- package/src/views/SkiaView.tsx +11 -0
@@ -1,4 +1,7 @@
|
|
1
1
|
/**
|
2
|
+
* @deprecated Use Reanimated 3
|
3
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
4
|
+
*
|
2
5
|
* @returns A new value that will be updated on every frame redraw with the
|
3
6
|
* number of milliseconds elapsed since the value was started.
|
4
7
|
* The clock is created in the stopped state.
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { useEffect, useMemo } from "react";
|
2
2
|
import { ValueApi } from "../api";
|
3
3
|
/**
|
4
|
+
* @deprecated Use Reanimated 3
|
5
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
6
|
+
*
|
4
7
|
* @returns A new value that will be updated on every frame redraw with the
|
5
8
|
* number of milliseconds elapsed since the value was started.
|
6
9
|
* The clock is created in the stopped state.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useEffect","useMemo","ValueApi","useClockValue","clock","createClockValue","start","stop"],"sources":["useClockValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\n\n/**\n * @returns A new value that will be updated on every frame redraw with the\n * number of milliseconds elapsed since the value was started.\n * The clock is created in the stopped state.\n */\n\nexport const useClockValue = () => {\n const clock = useMemo(() => ValueApi.createClockValue(), []);\n useEffect(() => {\n clock.start();\n return clock.stop;\n }, [clock]);\n return clock;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AAEA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,aAAa,GAAG,MAAM;EACjC,MAAMC,KAAK,GAAGH,OAAO,CAAC,MAAMC,QAAQ,CAACG,gBAAT,EAAP,EAAoC,EAApC,CAArB;EACAL,SAAS,CAAC,MAAM;IACdI,KAAK,CAACE,KAAN;IACA,OAAOF,KAAK,CAACG,IAAb;EACD,CAHQ,EAGN,CAACH,KAAD,CAHM,CAAT;EAIA,OAAOA,KAAP;AACD,CAPM"}
|
1
|
+
{"version":3,"names":["useEffect","useMemo","ValueApi","useClockValue","clock","createClockValue","start","stop"],"sources":["useClockValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * @returns A new value that will be updated on every frame redraw with the\n * number of milliseconds elapsed since the value was started.\n * The clock is created in the stopped state.\n */\n\nexport const useClockValue = () => {\n const clock = useMemo(() => ValueApi.createClockValue(), []);\n useEffect(() => {\n clock.start();\n return clock.stop;\n }, [clock]);\n return clock;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,aAAa,GAAG,MAAM;EACjC,MAAMC,KAAK,GAAGH,OAAO,CAAC,MAAMC,QAAQ,CAACG,gBAAT,EAAP,EAAoC,EAApC,CAArB;EACAL,SAAS,CAAC,MAAM;IACdI,KAAK,CAACE,KAAN;IACA,OAAOF,KAAK,CAACG,IAAb;EACD,CAHQ,EAGN,CAACH,KAAD,CAHM,CAAT;EAIA,OAAOA,KAAP;AACD,CAPM"}
|
@@ -1,4 +1,7 @@
|
|
1
1
|
/**
|
2
|
+
* @deprecated Use Reanimated 3
|
3
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
4
|
+
*
|
2
5
|
* Creates a new computed value - a value that will calculate its value depending
|
3
6
|
* on other values.
|
4
7
|
* @param cb Callback to calculate new value
|
@@ -2,6 +2,9 @@ import { useEffect, useMemo } from "react";
|
|
2
2
|
import { ValueApi } from "../api";
|
3
3
|
import { isValue } from "../../renderer/processors/Animations";
|
4
4
|
/**
|
5
|
+
* @deprecated Use Reanimated 3
|
6
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
7
|
+
*
|
5
8
|
* Creates a new computed value - a value that will calculate its value depending
|
6
9
|
* on other values.
|
7
10
|
* @param cb Callback to calculate new value
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useEffect","useMemo","ValueApi","isValue","useComputedValue","cb","values","value","createComputedValue","filter","dispose"],"sources":["useComputedValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport { isValue } from \"../../renderer/processors/Animations\";\n\n/**\n * Creates a new computed value - a value that will calculate its value depending\n * on other values.\n * @param cb Callback to calculate new value\n * @param values Dependant values\n * @returns A readonly value\n */\nexport const useComputedValue = <R>(cb: () => R, values: unknown[]) => {\n const value = useMemo(\n () => ValueApi.createComputedValue<R>(cb, values.filter(isValue)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n values\n );\n useEffect(() => () => value.dispose(), [value]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AACA,SAASC,OAAT,QAAwB,sCAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAIC,EAAJ,EAAiBC,MAAjB,KAAuC;EACrE,MAAMC,KAAK,GAAGN,OAAO,CACnB,MAAMC,QAAQ,CAACM,mBAAT,CAAgCH,EAAhC,EAAoCC,MAAM,CAACG,MAAP,CAAcN,OAAd,CAApC,CADa,EAEnB;EACAG,MAHmB,CAArB;EAKAN,SAAS,CAAC,MAAM,MAAMO,KAAK,CAACG,OAAN,EAAb,EAA8B,CAACH,KAAD,CAA9B,CAAT;EACA,OAAOA,KAAP;AACD,CARM"}
|
1
|
+
{"version":3,"names":["useEffect","useMemo","ValueApi","isValue","useComputedValue","cb","values","value","createComputedValue","filter","dispose"],"sources":["useComputedValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport { isValue } from \"../../renderer/processors/Animations\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Creates a new computed value - a value that will calculate its value depending\n * on other values.\n * @param cb Callback to calculate new value\n * @param values Dependant values\n * @returns A readonly value\n */\nexport const useComputedValue = <R>(cb: () => R, values: unknown[]) => {\n const value = useMemo(\n () => ValueApi.createComputedValue<R>(cb, values.filter(isValue)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n values\n );\n useEffect(() => () => value.dispose(), [value]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AACA,SAASC,OAAT,QAAwB,sCAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAIC,EAAJ,EAAiBC,MAAjB,KAAuC;EACrE,MAAMC,KAAK,GAAGN,OAAO,CACnB,MAAMC,QAAQ,CAACM,mBAAT,CAAgCH,EAAhC,EAAoCC,MAAM,CAACG,MAAP,CAAcN,OAAd,CAApC,CADa,EAEnB;EACAG,MAHmB,CAArB;EAKAN,SAAS,CAAC,MAAM,MAAMO,KAAK,CAACG,OAAN,EAAb,EAA8B,CAACH,KAAD,CAA9B,CAAT;EACA,OAAOA,KAAP;AACD,CARM"}
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import type { SkiaMutableValue } from "../types";
|
2
2
|
/**
|
3
|
+
* @deprecated Use Reanimated 3
|
4
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
5
|
+
*
|
3
6
|
* Creates a new value that holds some data.
|
4
7
|
* @param v Value to hold
|
5
8
|
* @returns A Value of type of v
|
@@ -2,6 +2,9 @@ import { useMemo } from "react";
|
|
2
2
|
import { ValueApi } from "../api";
|
3
3
|
|
4
4
|
/**
|
5
|
+
* @deprecated Use Reanimated 3
|
6
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
7
|
+
*
|
5
8
|
* Creates a new value that holds some data.
|
6
9
|
* @param v Value to hold
|
7
10
|
* @returns A Value of type of v
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useMemo","ValueApi","useValue","v","createValue"],"sources":["useValue.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport type { SkiaMutableValue } from \"../types\";\n\n/**\n * Creates a new value that holds some data.\n * @param v Value to hold\n * @returns A Value of type of v\n */\nexport const useValue = <T>(v: T): SkiaMutableValue<T> => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => ValueApi.createValue(v), []);\n};\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,QAAT,QAAyB,QAAzB;;AAGA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAOC,CAAJ,IAAkC;EACxD;EACA,OAAOH,OAAO,CAAC,MAAMC,QAAQ,CAACG,WAAT,CAAqBD,CAArB,CAAP,EAAgC,EAAhC,CAAd;AACD,CAHM"}
|
1
|
+
{"version":3,"names":["useMemo","ValueApi","useValue","v","createValue"],"sources":["useValue.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport type { SkiaMutableValue } from \"../types\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Creates a new value that holds some data.\n * @param v Value to hold\n * @returns A Value of type of v\n */\nexport const useValue = <T>(v: T): SkiaMutableValue<T> => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => ValueApi.createValue(v), []);\n};\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,QAAT,QAAyB,QAAzB;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAOC,CAAJ,IAAkC;EACxD;EACA,OAAOH,OAAO,CAAC,MAAMC,QAAQ,CAACG,WAAT,CAAqBD,CAArB,CAAP,EAAgC,EAAhC,CAAd;AACD,CAHM"}
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import type { SkiaValue } from "../types";
|
2
2
|
/**
|
3
|
+
* @deprecated Use Reanimated 3
|
4
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
5
|
+
*
|
3
6
|
* Sets up an effect that will be run whenever the value changes
|
4
7
|
* @param value Value to subscribe to changes on
|
5
8
|
* @param cb Callback to run when value changes
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { useEffect } from "react";
|
2
2
|
|
3
3
|
/**
|
4
|
+
* @deprecated Use Reanimated 3
|
5
|
+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
6
|
+
*
|
4
7
|
* Sets up an effect that will be run whenever the value changes
|
5
8
|
* @param value Value to subscribe to changes on
|
6
9
|
* @param cb Callback to run when value changes
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useEffect","useValueEffect","value","cb","addListener"],"sources":["useValueEffect.ts"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport type { SkiaValue } from \"../types\";\n\n/**\n * Sets up an effect that will be run whenever the value changes\n * @param value Value to subscribe to changes on\n * @param cb Callback to run when value changes\n */\nexport const useValueEffect = <T>(value: SkiaValue<T>, cb: (v: T) => void) => {\n useEffect(() => {\n return value.addListener(cb);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n};\n"],"mappings":"AAAA,SAASA,SAAT,QAA0B,OAA1B;;AAIA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,CAAIC,KAAJ,EAAyBC,EAAzB,KAAgD;EAC5EH,SAAS,CAAC,MAAM;IACd,OAAOE,KAAK,CAACE,WAAN,CAAkBD,EAAlB,CAAP,CADc,CAEd;EACD,CAHQ,EAGN,CAACD,KAAD,CAHM,CAAT;AAID,CALM"}
|
1
|
+
{"version":3,"names":["useEffect","useValueEffect","value","cb","addListener"],"sources":["useValueEffect.ts"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport type { SkiaValue } from \"../types\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Sets up an effect that will be run whenever the value changes\n * @param value Value to subscribe to changes on\n * @param cb Callback to run when value changes\n */\nexport const useValueEffect = <T>(value: SkiaValue<T>, cb: (v: T) => void) => {\n useEffect(() => {\n return value.addListener(cb);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n};\n"],"mappings":"AAAA,SAASA,SAAT,QAA0B,OAA1B;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,CAAIC,KAAJ,EAAyBC,EAAzB,KAAgD;EAC5EH,SAAS,CAAC,MAAM;IACd,OAAOE,KAAK,CAACE,WAAN,CAAkBD,EAAlB,CAAP,CADc,CAEd;EACD,CAHQ,EAGN,CAACD,KAAD,CAHM,CAAT;AAID,CALM"}
|
@@ -43,21 +43,21 @@ export interface ISkiaValueApi {
|
|
43
43
|
* Creates a new value that holds the initial value and that
|
44
44
|
* can be changed.
|
45
45
|
*/
|
46
|
-
createValue
|
46
|
+
createValue<T>(initialValue: T): SkiaMutableValue<T>;
|
47
47
|
/**
|
48
48
|
* Creates a computed value. This is a calculated value that returns the result of
|
49
49
|
* a function that is called with the values of the dependencies.
|
50
50
|
*/
|
51
|
-
createComputedValue
|
51
|
+
createComputedValue<R>(cb: () => R, values: Array<SkiaValue<unknown>>): SkiaValue<R>;
|
52
52
|
/**
|
53
53
|
* Creates a clock value where the value is the number of milliseconds elapsed
|
54
54
|
* since the clock was created
|
55
55
|
*/
|
56
|
-
createClockValue
|
56
|
+
createClockValue(): SkiaClockValue;
|
57
57
|
/**
|
58
58
|
* Creates an animation that is driven from a clock and updated every frame.
|
59
59
|
* @param cb Callback to calculate next value from time.
|
60
60
|
* @returns An animation object that can control a value.
|
61
61
|
*/
|
62
|
-
createAnimation
|
62
|
+
createAnimation<S extends AnimationState = AnimationState>(cb: (t: number, state: S | undefined) => S): SkiaAnimation;
|
63
63
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface SkiaValue<T = number> {\n /**\n * Gets the value hold by the Value object\n */\n readonly current: T;\n /**\n * Adds a listener that is called when value changes.\n * Returns unsubscribe method.\n */\n addListener: (cb: (value: T) => void) => () => void;\n /**\n * Invalidates the value. Has different meaning depending on the type of the value.\n */\n dispose: () => void;\n /**\n * Field to make typechecking easier\n */\n __typename__: \"RNSkValue\";\n}\n\nexport interface SkiaMutableValue<T = number> extends SkiaValue<T> {\n /**\n * Get/sets the value hold by the Value object\n */\n current: T;\n /**\n * Get/sets the animation controlling the value\n * */\n animation: SkiaAnimation | undefined;\n}\n\nexport interface SkiaClockValue extends SkiaValue<number> {\n start: () => void;\n stop: () => void;\n}\n\nexport interface SkiaAnimation extends SkiaClockValue {\n cancel: () => void;\n}\n\nexport interface AnimationState {\n current: number;\n finished: boolean;\n}\n\nexport interface ISkiaValueApi {\n /**\n * Creates a new value that holds the initial value and that\n * can be changed.\n */\n createValue
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface SkiaValue<T = number> {\n /**\n * Gets the value hold by the Value object\n */\n readonly current: T;\n /**\n * Adds a listener that is called when value changes.\n * Returns unsubscribe method.\n */\n addListener: (cb: (value: T) => void) => () => void;\n /**\n * Invalidates the value. Has different meaning depending on the type of the value.\n */\n dispose: () => void;\n /**\n * Field to make typechecking easier\n */\n __typename__: \"RNSkValue\";\n}\n\nexport interface SkiaMutableValue<T = number> extends SkiaValue<T> {\n /**\n * Get/sets the value hold by the Value object\n */\n current: T;\n /**\n * Get/sets the animation controlling the value\n * */\n animation: SkiaAnimation | undefined;\n}\n\nexport interface SkiaClockValue extends SkiaValue<number> {\n start: () => void;\n stop: () => void;\n}\n\nexport interface SkiaAnimation extends SkiaClockValue {\n cancel: () => void;\n}\n\nexport interface AnimationState {\n current: number;\n finished: boolean;\n}\n\nexport interface ISkiaValueApi {\n /**\n * Creates a new value that holds the initial value and that\n * can be changed.\n */\n createValue<T>(initialValue: T): SkiaMutableValue<T>;\n /**\n * Creates a computed value. This is a calculated value that returns the result of\n * a function that is called with the values of the dependencies.\n */\n createComputedValue<R>(\n cb: () => R,\n values: Array<SkiaValue<unknown>>\n ): SkiaValue<R>;\n /**\n * Creates a clock value where the value is the number of milliseconds elapsed\n * since the clock was created\n */\n createClockValue(): SkiaClockValue;\n /**\n * Creates an animation that is driven from a clock and updated every frame.\n * @param cb Callback to calculate next value from time.\n * @returns An animation object that can control a value.\n */\n createAnimation<S extends AnimationState = AnimationState>(\n cb: (t: number, state: S | undefined) => S\n ): SkiaAnimation;\n}\n"],"mappings":""}
|
@@ -5,6 +5,11 @@ import type { SkiaDrawViewProps } from "./types";
|
|
5
5
|
export declare const SkiaViewNativeId: {
|
6
6
|
current: number;
|
7
7
|
};
|
8
|
+
/**
|
9
|
+
* @deprecated If you are looking to use the Skia imperative API, you can use:
|
10
|
+
* The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/
|
11
|
+
* The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures
|
12
|
+
*/
|
8
13
|
export declare class SkiaView extends React.Component<SkiaDrawViewProps> {
|
9
14
|
constructor(props: SkiaDrawViewProps);
|
10
15
|
private _nativeId;
|
@@ -9,12 +9,22 @@ export const SkiaViewNativeId = {
|
|
9
9
|
current: 1000
|
10
10
|
};
|
11
11
|
const NativeSkiaView = SkiaDrawViewNativeComponent;
|
12
|
+
/**
|
13
|
+
* @deprecated If you are looking to use the Skia imperative API, you can use:
|
14
|
+
* The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/
|
15
|
+
* The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures
|
16
|
+
*/
|
17
|
+
|
12
18
|
export class SkiaView extends React.Component {
|
13
19
|
constructor(props) {
|
14
20
|
super(props);
|
15
21
|
|
16
22
|
_defineProperty(this, "_nativeId", void 0);
|
17
23
|
|
24
|
+
console.warn(`The SkiaView component is deprecated and will be removed in the next release.
|
25
|
+
If you are looking to use the Skia imperative API, you can use:
|
26
|
+
* The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/
|
27
|
+
* The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures`);
|
18
28
|
this._nativeId = SkiaViewNativeId.current++;
|
19
29
|
const {
|
20
30
|
onDraw,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","SkiaDrawViewNativeComponent","SkiaViewApi","SkiaViewNativeId","current","NativeSkiaView","SkiaView","Component","constructor","props","_nativeId","onDraw","onSize","assertSkiaViewApi","setJsiProperty","nativeId","componentDidUpdate","prevProps","makeImageSnapshot","rect","redraw","requestRedraw","registerValues","values","registerValuesInView","render","mode","debug","viewProps","callJsiMethod","Error"],"sources":["SkiaView.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkRect } from \"../skia/types\";\nimport type { SkiaValue } from \"../values\";\nimport SkiaDrawViewNativeComponent from \"../specs/SkiaDrawViewNativeComponent\";\n\nimport { SkiaViewApi } from \"./api\";\nimport type { SkiaDrawViewProps } from \"./types\";\n\nexport const SkiaViewNativeId = { current: 1000 };\n\nconst NativeSkiaView = SkiaDrawViewNativeComponent;\n\nexport class SkiaView extends React.Component<SkiaDrawViewProps> {\n constructor(props: SkiaDrawViewProps) {\n super(props);\n this._nativeId = SkiaViewNativeId.current++;\n const { onDraw, onSize } = props;\n if (onDraw) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"drawCallback\", onDraw);\n }\n if (onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n private _nativeId: number;\n\n public get nativeId() {\n return this._nativeId;\n }\n\n componentDidUpdate(prevProps: SkiaDrawViewProps) {\n const { onDraw, onSize } = this.props;\n if (onDraw !== prevProps.onDraw) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"drawCallback\", onDraw);\n }\n if (onSize !== prevProps.onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n assertSkiaViewApi();\n return SkiaViewApi.makeImageSnapshot(this._nativeId, rect);\n }\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n public redraw() {\n assertSkiaViewApi();\n SkiaViewApi.requestRedraw(this._nativeId);\n }\n\n /**\n * Registers one or move values as a dependant value of the Skia View. The view will\n * The view will redraw itself when any of the values change.\n * @param values Values to register\n */\n public registerValues(values: SkiaValue<unknown>[]): () => void {\n assertSkiaViewApi();\n return SkiaViewApi.registerValuesInView(this._nativeId, values);\n }\n\n render() {\n const { mode, debug = false, onSize, ...viewProps } = this.props;\n return (\n <NativeSkiaView\n collapsable={false}\n nativeID={`${this._nativeId}`}\n mode={mode ?? \"default\"}\n debug={debug}\n {...viewProps}\n />\n );\n }\n}\n\nconst assertSkiaViewApi = () => {\n if (\n SkiaViewApi === null ||\n SkiaViewApi.setJsiProperty === null ||\n SkiaViewApi.callJsiMethod === null ||\n SkiaViewApi.registerValuesInView === null ||\n SkiaViewApi.requestRedraw === null ||\n SkiaViewApi.makeImageSnapshot === null\n ) {\n throw Error(\"Skia View Api was not found.\");\n }\n};\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAIA,OAAOC,2BAAP,MAAwC,sCAAxC;AAEA,SAASC,WAAT,QAA4B,OAA5B;AAGA,OAAO,MAAMC,gBAAgB,GAAG;EAAEC,OAAO,EAAE;AAAX,CAAzB;AAEP,MAAMC,cAAc,GAAGJ,2BAAvB;AAEA,OAAO,MAAMK,QAAN,SAAuBN,KAAK,CAACO,SAA7B,CAA0D;EAC/DC,WAAW,CAACC,KAAD,EAA2B;IACpC,MAAMA,KAAN;;IADoC;;
|
1
|
+
{"version":3,"names":["React","SkiaDrawViewNativeComponent","SkiaViewApi","SkiaViewNativeId","current","NativeSkiaView","SkiaView","Component","constructor","props","console","warn","_nativeId","onDraw","onSize","assertSkiaViewApi","setJsiProperty","nativeId","componentDidUpdate","prevProps","makeImageSnapshot","rect","redraw","requestRedraw","registerValues","values","registerValuesInView","render","mode","debug","viewProps","callJsiMethod","Error"],"sources":["SkiaView.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkRect } from \"../skia/types\";\nimport type { SkiaValue } from \"../values\";\nimport SkiaDrawViewNativeComponent from \"../specs/SkiaDrawViewNativeComponent\";\n\nimport { SkiaViewApi } from \"./api\";\nimport type { SkiaDrawViewProps } from \"./types\";\n\nexport const SkiaViewNativeId = { current: 1000 };\n\nconst NativeSkiaView = SkiaDrawViewNativeComponent;\n\n/**\n * @deprecated If you are looking to use the Skia imperative API, you can use:\n * The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/\n * The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures\n */\nexport class SkiaView extends React.Component<SkiaDrawViewProps> {\n constructor(props: SkiaDrawViewProps) {\n super(props);\n console.warn(\n `The SkiaView component is deprecated and will be removed in the next release.\nIf you are looking to use the Skia imperative API, you can use:\n* The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/\n* The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures`\n );\n this._nativeId = SkiaViewNativeId.current++;\n const { onDraw, onSize } = props;\n if (onDraw) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"drawCallback\", onDraw);\n }\n if (onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n private _nativeId: number;\n\n public get nativeId() {\n return this._nativeId;\n }\n\n componentDidUpdate(prevProps: SkiaDrawViewProps) {\n const { onDraw, onSize } = this.props;\n if (onDraw !== prevProps.onDraw) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"drawCallback\", onDraw);\n }\n if (onSize !== prevProps.onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n assertSkiaViewApi();\n return SkiaViewApi.makeImageSnapshot(this._nativeId, rect);\n }\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n public redraw() {\n assertSkiaViewApi();\n SkiaViewApi.requestRedraw(this._nativeId);\n }\n\n /**\n * Registers one or move values as a dependant value of the Skia View. The view will\n * The view will redraw itself when any of the values change.\n * @param values Values to register\n */\n public registerValues(values: SkiaValue<unknown>[]): () => void {\n assertSkiaViewApi();\n return SkiaViewApi.registerValuesInView(this._nativeId, values);\n }\n\n render() {\n const { mode, debug = false, onSize, ...viewProps } = this.props;\n return (\n <NativeSkiaView\n collapsable={false}\n nativeID={`${this._nativeId}`}\n mode={mode ?? \"default\"}\n debug={debug}\n {...viewProps}\n />\n );\n }\n}\n\nconst assertSkiaViewApi = () => {\n if (\n SkiaViewApi === null ||\n SkiaViewApi.setJsiProperty === null ||\n SkiaViewApi.callJsiMethod === null ||\n SkiaViewApi.registerValuesInView === null ||\n SkiaViewApi.requestRedraw === null ||\n SkiaViewApi.makeImageSnapshot === null\n ) {\n throw Error(\"Skia View Api was not found.\");\n }\n};\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAIA,OAAOC,2BAAP,MAAwC,sCAAxC;AAEA,SAASC,WAAT,QAA4B,OAA5B;AAGA,OAAO,MAAMC,gBAAgB,GAAG;EAAEC,OAAO,EAAE;AAAX,CAAzB;AAEP,MAAMC,cAAc,GAAGJ,2BAAvB;AAEA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMK,QAAN,SAAuBN,KAAK,CAACO,SAA7B,CAA0D;EAC/DC,WAAW,CAACC,KAAD,EAA2B;IACpC,MAAMA,KAAN;;IADoC;;IAEpCC,OAAO,CAACC,IAAR,CACG;AACP;AACA;AACA,0FAJI;IAMA,KAAKC,SAAL,GAAiBT,gBAAgB,CAACC,OAAjB,EAAjB;IACA,MAAM;MAAES,MAAF;MAAUC;IAAV,IAAqBL,KAA3B;;IACA,IAAII,MAAJ,EAAY;MACVE,iBAAiB;MACjBb,WAAW,CAACc,cAAZ,CAA2B,KAAKJ,SAAhC,EAA2C,cAA3C,EAA2DC,MAA3D;IACD;;IACD,IAAIC,MAAJ,EAAY;MACVC,iBAAiB;MACjBb,WAAW,CAACc,cAAZ,CAA2B,KAAKJ,SAAhC,EAA2C,QAA3C,EAAqDE,MAArD;IACD;EACF;;EAIkB,IAARG,QAAQ,GAAG;IACpB,OAAO,KAAKL,SAAZ;EACD;;EAEDM,kBAAkB,CAACC,SAAD,EAA+B;IAC/C,MAAM;MAAEN,MAAF;MAAUC;IAAV,IAAqB,KAAKL,KAAhC;;IACA,IAAII,MAAM,KAAKM,SAAS,CAACN,MAAzB,EAAiC;MAC/BE,iBAAiB;MACjBb,WAAW,CAACc,cAAZ,CAA2B,KAAKJ,SAAhC,EAA2C,cAA3C,EAA2DC,MAA3D;IACD;;IACD,IAAIC,MAAM,KAAKK,SAAS,CAACL,MAAzB,EAAiC;MAC/BC,iBAAiB;MACjBb,WAAW,CAACc,cAAZ,CAA2B,KAAKJ,SAAhC,EAA2C,QAA3C,EAAqDE,MAArD;IACD;EACF;EAED;AACF;AACA;AACA;AACA;;;EACSM,iBAAiB,CAACC,IAAD,EAAgB;IACtCN,iBAAiB;IACjB,OAAOb,WAAW,CAACkB,iBAAZ,CAA8B,KAAKR,SAAnC,EAA8CS,IAA9C,CAAP;EACD;EAED;AACF;AACA;;;EACSC,MAAM,GAAG;IACdP,iBAAiB;IACjBb,WAAW,CAACqB,aAAZ,CAA0B,KAAKX,SAA/B;EACD;EAED;AACF;AACA;AACA;AACA;;;EACSY,cAAc,CAACC,MAAD,EAA2C;IAC9DV,iBAAiB;IACjB,OAAOb,WAAW,CAACwB,oBAAZ,CAAiC,KAAKd,SAAtC,EAAiDa,MAAjD,CAAP;EACD;;EAEDE,MAAM,GAAG;IACP,MAAM;MAAEC,IAAF;MAAQC,KAAK,GAAG,KAAhB;MAAuBf,MAAvB;MAA+B,GAAGgB;IAAlC,IAAgD,KAAKrB,KAA3D;IACA,oBACE,oBAAC,cAAD;MACE,WAAW,EAAE,KADf;MAEE,QAAQ,EAAG,GAAE,KAAKG,SAAU,EAF9B;MAGE,IAAI,EAAEgB,IAAF,aAAEA,IAAF,cAAEA,IAAF,GAAU,SAHhB;MAIE,KAAK,EAAEC;IAJT,GAKMC,SALN,EADF;EASD;;AA9E8D;;AAiFjE,MAAMf,iBAAiB,GAAG,MAAM;EAC9B,IACEb,WAAW,KAAK,IAAhB,IACAA,WAAW,CAACc,cAAZ,KAA+B,IAD/B,IAEAd,WAAW,CAAC6B,aAAZ,KAA8B,IAF9B,IAGA7B,WAAW,CAACwB,oBAAZ,KAAqC,IAHrC,IAIAxB,WAAW,CAACqB,aAAZ,KAA8B,IAJ9B,IAKArB,WAAW,CAACkB,iBAAZ,KAAkC,IANpC,EAOE;IACA,MAAMY,KAAK,CAAC,8BAAD,CAAX;EACD;AACF,CAXD"}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import type { SkiaMutableValue, SkiaAnimation } from "../../values/types";
|
2
2
|
import type { AnimationParams, SpringConfig, AnimationCallback } from "../types";
|
3
3
|
/**
|
4
|
+
* @deprecated Use Reanimated 3 for animations:
|
5
|
+
* https://shopify.github.io/react-native-skia/docs/animations/animations
|
6
|
+
*
|
4
7
|
* Creates a new animation on an existing value that will be driven by
|
5
8
|
* an animation value. The value will be run from / to the value in
|
6
9
|
* params and modified by the provided easing curve for the length of
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import type { SkiaValue } from "../../values/types";
|
2
2
|
import type { SpringConfig, AnimationParams, AnimationCallback } from "../types";
|
3
3
|
/**
|
4
|
+
* @deprecated Use Reanimated 3 for animations:
|
5
|
+
* https://shopify.github.io/react-native-skia/docs/animations/animations
|
6
|
+
*
|
4
7
|
* Creats a spring based animation value that will run whenever
|
5
8
|
* the animation parameters change.
|
6
9
|
* @param toOrParams
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import type { SkiaMutableValue, SkiaAnimation } from "../../values/types";
|
2
2
|
import type { AnimationParams, TimingConfig, AnimationCallback } from "../types";
|
3
3
|
/**
|
4
|
+
* @deprecated Use Reanimated 3 for animations:
|
5
|
+
* https://shopify.github.io/react-native-skia/docs/animations/animations
|
6
|
+
*
|
4
7
|
* Creates a new animation on an existing value that will be driven by
|
5
8
|
* an animation value. The value will be run from / to the value in
|
6
9
|
* params and modified by the provided easing curve for the length of
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import type { TimingConfig } from "../types";
|
2
2
|
/**
|
3
|
+
* @deprecated Use Reanimated 3 for animations:
|
4
|
+
* https://shopify.github.io/react-native-skia/docs/animations/animations
|
5
|
+
*
|
3
6
|
* Configures a looped timing value. The value will go back and forth
|
4
7
|
* between 0 and 1 and back.
|
5
8
|
* @param config Timing configuration for easing and duration
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import type { SkiaValue } from "../../values/types";
|
2
2
|
import type { AnimationParams, TimingConfig, AnimationCallback } from "../types";
|
3
3
|
/**
|
4
|
+
* @deprecated Use Reanimated 3 for animations:
|
5
|
+
* https://shopify.github.io/react-native-skia/docs/animations/animations
|
6
|
+
*
|
4
7
|
* Creats an animation value that will run whenever
|
5
8
|
* the animation parameters change. The animation start immediately.
|
6
9
|
* @param toOrParams
|
@@ -8,14 +8,14 @@ export declare const size: (width?: number, height?: number) => {
|
|
8
8
|
width: number;
|
9
9
|
height: number;
|
10
10
|
};
|
11
|
-
export declare const rect2rect: (src: SkRect, dst: SkRect) =>
|
12
|
-
|
11
|
+
export declare const rect2rect: (src: SkRect, dst: SkRect) => [{
|
12
|
+
translateX: number;
|
13
13
|
}, {
|
14
|
-
|
14
|
+
translateY: number;
|
15
15
|
}, {
|
16
|
-
|
16
|
+
scaleX: number;
|
17
17
|
}, {
|
18
|
-
|
18
|
+
scaleY: number;
|
19
19
|
}];
|
20
20
|
export declare const fitRects: (fit: Fit, rect: SkRect, { x, y, width, height }: SkRect) => {
|
21
21
|
src: {
|
@@ -1,87 +1,247 @@
|
|
1
|
-
import type { Skia, SkRect,
|
1
|
+
import type { Skia, SkRect, Transforms3d, Vector } from "../../../skia/types";
|
2
2
|
import { TileMode } from "../../../skia/types";
|
3
3
|
import type { GradientProps, ImageShaderProps } from "../../types";
|
4
|
-
export declare const transformOrigin: (origin: Vector, transform:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
readonly
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
export declare const transformOrigin: (origin: Vector, transform: Transforms3d) => (Pick<{
|
5
|
+
translateX: number;
|
6
|
+
translateY: number;
|
7
|
+
translateZ: number;
|
8
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
9
|
+
scale: number;
|
10
|
+
scaleX: number;
|
11
|
+
scaleY: number;
|
12
|
+
skewX: number;
|
13
|
+
skewY: number;
|
14
|
+
rotateZ: number;
|
15
|
+
rotate: number;
|
16
|
+
perspective: number;
|
17
|
+
rotateX: number;
|
18
|
+
rotateY: number;
|
19
|
+
matrix: import("../../../skia/types").Matrix4;
|
14
20
|
}, "translateX"> | Pick<{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
readonly
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
translateX: number;
|
22
|
+
translateY: number;
|
23
|
+
translateZ: number;
|
24
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
25
|
+
scale: number;
|
26
|
+
scaleX: number;
|
27
|
+
scaleY: number;
|
28
|
+
skewX: number;
|
29
|
+
skewY: number;
|
30
|
+
rotateZ: number;
|
31
|
+
rotate: number;
|
32
|
+
perspective: number;
|
33
|
+
rotateX: number;
|
34
|
+
rotateY: number;
|
35
|
+
matrix: import("../../../skia/types").Matrix4;
|
24
36
|
}, "translateY"> | Pick<{
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
readonly
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
37
|
+
translateX: number;
|
38
|
+
translateY: number;
|
39
|
+
translateZ: number;
|
40
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
41
|
+
scale: number;
|
42
|
+
scaleX: number;
|
43
|
+
scaleY: number;
|
44
|
+
skewX: number;
|
45
|
+
skewY: number;
|
46
|
+
rotateZ: number;
|
47
|
+
rotate: number;
|
48
|
+
perspective: number;
|
49
|
+
rotateX: number;
|
50
|
+
rotateY: number;
|
51
|
+
matrix: import("../../../skia/types").Matrix4;
|
52
|
+
}, "translateZ"> | Pick<{
|
53
|
+
translateX: number;
|
54
|
+
translateY: number;
|
55
|
+
translateZ: number;
|
56
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
57
|
+
scale: number;
|
58
|
+
scaleX: number;
|
59
|
+
scaleY: number;
|
60
|
+
skewX: number;
|
61
|
+
skewY: number;
|
62
|
+
rotateZ: number;
|
63
|
+
rotate: number;
|
64
|
+
perspective: number;
|
65
|
+
rotateX: number;
|
66
|
+
rotateY: number;
|
67
|
+
matrix: import("../../../skia/types").Matrix4;
|
68
|
+
}, "translate"> | Pick<{
|
69
|
+
translateX: number;
|
70
|
+
translateY: number;
|
71
|
+
translateZ: number;
|
72
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
73
|
+
scale: number;
|
74
|
+
scaleX: number;
|
75
|
+
scaleY: number;
|
76
|
+
skewX: number;
|
77
|
+
skewY: number;
|
78
|
+
rotateZ: number;
|
79
|
+
rotate: number;
|
80
|
+
perspective: number;
|
81
|
+
rotateX: number;
|
82
|
+
rotateY: number;
|
83
|
+
matrix: import("../../../skia/types").Matrix4;
|
34
84
|
}, "scale"> | Pick<{
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
readonly
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
85
|
+
translateX: number;
|
86
|
+
translateY: number;
|
87
|
+
translateZ: number;
|
88
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
89
|
+
scale: number;
|
90
|
+
scaleX: number;
|
91
|
+
scaleY: number;
|
92
|
+
skewX: number;
|
93
|
+
skewY: number;
|
94
|
+
rotateZ: number;
|
95
|
+
rotate: number;
|
96
|
+
perspective: number;
|
97
|
+
rotateX: number;
|
98
|
+
rotateY: number;
|
99
|
+
matrix: import("../../../skia/types").Matrix4;
|
44
100
|
}, "scaleX"> | Pick<{
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
readonly
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
101
|
+
translateX: number;
|
102
|
+
translateY: number;
|
103
|
+
translateZ: number;
|
104
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
105
|
+
scale: number;
|
106
|
+
scaleX: number;
|
107
|
+
scaleY: number;
|
108
|
+
skewX: number;
|
109
|
+
skewY: number;
|
110
|
+
rotateZ: number;
|
111
|
+
rotate: number;
|
112
|
+
perspective: number;
|
113
|
+
rotateX: number;
|
114
|
+
rotateY: number;
|
115
|
+
matrix: import("../../../skia/types").Matrix4;
|
54
116
|
}, "scaleY"> | Pick<{
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
readonly
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
117
|
+
translateX: number;
|
118
|
+
translateY: number;
|
119
|
+
translateZ: number;
|
120
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
121
|
+
scale: number;
|
122
|
+
scaleX: number;
|
123
|
+
scaleY: number;
|
124
|
+
skewX: number;
|
125
|
+
skewY: number;
|
126
|
+
rotateZ: number;
|
127
|
+
rotate: number;
|
128
|
+
perspective: number;
|
129
|
+
rotateX: number;
|
130
|
+
rotateY: number;
|
131
|
+
matrix: import("../../../skia/types").Matrix4;
|
64
132
|
}, "skewX"> | Pick<{
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
readonly
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
133
|
+
translateX: number;
|
134
|
+
translateY: number;
|
135
|
+
translateZ: number;
|
136
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
137
|
+
scale: number;
|
138
|
+
scaleX: number;
|
139
|
+
scaleY: number;
|
140
|
+
skewX: number;
|
141
|
+
skewY: number;
|
142
|
+
rotateZ: number;
|
143
|
+
rotate: number;
|
144
|
+
perspective: number;
|
145
|
+
rotateX: number;
|
146
|
+
rotateY: number;
|
147
|
+
matrix: import("../../../skia/types").Matrix4;
|
74
148
|
}, "skewY"> | Pick<{
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
readonly
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
149
|
+
translateX: number;
|
150
|
+
translateY: number;
|
151
|
+
translateZ: number;
|
152
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
153
|
+
scale: number;
|
154
|
+
scaleX: number;
|
155
|
+
scaleY: number;
|
156
|
+
skewX: number;
|
157
|
+
skewY: number;
|
158
|
+
rotateZ: number;
|
159
|
+
rotate: number;
|
160
|
+
perspective: number;
|
161
|
+
rotateX: number;
|
162
|
+
rotateY: number;
|
163
|
+
matrix: import("../../../skia/types").Matrix4;
|
164
|
+
}, "perspective"> | Pick<{
|
165
|
+
translateX: number;
|
166
|
+
translateY: number;
|
167
|
+
translateZ: number;
|
168
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
169
|
+
scale: number;
|
170
|
+
scaleX: number;
|
171
|
+
scaleY: number;
|
172
|
+
skewX: number;
|
173
|
+
skewY: number;
|
174
|
+
rotateZ: number;
|
175
|
+
rotate: number;
|
176
|
+
perspective: number;
|
177
|
+
rotateX: number;
|
178
|
+
rotateY: number;
|
179
|
+
matrix: import("../../../skia/types").Matrix4;
|
180
|
+
}, "rotateX"> | Pick<{
|
181
|
+
translateX: number;
|
182
|
+
translateY: number;
|
183
|
+
translateZ: number;
|
184
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
185
|
+
scale: number;
|
186
|
+
scaleX: number;
|
187
|
+
scaleY: number;
|
188
|
+
skewX: number;
|
189
|
+
skewY: number;
|
190
|
+
rotateZ: number;
|
191
|
+
rotate: number;
|
192
|
+
perspective: number;
|
193
|
+
rotateX: number;
|
194
|
+
rotateY: number;
|
195
|
+
matrix: import("../../../skia/types").Matrix4;
|
196
|
+
}, "rotateY"> | Pick<{
|
197
|
+
translateX: number;
|
198
|
+
translateY: number;
|
199
|
+
translateZ: number;
|
200
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
201
|
+
scale: number;
|
202
|
+
scaleX: number;
|
203
|
+
scaleY: number;
|
204
|
+
skewX: number;
|
205
|
+
skewY: number;
|
206
|
+
rotateZ: number;
|
207
|
+
rotate: number;
|
208
|
+
perspective: number;
|
209
|
+
rotateX: number;
|
210
|
+
rotateY: number;
|
211
|
+
matrix: import("../../../skia/types").Matrix4;
|
212
|
+
}, "rotateZ"> | Pick<{
|
213
|
+
translateX: number;
|
214
|
+
translateY: number;
|
215
|
+
translateZ: number;
|
216
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
217
|
+
scale: number;
|
218
|
+
scaleX: number;
|
219
|
+
scaleY: number;
|
220
|
+
skewX: number;
|
221
|
+
skewY: number;
|
222
|
+
rotateZ: number;
|
223
|
+
rotate: number;
|
224
|
+
perspective: number;
|
225
|
+
rotateX: number;
|
226
|
+
rotateY: number;
|
227
|
+
matrix: import("../../../skia/types").Matrix4;
|
228
|
+
}, "rotate"> | Pick<{
|
229
|
+
translateX: number;
|
230
|
+
translateY: number;
|
231
|
+
translateZ: number;
|
232
|
+
translate: readonly [number, number] | readonly [number, number, number];
|
233
|
+
scale: number;
|
234
|
+
scaleX: number;
|
235
|
+
scaleY: number;
|
236
|
+
skewX: number;
|
237
|
+
skewY: number;
|
238
|
+
rotateZ: number;
|
239
|
+
rotate: number;
|
240
|
+
perspective: number;
|
241
|
+
rotateX: number;
|
242
|
+
rotateY: number;
|
243
|
+
matrix: import("../../../skia/types").Matrix4;
|
244
|
+
}, "matrix">)[];
|
85
245
|
export declare const processGradientProps: (Skia: Skia, { colors, positions, mode, flags, ...transform }: GradientProps) => {
|
86
246
|
colors: Float32Array[];
|
87
247
|
positions: number[] | null;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ReactNode } from "react";
|
2
|
-
import type { BlendMode, Color, PaintStyle, SkMatrix, SkPaint, SkPath, SkRect, SkRRect, StrokeCap, StrokeJoin,
|
2
|
+
import type { BlendMode, Color, Matrix3, Matrix4, PaintStyle, SkMatrix, SkPaint, SkPath, SkRect, SkRRect, StrokeCap, StrokeJoin, Transforms3d, Vector } from "../../skia/types";
|
3
3
|
export type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;
|
4
4
|
export type PathDef = string | SkPath;
|
5
5
|
export type ClipDef = SkRRect | SkRect | PathDef;
|
@@ -34,9 +34,9 @@ export interface ScalarCircleDef {
|
|
34
34
|
}
|
35
35
|
export type CircleDef = PointCircleDef | ScalarCircleDef;
|
36
36
|
export interface TransformProps {
|
37
|
-
transform?:
|
37
|
+
transform?: Transforms3d;
|
38
38
|
origin?: Vector;
|
39
|
-
matrix?: SkMatrix;
|
39
|
+
matrix?: SkMatrix | Matrix4 | Matrix3 | number[];
|
40
40
|
}
|
41
41
|
export interface PaintProps extends ChildrenProps {
|
42
42
|
color?: Color;
|