@shopify/react-native-skia 2.0.7 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/android/CMakeLists.txt +20 -1
  2. package/cpp/api/JsiSkApi.h +3 -0
  3. package/cpp/api/JsiSkImageFilterFactory.h +478 -39
  4. package/cpp/api/JsiSkSkottie.h +590 -0
  5. package/cpp/api/JsiSkottieFactory.h +65 -0
  6. package/cpp/api/recorder/Command.h +1 -0
  7. package/cpp/api/recorder/Convertor.h +32 -0
  8. package/cpp/api/recorder/Drawings.h +23 -0
  9. package/cpp/api/recorder/ImageFilters.h +20 -0
  10. package/cpp/api/recorder/JsiRecorder.h +6 -0
  11. package/cpp/api/recorder/RNRecorder.h +15 -0
  12. package/cpp/api/third_party/SkottieUtils.cpp +333 -0
  13. package/cpp/api/third_party/SkottieUtils.h +172 -0
  14. package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +980 -0
  15. package/cpp/skia/modules/jsonreader/SkJSONReader.h +389 -0
  16. package/cpp/skia/modules/skottie/include/ExternalLayer.h +56 -0
  17. package/cpp/skia/modules/skottie/include/Skottie.h +313 -0
  18. package/cpp/skia/modules/skottie/include/SkottieProperty.h +190 -0
  19. package/cpp/skia/modules/skottie/include/SlotManager.h +113 -0
  20. package/cpp/skia/modules/skottie/include/TextShaper.h +200 -0
  21. package/cpp/skia/modules/skottie/src/SkottieValue.h +56 -0
  22. package/cpp/skia/modules/skottie/src/animator/Animator.h +89 -0
  23. package/cpp/skia/modules/skottie/src/text/Font.h +82 -0
  24. package/cpp/skia/modules/skottie/src/text/TextAdapter.h +155 -0
  25. package/cpp/skia/modules/skottie/src/text/TextAnimator.h +121 -0
  26. package/cpp/skia/modules/skottie/src/text/TextValue.h +28 -0
  27. package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +61 -0
  28. package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +135 -0
  29. package/cpp/skia/modules/sksg/include/SkSGDraw.h +57 -0
  30. package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +50 -0
  31. package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +181 -0
  32. package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +54 -0
  33. package/cpp/skia/modules/sksg/include/SkSGGradient.h +108 -0
  34. package/cpp/skia/modules/sksg/include/SkSGGroup.h +65 -0
  35. package/cpp/skia/modules/sksg/include/SkSGImage.h +59 -0
  36. package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +46 -0
  37. package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +65 -0
  38. package/cpp/skia/modules/sksg/include/SkSGMerge.h +74 -0
  39. package/cpp/skia/modules/sksg/include/SkSGNode.h +128 -0
  40. package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +54 -0
  41. package/cpp/skia/modules/sksg/include/SkSGPaint.h +112 -0
  42. package/cpp/skia/modules/sksg/include/SkSGPath.h +68 -0
  43. package/cpp/skia/modules/sksg/include/SkSGPlane.h +47 -0
  44. package/cpp/skia/modules/sksg/include/SkSGRect.h +122 -0
  45. package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +283 -0
  46. package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +157 -0
  47. package/cpp/skia/modules/sksg/include/SkSGScene.h +47 -0
  48. package/cpp/skia/modules/sksg/include/SkSGText.h +82 -0
  49. package/cpp/skia/modules/sksg/include/SkSGTransform.h +127 -0
  50. package/cpp/skia/src/base/SkArenaAlloc.h +371 -0
  51. package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +15 -15
  52. package/lib/commonjs/dom/types/Drawings.d.ts +8 -1
  53. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  54. package/lib/commonjs/dom/types/NodeType.d.ts +3 -1
  55. package/lib/commonjs/dom/types/NodeType.js +4 -0
  56. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  57. package/lib/commonjs/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
  58. package/lib/commonjs/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
  59. package/lib/commonjs/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
  60. package/lib/commonjs/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
  61. package/lib/commonjs/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
  62. package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -0
  63. package/lib/commonjs/renderer/components/ImageFilter.d.ts +4 -0
  64. package/lib/commonjs/renderer/components/ImageFilter.js +13 -0
  65. package/lib/commonjs/renderer/components/ImageFilter.js.map +1 -0
  66. package/lib/commonjs/renderer/components/Skottie.d.ts +4 -0
  67. package/lib/commonjs/renderer/components/Skottie.js +13 -0
  68. package/lib/commonjs/renderer/components/Skottie.js.map +1 -0
  69. package/lib/commonjs/renderer/components/index.d.ts +2 -0
  70. package/lib/commonjs/renderer/components/index.js +22 -0
  71. package/lib/commonjs/renderer/components/index.js.map +1 -1
  72. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
  73. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  74. package/lib/commonjs/skia/types/Matrix4.d.ts +11 -2
  75. package/lib/commonjs/skia/types/Matrix4.js +42 -1
  76. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  77. package/lib/commonjs/skia/types/Recorder.d.ts +2 -1
  78. package/lib/commonjs/skia/types/Recorder.js.map +1 -1
  79. package/lib/commonjs/skia/types/Skia.d.ts +2 -0
  80. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  81. package/lib/commonjs/skia/types/Skottie.d.ts +223 -0
  82. package/lib/commonjs/skia/types/Skottie.js +73 -0
  83. package/lib/commonjs/skia/types/Skottie.js.map +1 -0
  84. package/lib/commonjs/skia/types/index.d.ts +1 -0
  85. package/lib/commonjs/skia/types/index.js +11 -0
  86. package/lib/commonjs/skia/types/index.js.map +1 -1
  87. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
  88. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +88 -19
  89. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  90. package/lib/commonjs/skia/web/JsiSkia.js +2 -0
  91. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  92. package/lib/commonjs/skia/web/JsiSkottieAnimation.d.ts +59 -0
  93. package/lib/commonjs/skia/web/JsiSkottieAnimation.js +243 -0
  94. package/lib/commonjs/skia/web/JsiSkottieAnimation.js.map +1 -0
  95. package/lib/commonjs/skia/web/JsiSkottieFactory.d.ts +9 -0
  96. package/lib/commonjs/skia/web/JsiSkottieFactory.js +26 -0
  97. package/lib/commonjs/skia/web/JsiSkottieFactory.js.map +1 -0
  98. package/lib/commonjs/sksg/Elements.d.ts +3 -1
  99. package/lib/commonjs/sksg/Elements.js.map +1 -1
  100. package/lib/commonjs/sksg/Node.d.ts +1 -1
  101. package/lib/commonjs/sksg/Node.js +1 -1
  102. package/lib/commonjs/sksg/Node.js.map +1 -1
  103. package/lib/commonjs/sksg/Recorder/Core.d.ts +4 -2
  104. package/lib/commonjs/sksg/Recorder/Core.js +1 -0
  105. package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
  106. package/lib/commonjs/sksg/Recorder/Player.js +2 -0
  107. package/lib/commonjs/sksg/Recorder/Player.js.map +1 -1
  108. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
  109. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js +4 -0
  110. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  111. package/lib/commonjs/sksg/Recorder/Recorder.d.ts +2 -1
  112. package/lib/commonjs/sksg/Recorder/Recorder.js +6 -0
  113. package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -1
  114. package/lib/commonjs/sksg/Recorder/Visitor.js +3 -0
  115. package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -1
  116. package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +2 -2
  117. package/lib/commonjs/sksg/Recorder/commands/Drawing.js +11 -4
  118. package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -1
  119. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +12 -2
  120. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -1
  121. package/lib/module/dom/nodes/datatypes/Gradient.d.ts +15 -15
  122. package/lib/module/dom/types/Drawings.d.ts +8 -1
  123. package/lib/module/dom/types/Drawings.js.map +1 -1
  124. package/lib/module/dom/types/NodeType.d.ts +3 -1
  125. package/lib/module/dom/types/NodeType.js +4 -0
  126. package/lib/module/dom/types/NodeType.js.map +1 -1
  127. package/lib/module/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
  128. package/lib/module/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
  129. package/lib/module/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
  130. package/lib/module/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
  131. package/lib/module/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
  132. package/lib/module/renderer/__tests__/setup.d.ts +5 -0
  133. package/lib/module/renderer/components/ImageFilter.d.ts +4 -0
  134. package/lib/module/renderer/components/ImageFilter.js +5 -0
  135. package/lib/module/renderer/components/ImageFilter.js.map +1 -0
  136. package/lib/module/renderer/components/Skottie.d.ts +4 -0
  137. package/lib/module/renderer/components/Skottie.js +5 -0
  138. package/lib/module/renderer/components/Skottie.js.map +1 -0
  139. package/lib/module/renderer/components/index.d.ts +2 -0
  140. package/lib/module/renderer/components/index.js +2 -0
  141. package/lib/module/renderer/components/index.js.map +1 -1
  142. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
  143. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  144. package/lib/module/skia/types/Matrix4.d.ts +11 -2
  145. package/lib/module/skia/types/Matrix4.js +40 -0
  146. package/lib/module/skia/types/Matrix4.js.map +1 -1
  147. package/lib/module/skia/types/Recorder.d.ts +2 -1
  148. package/lib/module/skia/types/Recorder.js.map +1 -1
  149. package/lib/module/skia/types/Skia.d.ts +2 -0
  150. package/lib/module/skia/types/Skia.js.map +1 -1
  151. package/lib/module/skia/types/Skottie.d.ts +223 -0
  152. package/lib/module/skia/types/Skottie.js +74 -0
  153. package/lib/module/skia/types/Skottie.js.map +1 -0
  154. package/lib/module/skia/types/index.d.ts +1 -0
  155. package/lib/module/skia/types/index.js +1 -0
  156. package/lib/module/skia/types/index.js.map +1 -1
  157. package/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
  158. package/lib/module/skia/web/JsiSkImageFilterFactory.js +88 -19
  159. package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  160. package/lib/module/skia/web/JsiSkia.js +2 -0
  161. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  162. package/lib/module/skia/web/JsiSkottieAnimation.d.ts +59 -0
  163. package/lib/module/skia/web/JsiSkottieAnimation.js +236 -0
  164. package/lib/module/skia/web/JsiSkottieAnimation.js.map +1 -0
  165. package/lib/module/skia/web/JsiSkottieFactory.d.ts +9 -0
  166. package/lib/module/skia/web/JsiSkottieFactory.js +19 -0
  167. package/lib/module/skia/web/JsiSkottieFactory.js.map +1 -0
  168. package/lib/module/sksg/Elements.d.ts +3 -1
  169. package/lib/module/sksg/Elements.js.map +1 -1
  170. package/lib/module/sksg/Node.d.ts +1 -1
  171. package/lib/module/sksg/Node.js +1 -1
  172. package/lib/module/sksg/Node.js.map +1 -1
  173. package/lib/module/sksg/Recorder/Core.d.ts +4 -2
  174. package/lib/module/sksg/Recorder/Core.js +1 -0
  175. package/lib/module/sksg/Recorder/Core.js.map +1 -1
  176. package/lib/module/sksg/Recorder/Player.js +3 -1
  177. package/lib/module/sksg/Recorder/Player.js.map +1 -1
  178. package/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
  179. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +4 -0
  180. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  181. package/lib/module/sksg/Recorder/Recorder.d.ts +2 -1
  182. package/lib/module/sksg/Recorder/Recorder.js +6 -0
  183. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  184. package/lib/module/sksg/Recorder/Visitor.js +3 -0
  185. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  186. package/lib/module/sksg/Recorder/commands/Drawing.d.ts +2 -2
  187. package/lib/module/sksg/Recorder/commands/Drawing.js +9 -2
  188. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  189. package/lib/module/sksg/Recorder/commands/ImageFilters.js +12 -2
  190. package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -1
  191. package/lib/typescript/lib/commonjs/renderer/components/ImageFilter.d.ts +2 -0
  192. package/lib/typescript/lib/commonjs/renderer/components/Skottie.d.ts +2 -0
  193. package/lib/typescript/lib/commonjs/skia/types/Matrix4.d.ts +1 -0
  194. package/lib/typescript/lib/commonjs/skia/types/Skottie.d.ts +6 -0
  195. package/lib/typescript/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +22 -5
  196. package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +2 -0
  197. package/lib/typescript/lib/commonjs/skia/web/JsiSkottieAnimation.d.ts +48 -0
  198. package/lib/typescript/lib/commonjs/skia/web/JsiSkottieFactory.d.ts +6 -0
  199. package/lib/typescript/lib/commonjs/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  200. package/lib/typescript/lib/commonjs/sksg/Recorder/Recorder.d.ts +1 -0
  201. package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +1 -1
  202. package/lib/typescript/lib/module/mock/index.d.ts +8 -0
  203. package/lib/typescript/lib/module/renderer/components/ImageFilter.d.ts +2 -0
  204. package/lib/typescript/lib/module/renderer/components/Skottie.d.ts +2 -0
  205. package/lib/typescript/lib/module/renderer/components/index.d.ts +2 -0
  206. package/lib/typescript/lib/module/skia/Skia.web.d.ts +1 -0
  207. package/lib/typescript/lib/module/skia/types/Matrix4.d.ts +1 -0
  208. package/lib/typescript/lib/module/skia/types/Skottie.d.ts +5 -0
  209. package/lib/typescript/lib/module/skia/types/index.d.ts +1 -0
  210. package/lib/typescript/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +22 -5
  211. package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +2 -0
  212. package/lib/typescript/lib/module/skia/web/JsiSkottieAnimation.d.ts +47 -0
  213. package/lib/typescript/lib/module/skia/web/JsiSkottieFactory.d.ts +5 -0
  214. package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  215. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +1 -0
  216. package/lib/typescript/lib/module/sksg/Recorder/commands/Drawing.d.ts +1 -1
  217. package/lib/typescript/src/dom/nodes/datatypes/Gradient.d.ts +15 -15
  218. package/lib/typescript/src/dom/types/Drawings.d.ts +8 -1
  219. package/lib/typescript/src/dom/types/NodeType.d.ts +3 -1
  220. package/lib/typescript/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.d.ts +1 -0
  221. package/lib/typescript/src/renderer/__tests__/e2e/Camera.spec.d.ts +21 -0
  222. package/lib/typescript/src/renderer/__tests__/e2e/ImageFilter.spec.d.ts +1 -0
  223. package/lib/typescript/src/renderer/__tests__/e2e/LightingImageFilters.spec.d.ts +1 -0
  224. package/lib/typescript/src/renderer/__tests__/e2e/Skottie.spec.d.ts +1 -0
  225. package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -0
  226. package/lib/typescript/src/renderer/components/ImageFilter.d.ts +4 -0
  227. package/lib/typescript/src/renderer/components/Skottie.d.ts +4 -0
  228. package/lib/typescript/src/renderer/components/index.d.ts +2 -0
  229. package/lib/typescript/src/skia/types/ImageFilter/ImageFilterFactory.d.ts +252 -15
  230. package/lib/typescript/src/skia/types/Matrix4.d.ts +11 -2
  231. package/lib/typescript/src/skia/types/Recorder.d.ts +2 -1
  232. package/lib/typescript/src/skia/types/Skia.d.ts +2 -0
  233. package/lib/typescript/src/skia/types/Skottie.d.ts +223 -0
  234. package/lib/typescript/src/skia/types/index.d.ts +1 -0
  235. package/lib/typescript/src/skia/web/JsiSkImageFilterFactory.d.ts +29 -12
  236. package/lib/typescript/src/skia/web/JsiSkottieAnimation.d.ts +59 -0
  237. package/lib/typescript/src/skia/web/JsiSkottieFactory.d.ts +9 -0
  238. package/lib/typescript/src/sksg/Elements.d.ts +3 -1
  239. package/lib/typescript/src/sksg/Node.d.ts +1 -1
  240. package/lib/typescript/src/sksg/Recorder/Core.d.ts +4 -2
  241. package/lib/typescript/src/sksg/Recorder/ReanimatedRecorder.d.ts +2 -1
  242. package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +2 -1
  243. package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +2 -2
  244. package/libs/android/arm64-v8a/libjsonreader.a +0 -0
  245. package/libs/android/armeabi-v7a/libjsonreader.a +0 -0
  246. package/libs/android/x86/libjsonreader.a +0 -0
  247. package/libs/android/x86_64/libjsonreader.a +0 -0
  248. package/libs/apple/libpathops.xcframework/Info.plist +8 -8
  249. package/libs/apple/libskia.xcframework/Info.plist +14 -14
  250. package/libs/apple/libskottie.xcframework/Info.plist +14 -14
  251. package/libs/apple/libskparagraph.xcframework/Info.plist +16 -16
  252. package/libs/apple/libsksg.xcframework/Info.plist +5 -5
  253. package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
  254. package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +14 -14
  255. package/libs/apple/libsvg.xcframework/Info.plist +14 -14
  256. package/package.json +1 -1
  257. package/react-native-skia.podspec +4 -2
  258. package/src/__tests__/snapshots/matrix4/camera-corner.png +0 -0
  259. package/src/__tests__/snapshots/matrix4/camera-offset.png +0 -0
  260. package/src/__tests__/snapshots/matrix4/camera-top-left-center.png +0 -0
  261. package/src/__tests__/snapshots/matrix4/camera-zoom-out.png +0 -0
  262. package/src/__tests__/snapshots/matrix4/full-rect.png +0 -0
  263. package/src/__tests__/snapshots/matrix4/rect.png +0 -0
  264. package/src/__tests__/snapshots/matrix4/scaled-rect.png +0 -0
  265. package/src/__tests__/snapshots/matrix4/test-perspective.png +0 -0
  266. package/src/__tests__/snapshots/matrix4/test-perspective2.png +0 -0
  267. package/src/dom/types/Drawings.ts +11 -0
  268. package/src/dom/types/NodeType.ts +4 -0
  269. package/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.tsx +492 -0
  270. package/src/renderer/__tests__/e2e/Camera.spec.tsx +475 -0
  271. package/src/renderer/__tests__/e2e/ImageFilter.spec.tsx +99 -0
  272. package/src/renderer/__tests__/e2e/LightingImageFilters.spec.tsx +1478 -0
  273. package/src/renderer/__tests__/e2e/Skottie.spec.tsx +440 -0
  274. package/src/renderer/__tests__/e2e/setup/skottie/basic_slots.json +1118 -0
  275. package/src/renderer/__tests__/e2e/setup/skottie/color-props.json +1 -0
  276. package/src/renderer/__tests__/e2e/setup/skottie/confetti.json +5899 -0
  277. package/src/renderer/__tests__/e2e/setup/skottie/drinks.json +43857 -0
  278. package/src/renderer/__tests__/e2e/setup/skottie/fingerprint.json +1 -0
  279. package/src/renderer/__tests__/e2e/setup/skottie/lego_loader.json +29540 -0
  280. package/src/renderer/__tests__/e2e/setup/skottie/new-drop.json +1 -0
  281. package/src/renderer/__tests__/e2e/setup/skottie/onboarding.json +1 -0
  282. package/src/renderer/__tests__/e2e/setup/skottie/text-layer.json +1 -0
  283. package/src/renderer/__tests__/setup.tsx +31 -0
  284. package/src/renderer/components/ImageFilter.tsx +8 -0
  285. package/src/renderer/components/Skottie.tsx +8 -0
  286. package/src/renderer/components/index.ts +2 -0
  287. package/src/skia/__tests__/assets/Avenir-Heavy.ttf +0 -0
  288. package/src/skia/types/ImageFilter/ImageFilterFactory.ts +391 -21
  289. package/src/skia/types/Matrix4.ts +108 -2
  290. package/src/skia/types/Recorder.ts +2 -0
  291. package/src/skia/types/Skia.ts +2 -0
  292. package/src/skia/types/Skottie.ts +266 -0
  293. package/src/skia/types/index.ts +1 -0
  294. package/src/skia/web/JsiSkImageFilterFactory.ts +266 -31
  295. package/src/skia/web/JsiSkia.ts +2 -0
  296. package/src/skia/web/JsiSkottieAnimation.ts +259 -0
  297. package/src/skia/web/JsiSkottieFactory.ts +25 -0
  298. package/src/sksg/Elements.tsx +4 -0
  299. package/src/sksg/Node.ts +1 -0
  300. package/src/sksg/Recorder/Core.ts +3 -0
  301. package/src/sksg/Recorder/Player.ts +3 -0
  302. package/src/sksg/Recorder/ReanimatedRecorder.ts +6 -0
  303. package/src/sksg/Recorder/Recorder.ts +5 -0
  304. package/src/sksg/Recorder/Visitor.ts +3 -0
  305. package/src/sksg/Recorder/commands/Drawing.ts +7 -3
  306. package/src/sksg/Recorder/commands/ImageFilters.ts +15 -2
@@ -1 +1 @@
1
- {"version":3,"names":["exhaustiveCheck","a","Error","Matrix4","translate","x","y","z","perspective","p","normalizeVec","vec","length","Math","sqrt","rotatedUnitSinCos","axisVec","sinAngle","cosAngle","c","s","t","matrixVecMul4","m","v","mapPoint3d","r","multiply4","b","result","Array","fill","i","j","skewY","angle","tan","skewX","toMatrix3","rotate","axis","value","sin","cos","pivot","scale","sx","sy","sz","m4","rotateAxis","rotateZ","rotateX","rotateY","processTransform3d","transforms","reduce","acc","val","key","Object","keys","transform","convertToColumnMajor","rowMajorMatrix","colMajorMatrix","size","row","col","convertToAffineMatrix","d","tx","ty","det3x3","a00","a01","a02","a10","a11","a12","a20","a21","a22","invert4","a03","a13","a23","a30","a31","a32","a33","b00","b01","b02","b03","b10","b11","b12","b13","b20","b21","b22","b23","b30","b31","b32","b33","det","abs","invDet"],"sources":["Matrix4.ts"],"sourcesContent":["type Point = { x: number; y: number };\ntype Vec2 = readonly [number, number];\ntype Vec3 = readonly [number, number, number];\ntype Vec4 = readonly [number, number, number, number];\n\nexport type Matrix3 = readonly [\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number\n];\n\nexport type Matrix4 = readonly [\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number\n];\n\ntype Transform3dName =\n | \"translateX\"\n | \"translateY\"\n | \"translateZ\"\n | \"translate\"\n | \"scale\"\n | \"scaleX\"\n | \"scaleY\"\n | \"skewX\"\n | \"skewY\"\n | \"rotateZ\"\n | \"rotate\"\n | \"perspective\"\n | \"rotateX\"\n | \"rotateY\"\n | \"matrix\";\n\ntype Transformations = {\n [Name in Transform3dName]: Name extends \"matrix\"\n ? Matrix4\n : Name extends \"translate\"\n ? Vec3 | Vec2\n : number;\n};\n\ntype Transform3d =\n | Pick<Transformations, \"translateX\">\n | Pick<Transformations, \"translateY\">\n | Pick<Transformations, \"translateZ\">\n | Pick<Transformations, \"translate\">\n | Pick<Transformations, \"scale\">\n | Pick<Transformations, \"scaleX\">\n | Pick<Transformations, \"scaleY\">\n | Pick<Transformations, \"skewX\">\n | Pick<Transformations, \"skewY\">\n | Pick<Transformations, \"perspective\">\n | Pick<Transformations, \"rotateX\">\n | Pick<Transformations, \"rotateY\">\n | Pick<Transformations, \"rotateZ\">\n | Pick<Transformations, \"rotate\">\n | Pick<Transformations, \"matrix\">;\n\nexport type Transforms3d = Transform3d[];\n\nconst exhaustiveCheck = (a: never): never => {\n \"worklet\";\n throw new Error(`Unexhaustive handling for ${a}`);\n};\n\n/**\n * @worklet\n */\nexport const Matrix4 = (): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n};\n\n/**\n * @worklet\n */\nexport const translate = (x: number, y: number, z = 0): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1];\n};\n\n/**\n * @worklet\n */\nexport const perspective = (p: number): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1 / p, 1];\n};\n\nconst normalizeVec = (vec: Vec3): Vec3 => {\n \"worklet\";\n const [x, y, z] = vec;\n const length = Math.sqrt(x * x + y * y + z * z);\n // Check for zero length to avoid division by zero\n if (length === 0) {\n return [0, 0, 0];\n }\n return [x / length, y / length, z / length];\n};\n\nconst rotatedUnitSinCos = (\n axisVec: Vec3,\n sinAngle: number,\n cosAngle: number\n): Matrix4 => {\n \"worklet\";\n const x = axisVec[0];\n const y = axisVec[1];\n const z = axisVec[2];\n const c = cosAngle;\n const s = sinAngle;\n const t = 1 - c;\n return [\n t * x * x + c,\n t * x * y - s * z,\n t * x * z + s * y,\n 0,\n t * x * y + s * z,\n t * y * y + c,\n t * y * z - s * x,\n 0,\n t * x * z - s * y,\n t * y * z + s * x,\n t * z * z + c,\n 0,\n 0,\n 0,\n 0,\n 1,\n ];\n};\n\n/**\n * @worklet\n */\nexport const matrixVecMul4 = (m: Matrix4, v: Vec4): Vec4 => {\n \"worklet\";\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3],\n m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3],\n m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3],\n m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3],\n ];\n};\n\n/**\n * @worklet\n */\nexport const mapPoint3d = (m: Matrix4, v: Vec3) => {\n \"worklet\";\n const r = matrixVecMul4(m, [...v, 1]);\n return [r[0] / r[3], r[1] / r[3], r[2] / r[3]] as const;\n};\n\n/**\n * @worklet\n */\nexport const multiply4 = (a: Matrix4, b: Matrix4): Matrix4 => {\n \"worklet\";\n const result = new Array(16).fill(0);\n for (let i = 0; i < 4; i++) {\n for (let j = 0; j < 4; j++) {\n result[i * 4 + j] =\n a[i * 4] * b[j] +\n a[i * 4 + 1] * b[j + 4] +\n a[i * 4 + 2] * b[j + 8] +\n a[i * 4 + 3] * b[j + 12];\n }\n }\n return result as unknown as Matrix4;\n};\n\nconst skewY = (angle: number): Matrix4 => {\n \"worklet\";\n return [1, Math.tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n};\n\nconst skewX = (angle: number): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, 0, Math.tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n};\n\n/**\n * @worklet\n */\nexport const toMatrix3 = (m: Matrix4) => {\n \"worklet\";\n return [m[0], m[1], m[3], m[4], m[5], m[7], m[12], m[13], m[15]];\n};\n\nconst rotate = (axis: Vec3, value: number) => {\n \"worklet\";\n return rotatedUnitSinCos(\n normalizeVec(axis),\n Math.sin(value),\n Math.cos(value)\n );\n};\n\n/**\n * @worklet\n */\nexport const pivot = (m: Matrix4, p: Point) => {\n \"worklet\";\n return multiply4(translate(p.x, p.y), multiply4(m, translate(-p.x, -p.y)));\n};\n\n/**\n * @worklet\n */\nexport const scale = (sx: number, sy: number, sz = 1, p?: Point): Matrix4 => {\n \"worklet\";\n const m4: Matrix4 = [sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1];\n if (p) {\n return pivot(m4, p);\n }\n return m4;\n};\n\nconst rotateAxis = (axis: Vec3, angle: number, p?: Point) => {\n \"worklet\";\n const result = rotate(axis, angle);\n if (p) {\n return pivot(result, p);\n }\n return result;\n};\n\n/**\n * @worklet\n */\nexport const rotateZ = (value: number, p?: Point) => {\n \"worklet\";\n return rotateAxis([0, 0, 1], value, p);\n};\n\n/**\n * @worklet\n */\nexport const rotateX = (value: number, p?: Point) => {\n \"worklet\";\n return rotateAxis([1, 0, 0], value, p);\n};\n\n/**\n * @worklet\n */\nexport const rotateY = (value: number, p?: Point) => {\n \"worklet\";\n return rotateAxis([0, 1, 0], value, p);\n};\n\n/**\n * @worklet\n */\nexport const processTransform3d = (transforms: Transforms3d) => {\n \"worklet\";\n return transforms.reduce((acc, val) => {\n const key = Object.keys(val)[0] as Transform3dName;\n const transform = val as Pick<Transformations, typeof key>;\n if (key === \"translateX\") {\n const value = transform[key];\n return multiply4(acc, translate(value, 0, 0));\n }\n if (key === \"translate\") {\n const [x, y, z = 0] = transform[key];\n return multiply4(acc, translate(x, y, z));\n }\n if (key === \"translateY\") {\n const value = transform[key];\n return multiply4(acc, translate(0, value, 0));\n }\n if (key === \"translateZ\") {\n const value = transform[key];\n return multiply4(acc, translate(0, 0, value));\n }\n if (key === \"scale\") {\n const value = transform[key];\n return multiply4(acc, scale(value, value, 1));\n }\n if (key === \"scaleX\") {\n const value = transform[key];\n return multiply4(acc, scale(value, 1, 1));\n }\n if (key === \"scaleY\") {\n const value = transform[key];\n return multiply4(acc, scale(1, value, 1));\n }\n if (key === \"skewX\") {\n const value = transform[key];\n return multiply4(acc, skewX(value));\n }\n if (key === \"skewY\") {\n const value = transform[key];\n return multiply4(acc, skewY(value));\n }\n if (key === \"rotateX\") {\n const value = transform[key];\n return multiply4(acc, rotate([1, 0, 0], value));\n }\n if (key === \"rotateY\") {\n const value = transform[key];\n return multiply4(acc, rotate([0, 1, 0], value));\n }\n if (key === \"perspective\") {\n const value = transform[key];\n return multiply4(acc, perspective(value));\n }\n if (key === \"rotate\" || key === \"rotateZ\") {\n const value = transform[key];\n return multiply4(acc, rotate([0, 0, 1], value));\n }\n if (key === \"matrix\") {\n const value = transform[key];\n return multiply4(acc, value);\n }\n return exhaustiveCheck(key);\n }, Matrix4());\n};\n\n/**\n * @worklet\n */\nexport const convertToColumnMajor = (rowMajorMatrix: Matrix4) => {\n \"worklet\";\n\n const colMajorMatrix = new Array<number>(16);\n const size = 4;\n for (let row = 0; row < size; row++) {\n for (let col = 0; col < size; col++) {\n colMajorMatrix[col * size + row] = rowMajorMatrix[row * size + col];\n }\n }\n return colMajorMatrix as unknown as Matrix4;\n};\n\n/**\n * @worklet\n */\nexport const convertToAffineMatrix = (m4: Matrix4) => {\n \"worklet\";\n // Extracting the relevant components from the 4x4 matrix\n const a = m4[0]; // Scale X\n const b = m4[1]; // Skew Y\n const c = m4[4]; // Skew X\n const d = m4[5]; // Scale Y\n const tx = m4[12]; // Translate X\n const ty = m4[13]; // Translate Y\n\n // Returning the 6-element affine transformation matrix\n return [a, b, c, d, tx, ty];\n};\n\n/**\n * Calculates the determinant of a 3x3 matrix\n * @worklet\n */\nconst det3x3 = (\n a00: number,\n a01: number,\n a02: number,\n a10: number,\n a11: number,\n a12: number,\n a20: number,\n a21: number,\n a22: number\n): number => {\n \"worklet\";\n return (\n a00 * (a11 * a22 - a12 * a21) +\n a01 * (a12 * a20 - a10 * a22) +\n a02 * (a10 * a21 - a11 * a20)\n );\n};\n\n/**\n * Inverts a 4x4 matrix\n * @worklet\n * @returns The inverted matrix, or the identity matrix if the input is not invertible\n */\nexport const invert4 = (m: Matrix4): Matrix4 => {\n \"worklet\";\n\n const a00 = m[0],\n a01 = m[1],\n a02 = m[2],\n a03 = m[3];\n const a10 = m[4],\n a11 = m[5],\n a12 = m[6],\n a13 = m[7];\n const a20 = m[8],\n a21 = m[9],\n a22 = m[10],\n a23 = m[11];\n const a30 = m[12],\n a31 = m[13],\n a32 = m[14],\n a33 = m[15];\n\n // Calculate cofactors\n const b00 = det3x3(a11, a12, a13, a21, a22, a23, a31, a32, a33);\n const b01 = -det3x3(a10, a12, a13, a20, a22, a23, a30, a32, a33);\n const b02 = det3x3(a10, a11, a13, a20, a21, a23, a30, a31, a33);\n const b03 = -det3x3(a10, a11, a12, a20, a21, a22, a30, a31, a32);\n\n const b10 = -det3x3(a01, a02, a03, a21, a22, a23, a31, a32, a33);\n const b11 = det3x3(a00, a02, a03, a20, a22, a23, a30, a32, a33);\n const b12 = -det3x3(a00, a01, a03, a20, a21, a23, a30, a31, a33);\n const b13 = det3x3(a00, a01, a02, a20, a21, a22, a30, a31, a32);\n\n const b20 = det3x3(a01, a02, a03, a11, a12, a13, a31, a32, a33);\n const b21 = -det3x3(a00, a02, a03, a10, a12, a13, a30, a32, a33);\n const b22 = det3x3(a00, a01, a03, a10, a11, a13, a30, a31, a33);\n const b23 = -det3x3(a00, a01, a02, a10, a11, a12, a30, a31, a32);\n\n const b30 = -det3x3(a01, a02, a03, a11, a12, a13, a21, a22, a23);\n const b31 = det3x3(a00, a02, a03, a10, a12, a13, a20, a22, a23);\n const b32 = -det3x3(a00, a01, a03, a10, a11, a13, a20, a21, a23);\n const b33 = det3x3(a00, a01, a02, a10, a11, a12, a20, a21, a22);\n\n // Calculate determinant\n const det = a00 * b00 + a01 * b01 + a02 * b02 + a03 * b03;\n\n // Check if matrix is invertible\n if (Math.abs(det) < 1e-8) {\n // Return identity matrix if not invertible\n return Matrix4();\n }\n\n const invDet = 1.0 / det;\n\n // Calculate inverse matrix\n return [\n b00 * invDet,\n b10 * invDet,\n b20 * invDet,\n b30 * invDet,\n b01 * invDet,\n b11 * invDet,\n b21 * invDet,\n b31 * invDet,\n b02 * invDet,\n b12 * invDet,\n b22 * invDet,\n b32 * invDet,\n b03 * invDet,\n b13 * invDet,\n b23 * invDet,\n b33 * invDet,\n ] as Matrix4;\n};\n"],"mappings":"AAgFA,MAAMA,eAAe,GAAIC,CAAQ,IAAY;EAC3C,SAAS;;EACT,MAAM,IAAIC,KAAK,CAAC,6BAA6BD,CAAC,EAAE,CAAC;AACnD,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,OAAO,GAAGA,CAAA,KAAe;EACpC,SAAS;;EACT,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACzD,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGA,CAACC,CAAS,EAAEC,CAAS,EAAEC,CAAC,GAAG,CAAC,KAAc;EACjE,SA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e,MAAM,EACZX,GAAG,GAAGW,MAAM,EACZP,GAAG,GAAGO,MAAM,EACZH,GAAG,GAAGG,MAAM,CACb;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["exhaustiveCheck","a","Error","Matrix4","translate","x","y","z","perspective","p","normalizeVec","vec","length","Math","sqrt","rotatedUnitSinCos","axisVec","sinAngle","cosAngle","c","s","t","matrixVecMul4","m","v","mapPoint3d","r","multiply4","b","result","Array","fill","i","j","skewY","angle","tan","skewX","toMatrix3","rotate","axis","value","sin","cos","pivot","scale","sx","sy","sz","m4","rotateAxis","rotateZ","rotateX","rotateY","processTransform3d","transforms","reduce","acc","val","key","Object","keys","transform","convertToColumnMajor","rowMajorMatrix","colMajorMatrix","size","row","col","convertToAffineMatrix","d","tx","ty","det3x3","a00","a01","a02","a10","a11","a12","a20","a21","a22","invert4","a03","a13","a23","a30","a31","a32","a33","b00","b01","b02","b03","b10","b11","b12","b13","b20","b21","b22","b23","b30","b31","b32","b33","det","abs","invDet","vecSub","vecCross","lookat","eyeVec","centerVec","upVec","f","u","uf","perspectiveMatrix","near","far","dInv","halfAngle","cot","setupCamera","area","zscale","cam","camera","eye","coa","up","center","viewScale","viewport"],"sources":["Matrix4.ts"],"sourcesContent":["type Point = { x: number; y: number };\ntype Vec2 = readonly [number, number];\nexport type Vec3 = readonly [number, number, number];\nexport type Vec4 = readonly [number, number, number, number];\n\nexport type Matrix3 = readonly [\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number\n];\n\nexport type Matrix4 = readonly [\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number,\n number\n];\n\ntype Transform3dName =\n | \"translateX\"\n | \"translateY\"\n | \"translateZ\"\n | \"translate\"\n | \"scale\"\n | \"scaleX\"\n | \"scaleY\"\n | \"skewX\"\n | \"skewY\"\n | \"rotateZ\"\n | \"rotate\"\n | \"perspective\"\n | \"rotateX\"\n | \"rotateY\"\n | \"matrix\";\n\ntype Transformations = {\n [Name in Transform3dName]: Name extends \"matrix\"\n ? Matrix4\n : Name extends \"translate\"\n ? Vec3 | Vec2\n : number;\n};\n\ntype Transform3d =\n | Pick<Transformations, \"translateX\">\n | Pick<Transformations, \"translateY\">\n | Pick<Transformations, \"translateZ\">\n | Pick<Transformations, \"translate\">\n | Pick<Transformations, \"scale\">\n | Pick<Transformations, \"scaleX\">\n | Pick<Transformations, \"scaleY\">\n | Pick<Transformations, \"skewX\">\n | Pick<Transformations, \"skewY\">\n | Pick<Transformations, \"perspective\">\n | Pick<Transformations, \"rotateX\">\n | Pick<Transformations, \"rotateY\">\n | Pick<Transformations, \"rotateZ\">\n | Pick<Transformations, \"rotate\">\n | Pick<Transformations, \"matrix\">;\n\nexport type Transforms3d = Transform3d[];\n\nconst exhaustiveCheck = (a: never): never => {\n \"worklet\";\n throw new Error(`Unexhaustive handling for ${a}`);\n};\n\n/**\n * @worklet\n */\nexport const Matrix4 = (): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n};\n\n/**\n * @worklet\n */\nexport const translate = (x: number, y: number, z = 0): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1];\n};\n\n/**\n * @worklet\n */\nexport const perspective = (p: number): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1 / p, 1];\n};\n\nconst normalizeVec = (vec: Vec3): Vec3 => {\n \"worklet\";\n const [x, y, z] = vec;\n const length = Math.sqrt(x * x + y * y + z * z);\n // Check for zero length to avoid division by zero\n if (length === 0) {\n return [0, 0, 0];\n }\n return [x / length, y / length, z / length];\n};\n\nconst rotatedUnitSinCos = (\n axisVec: Vec3,\n sinAngle: number,\n cosAngle: number\n): Matrix4 => {\n \"worklet\";\n const x = axisVec[0];\n const y = axisVec[1];\n const z = axisVec[2];\n const c = cosAngle;\n const s = sinAngle;\n const t = 1 - c;\n return [\n t * x * x + c,\n t * x * y - s * z,\n t * x * z + s * y,\n 0,\n t * x * y + s * z,\n t * y * y + c,\n t * y * z - s * x,\n 0,\n t * x * z - s * y,\n t * y * z + s * x,\n t * z * z + c,\n 0,\n 0,\n 0,\n 0,\n 1,\n ];\n};\n\n/**\n * @worklet\n */\nexport const matrixVecMul4 = (m: Matrix4, v: Vec4): Vec4 => {\n \"worklet\";\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3],\n m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3],\n m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3],\n m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3],\n ];\n};\n\n/**\n * @worklet\n */\nexport const mapPoint3d = (m: Matrix4, v: Vec3) => {\n \"worklet\";\n const r = matrixVecMul4(m, [...v, 1]);\n return [r[0] / r[3], r[1] / r[3], r[2] / r[3]] as const;\n};\n\n/**\n * @worklet\n */\nexport const multiply4 = (a: Matrix4, b: Matrix4): Matrix4 => {\n \"worklet\";\n const result = new Array(16).fill(0);\n for (let i = 0; i < 4; i++) {\n for (let j = 0; j < 4; j++) {\n result[i * 4 + j] =\n a[i * 4] * b[j] +\n a[i * 4 + 1] * b[j + 4] +\n a[i * 4 + 2] * b[j + 8] +\n a[i * 4 + 3] * b[j + 12];\n }\n }\n return result as unknown as Matrix4;\n};\n\nconst skewY = (angle: number): Matrix4 => {\n \"worklet\";\n return [1, Math.tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n};\n\nconst skewX = (angle: number): Matrix4 => {\n \"worklet\";\n return [1, 0, 0, 0, Math.tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n};\n\n/**\n * @worklet\n */\nexport const toMatrix3 = (m: Matrix4) => {\n \"worklet\";\n return [m[0], m[1], m[3], m[4], m[5], m[7], m[12], m[13], m[15]];\n};\n\nconst rotate = (axis: Vec3, value: number) => {\n \"worklet\";\n return rotatedUnitSinCos(\n normalizeVec(axis),\n Math.sin(value),\n Math.cos(value)\n );\n};\n\n/**\n * @worklet\n */\nexport const pivot = (m: Matrix4, p: Point) => {\n \"worklet\";\n return multiply4(translate(p.x, p.y), multiply4(m, translate(-p.x, -p.y)));\n};\n\n/**\n * @worklet\n */\nexport const scale = (sx: number, sy: number, sz = 1, p?: Point): Matrix4 => {\n \"worklet\";\n const m4: Matrix4 = [sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1];\n if (p) {\n return pivot(m4, p);\n }\n return m4;\n};\n\nconst rotateAxis = (axis: Vec3, angle: number, p?: Point) => {\n \"worklet\";\n const result = rotate(axis, angle);\n if (p) {\n return pivot(result, p);\n }\n return result;\n};\n\n/**\n * @worklet\n */\nexport const rotateZ = (value: number, p?: Point) => {\n \"worklet\";\n return rotateAxis([0, 0, 1], value, p);\n};\n\n/**\n * @worklet\n */\nexport const rotateX = (value: number, p?: Point) => {\n \"worklet\";\n return rotateAxis([1, 0, 0], value, p);\n};\n\n/**\n * @worklet\n */\nexport const rotateY = (value: number, p?: Point) => {\n \"worklet\";\n return rotateAxis([0, 1, 0], value, p);\n};\n\n/**\n * @worklet\n */\nexport const processTransform3d = (transforms: Transforms3d) => {\n \"worklet\";\n return transforms.reduce((acc, val) => {\n const key = Object.keys(val)[0] as Transform3dName;\n const transform = val as Pick<Transformations, typeof key>;\n if (key === \"translateX\") {\n const value = transform[key];\n return multiply4(acc, translate(value, 0, 0));\n }\n if (key === \"translate\") {\n const [x, y, z = 0] = transform[key];\n return multiply4(acc, translate(x, y, z));\n }\n if (key === \"translateY\") {\n const value = transform[key];\n return multiply4(acc, translate(0, value, 0));\n }\n if (key === \"translateZ\") {\n const value = transform[key];\n return multiply4(acc, translate(0, 0, value));\n }\n if (key === \"scale\") {\n const value = transform[key];\n return multiply4(acc, scale(value, value, 1));\n }\n if (key === \"scaleX\") {\n const value = transform[key];\n return multiply4(acc, scale(value, 1, 1));\n }\n if (key === \"scaleY\") {\n const value = transform[key];\n return multiply4(acc, scale(1, value, 1));\n }\n if (key === \"skewX\") {\n const value = transform[key];\n return multiply4(acc, skewX(value));\n }\n if (key === \"skewY\") {\n const value = transform[key];\n return multiply4(acc, skewY(value));\n }\n if (key === \"rotateX\") {\n const value = transform[key];\n return multiply4(acc, rotate([1, 0, 0], value));\n }\n if (key === \"rotateY\") {\n const value = transform[key];\n return multiply4(acc, rotate([0, 1, 0], value));\n }\n if (key === \"perspective\") {\n const value = transform[key];\n return multiply4(acc, perspective(value));\n }\n if (key === \"rotate\" || key === \"rotateZ\") {\n const value = transform[key];\n return multiply4(acc, rotate([0, 0, 1], value));\n }\n if (key === \"matrix\") {\n const value = transform[key];\n return multiply4(acc, value);\n }\n return exhaustiveCheck(key);\n }, Matrix4());\n};\n\n/**\n * @worklet\n */\nexport const convertToColumnMajor = (rowMajorMatrix: Matrix4) => {\n \"worklet\";\n\n const colMajorMatrix = new Array<number>(16);\n const size = 4;\n for (let row = 0; row < size; row++) {\n for (let col = 0; col < size; col++) {\n colMajorMatrix[col * size + row] = rowMajorMatrix[row * size + col];\n }\n }\n return colMajorMatrix as unknown as Matrix4;\n};\n\n/**\n * @worklet\n */\nexport const convertToAffineMatrix = (m4: Matrix4) => {\n \"worklet\";\n // Extracting the relevant components from the 4x4 matrix\n const a = m4[0]; // Scale X\n const b = m4[1]; // Skew Y\n const c = m4[4]; // Skew X\n const d = m4[5]; // Scale Y\n const tx = m4[12]; // Translate X\n const ty = m4[13]; // Translate Y\n\n // Returning the 6-element affine transformation matrix\n return [a, b, c, d, tx, ty];\n};\n\n/**\n * Calculates the determinant of a 3x3 matrix\n * @worklet\n */\nconst det3x3 = (\n a00: number,\n a01: number,\n a02: number,\n a10: number,\n a11: number,\n a12: number,\n a20: number,\n a21: number,\n a22: number\n): number => {\n \"worklet\";\n return (\n a00 * (a11 * a22 - a12 * a21) +\n a01 * (a12 * a20 - a10 * a22) +\n a02 * (a10 * a21 - a11 * a20)\n );\n};\n\n/**\n * Inverts a 4x4 matrix\n * @worklet\n * @returns The inverted matrix, or the identity matrix if the input is not invertible\n */\nexport const invert4 = (m: Matrix4): Matrix4 => {\n \"worklet\";\n\n const a00 = m[0],\n a01 = m[1],\n a02 = m[2],\n a03 = m[3];\n const a10 = m[4],\n a11 = m[5],\n a12 = m[6],\n a13 = m[7];\n const a20 = m[8],\n a21 = m[9],\n a22 = m[10],\n a23 = m[11];\n const a30 = m[12],\n a31 = m[13],\n a32 = m[14],\n a33 = m[15];\n\n // Calculate cofactors\n const b00 = det3x3(a11, a12, a13, a21, a22, a23, a31, a32, a33);\n const b01 = -det3x3(a10, a12, a13, a20, a22, a23, a30, a32, a33);\n const b02 = det3x3(a10, a11, a13, a20, a21, a23, a30, a31, a33);\n const b03 = -det3x3(a10, a11, a12, a20, a21, a22, a30, a31, a32);\n\n const b10 = -det3x3(a01, a02, a03, a21, a22, a23, a31, a32, a33);\n const b11 = det3x3(a00, a02, a03, a20, a22, a23, a30, a32, a33);\n const b12 = -det3x3(a00, a01, a03, a20, a21, a23, a30, a31, a33);\n const b13 = det3x3(a00, a01, a02, a20, a21, a22, a30, a31, a32);\n\n const b20 = det3x3(a01, a02, a03, a11, a12, a13, a31, a32, a33);\n const b21 = -det3x3(a00, a02, a03, a10, a12, a13, a30, a32, a33);\n const b22 = det3x3(a00, a01, a03, a10, a11, a13, a30, a31, a33);\n const b23 = -det3x3(a00, a01, a02, a10, a11, a12, a30, a31, a32);\n\n const b30 = -det3x3(a01, a02, a03, a11, a12, a13, a21, a22, a23);\n const b31 = det3x3(a00, a02, a03, a10, a12, a13, a20, a22, a23);\n const b32 = -det3x3(a00, a01, a03, a10, a11, a13, a20, a21, a23);\n const b33 = det3x3(a00, a01, a02, a10, a11, a12, a20, a21, a22);\n\n // Calculate determinant\n const det = a00 * b00 + a01 * b01 + a02 * b02 + a03 * b03;\n\n // Check if matrix is invertible\n if (Math.abs(det) < 1e-8) {\n // Return identity matrix if not invertible\n return Matrix4();\n }\n\n const invDet = 1.0 / det;\n\n // Calculate inverse matrix\n return [\n b00 * invDet,\n b10 * invDet,\n b20 * invDet,\n b30 * invDet,\n b01 * invDet,\n b11 * invDet,\n b21 * invDet,\n b31 * invDet,\n b02 * invDet,\n b12 * invDet,\n b22 * invDet,\n b32 * invDet,\n b03 * invDet,\n b13 * invDet,\n b23 * invDet,\n b33 * invDet,\n ] as Matrix4;\n};\n\nconst vecSub = (a: Vec3, b: Vec3): Vec3 => {\n \"worklet\";\n return [a[0] - b[0], a[1] - b[1], a[2] - b[2]];\n};\n\nconst vecCross = (a: Vec3, b: Vec3): Vec3 => {\n \"worklet\";\n return [\n a[1] * b[2] - a[2] * b[1],\n a[2] * b[0] - a[0] * b[2],\n a[0] * b[1] - a[1] * b[0],\n ];\n};\n\nconst lookat = (eyeVec: Vec3, centerVec: Vec3, upVec: Vec3): Matrix4 => {\n \"worklet\";\n const f = normalizeVec(vecSub(centerVec, eyeVec));\n const u = normalizeVec(upVec);\n const s = normalizeVec(vecCross(f, u));\n const uf = vecCross(s, f);\n\n // Build the look-at matrix directly\n const m: Matrix4 = [\n s[0],\n uf[0],\n -f[0],\n eyeVec[0],\n s[1],\n uf[1],\n -f[1],\n eyeVec[1],\n s[2],\n uf[2],\n -f[2],\n eyeVec[2],\n 0,\n 0,\n 0,\n 1,\n ];\n\n return invert4(m);\n};\n\nconst perspectiveMatrix = (\n near: number,\n far: number,\n angle: number\n): Matrix4 => {\n \"worklet\";\n const dInv = 1 / (far - near);\n const halfAngle = angle / 2;\n const cot = Math.cos(halfAngle) / Math.sin(halfAngle);\n return [\n cot,\n 0,\n 0,\n 0,\n 0,\n cot,\n 0,\n 0,\n 0,\n 0,\n (far + near) * dInv,\n 2 * far * near * dInv,\n 0,\n 0,\n -1,\n 1,\n ];\n};\n\nexport interface CameraConfig {\n eye: Vec3;\n coa: Vec3;\n up: Vec3;\n near: number;\n far: number;\n angle: number;\n}\n\nexport const setupCamera = (\n area: Vec4,\n zscale: number,\n cam: CameraConfig\n): Matrix4 => {\n \"worklet\";\n const camera = lookat(cam.eye, cam.coa, cam.up);\n const p = perspectiveMatrix(cam.near, cam.far, cam.angle);\n const center: Vec3 = [(area[0] + area[2]) / 2, (area[1] + area[3]) / 2, 0];\n const viewScale: Vec3 = [\n (area[2] - area[0]) / 2,\n (area[3] - area[1]) / 2,\n zscale,\n ];\n const viewport = multiply4(\n translate(center[0], center[1], center[2]),\n scale(viewScale[0], viewScale[1], viewScale[2])\n );\n return multiply4(\n multiply4(viewport, p),\n multiply4(camera, invert4(viewport))\n );\n};\n"],"mappings":"AAgFA,MAAMA,eAAe,GAAIC,CAAQ,IAAY;EAC3C,SAAS;;EACT,MAAM,IAAIC,KAAK,CAAC,6BAA6BD,CAAC,EAAE,CAAC;AACnD,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,OAAO,GAAGA,CAAA,KAAe;EACpC,SAAS;;EACT,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACzD,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGA,CAACC,CAAS,EAAEC,CAAS,EAAEC,CAAC,GAAG,CAAC,KAAc;EACjE,SAAS;;EACT,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAEF,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAEC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAEC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACzD,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC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AAG,CAAC,CAACP,IAAI,CAAC,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;EAC1E,MAAMQ,SAAe,GAAG,CACtB,CAACR,IAAI,CAAC,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EACvB,CAACA,IAAI,CAAC,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EACvBC,MAAM,CACP;EACD,MAAMQ,QAAQ,GAAG5G,SAAS,CACxBvB,SAAS,CAACiI,MAAM,CAAC,CAAC,CAAC,EAAEA,MAAM,CAAC,CAAC,CAAC,EAAEA,MAAM,CAAC,CAAC,CAAC,CAAC,EAC1CxF,KAAK,CAACyF,SAAS,CAAC,CAAC,CAAC,EAAEA,SAAS,CAAC,CAAC,CAAC,EAAEA,SAAS,CAAC,CAAC,CAAC,CAChD,CAAC;EACD,OAAO3G,SAAS,CACdA,SAAS,CAAC4G,QAAQ,EAAE9H,CAAC,CAAC,EACtBkB,SAAS,CAACsG,MAAM,EAAE9C,OAAO,CAACoD,QAAQ,CAAC,CACrC,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type { SharedValue } from "react-native-reanimated";
2
- import type { TextProps, AtlasProps, BlurMaskFilterProps, BoxProps, BoxShadowProps, CircleProps, CTMProps, DiffRectProps, GlyphsProps, ImageProps, ImageSVGProps, LineProps, NodeType, OvalProps, PaintProps, ParagraphProps, PatchProps, PathProps, PictureProps, PointsProps, RectProps, RoundedRectProps, TextBlobProps, TextPathProps, VerticesProps } from "../../dom/types";
2
+ import type { TextProps, AtlasProps, BlurMaskFilterProps, BoxProps, BoxShadowProps, CircleProps, CTMProps, DiffRectProps, GlyphsProps, ImageProps, ImageSVGProps, LineProps, NodeType, OvalProps, PaintProps, ParagraphProps, PatchProps, PathProps, PictureProps, PointsProps, RectProps, RoundedRectProps, TextBlobProps, TextPathProps, VerticesProps, SkottieProps } from "../../dom/types";
3
3
  import type { AnimatedProps } from "../../renderer/processors/Animations/Animations";
4
4
  import type { SkPicture } from "./Picture";
5
5
  export interface BaseRecorder {
@@ -44,6 +44,7 @@ export interface BaseRecorder {
44
44
  drawPicture(props: AnimatedProps<PictureProps>): void;
45
45
  drawImageSVG(props: AnimatedProps<ImageSVGProps>): void;
46
46
  drawParagraph(props: AnimatedProps<ParagraphProps>): void;
47
+ drawSkottie(props: AnimatedProps<SkottieProps>): void;
47
48
  drawAtlas(props: AnimatedProps<AtlasProps>): void;
48
49
  }
49
50
  export interface JsiRecorder extends BaseRecorder {
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["Recorder.ts"],"sourcesContent":["import type { SharedValue } from \"react-native-reanimated\";\n\nimport type {\n TextProps,\n AtlasProps,\n BlurMaskFilterProps,\n BoxProps,\n BoxShadowProps,\n CircleProps,\n CTMProps,\n DiffRectProps,\n GlyphsProps,\n ImageProps,\n ImageSVGProps,\n LineProps,\n NodeType,\n OvalProps,\n PaintProps,\n ParagraphProps,\n PatchProps,\n PathProps,\n PictureProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextBlobProps,\n TextPathProps,\n VerticesProps,\n} from \"../../dom/types\";\nimport type { AnimatedProps } from \"../../renderer/processors/Animations/Animations\";\n\nimport type { SkPicture } from \"./Picture\";\n\nexport interface BaseRecorder {\n saveGroup(): void;\n restoreGroup(): void;\n savePaint(props: AnimatedProps<PaintProps>, standalone: boolean): void;\n restorePaint(): void;\n restorePaintDeclaration(): void;\n materializePaint(): void;\n pushPathEffect(pathEffectType: NodeType, props: AnimatedProps<unknown>): void;\n pushImageFilter(\n imageFilterType: NodeType,\n props: AnimatedProps<unknown>\n ): void;\n pushColorFilter(\n colorFilterType: NodeType,\n props: AnimatedProps<unknown>\n ): void;\n pushShader(shaderType: NodeType, props: AnimatedProps<unknown>): void;\n pushBlurMaskFilter(props: AnimatedProps<BlurMaskFilterProps>): void;\n composePathEffect(): void;\n composeColorFilter(): void;\n composeImageFilter(): void;\n saveCTM(props: AnimatedProps<CTMProps>): void;\n restoreCTM(): void;\n drawPaint(): void;\n saveLayer(): void;\n saveBackdropFilter(): void;\n drawBox(\n boxProps: AnimatedProps<BoxProps>,\n shadows: {\n props: BoxShadowProps;\n animatedProps?: Record<string, SharedValue<unknown>>;\n }[]\n ): void;\n drawImage(props: AnimatedProps<ImageProps>): void;\n drawCircle(props: AnimatedProps<CircleProps>): void;\n drawPoints(props: AnimatedProps<PointsProps>): void;\n drawPath(props: AnimatedProps<PathProps>): void;\n drawRect(props: AnimatedProps<RectProps>): void;\n drawRRect(props: AnimatedProps<RoundedRectProps>): void;\n drawOval(props: AnimatedProps<OvalProps>): void;\n drawLine(props: AnimatedProps<LineProps>): void;\n drawPatch(props: AnimatedProps<PatchProps>): void;\n drawVertices(props: AnimatedProps<VerticesProps>): void;\n drawDiffRect(props: AnimatedProps<DiffRectProps>): void;\n drawText(props: AnimatedProps<TextProps>): void;\n drawTextPath(props: AnimatedProps<TextPathProps>): void;\n drawTextBlob(props: AnimatedProps<TextBlobProps>): void;\n drawGlyphs(props: AnimatedProps<GlyphsProps>): void;\n drawPicture(props: AnimatedProps<PictureProps>): void;\n drawImageSVG(props: AnimatedProps<ImageSVGProps>): void;\n drawParagraph(props: AnimatedProps<ParagraphProps>): void;\n drawAtlas(props: AnimatedProps<AtlasProps>): void;\n}\n\nexport interface JsiRecorder extends BaseRecorder {\n play(): SkPicture;\n applyUpdates(variables: SharedValue<unknown>[]): void;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["Recorder.ts"],"sourcesContent":["import type { SharedValue } from \"react-native-reanimated\";\n\nimport type {\n TextProps,\n AtlasProps,\n BlurMaskFilterProps,\n BoxProps,\n BoxShadowProps,\n CircleProps,\n CTMProps,\n DiffRectProps,\n GlyphsProps,\n ImageProps,\n ImageSVGProps,\n LineProps,\n NodeType,\n OvalProps,\n PaintProps,\n ParagraphProps,\n PatchProps,\n PathProps,\n PictureProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextBlobProps,\n TextPathProps,\n VerticesProps,\n SkottieProps,\n} from \"../../dom/types\";\nimport type { AnimatedProps } from \"../../renderer/processors/Animations/Animations\";\n\nimport type { SkPicture } from \"./Picture\";\n\nexport interface BaseRecorder {\n saveGroup(): void;\n restoreGroup(): void;\n savePaint(props: AnimatedProps<PaintProps>, standalone: boolean): void;\n restorePaint(): void;\n restorePaintDeclaration(): void;\n materializePaint(): void;\n pushPathEffect(pathEffectType: NodeType, props: AnimatedProps<unknown>): void;\n pushImageFilter(\n imageFilterType: NodeType,\n props: AnimatedProps<unknown>\n ): void;\n pushColorFilter(\n colorFilterType: NodeType,\n props: AnimatedProps<unknown>\n ): void;\n pushShader(shaderType: NodeType, props: AnimatedProps<unknown>): void;\n pushBlurMaskFilter(props: AnimatedProps<BlurMaskFilterProps>): void;\n composePathEffect(): void;\n composeColorFilter(): void;\n composeImageFilter(): void;\n saveCTM(props: AnimatedProps<CTMProps>): void;\n restoreCTM(): void;\n drawPaint(): void;\n saveLayer(): void;\n saveBackdropFilter(): void;\n drawBox(\n boxProps: AnimatedProps<BoxProps>,\n shadows: {\n props: BoxShadowProps;\n animatedProps?: Record<string, SharedValue<unknown>>;\n }[]\n ): void;\n drawImage(props: AnimatedProps<ImageProps>): void;\n drawCircle(props: AnimatedProps<CircleProps>): void;\n drawPoints(props: AnimatedProps<PointsProps>): void;\n drawPath(props: AnimatedProps<PathProps>): void;\n drawRect(props: AnimatedProps<RectProps>): void;\n drawRRect(props: AnimatedProps<RoundedRectProps>): void;\n drawOval(props: AnimatedProps<OvalProps>): void;\n drawLine(props: AnimatedProps<LineProps>): void;\n drawPatch(props: AnimatedProps<PatchProps>): void;\n drawVertices(props: AnimatedProps<VerticesProps>): void;\n drawDiffRect(props: AnimatedProps<DiffRectProps>): void;\n drawText(props: AnimatedProps<TextProps>): void;\n drawTextPath(props: AnimatedProps<TextPathProps>): void;\n drawTextBlob(props: AnimatedProps<TextBlobProps>): void;\n drawGlyphs(props: AnimatedProps<GlyphsProps>): void;\n drawPicture(props: AnimatedProps<PictureProps>): void;\n drawImageSVG(props: AnimatedProps<ImageSVGProps>): void;\n drawParagraph(props: AnimatedProps<ParagraphProps>): void;\n drawSkottie(props: AnimatedProps<SkottieProps>): void;\n drawAtlas(props: AnimatedProps<AtlasProps>): void;\n}\n\nexport interface JsiRecorder extends BaseRecorder {\n play(): SkPicture;\n applyUpdates(variables: SharedValue<unknown>[]): void;\n}\n"],"mappings":"","ignoreList":[]}
@@ -29,6 +29,7 @@ import type { ParagraphBuilderFactory } from "./Paragraph/ParagraphBuilder";
29
29
  import type { Video } from "./Video";
30
30
  import type { NativeBufferFactory } from "./NativeBuffer";
31
31
  import type { JsiRecorder } from "./Recorder";
32
+ import type { SkottieFactory } from "./Skottie";
32
33
  export interface SkiaContext {
33
34
  getSurface(): SkSurface;
34
35
  present(): void;
@@ -78,6 +79,7 @@ export interface Skia {
78
79
  TextBlob: TextBlobFactory;
79
80
  Surface: SurfaceFactory;
80
81
  ParagraphBuilder: ParagraphBuilderFactory;
82
+ Skottie: SkottieFactory;
81
83
  Video: (url: string) => Promise<Video> | Video;
82
84
  Context(surface: bigint, width: number, height: number): SkiaContext;
83
85
  NativeBuffer: NativeBufferFactory;
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["Skia.ts"],"sourcesContent":["import type { ImageFilterFactory } from \"./ImageFilter\";\nimport type { PathFactory } from \"./Path\";\nimport type { ColorFilterFactory } from \"./ColorFilter\";\nimport type { SkFont, FontMgrFactory } from \"./Font\";\nimport type { SkTypeface, TypefaceFactory } from \"./Typeface\";\nimport type { ImageFactory } from \"./Image\";\nimport type { MaskFilterFactory } from \"./MaskFilter\";\nimport type { SkPaint } from \"./Paint\";\nimport type { SkHostRect, SkRect } from \"./Rect\";\nimport type { SkRRect } from \"./RRect\";\nimport type {\n RuntimeEffectFactory,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n} from \"./RuntimeEffect\";\nimport type { ShaderFactory } from \"./Shader\";\nimport type { SkMatrix } from \"./Matrix\";\nimport type { PathEffectFactory } from \"./PathEffect\";\nimport type { SkPoint } from \"./Point\";\nimport type { SkVertices, VertexMode } from \"./Vertices/Vertices\";\nimport type { DataFactory } from \"./Data\";\nimport type { SVGFactory } from \"./SVG\";\nimport type { TextBlobFactory } from \"./TextBlob\";\nimport type { SkSurface, SurfaceFactory } from \"./Surface\";\nimport type { SkRSXform } from \"./RSXform\";\nimport type { SkPath } from \"./Path/Path\";\nimport type { SkContourMeasureIter } from \"./ContourMeasure\";\nimport type { PictureFactory, SkPictureRecorder } from \"./Picture\";\nimport type { Color, SkColor } from \"./Color\";\nimport type { TypefaceFontProviderFactory } from \"./Paragraph/TypefaceFontProviderFactory\";\nimport type { AnimatedImageFactory } from \"./AnimatedImage\";\nimport type { ParagraphBuilderFactory } from \"./Paragraph/ParagraphBuilder\";\nimport type { Video } from \"./Video\";\nimport type { NativeBufferFactory } from \"./NativeBuffer\";\nimport type { JsiRecorder } from \"./Recorder\";\n\nexport interface SkiaContext {\n getSurface(): SkSurface;\n present(): void;\n}\n\n/**\n * Declares the interface for the native Skia API\n */\nexport interface Skia {\n Point: (x: number, y: number) => SkPoint;\n XYWHRect: (x: number, y: number, width: number, height: number) => SkHostRect;\n RuntimeShaderBuilder: (rt: SkRuntimeEffect) => SkRuntimeShaderBuilder;\n RRectXY: (rect: SkRect, rx: number, ry: number) => SkRRect;\n RSXform: (scos: number, ssin: number, tx: number, ty: number) => SkRSXform;\n RSXformFromRadians: (\n scale: number,\n radians: number,\n tx: number,\n ty: number,\n px: number,\n py: number\n ) => SkRSXform;\n Color: (color: Color) => SkColor;\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ) => SkContourMeasureIter;\n Paint: () => SkPaint;\n PictureRecorder: () => SkPictureRecorder;\n Picture: PictureFactory;\n Path: PathFactory;\n Matrix: (matrix?: readonly number[]) => SkMatrix;\n ColorFilter: ColorFilterFactory;\n Font: (typeface?: SkTypeface, size?: number) => SkFont;\n Typeface: TypefaceFactory;\n TypefaceFontProvider: TypefaceFontProviderFactory;\n FontMgr: FontMgrFactory;\n MaskFilter: MaskFilterFactory;\n RuntimeEffect: RuntimeEffectFactory;\n ImageFilter: ImageFilterFactory;\n Shader: ShaderFactory;\n PathEffect: PathEffectFactory;\n /**\n * Returns an Vertices based on the given positions and optional parameters.\n * See SkVertices.h (especially the Builder) for more details.\n * @param mode\n * @param positions\n * @param textureCoordinates\n * @param colors - either a list of int colors or a flattened color array.\n * @param indices\n * @param isVolatile\n */\n MakeVertices(\n mode: VertexMode,\n positions: SkPoint[],\n textureCoordinates?: SkPoint[] | null,\n colors?: SkColor[],\n indices?: number[] | null,\n isVolatile?: boolean\n ): SkVertices;\n Data: DataFactory;\n Image: ImageFactory;\n AnimatedImage: AnimatedImageFactory;\n SVG: SVGFactory;\n TextBlob: TextBlobFactory;\n Surface: SurfaceFactory;\n ParagraphBuilder: ParagraphBuilderFactory;\n Video: (url: string) => Promise<Video> | Video;\n Context(surface: bigint, width: number, height: number): SkiaContext;\n NativeBuffer: NativeBufferFactory;\n Recorder(): JsiRecorder;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["Skia.ts"],"sourcesContent":["import type { ImageFilterFactory } from \"./ImageFilter\";\nimport type { PathFactory } from \"./Path\";\nimport type { ColorFilterFactory } from \"./ColorFilter\";\nimport type { SkFont, FontMgrFactory } from \"./Font\";\nimport type { SkTypeface, TypefaceFactory } from \"./Typeface\";\nimport type { ImageFactory } from \"./Image\";\nimport type { MaskFilterFactory } from \"./MaskFilter\";\nimport type { SkPaint } from \"./Paint\";\nimport type { SkHostRect, SkRect } from \"./Rect\";\nimport type { SkRRect } from \"./RRect\";\nimport type {\n RuntimeEffectFactory,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n} from \"./RuntimeEffect\";\nimport type { ShaderFactory } from \"./Shader\";\nimport type { SkMatrix } from \"./Matrix\";\nimport type { PathEffectFactory } from \"./PathEffect\";\nimport type { SkPoint } from \"./Point\";\nimport type { SkVertices, VertexMode } from \"./Vertices/Vertices\";\nimport type { DataFactory } from \"./Data\";\nimport type { SVGFactory } from \"./SVG\";\nimport type { TextBlobFactory } from \"./TextBlob\";\nimport type { SkSurface, SurfaceFactory } from \"./Surface\";\nimport type { SkRSXform } from \"./RSXform\";\nimport type { SkPath } from \"./Path/Path\";\nimport type { SkContourMeasureIter } from \"./ContourMeasure\";\nimport type { PictureFactory, SkPictureRecorder } from \"./Picture\";\nimport type { Color, SkColor } from \"./Color\";\nimport type { TypefaceFontProviderFactory } from \"./Paragraph/TypefaceFontProviderFactory\";\nimport type { AnimatedImageFactory } from \"./AnimatedImage\";\nimport type { ParagraphBuilderFactory } from \"./Paragraph/ParagraphBuilder\";\nimport type { Video } from \"./Video\";\nimport type { NativeBufferFactory } from \"./NativeBuffer\";\nimport type { JsiRecorder } from \"./Recorder\";\nimport type { SkottieFactory } from \"./Skottie\";\n\nexport interface SkiaContext {\n getSurface(): SkSurface;\n present(): void;\n}\n\n/**\n * Declares the interface for the native Skia API\n */\nexport interface Skia {\n Point: (x: number, y: number) => SkPoint;\n XYWHRect: (x: number, y: number, width: number, height: number) => SkHostRect;\n RuntimeShaderBuilder: (rt: SkRuntimeEffect) => SkRuntimeShaderBuilder;\n RRectXY: (rect: SkRect, rx: number, ry: number) => SkRRect;\n RSXform: (scos: number, ssin: number, tx: number, ty: number) => SkRSXform;\n RSXformFromRadians: (\n scale: number,\n radians: number,\n tx: number,\n ty: number,\n px: number,\n py: number\n ) => SkRSXform;\n Color: (color: Color) => SkColor;\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ) => SkContourMeasureIter;\n Paint: () => SkPaint;\n PictureRecorder: () => SkPictureRecorder;\n Picture: PictureFactory;\n Path: PathFactory;\n Matrix: (matrix?: readonly number[]) => SkMatrix;\n ColorFilter: ColorFilterFactory;\n Font: (typeface?: SkTypeface, size?: number) => SkFont;\n Typeface: TypefaceFactory;\n TypefaceFontProvider: TypefaceFontProviderFactory;\n FontMgr: FontMgrFactory;\n MaskFilter: MaskFilterFactory;\n RuntimeEffect: RuntimeEffectFactory;\n ImageFilter: ImageFilterFactory;\n Shader: ShaderFactory;\n PathEffect: PathEffectFactory;\n /**\n * Returns an Vertices based on the given positions and optional parameters.\n * See SkVertices.h (especially the Builder) for more details.\n * @param mode\n * @param positions\n * @param textureCoordinates\n * @param colors - either a list of int colors or a flattened color array.\n * @param indices\n * @param isVolatile\n */\n MakeVertices(\n mode: VertexMode,\n positions: SkPoint[],\n textureCoordinates?: SkPoint[] | null,\n colors?: SkColor[],\n indices?: number[] | null,\n isVolatile?: boolean\n ): SkVertices;\n Data: DataFactory;\n Image: ImageFactory;\n AnimatedImage: AnimatedImageFactory;\n SVG: SVGFactory;\n TextBlob: TextBlobFactory;\n Surface: SurfaceFactory;\n ParagraphBuilder: ParagraphBuilderFactory;\n Skottie: SkottieFactory;\n Video: (url: string) => Promise<Video> | Video;\n Context(surface: bigint, width: number, height: number): SkiaContext;\n NativeBuffer: NativeBufferFactory;\n Recorder(): JsiRecorder;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,223 @@
1
+ import type { SkCanvas } from "./Canvas";
2
+ import type { SkColor } from "./Color";
3
+ import type { SkData } from "./Data";
4
+ import type { SkJSIInstance } from "./JsiInstance";
5
+ import type { StrokeJoin } from "./Paint";
6
+ import type { TextAlign, TextDirection } from "./Paragraph";
7
+ import type { SkPoint } from "./Point";
8
+ import type { SkRect } from "./Rect";
9
+ import type { SkSize } from "./Size";
10
+ import type { SkTypeface } from "./Typeface";
11
+ export declare enum LineBreakType {
12
+ SoftLineBreak = 0,
13
+ HardtLineBreak = 1
14
+ }
15
+ export declare enum VerticalTextAlign {
16
+ Top = 0,
17
+ TopBaseline = 1,
18
+ VisualTop = 2,// visual top -> text box top
19
+ VisualCenter = 3,// visual center -> text box center
20
+ VisualBottom = 4
21
+ }
22
+ export declare enum ResizePolicy {
23
+ None = 0,
24
+ ScaleToFit = 1,
25
+ DownscaleToFit = 2
26
+ }
27
+ export declare enum InputState {
28
+ Down = 0,
29
+ Up = 1,
30
+ Move = 2,
31
+ Right = 3,
32
+ Left = 4
33
+ }
34
+ export declare enum ModifierKey {
35
+ None = 0,
36
+ Shift = 1,
37
+ Control = 2,
38
+ Option = 3,
39
+ Command = 4,
40
+ FirstPress = 5
41
+ }
42
+ export interface AnimationMarker {
43
+ name: string;
44
+ t0: number;
45
+ t1: number;
46
+ }
47
+ export interface ColorProperty {
48
+ /**
49
+ * Property identifier, usually the node name.
50
+ */
51
+ key: string;
52
+ /**
53
+ * Property value (RGBA, 255-based).
54
+ */
55
+ value: SkColor;
56
+ }
57
+ /**
58
+ * Named opacity property.
59
+ */
60
+ export interface OpacityProperty {
61
+ /**
62
+ * Property identifier, usually the node name.
63
+ */
64
+ key: string;
65
+ /**
66
+ * Property value (0..100).
67
+ */
68
+ value: number;
69
+ }
70
+ /**
71
+ * Text property value.
72
+ */
73
+ export interface TextValue {
74
+ /**
75
+ * The text string payload.
76
+ */
77
+ text: string;
78
+ /**
79
+ * Font size.
80
+ */
81
+ size: number;
82
+ }
83
+ /**
84
+ * Named text property.
85
+ */
86
+ export interface TextProperty {
87
+ /**
88
+ * Property identifier, usually the node name.
89
+ */
90
+ key: string;
91
+ /**
92
+ * Property value.
93
+ */
94
+ value: TextValue;
95
+ }
96
+ /**
97
+ * Transform property value. Maps to AE styled transform.
98
+ */
99
+ export interface TransformValue {
100
+ /**
101
+ * Anchor point for transform. x and y value.
102
+ */
103
+ anchor: SkPoint;
104
+ /**
105
+ * Position of transform. x and y value.
106
+ */
107
+ position: SkPoint;
108
+ /**
109
+ * Scale of transform. x and y value.
110
+ */
111
+ scale: SkPoint;
112
+ /**
113
+ * Rotation of transform in degrees.
114
+ */
115
+ rotation: number;
116
+ /**
117
+ * Skew to apply during transform.
118
+ */
119
+ skew: number;
120
+ /**
121
+ * Direction of skew in degrees.
122
+ */
123
+ skewAxis: number;
124
+ }
125
+ /**
126
+ * Named transform property for Skottie property observer.
127
+ */
128
+ export interface TransformProperty {
129
+ /**
130
+ * Property identifier, usually the node name.
131
+ */
132
+ key: string;
133
+ /**
134
+ * Property value.
135
+ */
136
+ value: TransformValue;
137
+ }
138
+ /**
139
+ * Collection of slot IDs sorted by value type
140
+ */
141
+ export interface SlotInfo {
142
+ colorSlotIDs: string[];
143
+ scalarSlotIDs: string[];
144
+ vec2SlotIDs: string[];
145
+ imageSlotIDs: string[];
146
+ textSlotIDs: string[];
147
+ }
148
+ /**
149
+ * Text property for ManagedAnimation's slot support
150
+ */
151
+ export interface SlottableTextProperty {
152
+ typeface?: SkTypeface;
153
+ text?: string;
154
+ textSize?: number;
155
+ minTextSize?: number;
156
+ maxTextSize?: number;
157
+ strokeWidth?: number;
158
+ lineHeight?: number;
159
+ lineShift?: number;
160
+ ascent?: number;
161
+ maxLines?: number;
162
+ horizAlign?: TextAlign;
163
+ vertAlign?: VerticalTextAlign;
164
+ strokeJoin?: StrokeJoin;
165
+ direction?: TextDirection;
166
+ linebreak?: LineBreakType;
167
+ resize?: ResizePolicy;
168
+ boundingBox?: SkRect;
169
+ fillColor?: SkColor;
170
+ strokeColor?: SkColor;
171
+ }
172
+ export interface SkSkottieAnimation extends SkJSIInstance<"SkottieAnimation"> {
173
+ /**
174
+ * Returns the animation duration in seconds.
175
+ */
176
+ duration(): number;
177
+ /**
178
+ * Returns the animation frame rate (frames / second).
179
+ */
180
+ fps(): number;
181
+ /**
182
+ * Draws current animation frame. Must call seek or seekFrame first.
183
+ * @param canvas
184
+ * @param dstRect
185
+ */
186
+ render(canvas: SkCanvas, dstRect?: SkRect): void;
187
+ /**
188
+ * Update the animation state to match |t|, specified as a frame index
189
+ * i.e. relative to duration() * fps().
190
+ *
191
+ * Returns the rectangle that was affected by this animation.
192
+ *
193
+ * @param frame - Fractional values are allowed and meaningful - e.g.
194
+ * 0.0 -> first frame
195
+ * 1.0 -> second frame
196
+ * 0.5 -> halfway between first and second frame
197
+ * @param damageRect - will copy damage frame into this if provided.
198
+ */
199
+ seekFrame(frame: number, damageRect?: SkRect): void;
200
+ size(): SkSize;
201
+ version(): string;
202
+ getSlotInfo(): SlotInfo;
203
+ setColorSlot(key: string, color: SkColor): boolean;
204
+ setScalarSlot(key: string, scalar: number): boolean;
205
+ setVec2Slot(key: string, vec2: SkPoint): boolean;
206
+ setTextSlot(key: string, text: SlottableTextProperty): boolean;
207
+ setImageSlot(key: string, assetName: string): boolean;
208
+ getColorSlot(key: string): SkColor | null;
209
+ getScalarSlot(key: string): number | null;
210
+ getVec2Slot(key: string): SkPoint | null;
211
+ getTextSlot(key: string): SlottableTextProperty | null;
212
+ getColorProps(): ColorProperty[];
213
+ getTextProps(): TextProperty[];
214
+ getOpacityProps(): OpacityProperty[];
215
+ getTransformProps(): TransformProperty[];
216
+ setColor(key: string, color: SkColor): boolean;
217
+ setText(key: string, text: string, size: number): boolean;
218
+ setOpacity(key: string, opacity: number): boolean;
219
+ setTransform(key: string, anchor: SkPoint, position: SkPoint, scale: SkPoint, rotation: number, skew: number, skewAxis: number): boolean;
220
+ }
221
+ export interface SkottieFactory {
222
+ Make(json: string, assets?: Record<string, SkData>): SkSkottieAnimation;
223
+ }
@@ -0,0 +1,74 @@
1
+ export let LineBreakType = /*#__PURE__*/function (LineBreakType) {
2
+ LineBreakType[LineBreakType["SoftLineBreak"] = 0] = "SoftLineBreak";
3
+ LineBreakType[LineBreakType["HardtLineBreak"] = 1] = "HardtLineBreak";
4
+ return LineBreakType;
5
+ }({});
6
+ export let VerticalTextAlign = /*#__PURE__*/function (VerticalTextAlign) {
7
+ VerticalTextAlign[VerticalTextAlign["Top"] = 0] = "Top";
8
+ VerticalTextAlign[VerticalTextAlign["TopBaseline"] = 1] = "TopBaseline";
9
+ // Skottie vertical alignment extensions
10
+ // Visual alignement modes -- these are using tight visual bounds for the paragraph.
11
+ VerticalTextAlign[VerticalTextAlign["VisualTop"] = 2] = "VisualTop";
12
+ // visual top -> text box top
13
+ VerticalTextAlign[VerticalTextAlign["VisualCenter"] = 3] = "VisualCenter";
14
+ // visual center -> text box center
15
+ VerticalTextAlign[VerticalTextAlign["VisualBottom"] = 4] = "VisualBottom"; // visual bottom -> text box bottom
16
+ return VerticalTextAlign;
17
+ }({});
18
+ export let ResizePolicy = /*#__PURE__*/function (ResizePolicy) {
19
+ // Use the specified text size.
20
+ ResizePolicy[ResizePolicy["None"] = 0] = "None";
21
+ // Resize the text such that the extent box fits (snuggly) in the text box,
22
+ // both horizontally and vertically.
23
+ ResizePolicy[ResizePolicy["ScaleToFit"] = 1] = "ScaleToFit";
24
+ // Same kScaleToFit if the text doesn't fit at the specified font size.
25
+ // Otherwise, same as kNone.
26
+ ResizePolicy[ResizePolicy["DownscaleToFit"] = 2] = "DownscaleToFit";
27
+ return ResizePolicy;
28
+ }({});
29
+ export let InputState = /*#__PURE__*/function (InputState) {
30
+ InputState[InputState["Down"] = 0] = "Down";
31
+ InputState[InputState["Up"] = 1] = "Up";
32
+ InputState[InputState["Move"] = 2] = "Move";
33
+ InputState[InputState["Right"] = 3] = "Right";
34
+ InputState[InputState["Left"] = 4] = "Left";
35
+ return InputState;
36
+ }({});
37
+ export let ModifierKey = /*#__PURE__*/function (ModifierKey) {
38
+ ModifierKey[ModifierKey["None"] = 0] = "None";
39
+ ModifierKey[ModifierKey["Shift"] = 1] = "Shift";
40
+ ModifierKey[ModifierKey["Control"] = 2] = "Control";
41
+ ModifierKey[ModifierKey["Option"] = 3] = "Option";
42
+ ModifierKey[ModifierKey["Command"] = 4] = "Command";
43
+ ModifierKey[ModifierKey["FirstPress"] = 5] = "FirstPress";
44
+ return ModifierKey;
45
+ }({});
46
+
47
+ /**
48
+ * Named opacity property.
49
+ */
50
+
51
+ /**
52
+ * Text property value.
53
+ */
54
+
55
+ /**
56
+ * Named text property.
57
+ */
58
+
59
+ /**
60
+ * Transform property value. Maps to AE styled transform.
61
+ */
62
+
63
+ /**
64
+ * Named transform property for Skottie property observer.
65
+ */
66
+
67
+ /**
68
+ * Collection of slot IDs sorted by value type
69
+ */
70
+
71
+ /**
72
+ * Text property for ManagedAnimation's slot support
73
+ */
74
+ //# sourceMappingURL=Skottie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["LineBreakType","VerticalTextAlign","ResizePolicy","InputState","ModifierKey"],"sources":["Skottie.ts"],"sourcesContent":["import type { SkCanvas } from \"./Canvas\";\nimport type { SkColor } from \"./Color\";\nimport type { SkData } from \"./Data\";\nimport type { SkJSIInstance } from \"./JsiInstance\";\nimport type { StrokeJoin } from \"./Paint\";\nimport type { TextAlign, TextDirection } from \"./Paragraph\";\nimport type { SkPoint } from \"./Point\";\nimport type { SkRect } from \"./Rect\";\nimport type { SkSize } from \"./Size\";\nimport type { SkTypeface } from \"./Typeface\";\n\nexport enum LineBreakType {\n SoftLineBreak,\n HardtLineBreak,\n}\n\nexport enum VerticalTextAlign {\n Top,\n TopBaseline,\n // Skottie vertical alignment extensions\n // Visual alignement modes -- these are using tight visual bounds for the paragraph.\n VisualTop, // visual top -> text box top\n VisualCenter, // visual center -> text box center\n VisualBottom, // visual bottom -> text box bottom\n}\n\nexport enum ResizePolicy {\n // Use the specified text size.\n None,\n // Resize the text such that the extent box fits (snuggly) in the text box,\n // both horizontally and vertically.\n ScaleToFit,\n // Same kScaleToFit if the text doesn't fit at the specified font size.\n // Otherwise, same as kNone.\n DownscaleToFit,\n}\n\nexport enum InputState {\n Down,\n Up,\n Move,\n Right,\n Left,\n}\n\nexport enum ModifierKey {\n None,\n Shift,\n Control,\n Option,\n Command,\n FirstPress,\n}\n\nexport interface AnimationMarker {\n name: string;\n t0: number; // 0.0 to 1.0\n t1: number; // 0.0 to 1.0\n}\n\nexport interface ColorProperty {\n /**\n * Property identifier, usually the node name.\n */\n key: string;\n /**\n * Property value (RGBA, 255-based).\n */\n value: SkColor;\n}\n\n/**\n * Named opacity property.\n */\nexport interface OpacityProperty {\n /**\n * Property identifier, usually the node name.\n */\n key: string;\n /**\n * Property value (0..100).\n */\n value: number;\n}\n\n/**\n * Text property value.\n */\nexport interface TextValue {\n /**\n * The text string payload.\n */\n text: string;\n /**\n * Font size.\n */\n size: number;\n}\n\n/**\n * Named text property.\n */\nexport interface TextProperty {\n /**\n * Property identifier, usually the node name.\n */\n key: string;\n /**\n * Property value.\n */\n value: TextValue;\n}\n\n/**\n * Transform property value. Maps to AE styled transform.\n */\nexport interface TransformValue {\n /**\n * Anchor point for transform. x and y value.\n */\n anchor: SkPoint;\n /**\n * Position of transform. x and y value.\n */\n position: SkPoint;\n /**\n * Scale of transform. x and y value.\n */\n scale: SkPoint;\n /**\n * Rotation of transform in degrees.\n */\n rotation: number;\n /**\n * Skew to apply during transform.\n */\n skew: number;\n /**\n * Direction of skew in degrees.\n */\n skewAxis: number;\n}\n\n/**\n * Named transform property for Skottie property observer.\n */\nexport interface TransformProperty {\n /**\n * Property identifier, usually the node name.\n */\n key: string;\n /**\n * Property value.\n */\n value: TransformValue;\n}\n\n/**\n * Collection of slot IDs sorted by value type\n */\nexport interface SlotInfo {\n colorSlotIDs: string[];\n scalarSlotIDs: string[];\n vec2SlotIDs: string[];\n imageSlotIDs: string[];\n textSlotIDs: string[];\n}\n\n/**\n * Text property for ManagedAnimation's slot support\n */\nexport interface SlottableTextProperty {\n typeface?: SkTypeface;\n text?: string;\n textSize?: number;\n\n minTextSize?: number;\n maxTextSize?: number;\n strokeWidth?: number;\n lineHeight?: number;\n lineShift?: number;\n ascent?: number;\n maxLines?: number;\n\n horizAlign?: TextAlign;\n vertAlign?: VerticalTextAlign;\n strokeJoin?: StrokeJoin;\n direction?: TextDirection;\n linebreak?: LineBreakType;\n resize?: ResizePolicy;\n\n boundingBox?: SkRect;\n fillColor?: SkColor;\n strokeColor?: SkColor;\n}\n\nexport interface SkSkottieAnimation extends SkJSIInstance<\"SkottieAnimation\"> {\n /**\n * Returns the animation duration in seconds.\n */\n duration(): number;\n /**\n * Returns the animation frame rate (frames / second).\n */\n fps(): number;\n\n /**\n * Draws current animation frame. Must call seek or seekFrame first.\n * @param canvas\n * @param dstRect\n */\n render(canvas: SkCanvas, dstRect?: SkRect): void;\n\n /**\n * Update the animation state to match |t|, specified as a frame index\n * i.e. relative to duration() * fps().\n *\n * Returns the rectangle that was affected by this animation.\n *\n * @param frame - Fractional values are allowed and meaningful - e.g.\n * 0.0 -> first frame\n * 1.0 -> second frame\n * 0.5 -> halfway between first and second frame\n * @param damageRect - will copy damage frame into this if provided.\n */\n seekFrame(frame: number, damageRect?: SkRect): void;\n\n size(): SkSize;\n\n version(): string;\n\n getSlotInfo(): SlotInfo;\n\n setColorSlot(key: string, color: SkColor): boolean;\n setScalarSlot(key: string, scalar: number): boolean;\n setVec2Slot(key: string, vec2: SkPoint): boolean;\n setTextSlot(key: string, text: SlottableTextProperty): boolean;\n setImageSlot(key: string, assetName: string): boolean;\n\n getColorSlot(key: string): SkColor | null;\n getScalarSlot(key: string): number | null;\n getVec2Slot(key: string): SkPoint | null;\n getTextSlot(key: string): SlottableTextProperty | null;\n\n getColorProps(): ColorProperty[];\n getTextProps(): TextProperty[];\n getOpacityProps(): OpacityProperty[];\n getTransformProps(): TransformProperty[];\n\n setColor(key: string, color: SkColor): boolean;\n setText(key: string, text: string, size: number): boolean;\n setOpacity(key: string, opacity: number): boolean;\n setTransform(\n key: string,\n anchor: SkPoint,\n position: SkPoint,\n scale: SkPoint,\n rotation: number,\n skew: number,\n skewAxis: number\n ): boolean;\n}\n\nexport interface SkottieFactory {\n Make(json: string, assets?: Record<string, SkData>): SkSkottieAnimation;\n}\n"],"mappings":"AAWA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAKzB,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAG3B;EACA;EAJUA,iBAAiB,CAAjBA,iBAAiB;EAKhB;EALDA,iBAAiB,CAAjBA,iBAAiB;EAMb;EANJA,iBAAiB,CAAjBA,iBAAiB,wCAOb;EAAA,OAPJA,iBAAiB;AAAA;AAU7B,WAAYC,YAAY,0BAAZA,YAAY;EACtB;EADUA,YAAY,CAAZA,YAAY;EAGtB;EACA;EAJUA,YAAY,CAAZA,YAAY;EAMtB;EACA;EAPUA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAQtB,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;;AA0BvB;AACA;AACA;;AAYA;AACA;AACA;;AAYA;AACA;AACA;;AAYA;AACA;AACA;;AA4BA;AACA;AACA;;AAYA;AACA;AACA;;AASA;AACA;AACA","ignoreList":[]}
@@ -32,3 +32,4 @@ export * from "./Matrix4";
32
32
  export * from "./NativeBuffer";
33
33
  export * from "./Recorder";
34
34
  export * from "./Video";
35
+ export * from "./Skottie";
@@ -32,4 +32,5 @@ export * from "./Matrix4";
32
32
  export * from "./NativeBuffer";
33
33
  export * from "./Recorder";
34
34
  export * from "./Video";
35
+ export * from "./Skottie";
35
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Picture\";\nexport * from \"./Data\";\nexport * from \"./SVG\";\nexport * from \"./Surface\";\nexport * from \"./Vertices\";\nexport * from \"./RuntimeEffect\";\nexport * from \"./Shader\";\nexport * from \"./Image\";\nexport * from \"./AnimatedImage\";\nexport * from \"./ColorFilter\";\nexport * from \"./ImageFilter\";\nexport * from \"./Font\";\nexport * from \"./Typeface\";\nexport * from \"./Paint\";\nexport * from \"./Path\";\nexport * from \"./Color\";\nexport * from \"./Canvas\";\nexport * from \"./ContourMeasure\";\nexport * from \"./MaskFilter\";\nexport * from \"./Matrix\";\nexport * from \"./PathEffect\";\nexport * from \"./Point\";\nexport * from \"./Rect\";\nexport * from \"./RRect\";\nexport * from \"./RSXform\";\nexport * from \"./JsiInstance\";\nexport * from \"./Skia\";\nexport * from \"./TextBlob\";\nexport * from \"./Size\";\nexport * from \"./Paragraph\";\nexport * from \"./Matrix4\";\nexport * from \"./NativeBuffer\";\nexport * from \"./Recorder\";\nexport * from \"./Video\";\n"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,kBAAkB;AAChC,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Picture\";\nexport * from \"./Data\";\nexport * from \"./SVG\";\nexport * from \"./Surface\";\nexport * from \"./Vertices\";\nexport * from \"./RuntimeEffect\";\nexport * from \"./Shader\";\nexport * from \"./Image\";\nexport * from \"./AnimatedImage\";\nexport * from \"./ColorFilter\";\nexport * from \"./ImageFilter\";\nexport * from \"./Font\";\nexport * from \"./Typeface\";\nexport * from \"./Paint\";\nexport * from \"./Path\";\nexport * from \"./Color\";\nexport * from \"./Canvas\";\nexport * from \"./ContourMeasure\";\nexport * from \"./MaskFilter\";\nexport * from \"./Matrix\";\nexport * from \"./PathEffect\";\nexport * from \"./Point\";\nexport * from \"./Rect\";\nexport * from \"./RRect\";\nexport * from \"./RSXform\";\nexport * from \"./JsiInstance\";\nexport * from \"./Skia\";\nexport * from \"./TextBlob\";\nexport * from \"./Size\";\nexport * from \"./Paragraph\";\nexport * from \"./Matrix4\";\nexport * from \"./NativeBuffer\";\nexport * from \"./Recorder\";\nexport * from \"./Video\";\nexport * from \"./Skottie\";\n"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,kBAAkB;AAChC,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,WAAW","ignoreList":[]}
@@ -1,19 +1,36 @@
1
1
  import type { CanvasKit } from "canvaskit-wasm";
2
- import type { ColorChannel, ImageFilterFactory, SkColor, SkColorFilter, SkImageFilter, BlendMode, SkRect, SkRuntimeShaderBuilder, SkShader, TileMode } from "../types";
2
+ import type { ColorChannel, ImageFilterFactory, SkColor, SkColorFilter, SkImageFilter, BlendMode, SkRect, SkRuntimeShaderBuilder, SkShader, TileMode, FilterMode, MipmapMode, SkImage, SkMatrix, SkPicture, SkPoint3 } from "../types";
3
3
  import { Host } from "./Host";
4
4
  import { JsiSkImageFilter } from "./JsiSkImageFilter";
5
5
  export declare class JsiSkImageFilterFactory extends Host implements ImageFilterFactory {
6
6
  constructor(CanvasKit: CanvasKit);
7
- MakeOffset(dx: number, dy: number, input: SkImageFilter | null): JsiSkImageFilter;
8
- MakeDisplacementMap(channelX: ColorChannel, channelY: ColorChannel, scale: number, in1: SkImageFilter, input: SkImageFilter | null): SkImageFilter;
9
- MakeShader(shader: SkShader, _input: SkImageFilter | null): SkImageFilter;
10
- MakeBlur(sigmaX: number, sigmaY: number, mode: TileMode, input: SkImageFilter | null): JsiSkImageFilter;
11
- MakeColorFilter(cf: SkColorFilter, input: SkImageFilter | null): JsiSkImageFilter;
7
+ MakeRuntimeShaderWithChildren(_builder: SkRuntimeShaderBuilder, _sampleRadius: number, _childShaderNames: string[], _inputs: Array<SkImageFilter | null>): SkImageFilter;
8
+ MakeArithmetic(_k1: number, _k2: number, _k3: number, _k4: number, _enforcePMColor: boolean, _background?: SkImageFilter | null, _foreground?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
9
+ MakeCrop(_rect: SkRect, _tileMode?: TileMode | null, _input?: SkImageFilter | null): SkImageFilter;
10
+ MakeEmpty(): SkImageFilter;
11
+ MakeImage(_image: SkImage, _srcRect?: SkRect | null, _dstRect?: SkRect | null, _filterMode?: FilterMode, _mipmap?: MipmapMode): SkImageFilter;
12
+ MakeMagnifier(_lensBounds: SkRect, _zoomAmount: number, _inset: number, _filterMode?: FilterMode, _mipmap?: MipmapMode, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
13
+ 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;
14
+ MakeMatrixTransform(_matrix: SkMatrix, _filterMode?: FilterMode, _mipmap?: MipmapMode, _input?: SkImageFilter | null): SkImageFilter;
15
+ MakeMerge(_filters: Array<SkImageFilter | null>, _cropRect?: SkRect | null): SkImageFilter;
16
+ MakePicture(_picture: SkPicture, _targetRect?: SkRect | null): SkImageFilter;
17
+ MakeTile(_src: SkRect, _dst: SkRect, _input?: SkImageFilter | null): SkImageFilter;
18
+ MakeDistantLitDiffuse(_direction: SkPoint3, _lightColor: SkColor, _surfaceScale: number, _kd: number, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
19
+ MakePointLitDiffuse(_location: SkPoint3, _lightColor: SkColor, _surfaceScale: number, _kd: number, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
20
+ MakeSpotLitDiffuse(_location: SkPoint3, _target: SkPoint3, _falloffExponent: number, _cutoffAngle: number, _lightColor: SkColor, _surfaceScale: number, _kd: number, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
21
+ MakeDistantLitSpecular(_direction: SkPoint3, _lightColor: SkColor, _surfaceScale: number, _ks: number, _shininess: number, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
22
+ MakePointLitSpecular(_location: SkPoint3, _lightColor: SkColor, _surfaceScale: number, _ks: number, _shininess: number, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
23
+ MakeSpotLitSpecular(_location: SkPoint3, _target: SkPoint3, _falloffExponent: number, _cutoffAngle: number, _lightColor: SkColor, _surfaceScale: number, _ks: number, _shininess: number, _input?: SkImageFilter | null, _cropRect?: SkRect | null): SkImageFilter;
24
+ MakeOffset(dx: number, dy: number, input?: SkImageFilter | null, cropRect?: SkRect | null): JsiSkImageFilter;
25
+ MakeDisplacementMap(channelX: ColorChannel, channelY: ColorChannel, scale: number, in1: SkImageFilter, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
26
+ MakeShader(shader: SkShader, dither?: boolean, cropRect?: SkRect | null): SkImageFilter;
27
+ MakeBlur(sigmaX: number, sigmaY: number, mode: TileMode, input?: SkImageFilter | null, cropRect?: SkRect | null): JsiSkImageFilter;
28
+ MakeColorFilter(colorFilter: SkColorFilter, input?: SkImageFilter | null, cropRect?: SkRect | null): JsiSkImageFilter;
12
29
  MakeCompose(outer: SkImageFilter | null, inner: SkImageFilter | null): JsiSkImageFilter;
13
- MakeDropShadow(dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
14
- MakeDropShadowOnly(dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
15
- MakeErode(rx: number, ry: number, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
16
- MakeDilate(rx: number, ry: number, input: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
17
- MakeBlend(mode: BlendMode, background: SkImageFilter, foreground: SkImageFilter | null, cropRect?: SkRect): SkImageFilter;
18
- MakeRuntimeShader(_builder: SkRuntimeShaderBuilder, _childShaderName: string | null, _input: SkImageFilter | null): SkImageFilter;
30
+ MakeDropShadow(dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
31
+ MakeDropShadowOnly(dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
32
+ MakeErode(rx: number, ry: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
33
+ MakeDilate(rx: number, ry: number, input?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
34
+ MakeBlend(mode: BlendMode, background: SkImageFilter, foreground?: SkImageFilter | null, cropRect?: SkRect | null): SkImageFilter;
35
+ MakeRuntimeShader(_builder: SkRuntimeShaderBuilder, _childShaderName: string | null, _input?: SkImageFilter | null): SkImageFilter;
19
36
  }