@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,11 +1,16 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const chromaticAberrationEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "chromaticAberration",
5
- amount: lerpNumber(from.amount, to.amount, t),
6
- angle: lerpNumber(from.angle, to.angle, t),
7
- mode: t < 0.5 ? from.mode : to.mode,
8
- }),
9
- equals: (a, b) => a.amount === b.amount && a.angle === b.angle && a.mode === b.mode,
10
- };
1
+ import { defineEffect, effectDataOf, param } from "../spec.js";
2
+ /** The {@link ChromaticAberrationEffect} spec: its parameters, defaults and ranges. */
3
+ export const chromaticAberrationSpec = defineEffect({
4
+ type: "chromaticAberration",
5
+ group: "glitch",
6
+ scalar: "amount",
7
+ neutral: { amount: 0 },
8
+ params: {
9
+ /** Pixel offset distance for the R/B fringe. */
10
+ amount: param.number({ default: 4, min: 0, unit: "px", inline: true }),
11
+ /** Fringe axis in degrees — 0 = horizontal, R right / B left. */
12
+ angle: param.number({ default: 0, unit: "deg" }),
13
+ },
14
+ });
15
+ export const chromaticAberrationEffect = effectDataOf(chromaticAberrationSpec);
11
16
  //# sourceMappingURL=chromatic-aberration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chromatic-aberration.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/chromatic-aberration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,MAAM,CAAC,MAAM,yBAAyB,GAA0C;IAC5E,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACtF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\nexport interface ChromaticAberrationEffect extends ModedEffect {\r\n type: \"chromaticAberration\";\r\n /** Pixel offset distance for the R/B channel fringe. */\r\n amount: number;\r\n /** Angle in degrees — 0 = horizontal split (R left, B right). */\r\n angle: number;\r\n}\r\n\r\nexport const chromaticAberrationEffect: EffectData<ChromaticAberrationEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"chromaticAberration\",\r\n amount: lerpNumber(from.amount, to.amount, t),\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.amount === b.amount && a.angle === b.angle && a.mode === b.mode,\r\n};\r\n"]}
1
+ {"version":3,"file":"chromatic-aberration.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/chromatic-aberration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAM/E,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,YAAY,CAAC;IAChD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,gDAAgD;QAChD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,iEAAiE;QACjE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;KACnD;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAA0C,YAAY,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\nexport interface ChromaticAberrationEffect extends ModedEffect, EffectFields<typeof chromaticAberrationSpec.params> {\r\n type: \"chromaticAberration\";\r\n}\r\n\r\n/** The {@link ChromaticAberrationEffect} spec: its parameters, defaults and ranges. */\r\nexport const chromaticAberrationSpec = defineEffect({\r\n type: \"chromaticAberration\",\r\n group: \"glitch\",\r\n scalar: \"amount\",\r\n neutral: { amount: 0 },\r\n params: {\r\n /** Pixel offset distance for the R/B fringe. */\r\n amount: param.number({ default: 4, min: 0, unit: \"px\", inline: true }),\r\n /** Fringe axis in degrees — 0 = horizontal, R right / B left. */\r\n angle: param.number({ default: 0, unit: \"deg\" }),\r\n },\r\n});\r\n\r\nexport const chromaticAberrationEffect: EffectData<ChromaticAberrationEffect> = effectDataOf(chromaticAberrationSpec);\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
  * Photographic tonal and colour adjustments as a **node effect** — the grading
4
5
  * panel `Adjustments.colorAdjustment` gives an image fill, now available on any
@@ -10,33 +11,102 @@ import type { ModedEffect, EffectData } from "../effect-data.js";
10
11
  * position, which a colour matrix does not have — so the node effect leaves it
11
12
  * out and `Effects.vignette()` provides the real thing.
12
13
  */
13
- export interface ColorAdjustmentEffect extends ModedEffect {
14
+ export interface ColorAdjustmentEffect extends ModedEffect, EffectFields<typeof colorAdjustmentSpec.params> {
14
15
  type: "colorAdjustment";
15
- /** −1…1 (0 = unchanged). Shifts overall lightness without clipping the way exposure does. */
16
- brightness?: number;
17
- /** 0…2 (1 = unchanged). Spreads highlights and shadows further apart. */
18
- contrast?: number;
19
- /** 0…3 (1 = unchanged). Scales colour saturation uniformly. */
20
- saturation?: number;
21
- /**
22
- * Hue rotation in **degrees** (0 = unchanged). Wraps, so a linear tween over
23
- * 360 cycles the whole wheel and lands back where it started.
24
- *
25
- * The luma-preserving rotation, so shifting hue does not also change how
26
- * light anything reads — unlike `invert({ channel: 'hue' })`, which is the
27
- * fixed 180° case of this and stays for symmetry with the other inversions.
28
- */
29
- hue?: number;
30
- /** −1…1 (0 = unchanged). Boosts muted colours more than already-vivid ones. */
31
- vibrance?: number;
32
- /** −1…1 (0 = unchanged). Lifts or crushes the shadow end. */
33
- shadows?: number;
34
- /** −1…1 (0 = unchanged). Brightens or rolls off the highlight end. */
35
- highlights?: number;
36
- /** −1…1 (0 = unchanged). Negative = cool/blue, positive = warm/orange. */
37
- temperature?: number;
38
- /** −1…1 (0 = unchanged). Negative = green, positive = magenta. */
39
- tint?: number;
40
16
  }
17
+ /** The {@link ColorAdjustmentEffect} spec: its parameters, defaults and ranges. */
18
+ export declare const colorAdjustmentSpec: import("../spec.js").EffectSpec<"colorAdjustment", {
19
+ /** −1…1, additive. */
20
+ readonly brightness: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
21
+ readonly default: 0;
22
+ readonly optional: true;
23
+ readonly min: -1;
24
+ readonly max: 1;
25
+ readonly control: "slider";
26
+ readonly inline: true;
27
+ }> & {
28
+ kind: "number";
29
+ };
30
+ /** 0…2, multiplicative around mid-grey. */
31
+ readonly contrast: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
32
+ readonly default: 1;
33
+ readonly optional: true;
34
+ readonly min: 0;
35
+ readonly max: 2;
36
+ readonly control: "slider";
37
+ }> & {
38
+ kind: "number";
39
+ };
40
+ /** 0…3, multiplicative. */
41
+ readonly saturation: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
42
+ readonly default: 1;
43
+ readonly optional: true;
44
+ readonly min: 0;
45
+ readonly max: 3;
46
+ readonly control: "slider";
47
+ }> & {
48
+ kind: "number";
49
+ };
50
+ /** Hue rotation in degrees. */
51
+ readonly hue: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
52
+ readonly default: 0;
53
+ readonly optional: true;
54
+ readonly unit: "deg";
55
+ readonly control: "hue";
56
+ }> & {
57
+ kind: "number";
58
+ };
59
+ /** −1…1, saturation weighted toward muted colours. */
60
+ readonly vibrance: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
61
+ readonly default: 0;
62
+ readonly optional: true;
63
+ readonly min: -1;
64
+ readonly max: 1;
65
+ readonly control: "slider";
66
+ }> & {
67
+ kind: "number";
68
+ };
69
+ /** −1…1, lifts or crushes the dark end. */
70
+ readonly shadows: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
71
+ readonly default: 0;
72
+ readonly optional: true;
73
+ readonly min: -1;
74
+ readonly max: 1;
75
+ readonly control: "slider";
76
+ }> & {
77
+ kind: "number";
78
+ };
79
+ /** −1…1, lifts or crushes the bright end. */
80
+ readonly highlights: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
81
+ readonly default: 0;
82
+ readonly optional: true;
83
+ readonly min: -1;
84
+ readonly max: 1;
85
+ readonly control: "slider";
86
+ }> & {
87
+ kind: "number";
88
+ };
89
+ /** −1…1, cool to warm. */
90
+ readonly temperature: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
91
+ readonly default: 0;
92
+ readonly optional: true;
93
+ readonly min: -1;
94
+ readonly max: 1;
95
+ readonly control: "slider";
96
+ }> & {
97
+ kind: "number";
98
+ };
99
+ /** −1…1, green to magenta. */
100
+ readonly tint: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
101
+ readonly default: 0;
102
+ readonly optional: true;
103
+ readonly min: -1;
104
+ readonly max: 1;
105
+ readonly control: "slider";
106
+ readonly label: "tintAmount";
107
+ }> & {
108
+ kind: "number";
109
+ };
110
+ }>;
41
111
  export declare const colorAdjustmentEffect: EffectData<ColorAdjustmentEffect>;
42
112
  //# sourceMappingURL=color-adjustment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color-adjustment.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/color-adjustment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACtD,IAAI,EAAE,iBAAiB,CAAC;IACxB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAyBnE,CAAC"}
1
+ {"version":3,"file":"color-adjustment.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/color-adjustment.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,qBAAsB,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,MAAM,CAAC;IACvG,IAAI,EAAE,iBAAiB,CAAC;CAC3B;AAED,mFAAmF;AACnF,eAAO,MAAM,mBAAmB;IAMxB,sBAAsB;;;;;;;;;;;IAEtB,2CAA2C;;;;;;;;;;IAE3C,2BAA2B;;;;;;;;;;IAE3B,+BAA+B;;;;;;;;;IAE/B,sDAAsD;;;;;;;;;;IAEtD,2CAA2C;;;;;;;;;;IAE3C,6CAA6C;;;;;;;;;;IAE7C,0BAA0B;;;;;;;;;;IAE1B,8BAA8B;;;;;;;;;;;EAGpC,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAqC,CAAC"}
@@ -1,27 +1,30 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const colorAdjustmentEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "colorAdjustment",
5
- brightness: lerpNumber(from.brightness ?? 0, to.brightness ?? 0, t),
6
- contrast: lerpNumber(from.contrast ?? 1, to.contrast ?? 1, t),
7
- saturation: lerpNumber(from.saturation ?? 1, to.saturation ?? 1, t),
8
- hue: lerpNumber(from.hue ?? 0, to.hue ?? 0, t),
9
- vibrance: lerpNumber(from.vibrance ?? 0, to.vibrance ?? 0, t),
10
- shadows: lerpNumber(from.shadows ?? 0, to.shadows ?? 0, t),
11
- highlights: lerpNumber(from.highlights ?? 0, to.highlights ?? 0, t),
12
- temperature: lerpNumber(from.temperature ?? 0, to.temperature ?? 0, t),
13
- tint: lerpNumber(from.tint ?? 0, to.tint ?? 0, t),
14
- mode: t < 0.5 ? from.mode : to.mode,
15
- }),
16
- equals: (a, b) => a.brightness === b.brightness &&
17
- a.contrast === b.contrast &&
18
- a.saturation === b.saturation &&
19
- a.hue === b.hue &&
20
- a.vibrance === b.vibrance &&
21
- a.shadows === b.shadows &&
22
- a.highlights === b.highlights &&
23
- a.temperature === b.temperature &&
24
- a.tint === b.tint &&
25
- a.mode === b.mode,
26
- };
1
+ import { defineEffect, effectDataOf, param } from "../spec.js";
2
+ /** The {@link ColorAdjustmentEffect} spec: its parameters, defaults and ranges. */
3
+ export const colorAdjustmentSpec = defineEffect({
4
+ type: "colorAdjustment",
5
+ group: "color",
6
+ neutral: { contrast: 1, saturation: 1, temperature: 0 },
7
+ // Every field is optional; `default` is what an absent one means.
8
+ params: {
9
+ /** −1…1, additive. */
10
+ brightness: param.number({ default: 0, optional: true, min: -1, max: 1, control: "slider", inline: true }),
11
+ /** 0…2, multiplicative around mid-grey. */
12
+ contrast: param.number({ default: 1, optional: true, min: 0, max: 2, control: "slider" }),
13
+ /** 0…3, multiplicative. */
14
+ saturation: param.number({ default: 1, optional: true, min: 0, max: 3, control: "slider" }),
15
+ /** Hue rotation in degrees. */
16
+ hue: param.number({ default: 0, optional: true, unit: "deg", control: "hue" }),
17
+ /** −1…1, saturation weighted toward muted colours. */
18
+ vibrance: param.number({ default: 0, optional: true, min: -1, max: 1, control: "slider" }),
19
+ /** −1…1, lifts or crushes the dark end. */
20
+ shadows: param.number({ default: 0, optional: true, min: -1, max: 1, control: "slider" }),
21
+ /** −1…1, lifts or crushes the bright end. */
22
+ highlights: param.number({ default: 0, optional: true, min: -1, max: 1, control: "slider" }),
23
+ /** −1…1, cool to warm. */
24
+ temperature: param.number({ default: 0, optional: true, min: -1, max: 1, control: "slider" }),
25
+ /** −1…1, green to magenta. */
26
+ tint: param.number({ default: 0, optional: true, min: -1, max: 1, control: "slider", label: "tintAmount" }),
27
+ },
28
+ });
29
+ export const colorAdjustmentEffect = effectDataOf(colorAdjustmentSpec);
27
30
  //# sourceMappingURL=color-adjustment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color-adjustment.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/color-adjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA2C1C,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7D,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9C,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7D,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1D,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,EAAE,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,CAAC;QACtE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;QACjD,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,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;QAC/B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACxB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Photographic tonal and colour adjustments as a **node effect** — the grading\r\n * panel `Adjustments.colorAdjustment` gives an image fill, now available on any\r\n * node. All fields are optional and default to neutral.\r\n *\r\n * Shares its type name and renderer handler with `ColorAdjustmentFilter` (the\r\n * media-fill filter) with one deliberate difference: no `vignette` field. That\r\n * knob was never implemented on the filter — a vignette needs each pixel's\r\n * position, which a colour matrix does not have — so the node effect leaves it\r\n * out and `Effects.vignette()` provides the real thing.\r\n */\r\nexport interface ColorAdjustmentEffect extends ModedEffect {\r\n type: \"colorAdjustment\";\r\n /** −1…1 (0 = unchanged). Shifts overall lightness without clipping the way exposure does. */\r\n brightness?: number;\r\n /** 0…2 (1 = unchanged). Spreads highlights and shadows further apart. */\r\n contrast?: number;\r\n /** 0…3 (1 = unchanged). Scales colour saturation uniformly. */\r\n saturation?: number;\r\n /**\r\n * Hue rotation in **degrees** (0 = unchanged). Wraps, so a linear tween over\r\n * 360 cycles the whole wheel and lands back where it started.\r\n *\r\n * The luma-preserving rotation, so shifting hue does not also change how\r\n * light anything reads — unlike `invert({ channel: 'hue' })`, which is the\r\n * fixed 180° case of this and stays for symmetry with the other inversions.\r\n */\r\n hue?: number;\r\n /** −1…1 (0 = unchanged). Boosts muted colours more than already-vivid ones. */\r\n vibrance?: number;\r\n /** −1…1 (0 = unchanged). Lifts or crushes the shadow end. */\r\n shadows?: number;\r\n /** −1…1 (0 = unchanged). Brightens or rolls off the highlight end. */\r\n highlights?: number;\r\n /** −1…1 (0 = unchanged). Negative = cool/blue, positive = warm/orange. */\r\n temperature?: number;\r\n /** −1…1 (0 = unchanged). Negative = green, positive = magenta. */\r\n tint?: number;\r\n}\r\n\r\nexport const colorAdjustmentEffect: EffectData<ColorAdjustmentEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"colorAdjustment\",\r\n brightness: lerpNumber(from.brightness ?? 0, to.brightness ?? 0, t),\r\n contrast: lerpNumber(from.contrast ?? 1, to.contrast ?? 1, t),\r\n saturation: lerpNumber(from.saturation ?? 1, to.saturation ?? 1, t),\r\n hue: lerpNumber(from.hue ?? 0, to.hue ?? 0, t),\r\n vibrance: lerpNumber(from.vibrance ?? 0, to.vibrance ?? 0, t),\r\n shadows: lerpNumber(from.shadows ?? 0, to.shadows ?? 0, t),\r\n highlights: lerpNumber(from.highlights ?? 0, to.highlights ?? 0, t),\r\n temperature: lerpNumber(from.temperature ?? 0, to.temperature ?? 0, t),\r\n tint: lerpNumber(from.tint ?? 0, to.tint ?? 0, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.brightness === b.brightness &&\r\n a.contrast === b.contrast &&\r\n a.saturation === b.saturation &&\r\n a.hue === b.hue &&\r\n a.vibrance === b.vibrance &&\r\n a.shadows === b.shadows &&\r\n a.highlights === b.highlights &&\r\n a.temperature === b.temperature &&\r\n a.tint === b.tint &&\r\n a.mode === b.mode,\r\n};\r\n"]}
1
+ {"version":3,"file":"color-adjustment.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/color-adjustment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAiB/E,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;IAC5C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE;IACvD,kEAAkE;IAClE,MAAM,EAAE;QACJ,sBAAsB;QACtB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC1G,2CAA2C;QAC3C,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QACzF,2BAA2B;QAC3B,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC3F,+BAA+B;QAC/B,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC9E,sDAAsD;QACtD,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC1F,2CAA2C;QAC3C,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QACzF,6CAA6C;QAC7C,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC5F,0BAA0B;QAC1B,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC7F,8BAA8B;QAC9B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;KAC9G;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAsC,YAAY,CAAC,mBAAmB,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 * Photographic tonal and colour adjustments as a **node effect** — the grading\r\n * panel `Adjustments.colorAdjustment` gives an image fill, now available on any\r\n * node. All fields are optional and default to neutral.\r\n *\r\n * Shares its type name and renderer handler with `ColorAdjustmentFilter` (the\r\n * media-fill filter) with one deliberate difference: no `vignette` field. That\r\n * knob was never implemented on the filter — a vignette needs each pixel's\r\n * position, which a colour matrix does not have — so the node effect leaves it\r\n * out and `Effects.vignette()` provides the real thing.\r\n */\r\nexport interface ColorAdjustmentEffect extends ModedEffect, EffectFields<typeof colorAdjustmentSpec.params> {\r\n type: \"colorAdjustment\";\r\n}\r\n\r\n/** The {@link ColorAdjustmentEffect} spec: its parameters, defaults and ranges. */\r\nexport const colorAdjustmentSpec = defineEffect({\r\n type: \"colorAdjustment\",\r\n group: \"color\",\r\n neutral: { contrast: 1, saturation: 1, temperature: 0 },\r\n // Every field is optional; `default` is what an absent one means.\r\n params: {\r\n /** −1…1, additive. */\r\n brightness: param.number({ default: 0, optional: true, min: -1, max: 1, control: \"slider\", inline: true }),\r\n /** 0…2, multiplicative around mid-grey. */\r\n contrast: param.number({ default: 1, optional: true, min: 0, max: 2, control: \"slider\" }),\r\n /** 0…3, multiplicative. */\r\n saturation: param.number({ default: 1, optional: true, min: 0, max: 3, control: \"slider\" }),\r\n /** Hue rotation in degrees. */\r\n hue: param.number({ default: 0, optional: true, unit: \"deg\", control: \"hue\" }),\r\n /** −1…1, saturation weighted toward muted colours. */\r\n vibrance: param.number({ default: 0, optional: true, min: -1, max: 1, control: \"slider\" }),\r\n /** −1…1, lifts or crushes the dark end. */\r\n shadows: param.number({ default: 0, optional: true, min: -1, max: 1, control: \"slider\" }),\r\n /** −1…1, lifts or crushes the bright end. */\r\n highlights: param.number({ default: 0, optional: true, min: -1, max: 1, control: \"slider\" }),\r\n /** −1…1, cool to warm. */\r\n temperature: param.number({ default: 0, optional: true, min: -1, max: 1, control: \"slider\" }),\r\n /** −1…1, green to magenta. */\r\n tint: param.number({ default: 0, optional: true, min: -1, max: 1, control: \"slider\", label: \"tintAmount\" }),\r\n },\r\n});\r\n\r\nexport const colorAdjustmentEffect: EffectData<ColorAdjustmentEffect> = effectDataOf(colorAdjustmentSpec);\r\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ModedEffect, EffectData } from "../effect-data.js";
2
- import type { CurvesChannel } from "../../filters/implementations/curves.js";
2
+ import { type EffectFields } from "../spec.js";
3
3
  /**
4
4
  * Tone curve as a **node effect** — the same adjustment `Adjustments.curves`
5
5
  * applies to a photo, now available on any node, so a group of shapes or a text
@@ -10,12 +10,26 @@ import type { CurvesChannel } from "../../filters/implementations/curves.js";
10
10
  * effect carries. Keeping them one implementation is deliberate — a curve should
11
11
  * not mean two different things depending on what it is attached to.
12
12
  */
13
- export interface CurvesEffect extends ModedEffect {
13
+ export interface CurvesEffect extends ModedEffect, EffectFields<typeof curvesSpec.params> {
14
14
  type: "curves";
15
- /** Curve control points as `[input, output]` pairs in 0–1. */
16
- points: [number, number][];
17
- /** Channel(s) the curve applies to (default `'rgb'`). */
18
- channel?: CurvesChannel;
19
15
  }
16
+ /** The {@link CurvesEffect} spec: its parameters, defaults and ranges. */
17
+ export declare const curvesSpec: import("../spec.js").EffectSpec<"curves", {
18
+ /** Curve control points as `[input, output]` pairs in 0–1. Move pairwise, as `curvesFilter.lerp`. */
19
+ readonly points: import("../spec.js").EffectParamDef<[number, number][], [number, number][]> & NoInfer<{
20
+ readonly kind: "points";
21
+ readonly required: true;
22
+ readonly lerp: (from: [number, number][], to: [number, number][], t: number) => [number, number][];
23
+ readonly equals: (a: [number, number][], b: [number, number][]) => boolean;
24
+ }>;
25
+ /** Channel(s) the curve applies to. An intermediate channel name is meaningless, so it cuts. */
26
+ readonly channel: import("../spec.js").EffectParamDef<"rgb" | "r" | "g" | "b" | "a", "rgb" | "r" | "g" | "b" | "a"> & NoInfer<{
27
+ readonly default: "rgb";
28
+ readonly optional: true;
29
+ }> & {
30
+ kind: "enum";
31
+ options: readonly ("rgb" | "r" | "g" | "b" | "a")[];
32
+ };
33
+ }>;
20
34
  export declare const curvesEffect: EffectData<CurvesEffect>;
21
35
  //# sourceMappingURL=curves.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"curves.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/curves.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,8DAA8D;IAC9D,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3B,yDAAyD;IACzD,OAAO,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAyBjD,CAAC"}
1
+ {"version":3,"file":"curves.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/curves.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,MAAM,CAAC;IACrF,IAAI,EAAE,QAAQ,CAAC;CAClB;AAED,0EAA0E;AAC1E,eAAO,MAAM,UAAU;IAWf,qGAAqG;;;;;;;IAUrG,gGAAgG;;;;;;;;EAGtG,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAA4B,CAAC"}
@@ -1,27 +1,30 @@
1
1
  import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const curvesEffect = {
3
- // Mirrors `curvesFilter.lerp`: points move pairwise, the channel hard-cuts
4
- // because an intermediate channel name is meaningless.
5
- lerp: (from, to, t) => ({
6
- type: "curves",
7
- channel: t < 0.5 ? from.channel : to.channel,
8
- points: from.points.map(([x, y], i) => {
9
- const [tx, ty] = to.points[i] ?? [x, y];
10
- return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)];
11
- }),
12
- mode: t < 0.5 ? from.mode : to.mode,
13
- }),
14
- equals: (a, b) => a.channel === b.channel &&
15
- a.mode === b.mode &&
16
- a.points.length === b.points.length &&
17
- a.points.every(([x, y], i) => x === b.points[i]?.[0] && y === b.points[i]?.[1]),
2
+ import { defineEffect, effectDataOf, param } from "../spec.js";
3
+ /** The {@link CurvesEffect} spec: its parameters, defaults and ranges. */
4
+ export const curvesSpec = defineEffect({
5
+ type: "curves",
6
+ group: "color",
18
7
  // A curve is a *lookup*, and a colour matrix cannot express one: it is affine
19
- // by construction and a curve is authored for its bends. The renderer used to
20
- // fit one straight line through the points and apply that, which is a grade
21
- // with the only interesting part removed. Evaluating it per pixel needs the
22
- // source as a shader it can read — the same reason `lut` is a shader scope,
23
- // and the same trade: exact, at the cost of a pass. See the renderer's
24
- // `curvesEffectHandler` for what that means for ordering.
8
+ // by construction and a curve is authored for its bends. Evaluating it per
9
+ // pixel needs the source as a shader it can read — the same reason `lut` is a
10
+ // shader scope, and the same trade: exact, at the cost of a pass. See the
11
+ // renderer's `curvesEffectHandler` for what that means for ordering.
25
12
  surface: "shader",
26
- };
13
+ neutral: { points: [[0, 0], [1, 1]] },
14
+ params: {
15
+ /** Curve control points as `[input, output]` pairs in 0–1. Move pairwise, as `curvesFilter.lerp`. */
16
+ points: param.of()({
17
+ kind: "points",
18
+ required: true,
19
+ lerp: (from, to, t) => from.map(([x, y], i) => {
20
+ const [tx, ty] = to[i] ?? [x, y];
21
+ return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)];
22
+ }),
23
+ equals: (a, b) => a.length === b.length && a.every(([x, y], i) => x === b[i]?.[0] && y === b[i]?.[1]),
24
+ }),
25
+ /** Channel(s) the curve applies to. An intermediate channel name is meaningless, so it cuts. */
26
+ channel: param.choice(["rgb", "r", "g", "b", "a"], { default: "rgb", optional: true }),
27
+ },
28
+ });
29
+ export const curvesEffect = effectDataOf(curvesSpec);
27
30
  //# sourceMappingURL=curves.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/curves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,2EAA2E;IAC3E,uDAAuD;IACvD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAClC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAqB,CAAC;QAC5E,CAAC,CAAC;QACF,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,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM;QACnC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACnF,8EAA8E;IAC9E,8EAA8E;IAC9E,4EAA4E;IAC5E,4EAA4E;IAC5E,4EAA4E;IAC5E,uEAAuE;IACvE,0DAA0D;IAC1D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport type { CurvesChannel } from \"../../filters/implementations/curves\";\r\n\r\n/**\r\n * Tone curve as a **node effect** — the same adjustment `Adjustments.curves`\r\n * applies to a photo, now available on any node, so a group of shapes or a text\r\n * block can be graded the same way.\r\n *\r\n * Shares its type name, fields and renderer handler with {@link CurvesFilter}\r\n * (the media-fill filter); the only difference is the `mode` flag every scene\r\n * effect carries. Keeping them one implementation is deliberate — a curve should\r\n * not mean two different things depending on what it is attached to.\r\n */\r\nexport interface CurvesEffect extends ModedEffect {\r\n type: \"curves\";\r\n /** Curve control points as `[input, output]` pairs in 0–1. */\r\n points: [number, number][];\r\n /** Channel(s) the curve applies to (default `'rgb'`). */\r\n channel?: CurvesChannel;\r\n}\r\n\r\nexport const curvesEffect: EffectData<CurvesEffect> = {\r\n // Mirrors `curvesFilter.lerp`: points move pairwise, the channel hard-cuts\r\n // because an intermediate channel name is meaningless.\r\n lerp: (from, to, t) => ({\r\n type: \"curves\",\r\n channel: t < 0.5 ? from.channel : to.channel,\r\n points: from.points.map(([x, y], i) => {\r\n const [tx, ty] = to.points[i] ?? [x, y];\r\n return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)] as [number, number];\r\n }),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) =>\r\n a.channel === b.channel &&\r\n a.mode === b.mode &&\r\n a.points.length === b.points.length &&\r\n a.points.every(([x, y], i) => x === b.points[i]?.[0] && y === b.points[i]?.[1]),\r\n // A curve is a *lookup*, and a colour matrix cannot express one: it is affine\r\n // by construction and a curve is authored for its bends. The renderer used to\r\n // fit one straight line through the points and apply that, which is a grade\r\n // with the only interesting part removed. Evaluating it per pixel needs the\r\n // source as a shader it can read — the same reason `lut` is a shader scope,\r\n // and the same trade: exact, at the cost of a pass. See the renderer's\r\n // `curvesEffectHandler` for what that means for ordering.\r\n surface: \"shader\",\r\n};\r\n"]}
1
+ {"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/curves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAgB/E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;IACnC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,OAAO;IACd,8EAA8E;IAC9E,2EAA2E;IAC3E,8EAA8E;IAC9E,0EAA0E;IAC1E,qEAAqE;IACrE,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;IACrC,MAAM,EAAE;QACJ,qGAAqG;QACrG,MAAM,EAAE,KAAK,CAAC,EAAE,EAAsB,CAAC;YACnC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC1C,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACjC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAqB,CAAC;YAC5E,CAAC,CAAC;YACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACxG,CAAC;QACF,gGAAgG;QAChG,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAA2B,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACnH;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAA6B,YAAY,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\nimport type { CurvesChannel } from \"../../filters/implementations/curves\";\r\nimport { defineEffect, effectDataOf, param, type EffectFields } from \"../spec\";\r\n\r\n/**\r\n * Tone curve as a **node effect** — the same adjustment `Adjustments.curves`\r\n * applies to a photo, now available on any node, so a group of shapes or a text\r\n * block can be graded the same way.\r\n *\r\n * Shares its type name, fields and renderer handler with {@link CurvesFilter}\r\n * (the media-fill filter); the only difference is the `mode` flag every scene\r\n * effect carries. Keeping them one implementation is deliberate — a curve should\r\n * not mean two different things depending on what it is attached to.\r\n */\r\nexport interface CurvesEffect extends ModedEffect, EffectFields<typeof curvesSpec.params> {\r\n type: \"curves\";\r\n}\r\n\r\n/** The {@link CurvesEffect} spec: its parameters, defaults and ranges. */\r\nexport const curvesSpec = defineEffect({\r\n type: \"curves\",\r\n group: \"color\",\r\n // A curve is a *lookup*, and a colour matrix cannot express one: it is affine\r\n // by construction and a curve is authored for its bends. Evaluating it per\r\n // pixel needs the source as a shader it can read — the same reason `lut` is a\r\n // shader scope, and the same trade: exact, at the cost of a pass. See the\r\n // renderer's `curvesEffectHandler` for what that means for ordering.\r\n surface: \"shader\",\r\n neutral: { points: [[0, 0], [1, 1]] },\r\n params: {\r\n /** Curve control points as `[input, output]` pairs in 0–1. Move pairwise, as `curvesFilter.lerp`. */\r\n points: param.of<[number, number][]>()({\r\n kind: \"points\",\r\n required: true,\r\n lerp: (from, to, t) => from.map(([x, y], i) => {\r\n const [tx, ty] = to[i] ?? [x, y];\r\n return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)] as [number, number];\r\n }),\r\n equals: (a, b) => a.length === b.length && a.every(([x, y], i) => x === b[i]?.[0] && y === b[i]?.[1]),\r\n }),\r\n /** Channel(s) the curve applies to. An intermediate channel name is meaningless, so it cuts. */\r\n channel: param.choice([\"rgb\", \"r\", \"g\", \"b\", \"a\"] satisfies CurvesChannel[], { default: \"rgb\", optional: true }),\r\n },\r\n});\r\n\r\nexport const curvesEffect: EffectData<CurvesEffect> = effectDataOf(curvesSpec);\r\n"]}
@@ -1,15 +1,36 @@
1
1
  import type { ModedEffect, EffectData } from "../effect-data.js";
2
+ import { type EffectFields } from "../spec.js";
2
3
  /**
3
4
  * Motion-blur-style directional (linear) blur. Unlike {@link BlurEffect}, which
4
5
  * blurs uniformly in all directions, this smears the node's own content along a
5
6
  * single axis.
6
7
  */
7
- export interface DirectionalBlurEffect extends ModedEffect {
8
+ export interface DirectionalBlurEffect extends ModedEffect, EffectFields<typeof directionalBlurSpec.params> {
8
9
  type: "directionalBlur";
9
- /** Smear length in pixels along `angle`. */
10
- radius: number;
11
- /** Angle in degrees of the smear axis — 0 = horizontal, 90 = vertical. */
12
- angle: number;
13
10
  }
11
+ /** The {@link DirectionalBlurEffect} spec: its parameters, defaults and ranges. */
12
+ export declare const directionalBlurSpec: import("../spec.js").EffectSpec<"directionalBlur", {
13
+ /** Smear length in pixels along `angle`. */
14
+ readonly radius: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
15
+ readonly default: 0;
16
+ readonly required: true;
17
+ readonly min: 0;
18
+ readonly unit: "px";
19
+ readonly label: "length";
20
+ readonly inline: true;
21
+ readonly order: 1;
22
+ readonly initial: 10;
23
+ }> & {
24
+ kind: "number";
25
+ };
26
+ /** Smear axis in degrees — 0 = horizontal, 90 = vertical. */
27
+ readonly angle: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
28
+ readonly default: 0;
29
+ readonly unit: "deg";
30
+ readonly order: 0;
31
+ }> & {
32
+ kind: "number";
33
+ };
34
+ }>;
14
35
  export declare const directionalBlurEffect: EffectData<DirectionalBlurEffect>;
15
36
  //# sourceMappingURL=directional-blur.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"directional-blur.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/directional-blur.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACtD,IAAI,EAAE,iBAAiB,CAAC;IACxB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAQnE,CAAC"}
1
+ {"version":3,"file":"directional-blur.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/directional-blur.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;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,MAAM,CAAC;IACvG,IAAI,EAAE,iBAAiB,CAAC;CAC3B;AAED,mFAAmF;AACnF,eAAO,MAAM,mBAAmB;IAMxB,4CAA4C;;;;;;;;;;;;;IAE5C,6DAA6D;;;;;;;;EAGnE,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAqC,CAAC"}
@@ -1,11 +1,16 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const directionalBlurEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "directionalBlur",
5
- radius: lerpNumber(from.radius, to.radius, t),
6
- angle: lerpNumber(from.angle, to.angle, t),
7
- mode: t < 0.5 ? from.mode : to.mode,
8
- }),
9
- equals: (a, b) => a.radius === b.radius && a.angle === b.angle && a.mode === b.mode,
10
- };
1
+ import { defineEffect, effectDataOf, param } from "../spec.js";
2
+ /** The {@link DirectionalBlurEffect} spec: its parameters, defaults and ranges. */
3
+ export const directionalBlurSpec = defineEffect({
4
+ type: "directionalBlur",
5
+ group: "blur",
6
+ scalar: "radius",
7
+ neutral: { radius: 0 },
8
+ params: {
9
+ /** Smear length in pixels along `angle`. */
10
+ radius: param.number({ default: 0, required: true, min: 0, unit: "px", label: "length", inline: true, order: 1, initial: 10 }),
11
+ /** Smear axis in degrees — 0 = horizontal, 90 = vertical. */
12
+ angle: param.number({ default: 0, unit: "deg", order: 0 }),
13
+ },
14
+ });
15
+ export const directionalBlurEffect = effectDataOf(directionalBlurSpec);
11
16
  //# sourceMappingURL=directional-blur.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"directional-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/directional-blur.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB1C,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,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,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;CACtF,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { ModedEffect, EffectData } from \"../effect-data\";\r\n\r\n/**\r\n * Motion-blur-style directional (linear) blur. Unlike {@link BlurEffect}, which\r\n * blurs uniformly in all directions, this smears the node's own content along a\r\n * single axis.\r\n */\r\nexport interface DirectionalBlurEffect extends ModedEffect {\r\n type: \"directionalBlur\";\r\n /** Smear length in pixels along `angle`. */\r\n radius: number;\r\n /** Angle in degrees of the smear axis — 0 = horizontal, 90 = vertical. */\r\n angle: number;\r\n}\r\n\r\nexport const directionalBlurEffect: EffectData<DirectionalBlurEffect> = {\r\n lerp: (from, to, t) => ({\r\n type: \"directionalBlur\",\r\n radius: lerpNumber(from.radius, to.radius, t),\r\n angle: lerpNumber(from.angle, to.angle, t),\r\n mode: t < 0.5 ? from.mode : to.mode,\r\n }),\r\n equals: (a, b) => a.radius === b.radius && a.angle === b.angle && a.mode === b.mode,\r\n};\r\n"]}
1
+ {"version":3,"file":"directional-blur.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/directional-blur.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAW/E,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;IAC5C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACtB,MAAM,EAAE;QACJ,4CAA4C;QAC5C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QAC9H,6DAA6D;QAC7D,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAC7D;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAsC,YAAY,CAAC,mBAAmB,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 * Motion-blur-style directional (linear) blur. Unlike {@link BlurEffect}, which\r\n * blurs uniformly in all directions, this smears the node's own content along a\r\n * single axis.\r\n */\r\nexport interface DirectionalBlurEffect extends ModedEffect, EffectFields<typeof directionalBlurSpec.params> {\r\n type: \"directionalBlur\";\r\n}\r\n\r\n/** The {@link DirectionalBlurEffect} spec: its parameters, defaults and ranges. */\r\nexport const directionalBlurSpec = defineEffect({\r\n type: \"directionalBlur\",\r\n group: \"blur\",\r\n scalar: \"radius\",\r\n neutral: { radius: 0 },\r\n params: {\r\n /** Smear length in pixels along `angle`. */\r\n radius: param.number({ default: 0, required: true, min: 0, unit: \"px\", label: \"length\", inline: true, order: 1, initial: 10 }),\r\n /** Smear axis in degrees — 0 = horizontal, 90 = vertical. */\r\n angle: param.number({ default: 0, unit: \"deg\", order: 0 }),\r\n },\r\n});\r\n\r\nexport const directionalBlurEffect: EffectData<DirectionalBlurEffect> = effectDataOf(directionalBlurSpec);\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
  * Size of the Bayer threshold matrix: 2×2, 4×4 or 8×8. Bigger matrices carry
4
5
  * more distinct threshold levels, so the pattern is finer and the apparent tonal
@@ -29,18 +30,64 @@ export type DitherNoise = 'bayer' | 'blue';
29
30
  * Contrast with `posterize`, which quantizes with no threshold pattern and so
30
31
  * produces flat bands.
31
32
  */
32
- export interface DitherEffect extends ModedEffect {
33
+ export interface DitherEffect extends ModedEffect, EffectFields<typeof ditherSpec.params> {
33
34
  type: "dither";
34
- /** Output tones per channel (≥ 2). 2 is pure 1-bit-per-channel. */
35
- levels: number;
36
- /** Bayer matrix size. Ignored when `noise` is `'blue'`. */
37
- matrix: DitherMatrix;
38
- /** Pattern cell size in px — >1 gives chunky, low-res-looking dither. */
39
- scale: number;
40
- /** Dither luminance to black and white instead of per channel. */
41
- monochrome: boolean;
42
- /** Threshold source: ordered Bayer matrix, or blue noise. */
43
- noise: DitherNoise;
44
35
  }
36
+ /** The {@link DitherEffect} spec: its parameters, defaults and ranges. */
37
+ export declare const ditherSpec: import("../spec.js").EffectSpec<"dither", {
38
+ /** Output tones per channel, ≥ 2. */
39
+ readonly levels: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
40
+ readonly default: 2;
41
+ readonly min: 2;
42
+ readonly max: 32;
43
+ readonly step: 1;
44
+ readonly inline: true;
45
+ readonly order: 0;
46
+ }> & {
47
+ kind: "number";
48
+ };
49
+ /** Bayer matrix size. Ignored when `noise` is `'blue'`. */
50
+ readonly matrix: import("../spec.js").EffectParamDef<4 | 2 | 8, 4 | 2 | 8> & NoInfer<{
51
+ readonly default: 4;
52
+ readonly optionsLabel: "ditherMatrix";
53
+ readonly order: 2;
54
+ }> & {
55
+ kind: "enum";
56
+ options: readonly (4 | 2 | 8)[];
57
+ };
58
+ /** Pattern cell size in pixels. */
59
+ readonly scale: import("../spec.js").EffectParamDef<number, number> & NoInfer<{
60
+ readonly default: 1;
61
+ readonly min: 1;
62
+ readonly step: 1;
63
+ readonly unit: "px";
64
+ readonly label: "cellSize";
65
+ readonly order: 3;
66
+ }> & {
67
+ kind: "number";
68
+ };
69
+ /** Dither luminance to black and white. */
70
+ readonly monochrome: import("../spec.js").EffectParamDef<boolean, boolean> & NoInfer<{
71
+ readonly default: false;
72
+ readonly order: 4;
73
+ }> & {
74
+ kind: "boolean";
75
+ };
76
+ /**
77
+ * Threshold pattern. `'bayer'` is the classic ordered matrix — a visible
78
+ * crosshatch, the retro look, which can beat against the pixel grid at
79
+ * some `scale`s. `'blue'` is a void-and-cluster blue-noise field: same
80
+ * tone reproduction, no lattice, no moiré.
81
+ */
82
+ readonly noise: import("../spec.js").EffectParamDef<"blue" | "bayer", "blue" | "bayer"> & NoInfer<{
83
+ readonly default: "bayer";
84
+ readonly label: "ditherNoise";
85
+ readonly optionsLabel: "ditherNoise";
86
+ readonly order: 1;
87
+ }> & {
88
+ kind: "enum";
89
+ options: readonly ("blue" | "bayer")[];
90
+ };
91
+ }>;
45
92
  export declare const ditherEffect: EffectData<DitherEffect>;
46
93
  //# sourceMappingURL=dither.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dither.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/dither.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,MAAM,EAAE,YAAY,CAAC;IACrB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,UAAU,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,KAAK,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAqBjD,CAAC"}
1
+ {"version":3,"file":"dither.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/dither.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;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,MAAM,CAAC;IACrF,IAAI,EAAE,QAAQ,CAAC;CAClB;AAED,0EAA0E;AAC1E,eAAO,MAAM,UAAU;IAQf,qCAAqC;;;;;;;;;;;IAErC,2DAA2D;;;;;;;;;IAE3D,mCAAmC;;;;;;;;;;;IAEnC,2CAA2C;;;;;;;IAE3C;;;;;OAKG;;;;;;;;;;EAGT,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAA4B,CAAC"}