@motionscript/core 0.1.0-alpha.7 → 0.1.0-alpha.8

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 (498) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/NOTICE +15 -14
  3. package/README.md +4 -4
  4. package/dist/assets/manager.d.ts.map +1 -1
  5. package/dist/assets/manager.js +7 -5
  6. package/dist/assets/manager.js.map +1 -1
  7. package/dist/attributes/audio/effects/chain.d.ts +73 -0
  8. package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
  9. package/dist/attributes/audio/effects/chain.js +67 -0
  10. package/dist/attributes/audio/effects/chain.js.map +1 -0
  11. package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
  12. package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
  13. package/dist/attributes/audio/effects/implementations/echo.js +11 -0
  14. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
  15. package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
  16. package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
  17. package/dist/attributes/audio/effects/implementations/gain.js +6 -0
  18. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
  19. package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
  20. package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
  21. package/dist/attributes/audio/effects/implementations/highpass.js +10 -0
  22. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
  23. package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
  24. package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
  25. package/dist/attributes/audio/effects/implementations/lowpass.js +10 -0
  26. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
  27. package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
  28. package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
  29. package/dist/attributes/audio/effects/implementations/tremolo.js +10 -0
  30. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
  31. package/dist/attributes/audio/effects/index.d.ts +12 -0
  32. package/dist/attributes/audio/effects/index.d.ts.map +1 -0
  33. package/dist/attributes/audio/effects/index.js +4 -0
  34. package/dist/attributes/audio/effects/index.js.map +1 -0
  35. package/dist/attributes/audio/effects/registry.d.ts +36 -0
  36. package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
  37. package/dist/attributes/audio/effects/registry.js +80 -0
  38. package/dist/attributes/audio/effects/registry.js.map +1 -0
  39. package/dist/attributes/audio/effects/union.d.ts +14 -0
  40. package/dist/attributes/audio/effects/union.d.ts.map +1 -0
  41. package/dist/attributes/audio/effects/union.js +24 -0
  42. package/dist/attributes/audio/effects/union.js.map +1 -0
  43. package/dist/attributes/audio/ramp.d.ts +103 -0
  44. package/dist/attributes/audio/ramp.d.ts.map +1 -0
  45. package/dist/attributes/audio/ramp.js +246 -0
  46. package/dist/attributes/audio/ramp.js.map +1 -0
  47. package/dist/attributes/audio/request.d.ts +24 -13
  48. package/dist/attributes/audio/request.d.ts.map +1 -1
  49. package/dist/attributes/audio/request.js +4 -3
  50. package/dist/attributes/audio/request.js.map +1 -1
  51. package/dist/attributes/audio/schedule.d.ts +21 -13
  52. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  53. package/dist/attributes/audio/schedule.js +42 -28
  54. package/dist/attributes/audio/schedule.js.map +1 -1
  55. package/dist/attributes/audio/sound.d.ts +15 -12
  56. package/dist/attributes/audio/sound.d.ts.map +1 -1
  57. package/dist/attributes/audio/sound.js +8 -10
  58. package/dist/attributes/audio/sound.js.map +1 -1
  59. package/dist/attributes/audio/transition.d.ts +33 -0
  60. package/dist/attributes/audio/transition.d.ts.map +1 -0
  61. package/dist/attributes/audio/transition.js +48 -0
  62. package/dist/attributes/audio/transition.js.map +1 -0
  63. package/dist/attributes/index.d.ts +4 -3
  64. package/dist/attributes/index.d.ts.map +1 -1
  65. package/dist/attributes/index.js +4 -7
  66. package/dist/attributes/index.js.map +1 -1
  67. package/dist/attributes/layout/matrix2d.d.ts +2 -2
  68. package/dist/attributes/layout/matrix2d.js.map +1 -1
  69. package/dist/attributes/layout/space3d.js +1 -1
  70. package/dist/attributes/layout/space3d.js.map +1 -1
  71. package/dist/attributes/properties/typed.d.ts +7 -7
  72. package/dist/attributes/properties/typed.d.ts.map +1 -1
  73. package/dist/attributes/properties/typed.js +6 -6
  74. package/dist/attributes/properties/typed.js.map +1 -1
  75. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -2
  76. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  77. package/dist/attributes/shape/corners/corner-radius.js +1 -2
  78. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  79. package/dist/attributes/shape/effects/chain.d.ts +96 -409
  80. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  81. package/dist/attributes/shape/effects/chain.js +93 -283
  82. package/dist/attributes/shape/effects/chain.js.map +1 -1
  83. package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
  84. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  85. package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
  86. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  87. package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
  88. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  89. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
  90. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  91. package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
  92. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
  94. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
  96. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  97. package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
  98. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  99. package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
  100. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  101. package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
  102. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/blur.js +13 -5
  104. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  105. package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
  106. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
  108. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
  110. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
  112. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
  114. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
  116. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
  118. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/curves.js +26 -23
  120. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
  122. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
  124. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
  126. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/dither.js +26 -20
  128. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +46 -14
  130. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
  132. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
  134. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
  136. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
  138. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/edges.js +17 -14
  140. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  141. package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
  142. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  143. package/dist/attributes/shape/effects/implementations/glass.js +28 -22
  144. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  145. package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
  146. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  147. package/dist/attributes/shape/effects/implementations/glow.js +74 -72
  148. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  149. package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
  150. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  151. package/dist/attributes/shape/effects/implementations/grain.js +21 -18
  152. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  153. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
  154. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  155. package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
  156. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  157. package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
  158. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  159. package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
  160. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  161. package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
  162. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  163. package/dist/attributes/shape/effects/implementations/invert.js +15 -10
  164. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  165. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
  166. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  167. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
  168. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  169. package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
  170. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  171. package/dist/attributes/shape/effects/implementations/lut.js +20 -16
  172. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  173. package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
  174. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  175. package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
  176. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  177. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
  178. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  179. package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
  180. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  181. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
  182. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  183. package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
  184. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  185. package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
  186. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  187. package/dist/attributes/shape/effects/implementations/outline.js +18 -17
  188. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  189. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
  190. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  191. package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
  192. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  193. package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
  194. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  195. package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
  196. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  197. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
  198. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  199. package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
  200. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  201. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
  202. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  203. package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
  204. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  205. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
  206. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  207. package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
  208. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  209. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
  210. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  211. package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
  212. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  213. package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
  214. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  215. package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
  216. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  217. package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
  218. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  219. package/dist/attributes/shape/effects/implementations/shader.js +42 -26
  220. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  221. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
  222. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  223. package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
  224. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  225. package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
  226. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  227. package/dist/attributes/shape/effects/implementations/streak.js +19 -16
  228. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  229. package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
  230. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  231. package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
  232. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  233. package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
  234. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  235. package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
  236. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  237. package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
  238. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  239. package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
  240. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  241. package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
  242. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  243. package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
  244. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  245. package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
  246. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  247. package/dist/attributes/shape/effects/implementations/wave.js +26 -23
  248. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  249. package/dist/attributes/shape/effects/index.d.ts +4 -2
  250. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  251. package/dist/attributes/shape/effects/index.js +1 -1
  252. package/dist/attributes/shape/effects/index.js.map +1 -1
  253. package/dist/attributes/shape/effects/registry.d.ts +11 -0
  254. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  255. package/dist/attributes/shape/effects/registry.js +113 -102
  256. package/dist/attributes/shape/effects/registry.js.map +1 -1
  257. package/dist/attributes/shape/effects/spec.d.ts +229 -0
  258. package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
  259. package/dist/attributes/shape/effects/spec.js +178 -0
  260. package/dist/attributes/shape/effects/spec.js.map +1 -0
  261. package/dist/attributes/shape/fill/chain.d.ts +7 -9
  262. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  263. package/dist/attributes/shape/fill/chain.js +9 -11
  264. package/dist/attributes/shape/fill/chain.js.map +1 -1
  265. package/dist/attributes/shape/fill/implementations/shader.d.ts +27 -26
  266. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  267. package/dist/attributes/shape/fill/implementations/shader.js +20 -14
  268. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  269. package/dist/attributes/shape/fill/index.d.ts +1 -1
  270. package/dist/attributes/shape/fill/index.d.ts.map +1 -1
  271. package/dist/attributes/shape/fill/index.js.map +1 -1
  272. package/dist/attributes/shape/fill/registry.d.ts +1 -2
  273. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  274. package/dist/attributes/shape/fill/registry.js +1 -2
  275. package/dist/attributes/shape/fill/registry.js.map +1 -1
  276. package/dist/attributes/shape/filters/chain.d.ts +2 -6
  277. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  278. package/dist/attributes/shape/filters/chain.js +1 -5
  279. package/dist/attributes/shape/filters/chain.js.map +1 -1
  280. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
  281. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  282. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  283. package/dist/attributes/shape/filters/registry.d.ts +1 -1
  284. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  285. package/dist/attributes/shape/filters/registry.js +3 -3
  286. package/dist/attributes/shape/filters/registry.js.map +1 -1
  287. package/dist/attributes/shape/filters/union.d.ts +2 -3
  288. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  289. package/dist/attributes/shape/filters/union.js.map +1 -1
  290. package/dist/attributes/shape/shaders/index.d.ts +2 -0
  291. package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
  292. package/dist/attributes/shape/shaders/index.js +2 -0
  293. package/dist/attributes/shape/shaders/index.js.map +1 -1
  294. package/dist/attributes/shape/shaders/language.d.ts +26 -0
  295. package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
  296. package/dist/attributes/shape/shaders/language.js +20 -0
  297. package/dist/attributes/shape/shaders/language.js.map +1 -0
  298. package/dist/attributes/shape/shaders/pack.d.ts +25 -11
  299. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  300. package/dist/attributes/shape/shaders/pack.js +9 -4
  301. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  302. package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
  303. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  304. package/dist/attributes/shape/shaders/resolve.js +3 -6
  305. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  306. package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
  307. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
  308. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  309. package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
  310. package/dist/browser/chunks/chunk-AOT33LMS.js +13 -0
  311. package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
  312. package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
  313. package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
  314. package/dist/browser/experimental.js +1 -1
  315. package/dist/browser/experimental.js.map +4 -4
  316. package/dist/browser/index.js +1 -1
  317. package/dist/browser/index.js.map +2 -2
  318. package/dist/browser/manifest.json +1 -1
  319. package/dist/browser/sdk.js +1 -1
  320. package/dist/components/builtins/audio/audio.d.ts +14 -5
  321. package/dist/components/builtins/audio/audio.d.ts.map +1 -1
  322. package/dist/components/builtins/audio/audio.js +10 -13
  323. package/dist/components/builtins/audio/audio.js.map +1 -1
  324. package/dist/components/builtins/geometry/composite.d.ts +3 -3
  325. package/dist/components/builtins/media/media.d.ts +7 -7
  326. package/dist/components/builtins/media/media.d.ts.map +1 -1
  327. package/dist/components/builtins/media/media.js +4 -10
  328. package/dist/components/builtins/media/media.js.map +1 -1
  329. package/dist/components/builtins/text/text.d.ts +12 -12
  330. package/dist/components/builtins/text/text.d.ts.map +1 -1
  331. package/dist/components/builtins/text/text.js +3 -0
  332. package/dist/components/builtins/text/text.js.map +1 -1
  333. package/dist/components/factory/api.d.ts +38 -11
  334. package/dist/components/factory/api.d.ts.map +1 -1
  335. package/dist/components/factory/api.js.map +1 -1
  336. package/dist/components/factory/component3d.d.ts.map +1 -1
  337. package/dist/components/factory/component3d.js +11 -3
  338. package/dist/components/factory/component3d.js.map +1 -1
  339. package/dist/components/factory/factory.d.ts +3 -0
  340. package/dist/components/factory/factory.d.ts.map +1 -1
  341. package/dist/components/factory/factory.js +39 -5
  342. package/dist/components/factory/factory.js.map +1 -1
  343. package/dist/components/modules/text-style.d.ts +1 -1
  344. package/dist/components/trees/2d/node-render.d.ts +1 -1
  345. package/dist/components/trees/2d/node-render.js +1 -1
  346. package/dist/components/trees/2d/node-render.js.map +1 -1
  347. package/dist/components/trees/2d/node2d.d.ts +1 -1
  348. package/dist/components/trees/2d/node2d.js +1 -1
  349. package/dist/components/trees/2d/node2d.js.map +1 -1
  350. package/dist/components/trees/audio/node-audio.d.ts +16 -9
  351. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  352. package/dist/components/trees/audio/node-audio.js +15 -11
  353. package/dist/components/trees/audio/node-audio.js.map +1 -1
  354. package/dist/document/command-traits.d.ts +12 -2
  355. package/dist/document/command-traits.d.ts.map +1 -1
  356. package/dist/document/command-traits.js +34 -6
  357. package/dist/document/command-traits.js.map +1 -1
  358. package/dist/document/index.d.ts +8 -0
  359. package/dist/document/index.d.ts.map +1 -1
  360. package/dist/document/index.js +4 -0
  361. package/dist/document/index.js.map +1 -1
  362. package/dist/document/migrate.d.ts +70 -0
  363. package/dist/document/migrate.d.ts.map +1 -0
  364. package/dist/document/migrate.js +202 -0
  365. package/dist/document/migrate.js.map +1 -0
  366. package/dist/document/missing-node.d.ts +27 -0
  367. package/dist/document/missing-node.d.ts.map +1 -0
  368. package/dist/document/missing-node.js +48 -0
  369. package/dist/document/missing-node.js.map +1 -0
  370. package/dist/document/node-descriptor.d.ts +4 -0
  371. package/dist/document/node-descriptor.d.ts.map +1 -1
  372. package/dist/document/node-descriptor.js.map +1 -1
  373. package/dist/document/placement.d.ts +2 -1
  374. package/dist/document/placement.d.ts.map +1 -1
  375. package/dist/document/placement.js.map +1 -1
  376. package/dist/document/project.d.ts +2 -0
  377. package/dist/document/project.d.ts.map +1 -1
  378. package/dist/document/project.js +1 -0
  379. package/dist/document/project.js.map +1 -1
  380. package/dist/document/prop-evolution.d.ts +51 -0
  381. package/dist/document/prop-evolution.d.ts.map +1 -0
  382. package/dist/document/prop-evolution.js +83 -0
  383. package/dist/document/prop-evolution.js.map +1 -0
  384. package/dist/document/registry.d.ts +16 -0
  385. package/dist/document/registry.d.ts.map +1 -1
  386. package/dist/document/registry.js +30 -4
  387. package/dist/document/registry.js.map +1 -1
  388. package/dist/document/settled-index.d.ts +2 -0
  389. package/dist/document/settled-index.d.ts.map +1 -1
  390. package/dist/document/settled-index.js +5 -5
  391. package/dist/document/settled-index.js.map +1 -1
  392. package/dist/document/timeline-patch.d.ts +4 -0
  393. package/dist/document/timeline-patch.d.ts.map +1 -1
  394. package/dist/document/timeline-patch.js +28 -3
  395. package/dist/document/timeline-patch.js.map +1 -1
  396. package/dist/document/timeline.d.ts +45 -1
  397. package/dist/document/timeline.d.ts.map +1 -1
  398. package/dist/document/timeline.js +172 -42
  399. package/dist/document/timeline.js.map +1 -1
  400. package/dist/document/types.d.ts +14 -28
  401. package/dist/document/types.d.ts.map +1 -1
  402. package/dist/document/types.js.map +1 -1
  403. package/dist/document/validate.d.ts +17 -5
  404. package/dist/document/validate.d.ts.map +1 -1
  405. package/dist/document/validate.js +158 -21
  406. package/dist/document/validate.js.map +1 -1
  407. package/dist/document/vocabulary.d.ts +28 -0
  408. package/dist/document/vocabulary.d.ts.map +1 -0
  409. package/dist/document/vocabulary.js +42 -0
  410. package/dist/document/vocabulary.js.map +1 -0
  411. package/dist/experimental.d.ts +68 -8
  412. package/dist/experimental.d.ts.map +1 -1
  413. package/dist/experimental.js +22 -8
  414. package/dist/experimental.js.map +1 -1
  415. package/dist/platform/exporter.d.ts +13 -0
  416. package/dist/platform/exporter.d.ts.map +1 -1
  417. package/dist/platform/exporter.js.map +1 -1
  418. package/dist/renamed-scene-names.d.ts +1 -1
  419. package/dist/renamed-scene-names.d.ts.map +1 -1
  420. package/dist/renamed-scene-names.js +1 -1
  421. package/dist/renamed-scene-names.js.map +1 -1
  422. package/dist/render/canvas-render-context2d.d.ts +9 -0
  423. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  424. package/dist/render/canvas-render-context2d.js +10 -0
  425. package/dist/render/canvas-render-context2d.js.map +1 -1
  426. package/dist/render/clip-contains.js +1 -1
  427. package/dist/render/clip-contains.js.map +1 -1
  428. package/dist/render/descriptors/text.d.ts +2 -2
  429. package/dist/render/descriptors/text.js +2 -2
  430. package/dist/render/descriptors/text.js.map +1 -1
  431. package/dist/render/index.d.ts +2 -0
  432. package/dist/render/index.d.ts.map +1 -1
  433. package/dist/render/index.js +1 -0
  434. package/dist/render/index.js.map +1 -1
  435. package/dist/render/render-context2d.d.ts +1 -1
  436. package/dist/render/render-context2d.js.map +1 -1
  437. package/dist/render/render-issue.d.ts +39 -0
  438. package/dist/render/render-issue.d.ts.map +1 -0
  439. package/dist/render/render-issue.js +29 -0
  440. package/dist/render/render-issue.js.map +1 -0
  441. package/dist/render/surface.d.ts +2 -2
  442. package/dist/render/surface.js.map +1 -1
  443. package/dist/render3d/graphics3d.d.ts.map +1 -1
  444. package/dist/render3d/graphics3d.js +54 -5
  445. package/dist/render3d/graphics3d.js.map +1 -1
  446. package/dist/runtime/asset-refine.js +2 -1
  447. package/dist/runtime/asset-refine.js.map +1 -1
  448. package/dist/runtime/asset-timeline.d.ts +10 -0
  449. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  450. package/dist/runtime/asset-timeline.js.map +1 -1
  451. package/dist/runtime/asset-update.d.ts.map +1 -1
  452. package/dist/runtime/asset-update.js +7 -0
  453. package/dist/runtime/asset-update.js.map +1 -1
  454. package/dist/runtime/clip-instance.d.ts +3 -1
  455. package/dist/runtime/clip-instance.d.ts.map +1 -1
  456. package/dist/runtime/clip-instance.js +4 -0
  457. package/dist/runtime/clip-instance.js.map +1 -1
  458. package/dist/runtime/clip-store.d.ts.map +1 -1
  459. package/dist/runtime/clip-store.js +17 -2
  460. package/dist/runtime/clip-store.js.map +1 -1
  461. package/dist/runtime/engine.d.ts +5 -3
  462. package/dist/runtime/engine.d.ts.map +1 -1
  463. package/dist/runtime/engine.js +2 -1
  464. package/dist/runtime/engine.js.map +1 -1
  465. package/dist/runtime/playback-controller.d.ts.map +1 -1
  466. package/dist/runtime/playback-controller.js +14 -4
  467. package/dist/runtime/playback-controller.js.map +1 -1
  468. package/dist/runtime/session.d.ts +7 -3
  469. package/dist/runtime/session.d.ts.map +1 -1
  470. package/dist/runtime/session.js +11 -4
  471. package/dist/runtime/session.js.map +1 -1
  472. package/dist/runtime/text-geometry.d.ts +1 -1
  473. package/dist/runtime/text-geometry.js.map +1 -1
  474. package/dist/sdk/index.d.ts +8 -6
  475. package/dist/sdk/index.d.ts.map +1 -1
  476. package/dist/sdk/index.js +10 -3
  477. package/dist/sdk/index.js.map +1 -1
  478. package/dist/tween/command-decorator.d.ts +7 -0
  479. package/dist/tween/command-decorator.d.ts.map +1 -1
  480. package/dist/tween/command-decorator.js +1 -0
  481. package/dist/tween/command-decorator.js.map +1 -1
  482. package/dist/tween/ease/describe.d.ts +2 -0
  483. package/dist/tween/ease/describe.d.ts.map +1 -1
  484. package/dist/tween/ease/describe.js +4 -0
  485. package/dist/tween/ease/describe.js.map +1 -1
  486. package/dist/tween/ease/spec.d.ts +31 -0
  487. package/dist/tween/ease/spec.d.ts.map +1 -0
  488. package/dist/tween/ease/spec.js +51 -0
  489. package/dist/tween/ease/spec.js.map +1 -0
  490. package/dist/tween/index.d.ts +1 -0
  491. package/dist/tween/index.d.ts.map +1 -1
  492. package/dist/tween/index.js +1 -0
  493. package/dist/tween/index.js.map +1 -1
  494. package/package.json +2 -2
  495. package/dist/browser/chunks/chunk-D4FSTPML.js +0 -14
  496. package/dist/browser/chunks/chunk-D4FSTPML.js.map +0 -7
  497. package/dist/browser/chunks/chunk-RTNATFWX.js +0 -5
  498. package/dist/browser/chunks/chunk-RTNATFWX.js.map +0 -7
@@ -1,4 +1,5 @@
1
1
  import type { ModedEffect, EffectData } from "../effect-data.js";
2
+ import { type EffectFields } from "../spec.js";
2
3
  /**
3
4
  * A 3D colour lookup table — the `.cube` a colourist hands you.
4
5
  *
@@ -33,14 +34,40 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
33
34
  * honest answer — there is no meaningful midpoint between two measured cubes —
34
35
  * and the way to dissolve between looks is two fills, or {@link amount}.
35
36
  */
36
- export interface LutEffect extends ModedEffect {
37
+ export interface LutEffect extends ModedEffect, EffectFields<typeof lutSpec.params> {
37
38
  type: "lut";
38
- /** The cube, flat RGB triples, red-fastest. Immutable and shared; see above. */
39
- table: Float32Array;
40
- /** Entries per axis. `table.length` must be `size³ × 3`. */
41
- size: number;
42
- /** 0–1 mix against the ungraded colour. 0 is a no-op, 1 is the full look. */
43
- amount: number;
44
39
  }
40
+ /** The {@link LutEffect} spec: its parameters, defaults and ranges. */
41
+ export declare const lutSpec: import("../spec.js").EffectSpec<"lut", {
42
+ /** The cube: flat RGB triples, red-fastest. Compared by reference, cut by `lerp`. */
43
+ readonly table: import("../spec.js").EffectParamDef<Float32Array<ArrayBufferLike>, Float32Array<ArrayBufferLike>> & NoInfer<{
44
+ readonly kind: "table";
45
+ readonly required: true;
46
+ readonly hidden: true;
47
+ }>;
48
+ /**
49
+ * Entries per axis. Cuts with the table: a table read at the wrong stride
50
+ * is not a wrong colour, it is garbage.
51
+ */
52
+ readonly size: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
53
+ readonly required: true;
54
+ readonly min: 2;
55
+ readonly step: 1;
56
+ readonly lerp: "step";
57
+ readonly hidden: true;
58
+ }> & {
59
+ kind: "number";
60
+ };
61
+ /** 0–1 mix against the ungraded colour. */
62
+ readonly amount: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
63
+ readonly default: 1;
64
+ readonly min: 0;
65
+ readonly max: 1;
66
+ readonly control: "slider";
67
+ readonly inline: true;
68
+ }> & {
69
+ kind: "number";
70
+ };
71
+ }>;
45
72
  export declare const lutEffect: EffectData<LutEffect>;
46
73
  //# sourceMappingURL=lut.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lut.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,gFAAgF;IAChF,KAAK,EAAE,YAAY,CAAC;IACpB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,SAAS,CAmB3C,CAAC"}
1
+ {"version":3,"file":"lut.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC;IAC/E,IAAI,EAAE,KAAK,CAAC;CACf;AAED,uEAAuE;AACvE,eAAO,MAAM,OAAO;IAUZ,qFAAqF;;;;;;IAErF;;;OAGG;;;;;;;;;;IAEH,2CAA2C;;;;;;;;;;EAGjD,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,SAAS,CAAyB,CAAC"}
@@ -1,21 +1,25 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const lutEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "lut",
5
- // The cube and its size travel together — a table read at the wrong
6
- // stride is not a wrong colour, it is garbage — so they cut together.
7
- table: t < 0.5 ? from.table : to.table,
8
- size: t < 0.5 ? from.size : to.size,
9
- amount: lerpNumber(from.amount, to.amount, t),
10
- mode: t < 0.5 ? from.mode : to.mode,
11
- }),
12
- equals: (a, b) => a.table === b.table &&
13
- a.size === b.size &&
14
- a.amount === b.amount &&
15
- a.mode === b.mode,
1
+ import { defineEffect, effectDataOf, param } from "../spec.js";
2
+ /** The {@link LutEffect} spec: its parameters, defaults and ranges. */
3
+ export const lutSpec = defineEffect({
4
+ type: "lut",
5
+ group: "color",
16
6
  // It samples a second texture at a coordinate derived from the source's own
17
7
  // colour, so it needs the source as a shader it can read — not a colour
18
8
  // matrix it can compose.
19
9
  surface: "shader",
20
- };
10
+ // A LUT's neutral is its mix, not its table.
11
+ neutral: { amount: 0 },
12
+ params: {
13
+ /** The cube: flat RGB triples, red-fastest. Compared by reference, cut by `lerp`. */
14
+ table: param.of()({ kind: "table", required: true, hidden: true }),
15
+ /**
16
+ * Entries per axis. Cuts with the table: a table read at the wrong stride
17
+ * is not a wrong colour, it is garbage.
18
+ */
19
+ size: param.number({ required: true, min: 2, step: 1, lerp: "step", hidden: true }),
20
+ /** 0–1 mix against the ungraded colour. */
21
+ amount: param.number({ default: 1, min: 0, max: 1, control: "slider", inline: true }),
22
+ },
23
+ });
24
+ export const lutEffect = effectDataOf(lutSpec);
21
25
  //# sourceMappingURL=lut.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lut.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+C1C,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,KAAK;QACX,oEAAoE;QACpE,sEAAsE;QACtE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;QACnC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,4EAA4E;IAC5E,wEAAwE;IACxE,yBAAyB;IACzB,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * A 3D colour lookup table — the `.cube` a colourist hands you.\r\n *\r\n * The one adjustment in the roster that is not a formula. Everything else here\r\n * says what to *do* to a colour; a LUT is a measured cube of what each colour\r\n * should *become*, which is how film-stock and print emulations are shipped and\r\n * why no combination of curves and matrices substitutes for one. Applying it is\r\n * a trilinear lookup per pixel.\r\n *\r\n * A node effect rather than a media-only adjustment, deliberately: everything\r\n * outside {@link NonFilterEffect} is automatically an `EffectAdjustment` too, so\r\n * one implementation grades an image fill's own pixels *and* a whole node —\r\n * which is what lets a graded photo and the graded titles over it be the same\r\n * look rather than two things kept in step by hand.\r\n *\r\n * ## The table\r\n *\r\n * Flat RGB triples, **red-fastest** — index `((b · size) + g) · size + r`, times\r\n * three — which is the order a `.cube` file writes its lines in, so a parser\r\n * fills this with no transposition to get wrong.\r\n *\r\n * It is a `Float32Array` and it is treated as **immutable and shared**: `equals`\r\n * compares it by reference and `lerp` hard-cuts it, exactly as `texture` does\r\n * with its `src`. That is not laziness. A 33³ cube is 107,811 floats; comparing\r\n * it per frame would cost more than the draw, interpolating it would allocate a\r\n * second cube per frame, and the renderer's GPU upload is cached against this\r\n * very identity. Hand the same array back each frame and a LUT costs one texture\r\n * upload for the life of the scene; build a fresh one per frame and it costs one\r\n * per frame.\r\n *\r\n * Cross-fading two *different* LUTs is therefore a cut, not a blend. That is the\r\n * honest answer — there is no meaningful midpoint between two measured cubes —\r\n * and the way to dissolve between looks is two fills, or {@link amount}.\r\n */\r\nexport interface LutEffect extends ModedEffect {\r\n type: \"lut\";\r\n /** The cube, flat RGB triples, red-fastest. Immutable and shared; see above. */\r\n table: Float32Array;\r\n /** Entries per axis. `table.length` must be `size³ × 3`. */\r\n size: number;\r\n /** 0–1 mix against the ungraded colour. 0 is a no-op, 1 is the full look. */\r\n amount: number;\r\n}\r\n\r\nexport const lutEffect: EffectData<LutEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"lut\",\r\n // The cube and its size travel together — a table read at the wrong\r\n // stride is not a wrong colour, it is garbage — so they cut together.\r\n table: t < 0.5 ? from.table : to.table,\r\n size: t < 0.5 ? from.size : to.size,\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.table === b.table &&\r\n a.size === b.size &&\r\n a.amount === b.amount &&\r\n a.mode === b.mode,\r\n // It samples a second texture at a coordinate derived from the source's own\r\n // colour, so it needs the source as a shader it can read — not a colour\r\n // matrix it can compose.\r\n surface: \"shader\",\r\n};\r\n"]}
1
+ {"version":3,"file":"lut.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/lut.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAwC/E,uEAAuE;AACvE,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAChC,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,OAAO;IACd,4EAA4E;IAC5E,wEAAwE;IACxE,yBAAyB;IACzB,OAAO,EAAE,QAAQ;IACjB,6CAA6C;IAC7C,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,qFAAqF;QACrF,KAAK,EAAE,KAAK,CAAC,EAAE,EAAgB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAChF;;;WAGG;QACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACnF,2CAA2C;QAC3C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KACxF;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAA0B,YAAY,CAAC,OAAO,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/**\r\n * A 3D colour lookup table — the `.cube` a colourist hands you.\r\n *\r\n * The one adjustment in the roster that is not a formula. Everything else here\r\n * says what to *do* to a colour; a LUT is a measured cube of what each colour\r\n * should *become*, which is how film-stock and print emulations are shipped and\r\n * why no combination of curves and matrices substitutes for one. Applying it is\r\n * a trilinear lookup per pixel.\r\n *\r\n * A node effect rather than a media-only adjustment, deliberately: everything\r\n * outside {@link NonFilterEffect} is automatically an `EffectAdjustment` too, so\r\n * one implementation grades an image fill's own pixels *and* a whole node —\r\n * which is what lets a graded photo and the graded titles over it be the same\r\n * look rather than two things kept in step by hand.\r\n *\r\n * ## The table\r\n *\r\n * Flat RGB triples, **red-fastest** — index `((b · size) + g) · size + r`, times\r\n * three — which is the order a `.cube` file writes its lines in, so a parser\r\n * fills this with no transposition to get wrong.\r\n *\r\n * It is a `Float32Array` and it is treated as **immutable and shared**: `equals`\r\n * compares it by reference and `lerp` hard-cuts it, exactly as `texture` does\r\n * with its `src`. That is not laziness. A 33³ cube is 107,811 floats; comparing\r\n * it per frame would cost more than the draw, interpolating it would allocate a\r\n * second cube per frame, and the renderer's GPU upload is cached against this\r\n * very identity. Hand the same array back each frame and a LUT costs one texture\r\n * upload for the life of the scene; build a fresh one per frame and it costs one\r\n * per frame.\r\n *\r\n * Cross-fading two *different* LUTs is therefore a cut, not a blend. That is the\r\n * honest answer — there is no meaningful midpoint between two measured cubes —\r\n * and the way to dissolve between looks is two fills, or {@link amount}.\r\n */\r\nexport interface LutEffect extends ModedEffect, EffectFields<typeof lutSpec.params> {\r\n type: \"lut\";\r\n}\r\n\r\n/** The {@link LutEffect} spec: its parameters, defaults and ranges. */\r\nexport const lutSpec = defineEffect({\r\n type: \"lut\",\r\n group: \"color\",\r\n // It samples a second texture at a coordinate derived from the source's own\r\n // colour, so it needs the source as a shader it can read — not a colour\r\n // matrix it can compose.\r\n surface: \"shader\",\r\n // A LUT's neutral is its mix, not its table.\r\n neutral: { amount: 0 },\r\n params: {\r\n /** The cube: flat RGB triples, red-fastest. Compared by reference, cut by `lerp`. */\r\n table: param.of<Float32Array>()({ kind: \"table\", required: true, hidden: true }),\r\n /**\r\n * Entries per axis. Cuts with the table: a table read at the wrong stride\r\n * is not a wrong colour, it is garbage.\r\n */\r\n size: param.number({ required: true, min: 2, step: 1, lerp: \"step\", hidden: true }),\r\n /** 0–1 mix against the ungraded colour. */\r\n amount: param.number({ default: 1, min: 0, max: 1, control: \"slider\", inline: true }),\r\n },\r\n});\r\n\r\nexport const lutEffect: EffectData<LutEffect> = effectDataOf(lutSpec);\r\n"]}
@@ -1,14 +1,32 @@
1
- import { Vector2 } from "../../../../attributes/layout/vector2.js";
2
1
  import type { ModedEffect, EffectData } from "../effect-data.js";
3
- export interface MagnifyEffect extends ModedEffect {
2
+ import { type EffectFields } from "../spec.js";
3
+ export interface MagnifyEffect extends ModedEffect, EffectFields<typeof magnifySpec.params> {
4
4
  type: "magnify";
5
- /** Magnify centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */
6
- center: Vector2;
7
- /**
8
- * Magnification factor for the backdrop beneath the node.
9
- * 1 = no magnification, 2 = 2× magnified, 0.5 = zoomed out to half size.
10
- */
11
- scale: number;
12
5
  }
6
+ /** The {@link MagnifyEffect} spec: its parameters, defaults and ranges. */
7
+ export declare const magnifySpec: import("../spec.js").EffectSpec<"magnify", {
8
+ /** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out. */
9
+ readonly scale: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
10
+ readonly default: 2;
11
+ readonly min: 0;
12
+ readonly step: 0.1;
13
+ readonly unit: "factor";
14
+ readonly label: "magnification";
15
+ readonly inline: true;
16
+ }> & {
17
+ kind: "number";
18
+ };
19
+ /** Magnify centre in 0–1 layer coords. */
20
+ readonly center: import("../spec.js").EffectParamDef<import("../../../index.js").Vector2, import("../../../index.js").Vector2> & NoInfer<{
21
+ readonly default: import("../../../index.js").Vector2;
22
+ readonly min: 0;
23
+ readonly max: 1;
24
+ readonly step: 0.01;
25
+ readonly unit: "normalized";
26
+ readonly label: "lensCenter";
27
+ }> & {
28
+ kind: "vec2";
29
+ };
30
+ }>;
13
31
  export declare const magnifyEffect: EffectData<MagnifyEffect>;
14
32
  //# sourceMappingURL=magnify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"magnify.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,aAAc,SAAQ,WAAW;IAC9C,IAAI,EAAE,SAAS,CAAC;IAChB,wFAAwF;IACxF,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAcnD,CAAC"}
1
+ {"version":3,"file":"magnify.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvF,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,2EAA2E;AAC3E,eAAO,MAAM,WAAW;IAUhB,iEAAiE;;;;;;;;;;;IAEjE,0CAA0C;;;;;;;;;;;EAGhD,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAA6B,CAAC"}
@@ -1,17 +1,20 @@
1
- import { lerpVector2 } from "../../../../attributes/layout/vector2.js";
2
- import { lerpNumber } from "../../../../tween/lerp.js";
3
- export const magnifyEffect = {
4
- lerp: (from, to, t) => ({
5
- type: "magnify",
6
- center: lerpVector2(from.center, to.center, t),
7
- scale: lerpNumber(from.scale, to.scale, t),
8
- mode: t < 0.5 ? from.mode : to.mode,
9
- }),
10
- equals: (a, b) => a.center.x === b.center.x &&
11
- a.center.y === b.center.y &&
12
- a.scale === b.scale &&
13
- a.mode === b.mode,
1
+ import { CENTER, defineEffect, effectDataOf, param } from "../spec.js";
2
+ /** The {@link MagnifyEffect} spec: its parameters, defaults and ranges. */
3
+ export const magnifySpec = defineEffect({
4
+ type: "magnify",
5
+ group: "distort",
14
6
  // Resamples the backdrop about `center`.
15
7
  surface: "shader",
16
- };
8
+ scalar: "scale",
9
+ defaultMode: "backdrop",
10
+ onlyOn: "backdrop",
11
+ neutral: { scale: 1 },
12
+ params: {
13
+ /** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out. */
14
+ scale: param.number({ default: 2, min: 0, step: 0.1, unit: "factor", label: "magnification", inline: true }),
15
+ /** Magnify centre in 0–1 layer coords. */
16
+ center: param.vec2({ default: CENTER, min: 0, max: 1, step: 0.01, unit: "normalized", label: "lensCenter" }),
17
+ },
18
+ });
19
+ export const magnifyEffect = effectDataOf(magnifySpec);
17
20
  //# sourceMappingURL=magnify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"magnify.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,yCAAyC;IACzC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpVector2, Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface MagnifyEffect extends ModedEffect {\r\n type: \"magnify\";\r\n /** Magnify centre in 0–1 normalised layer coordinates ({ x: 0.5, y: 0.5 } = middle). */\r\n center: Vector2;\r\n /**\r\n * Magnification factor for the backdrop beneath the node.\r\n * 1 = no magnification, 2 = 2× magnified, 0.5 = zoomed out to half size.\r\n */\r\n scale: number;\r\n}\r\n\r\nexport const magnifyEffect: EffectData<MagnifyEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"magnify\",\r\n center: lerpVector2(from.center, to.center, t),\r\n scale: lerpNumber(from.scale, to.scale, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.center.x === b.center.x &&\r\n a.center.y === b.center.y &&\r\n a.scale === b.scale &&\r\n a.mode === b.mode,\r\n // Resamples the backdrop about `center`.\r\n surface: \"shader\",\r\n};\r\n"]}
1
+ {"version":3,"file":"magnify.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/magnify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAMvF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,yCAAyC;IACzC,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACrB,MAAM,EAAE;QACJ,iEAAiE;QACjE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC5G,0CAA0C;QAC1C,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;KAC/G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAA8B,YAAY,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { CENTER, defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\nexport interface MagnifyEffect extends ModedEffect, EffectFields<typeof magnifySpec.params> {\r\n type: \"magnify\";\r\n}\r\n\r\n/** The {@link MagnifyEffect} spec: its parameters, defaults and ranges. */\r\nexport const magnifySpec = defineEffect({\r\n type: \"magnify\",\r\n group: \"distort\",\r\n // Resamples the backdrop about `center`.\r\n surface: \"shader\",\r\n scalar: \"scale\",\r\n defaultMode: \"backdrop\",\r\n onlyOn: \"backdrop\",\r\n neutral: { scale: 1 },\r\n params: {\r\n /** Magnification factor — 1 = none, 2 = 2×, 0.5 = zoomed out. */\r\n scale: param.number({ default: 2, min: 0, step: 0.1, unit: \"factor\", label: \"magnification\", inline: true }),\r\n /** Magnify centre in 0–1 layer coords. */\r\n center: param.vec2({ default: CENTER, min: 0, max: 1, step: 0.01, unit: \"normalized\", label: \"lensCenter\" }),\r\n },\r\n});\r\n\r\nexport const magnifyEffect: EffectData<MagnifyEffect> = effectDataOf(magnifySpec);\r\n"]}
@@ -1,4 +1,5 @@
1
- import type { ModedEffect, EffectData, EffectAxis } from "../effect-data.js";
1
+ import type { ModedEffect, EffectData } from "../effect-data.js";
2
+ import { type EffectFields } from "../spec.js";
2
3
  /** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */
3
4
  export type MotionBlurAlignment = "behind" | "centered" | "ahead" | number;
4
5
  /**
@@ -7,32 +8,66 @@ export type MotionBlurAlignment = "behind" | "centered" | "ahead" | number;
7
8
  * per-frame motion (sampled by the renderer), modelled on After Effects' shutter
8
9
  * angle (`length`) and shutter phase (`alignment`). A static node renders sharp.
9
10
  */
10
- export interface MotionBlurEffect extends ModedEffect {
11
+ export interface MotionBlurEffect extends ModedEffect, EffectFields<typeof motionBlurSpec.params> {
11
12
  type: "motionBlur";
13
+ }
14
+ /** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */
15
+ export declare function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number;
16
+ /** The {@link MotionBlurEffect} spec: its parameters, defaults and ranges. */
17
+ export declare const motionBlurSpec: import("../spec.js").EffectSpec<"motionBlur", {
12
18
  /**
13
19
  * Shutter "openness" as a percentage, the user-friendly form of a shutter
14
20
  * angle. `100` ≈ 360° = a smear spanning the node's full per-frame
15
21
  * displacement; `0` = no blur.
16
22
  */
17
- length: number;
23
+ readonly length: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
24
+ readonly default: 50;
25
+ readonly min: 0;
26
+ readonly unit: "percent";
27
+ readonly label: "shutter";
28
+ readonly inline: true;
29
+ }> & {
30
+ kind: "number";
31
+ };
18
32
  /**
19
33
  * Shutter phase — where the smear sits relative to the node's current
20
- * position along its motion. `'behind'` (−1) trails the motion, `'centered'`
21
- * (0) straddles it, `'ahead'` (1) leads it; a number is clamped to −1…1.
22
- */
23
- alignment: MotionBlurAlignment;
24
- /**
25
- * Quality hint for the renderer. Low values use a cheap continuous smear;
26
- * above the renderer's threshold it switches to discrete multi-tap
27
- * accumulation (After Effects' "Samples Per Frame" look).
34
+ * position along its motion: `'behind'` (−1) trails it, `'centered'` (0)
35
+ * straddles it, `'ahead'` (1) leads it; a number in −1…1 sits between.
28
36
  */
29
- samples: number;
30
- /** Multiplier on the blur length. `1` = nominal, `0` = off. */
31
- strength: number;
32
- /** Per-axis velocity scale — see {@link EffectAxis}. */
33
- axis: EffectAxis;
34
- }
35
- /** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */
36
- export declare function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number;
37
+ readonly alignment: import("../spec.js").EffectParamDef<MotionBlurAlignment, MotionBlurAlignment> & NoInfer<{
38
+ readonly kind: "enum";
39
+ readonly default: "centered";
40
+ readonly options: readonly ["centered", "behind", "ahead"];
41
+ readonly optionsLabel: "motionBlurAlignment";
42
+ readonly lerp: (a: MotionBlurAlignment, b: MotionBlurAlignment, t: number) => number;
43
+ readonly equals: (a: MotionBlurAlignment, b: MotionBlurAlignment) => boolean;
44
+ }>;
45
+ /** Renderer quality hint; above 32 switches to multi-tap accumulation. */
46
+ readonly samples: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
47
+ readonly default: 16;
48
+ readonly min: 1;
49
+ readonly step: 1;
50
+ readonly hidden: true;
51
+ }> & {
52
+ kind: "number";
53
+ };
54
+ /** Blur-length multiplier. */
55
+ readonly strength: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
56
+ readonly default: 1;
57
+ readonly min: 0;
58
+ readonly max: 2;
59
+ readonly control: "slider";
60
+ }> & {
61
+ kind: "number";
62
+ };
63
+ /** Per-axis velocity scale. */
64
+ readonly axis: import("../spec.js").EffectParamDef<import("../index.js").EffectAxis, import("../index.js").EffectAxis> & NoInfer<{
65
+ readonly default: "both";
66
+ readonly optionsLabel: "effectAxis";
67
+ readonly lerp: (a: import("../index.js").EffectAxis, b: import("../index.js").EffectAxis, t: number) => import("../../../../attributes/layout/vector2.js").Vector2;
68
+ }> & {
69
+ kind: "axis";
70
+ };
71
+ }>;
37
72
  export declare const motionBlurEffect: EffectData<MotionBlurEffect>;
38
73
  //# sourceMappingURL=motion-blur.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"motion-blur.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG1E,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACjD,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,IAAI,EAAE,UAAU,CAAC;CACpB;AAED,oFAAoF;AACpF,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM,CAOjF;AAED,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAmBzD,CAAC"}
1
+ {"version":3,"file":"motion-blur.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC;IAC7F,IAAI,EAAE,YAAY,CAAC;CACtB;AAED,oFAAoF;AACpF,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM,CAOjF;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc;IAMnB;;;;OAIG;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;IAUH,0EAA0E;;;;;;;;;IAE1E,8BAA8B;;;;;;;;;IAE9B,+BAA+B;;;;;;;;EAOrC,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAAgC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { lerpNumber } from "../../../../tween/lerp.js";
2
2
  import { lerpVector2 } from "../../../../attributes/layout/vector2.js";
3
- import { resolveEffectAxis, sameEffectAxis } from "../effect-data.js";
3
+ import { resolveEffectAxis } from "../effect-data.js";
4
+ import { defineEffect, effectDataOf, param } from "../spec.js";
4
5
  /** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */
5
6
  export function resolveMotionBlurAlignment(alignment) {
6
7
  switch (alignment) {
@@ -10,23 +11,44 @@ export function resolveMotionBlurAlignment(alignment) {
10
11
  default: return Math.max(-1, Math.min(1, alignment));
11
12
  }
12
13
  }
13
- export const motionBlurEffect = {
14
- lerp: (from, to, t) => ({
15
- type: "motionBlur",
16
- length: lerpNumber(from.length, to.length, t),
17
- // alignment lerps numerically once resolved to a phase; string presets
18
- // resolve to their numeric phase so e.g. 'behind' → 'ahead' sweeps.
19
- alignment: lerpNumber(resolveMotionBlurAlignment(from.alignment), resolveMotionBlurAlignment(to.alignment), t),
20
- samples: lerpNumber(from.samples, to.samples, t),
21
- strength: lerpNumber(from.strength, to.strength, t),
22
- axis: lerpVector2(resolveEffectAxis(from.axis), resolveEffectAxis(to.axis), t),
23
- mode: t < 0.5 ? from.mode : to.mode,
24
- }),
25
- equals: (a, b) => a.length === b.length &&
26
- resolveMotionBlurAlignment(a.alignment) === resolveMotionBlurAlignment(b.alignment) &&
27
- a.samples === b.samples &&
28
- a.strength === b.strength &&
29
- sameEffectAxis(a.axis, b.axis) &&
30
- a.mode === b.mode,
31
- };
14
+ /** The {@link MotionBlurEffect} spec: its parameters, defaults and ranges. */
15
+ export const motionBlurSpec = defineEffect({
16
+ type: "motionBlur",
17
+ group: "blur",
18
+ scalar: "length",
19
+ neutral: { length: 0 },
20
+ params: {
21
+ /**
22
+ * Shutter "openness" as a percentage, the user-friendly form of a shutter
23
+ * angle. `100` ≈ 360° = a smear spanning the node's full per-frame
24
+ * displacement; `0` = no blur.
25
+ */
26
+ length: param.number({ default: 50, min: 0, unit: "percent", label: "shutter", inline: true }),
27
+ /**
28
+ * Shutter phase — where the smear sits relative to the node's current
29
+ * position along its motion: `'behind'` (−1) trails it, `'centered'` (0)
30
+ * straddles it, `'ahead'` (1) leads it; a number in −1…1 sits between.
31
+ */
32
+ alignment: param.of()({
33
+ kind: "enum",
34
+ default: "centered",
35
+ options: ["centered", "behind", "ahead"],
36
+ optionsLabel: "motionBlurAlignment",
37
+ // Resolved to a phase, so e.g. 'behind' → 'ahead' sweeps.
38
+ lerp: (a, b, t) => lerpNumber(resolveMotionBlurAlignment(a), resolveMotionBlurAlignment(b), t),
39
+ equals: (a, b) => resolveMotionBlurAlignment(a) === resolveMotionBlurAlignment(b),
40
+ }),
41
+ /** Renderer quality hint; above 32 switches to multi-tap accumulation. */
42
+ samples: param.number({ default: 16, min: 1, step: 1, hidden: true }),
43
+ /** Blur-length multiplier. */
44
+ strength: param.number({ default: 1, min: 0, max: 2, control: "slider" }),
45
+ /** Per-axis velocity scale. */
46
+ axis: param.axis({
47
+ default: "both",
48
+ optionsLabel: "effectAxis",
49
+ lerp: (a, b, t) => lerpVector2(resolveEffectAxis(a), resolveEffectAxis(b), t),
50
+ }),
51
+ },
52
+ });
53
+ export const motionBlurEffect = effectDataOf(motionBlurSpec);
32
54
  //# sourceMappingURL=motion-blur.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAqCnE,oFAAoF;AACpF,MAAM,UAAU,0BAA0B,CAAC,SAA8B;IACrE,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,KAAK,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC1D,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,uEAAuE;QACvE,oEAAoE;QACpE,SAAS,EAAE,UAAU,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC9G,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,IAAI,EAAE,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9E,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC;QACnF,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData, EffectAxis } from \"../effect-data\";\r\nimport { resolveEffectAxis, sameEffectAxis } from \"../effect-data\";\r\n\r\n/** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */\r\nexport type MotionBlurAlignment = \"behind\" | \"centered\" | \"ahead\" | number;\r\n\r\n/**\r\n * Velocity-driven motion blur. Unlike {@link DirectionalBlurEffect}, whose smear\r\n * is authored, this derives its direction and length from the node's actual\r\n * per-frame motion (sampled by the renderer), modelled on After Effects' shutter\r\n * angle (`length`) and shutter phase (`alignment`). A static node renders sharp.\r\n */\r\nexport interface MotionBlurEffect extends ModedEffect {\r\n type: \"motionBlur\";\r\n /**\r\n * Shutter \"openness\" as a percentage, the user-friendly form of a shutter\r\n * angle. `100` ≈ 360° = a smear spanning the node's full per-frame\r\n * displacement; `0` = no blur.\r\n */\r\n length: number;\r\n /**\r\n * Shutter phase — where the smear sits relative to the node's current\r\n * position along its motion. `'behind'` (−1) trails the motion, `'centered'`\r\n * (0) straddles it, `'ahead'` (1) leads it; a number is clamped to −1…1.\r\n */\r\n alignment: MotionBlurAlignment;\r\n /**\r\n * Quality hint for the renderer. Low values use a cheap continuous smear;\r\n * above the renderer's threshold it switches to discrete multi-tap\r\n * accumulation (After Effects' \"Samples Per Frame\" look).\r\n */\r\n samples: number;\r\n /** Multiplier on the blur length. `1` = nominal, `0` = off. */\r\n strength: number;\r\n /** Per-axis velocity scale — see {@link EffectAxis}. */\r\n axis: EffectAxis;\r\n}\r\n\r\n/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */\r\nexport function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number {\r\n switch (alignment) {\r\n case \"behind\": return -1;\r\n case \"centered\": return 0;\r\n case \"ahead\": return 1;\r\n default: return Math.max(-1, Math.min(1, alignment));\r\n }\r\n}\r\n\r\nexport const motionBlurEffect: EffectData<MotionBlurEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"motionBlur\",\r\n length: lerpNumber(from.length, to.length, t),\r\n // alignment lerps numerically once resolved to a phase; string presets\r\n // resolve to their numeric phase so e.g. 'behind' → 'ahead' sweeps.\r\n alignment: lerpNumber(resolveMotionBlurAlignment(from.alignment), resolveMotionBlurAlignment(to.alignment), t),\r\n samples: lerpNumber(from.samples, to.samples, t),\r\n strength: lerpNumber(from.strength, to.strength, t),\r\n axis: lerpVector2(resolveEffectAxis(from.axis), resolveEffectAxis(to.axis), t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.length === b.length &&\r\n resolveMotionBlurAlignment(a.alignment) === resolveMotionBlurAlignment(b.alignment) &&\r\n a.samples === b.samples &&\r\n a.strength === b.strength &&\r\n sameEffectAxis(a.axis, b.axis) &&\r\n a.mode === b.mode,\r\n};\r\n"]}
1
+ {"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/motion-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAe/E,oFAAoF;AACpF,MAAM,UAAU,0BAA0B,CAAC,SAA8B;IACrE,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,KAAK,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;AACL,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;IACvC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ;;;;WAIG;QACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC9F;;;;WAIG;QACH,SAAS,EAAE,KAAK,CAAC,EAAE,EAAuB,CAAC;YACvC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;YACxC,YAAY,EAAE,qBAAqB;YACnC,0DAA0D;YAC1D,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC9F,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC;SACpF,CAAC;QACF,0EAA0E;QAC1E,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACrE,8BAA8B;QAC9B,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QACzE,+BAA+B;QAC/B,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;YACb,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAChF,CAAC;KACL;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAiC,YAAY,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { resolveEffectAxis } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/** Shutter phase presets — see {@link MotionBlurEffect.alignment}. */\r\nexport type MotionBlurAlignment = \"behind\" | \"centered\" | \"ahead\" | number;\r\n\r\n/**\r\n * Velocity-driven motion blur. Unlike {@link DirectionalBlurEffect}, whose smear\r\n * is authored, this derives its direction and length from the node's actual\r\n * per-frame motion (sampled by the renderer), modelled on After Effects' shutter\r\n * angle (`length`) and shutter phase (`alignment`). A static node renders sharp.\r\n */\r\nexport interface MotionBlurEffect extends ModedEffect, EffectFields<typeof motionBlurSpec.params> {\r\n type: \"motionBlur\";\r\n}\r\n\r\n/** Resolve {@link MotionBlurEffect.alignment} to a shutter-phase number in −1…1. */\r\nexport function resolveMotionBlurAlignment(alignment: MotionBlurAlignment): number {\r\n switch (alignment) {\r\n case \"behind\": return -1;\r\n case \"centered\": return 0;\r\n case \"ahead\": return 1;\r\n default: return Math.max(-1, Math.min(1, alignment));\r\n }\r\n}\r\n\r\n/** The {@link MotionBlurEffect} spec: its parameters, defaults and ranges. */\r\nexport const motionBlurSpec = defineEffect({\r\n type: \"motionBlur\",\r\n group: \"blur\",\r\n scalar: \"length\",\r\n neutral: { length: 0 },\r\n params: {\r\n /**\r\n * Shutter \"openness\" as a percentage, the user-friendly form of a shutter\r\n * angle. `100` ≈ 360° = a smear spanning the node's full per-frame\r\n * displacement; `0` = no blur.\r\n */\r\n length: param.number({ default: 50, min: 0, unit: \"percent\", label: \"shutter\", inline: true }),\r\n /**\r\n * Shutter phase — where the smear sits relative to the node's current\r\n * position along its motion: `'behind'` (−1) trails it, `'centered'` (0)\r\n * straddles it, `'ahead'` (1) leads it; a number in −1…1 sits between.\r\n */\r\n alignment: param.of<MotionBlurAlignment>()({\r\n kind: \"enum\",\r\n default: \"centered\",\r\n options: [\"centered\", \"behind\", \"ahead\"],\r\n optionsLabel: \"motionBlurAlignment\",\r\n // Resolved to a phase, so e.g. 'behind' → 'ahead' sweeps.\r\n lerp: (a, b, t) => lerpNumber(resolveMotionBlurAlignment(a), resolveMotionBlurAlignment(b), t),\r\n equals: (a, b) => resolveMotionBlurAlignment(a) === resolveMotionBlurAlignment(b),\r\n }),\r\n /** Renderer quality hint; above 32 switches to multi-tap accumulation. */\r\n samples: param.number({ default: 16, min: 1, step: 1, hidden: true }),\r\n /** Blur-length multiplier. */\r\n strength: param.number({ default: 1, min: 0, max: 2, control: \"slider\" }),\r\n /** Per-axis velocity scale. */\r\n axis: param.axis({\r\n default: \"both\",\r\n optionsLabel: \"effectAxis\",\r\n lerp: (a, b, t) => lerpVector2(resolveEffectAxis(a), resolveEffectAxis(b), t),\r\n }),\r\n },\r\n});\r\n\r\nexport const motionBlurEffect: EffectData<MotionBlurEffect> = effectDataOf(motionBlurSpec);\r\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { ModedEffect, EffectData } from "../effect-data.js";
2
+ import { type EffectFields } from "../spec.js";
2
3
  /**
3
4
  * Kuwahara filter — the painterly one.
4
5
  *
@@ -10,10 +11,23 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
10
11
  * Cost grows with the square of `radius` — four windows of `(radius+1)²` samples
11
12
  * each — so this is the most expensive effect in the set by a wide margin.
12
13
  */
13
- export interface OilPaintEffect extends ModedEffect {
14
+ export interface OilPaintEffect extends ModedEffect, EffectFields<typeof oilPaintSpec.params> {
14
15
  type: "oilPaint";
15
- /** Window radius in px. Brush size, and the dominant cost. 0 = off. */
16
- radius: number;
17
16
  }
17
+ /** The {@link OilPaintEffect} spec: its parameters, defaults and ranges. */
18
+ export declare const oilPaintSpec: import("../spec.js").EffectSpec<"oilPaint", {
19
+ /** Window radius in pixels — brush size, capped at 6. */
20
+ readonly radius: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
21
+ readonly default: 3;
22
+ readonly min: 0;
23
+ readonly max: 6;
24
+ readonly step: 1;
25
+ readonly unit: "px";
26
+ readonly label: "brush";
27
+ readonly inline: true;
28
+ }> & {
29
+ kind: "number";
30
+ };
31
+ }>;
18
32
  export declare const oilPaintEffect: EffectData<OilPaintEffect>;
19
33
  //# sourceMappingURL=oil-paint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oil-paint.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,cAAc,CASrD,CAAC"}
1
+ {"version":3,"file":"oil-paint.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC;IACzF,IAAI,EAAE,UAAU,CAAC;CACpB;AAED,4EAA4E;AAC5E,eAAO,MAAM,YAAY;IAQjB,yDAAyD;;;;;;;;;;;;EAG/D,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,cAAc,CAA8B,CAAC"}
@@ -1,12 +1,16 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const oilPaintEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "oilPaint",
5
- radius: lerpNumber(from.radius, to.radius, t),
6
- mode: t < 0.5 ? from.mode : to.mode,
7
- }),
8
- equals: (a, b) => a.radius === b.radius && a.mode === b.mode,
1
+ import { defineEffect, effectDataOf, param } from "../spec.js";
2
+ /** The {@link OilPaintEffect} spec: its parameters, defaults and ranges. */
3
+ export const oilPaintSpec = defineEffect({
4
+ type: "oilPaint",
5
+ group: "blur",
9
6
  // Reads a large neighbourhood per pixel.
10
7
  surface: "shader",
11
- };
8
+ scalar: "radius",
9
+ neutral: { radius: 0 },
10
+ params: {
11
+ /** Window radius in pixels — brush size, capped at 6. */
12
+ radius: param.number({ default: 3, min: 0, max: 6, step: 1, unit: "px", label: "brush", inline: true }),
13
+ },
14
+ });
15
+ export const oilPaintEffect = effectDataOf(oilPaintSpec);
12
16
  //# sourceMappingURL=oil-paint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oil-paint.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAC5D,yCAAyC;IACzC,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Kuwahara filter — the painterly one.\r\n *\r\n * Each pixel looks at four overlapping quadrant windows and takes the mean of\r\n * whichever is *flattest*. Averaging within a region but never across a boundary\r\n * is what makes it read as brushwork: flat areas smooth into strokes while edges\r\n * stay crisp, where a plain blur would soften both.\r\n *\r\n * Cost grows with the square of `radius` — four windows of `(radius+1)²` samples\r\n * each — so this is the most expensive effect in the set by a wide margin.\r\n */\r\nexport interface OilPaintEffect extends ModedEffect {\r\n type: \"oilPaint\";\r\n /** Window radius in px. Brush size, and the dominant cost. 0 = off. */\r\n radius: number;\r\n}\r\n\r\nexport const oilPaintEffect: EffectData<OilPaintEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"oilPaint\",\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.radius === b.radius && a.mode === b.mode,\r\n // Reads a large neighbourhood per pixel.\r\n surface: \"shader\",\r\n};\r\n"]}
1
+ {"version":3,"file":"oil-paint.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/oil-paint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAiB/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,MAAM;IACb,yCAAyC;IACzC,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,yDAAyD;QACzD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAC1G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAA+B,YAAY,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/**\r\n * Kuwahara filter — the painterly one.\r\n *\r\n * Each pixel looks at four overlapping quadrant windows and takes the mean of\r\n * whichever is *flattest*. Averaging within a region but never across a boundary\r\n * is what makes it read as brushwork: flat areas smooth into strokes while edges\r\n * stay crisp, where a plain blur would soften both.\r\n *\r\n * Cost grows with the square of `radius` — four windows of `(radius+1)²` samples\r\n * each — so this is the most expensive effect in the set by a wide margin.\r\n */\r\nexport interface OilPaintEffect extends ModedEffect, EffectFields<typeof oilPaintSpec.params> {\r\n type: \"oilPaint\";\r\n}\r\n\r\n/** The {@link OilPaintEffect} spec: its parameters, defaults and ranges. */\r\nexport const oilPaintSpec = defineEffect({\r\n type: \"oilPaint\",\r\n group: \"blur\",\r\n // Reads a large neighbourhood per pixel.\r\n surface: \"shader\",\r\n scalar: \"radius\",\r\n neutral: { radius: 0 },\r\n params: {\r\n /** Window radius in pixels — brush size, capped at 6. */\r\n radius: param.number({ default: 3, min: 0, max: 6, step: 1, unit: \"px\", label: \"brush\", inline: true }),\r\n },\r\n});\r\n\r\nexport const oilPaintEffect: EffectData<OilPaintEffect> = effectDataOf(oilPaintSpec);\r\n"]}
@@ -1,5 +1,5 @@
1
- import type { Color } from "../../../../attributes/shape/fill/color/parser.js";
2
1
  import type { ModedEffect, EffectData } from "../effect-data.js";
2
+ import { type EffectFields } from "../spec.js";
3
3
  /**
4
4
  * Where the outline sits relative to the node's silhouette — the same three
5
5
  * choices Figma and Illustrator offer for a stroke:
@@ -14,14 +14,34 @@ export type OutlinePosition = "outside" | "center" | "inside";
14
14
  * (a.k.a. "stroke" in Figma) that geometry strokes can't give you when the
15
15
  * silhouette comes from text, an image's alpha, or a whole subtree.
16
16
  */
17
- export interface OutlineEffect extends ModedEffect {
17
+ export interface OutlineEffect extends ModedEffect, EffectFields<typeof outlineSpec.params> {
18
18
  type: "outline";
19
- /** Band thickness in px. 0 = off. */
20
- width: number;
21
- /** Band colour — any CSS colour, theme alias, or RGBA tuple. */
22
- color: Color;
23
- /** Which side of the silhouette edge the band grows from. */
24
- position: OutlinePosition;
25
19
  }
20
+ /** The {@link OutlineEffect} spec: its parameters, defaults and ranges. */
21
+ export declare const outlineSpec: import("../spec.js").EffectSpec<"outline", {
22
+ /** Band thickness in pixels. */
23
+ readonly width: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
24
+ readonly default: 4;
25
+ readonly min: 0;
26
+ readonly unit: "px";
27
+ readonly inline: true;
28
+ }> & {
29
+ kind: "number";
30
+ };
31
+ /** Band colour. */
32
+ readonly color: import("../spec.js").EffectParamDef<import("../../fill/index.js").Color, import("../../fill/index.js").Color> & NoInfer<{
33
+ readonly default: "black";
34
+ }> & {
35
+ kind: "color";
36
+ };
37
+ /** Which side of the edge the band grows from. */
38
+ readonly position: import("../spec.js").EffectParamDef<"center" | "outside" | "inside", "center" | "outside" | "inside"> & NoInfer<{
39
+ readonly default: "outside";
40
+ readonly optionsLabel: "outlinePosition";
41
+ }> & {
42
+ kind: "enum";
43
+ options: readonly ("center" | "outside" | "inside")[];
44
+ };
45
+ }>;
26
46
  export declare const outlineEffect: EffectData<OutlineEffect>;
27
47
  //# sourceMappingURL=outline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/outline.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG9D;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAC9C,IAAI,EAAE,SAAS,CAAC;IAChB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,EAAE,KAAK,CAAC;IACb,6DAA6D;IAC7D,QAAQ,EAAE,eAAe,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAgBnD,CAAC"}
1
+ {"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/outline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC;IACvF,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,2EAA2E;AAC3E,eAAO,MAAM,WAAW;IAShB,gCAAgC;;;;;;;;;IAEhC,mBAAmB;;;;;;IAEnB,kDAAkD;;;;;;;;EAGxD,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAA6B,CAAC"}