@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,8 +1,6 @@
1
1
  export * from './shape/corners/index.js';
2
2
  export * from './shape/effects/index.js';
3
3
  export * from './shape/fill/index.js';
4
- export { normalizeUniforms, lerpUniformValue, lerpUniformRecord, uniformValuesEqual, uniformRecordsEqual, describeUniforms, writeUniforms, coordsMatrix, parseShaderChildren, } from './shape/sksl-uniforms.js';
5
- export type { SkSLUniformRecord, UniformReflect, UniformSlot, UniformBounds, ShaderChildDecl, } from './shape/sksl-uniforms.js';
6
4
  export * from './shape/filters/index.js';
7
5
  export * from './shape/path/index.js';
8
6
  export * from './shape/shadow/index.js';
@@ -11,7 +9,10 @@ export { Sound, SoundProps } from './audio/sound.js';
11
9
  export type { AudioBusStop, AudioRequest } from './audio/request.js';
12
10
  export { busStopKey } from './audio/request.js';
13
11
  export type { AudioClip } from './audio/schedule.js';
14
- export * from './audio/filters/index.js';
12
+ export { clipDurationOf, clipTimeAtSource, sourceTimeAtClip } from './audio/schedule.js';
13
+ export * from './audio/effects/index.js';
14
+ export * from './audio/ramp.js';
15
+ export * from './audio/transition.js';
15
16
  export * from './layout/index.js';
16
17
  export * from './mask/boolean.js';
17
18
  export * from './mask/mask.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/attributes/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAM7B,OAAO,EACH,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EACtD,kBAAkB,EAAE,mBAAmB,EACvC,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,GACrE,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACR,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,GACjF,MAAM,uBAAuB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,M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AO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACxE,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC"}
@@ -1,19 +1,16 @@
1
1
  export * from './shape/corners/index.js';
2
2
  export * from './shape/effects/index.js';
3
3
  export * from './shape/fill/index.js';
4
- // The renderer-facing half of the SkSL plumbing. Surfaced for the same reason
5
- // `resolveVideoTimestamp` is: the marshalling rules are part of the shader fill's
6
- // contract, so the backend consumes core's definition rather than reimplementing
7
- // it. Named rather than wildcard because `SkSLUniform`/`SkSLUniformValue` already
8
- // reach the barrel through `./shape/effects`.
9
- export { normalizeUniforms, lerpUniformValue, lerpUniformRecord, uniformValuesEqual, uniformRecordsEqual, describeUniforms, writeUniforms, coordsMatrix, parseShaderChildren, } from './shape/sksl-uniforms.js';
10
4
  export * from './shape/filters/index.js';
11
5
  export * from './shape/path/index.js';
12
6
  export * from './shape/shadow/index.js';
13
7
  export * from './shape/stroke/index.js';
14
8
  export { Sound } from './audio/sound.js';
15
9
  export { busStopKey } from './audio/request.js';
16
- export * from './audio/filters/index.js';
10
+ export { clipDurationOf, clipTimeAtSource, sourceTimeAtClip } from './audio/schedule.js';
11
+ export * from './audio/effects/index.js';
12
+ export * from './audio/ramp.js';
13
+ export * from './audio/transition.js';
17
14
  export * from './layout/index.js';
18
15
  export * from './mask/boolean.js';
19
16
  export * from './mask/mask.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/attributes/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,8EAA8E;AAC9E,kFAAkF;AAClF,iFAAiF;AACjF,kFAAkF;AAClF,8CAA8C;AAC9C,OAAO,EACH,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EACtD,kBAAkB,EAAE,mBAAmB,EACvC,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,GACrE,MAAM,uBAAuB,CAAC;AAI/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAc,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,+EAA+E;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './shape/corners';\r\nexport * from './shape/effects';\r\nexport * from './shape/fill';\r\n// The renderer-facing half of the SkSL plumbing. Surfaced for the same reason\r\n// `resolveVideoTimestamp` is: the marshalling rules are part of the shader fill's\r\n// contract, so the backend consumes core's definition rather than reimplementing\r\n// it. Named rather than wildcard because `SkSLUniform`/`SkSLUniformValue` already\r\n// reach the barrel through `./shape/effects`.\r\nexport {\r\n normalizeUniforms, lerpUniformValue, lerpUniformRecord,\r\n uniformValuesEqual, uniformRecordsEqual,\r\n describeUniforms, writeUniforms, coordsMatrix, parseShaderChildren,\r\n} from './shape/sksl-uniforms';\r\nexport type {\r\n SkSLUniformRecord, UniformReflect, UniformSlot, UniformBounds, ShaderChildDecl,\r\n} from './shape/sksl-uniforms';\r\nexport * from './shape/filters';\r\nexport * from './shape/path';\r\nexport * from './shape/shadow';\r\nexport * from './shape/stroke';\r\nexport { Sound, SoundProps } from './audio/sound';\r\nexport type { AudioBusStop, AudioRequest } from './audio/request';\r\nexport { busStopKey } from './audio/request';\r\nexport type { AudioClip } from './audio/schedule';\r\nexport * from './audio/filters';\r\nexport * from './layout';\r\nexport * from './mask/boolean';\r\nexport * from './mask/mask';\r\nexport * from './text';\r\n// What a host reads to draw an inspector: every property a node type declares.\r\nexport { getPropertyMeta } from './properties/decorator';\r\nexport type { PropertyMeta, PropOptions } from './properties/decorator';\r\nexport * from \"./shape/shaders\";\r\n\r\nexport * from './shared/operators';\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/attributes/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAc,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACtF,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,+EAA+E;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './shape/corners';\r\nexport * from './shape/effects';\r\nexport * from './shape/fill';\r\nexport * from './shape/filters';\r\nexport * from './shape/path';\r\nexport * from './shape/shadow';\r\nexport * from './shape/stroke';\r\nexport { Sound, SoundProps } from './audio/sound';\r\nexport type { AudioBusStop, AudioRequest } from './audio/request';\r\nexport { busStopKey } from './audio/request';\r\nexport type { AudioClip } from './audio/schedule';\r\nexport { clipDurationOf, clipTimeAtSource, sourceTimeAtClip } from './audio/schedule';\r\nexport * from './audio/effects';\r\nexport * from './audio/ramp';\r\nexport * from './audio/transition';\r\nexport * from './layout';\r\nexport * from './mask/boolean';\r\nexport * from './mask/mask';\r\nexport * from './text';\r\n// What a host reads to draw an inspector: every property a node type declares.\r\nexport { getPropertyMeta } from './properties/decorator';\r\nexport type { PropertyMeta, PropOptions } from './properties/decorator';\r\nexport * from \"./shape/shaders\";\r\n\r\nexport * from './shared/operators';\r\n"]}
@@ -9,8 +9,8 @@ import { Vector2 } from "../../attributes/layout/vector2.js";
9
9
  * ```
10
10
  *
11
11
  * Point mapping is `x' = (a·x + c·y + e) / w`, `y' = (b·x + d·y + f) / w`, with
12
- * `w = g·x + h·y + i`. This is the same column-order convention CanvasKit/DOM
13
- * use, so matrices compose in draw order: `parent.multiply(child)` is the world
12
+ * `w = g·x + h·y + i`. This is the same column-order convention the DOM
13
+ * uses, so matrices compose in draw order: `parent.multiply(child)` is the world
14
14
  * transform of `child`.
15
15
  *
16
16
  * **The bottom row is optional, and leaving it off means `[0 0 1]`** — an
@@ -1 +1 @@
1
- {"version":3,"file":"matrix2d.js","sourceRoot":"","sources":["../../../src/attributes/layout/matrix2d.ts"],"names":[],"mappings":"AAqCA,0FAA0F;AAC1F,MAAM,UAAU,YAAY,CAAC,CAAW;IACpC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,KAAK,GAAG,IAAI,CAAC;AACnB,SAAS,KAAK,CAAC,CAAS;IACpB,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC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E;IACvE,EAAE;IACF,0EAA0E;IAC1E,2EAA2E;IAC3E,0EAA0E;IAC1E,uEAAuE;IACvE,2EAA2E;IAC3E,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,2EAA2E;IAC3E,yEAAyE;IACzE,8DAA8D;IAC9D,MAAM,EAAE,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,OAAO;QACH,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC,EAAE,CAAC,GAAG,EAAE;QACT,CAAC,EAAE,CAAC,GAAG,EAAE;QACT,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Vector2 } from \"@/attributes/layout/vector2\";\r\n\r\n/**\r\n * A 2D transform stored as the members of a 3×3 matrix:\r\n *\r\n * ```\r\n * | a c e |\r\n * | b d f |\r\n * | g h i |\r\n * ```\r\n *\r\n * Point mapping is `x' = (a·x + c·y + e) / w`, `y' = (b·x + d·y + f) / w`, with\r\n * `w = g·x + h·y + i`. This is the same column-order convention CanvasKit/DOM\r\n * use, so matrices compose in draw order: `parent.multiply(child)` is the world\r\n * transform of `child`.\r\n *\r\n * **The bottom row is optional, and leaving it off means `[0 0 1]`** — an\r\n * ordinary affine transform, where `w` is 1 everywhere and the divide falls\r\n * away. Every matrix in the engine was exactly that until\r\n * {@link nodeProjectedMatrix} arrived: a node tilted out of its own plane\r\n * projects through a *homography*, and a homography does not fit in six numbers.\r\n * Rather than a second matrix type — with a second `multiply`, `invert` and\r\n * `applyToPoint` beside it, which is precisely how a renderer and a hit test end\r\n * up disagreeing about where a node is — the row lives here, and everything that\r\n * has no use for it simply omits it.\r\n */\r\n/** @internal */\r\nexport interface Matrix2D {\r\n a: number; b: number; c: number; d: number; e: number; f: number;\r\n /** Perspective row, x term. Omitted on an affine transform (means `0`). */\r\n g?: number;\r\n /** Perspective row, y term. Omitted on an affine transform (means `0`). */\r\n h?: number;\r\n /** Perspective row, constant term. Omitted on an affine transform (means `1`). */\r\n i?: number;\r\n}\r\n\r\n/** @internal Whether `m` carries a perspective row — i.e. whether `w` is not always 1. */\r\nexport function isProjective(m: Matrix2D): boolean {\r\n return (m.g ?? 0) !== 0 || (m.h ?? 0) !== 0 || (m.i ?? 1) !== 1;\r\n}\r\n\r\n/**\r\n * Guard the perspective divide. A point on the vanishing line has `w = 0` and\r\n * projects to infinity, which is a real answer no coordinate can hold; clamping\r\n * to a tiny same-signed `w` sends it far off-screen instead, which is where it\r\n * belongs and is a number the caller can keep doing arithmetic with. Without\r\n * this, one degenerate corner turns an anchor set into `Infinity`/`NaN` and\r\n * takes the selection box, the hit test and any layout reading it with it.\r\n */\r\nconst MIN_W = 1e-6;\r\nfunction safeW(w: number): number {\r\n if (w > MIN_W || w < -MIN_W) return w;\r\n return w < 0 ? -MIN_W : MIN_W;\r\n}\r\n\r\n/** @internal The identity transform — maps every point to itself. */\r\nexport function identity(): Matrix2D {\r\n return { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };\r\n}\r\n\r\n/** @internal Pure translation by (tx, ty). */\r\nexport function translation(tx: number, ty: number): Matrix2D {\r\n return { a: 1, b: 0, c: 0, d: 1, e: tx, f: ty };\r\n}\r\n\r\n/**\r\n * `m1 · m2` — the transform that applies `m2` first, then `m1`. Composing an\r\n * ancestor with a descendant (`ancestor.multiply(descendant)`) yields the\r\n * descendant's world transform.\r\n *\r\n * Two affine matrices take the six-member path they always did — that is every\r\n * composition in a scene with no 3D in it, once per node per parent per frame —\r\n * and the general 3×3 product runs only when one side actually carries a\r\n * perspective row.\r\n */\r\n/** @internal */\r\nexport function multiply(m1: Matrix2D, m2: Matrix2D): Matrix2D {\r\n if (isProjective(m1) || isProjective(m2)) return multiplyProjective(m1, m2);\r\n return {\r\n a: m1.a * m2.a + m1.c * m2.b,\r\n b: m1.b * m2.a + m1.d * m2.b,\r\n c: m1.a * m2.c + m1.c * m2.d,\r\n d: m1.b * m2.c + m1.d * m2.d,\r\n e: m1.a * m2.e + m1.c * m2.f + m1.e,\r\n f: m1.b * m2.e + m1.d * m2.f + m1.f,\r\n };\r\n}\r\n\r\n/** The full 3×3 product, rows `[a c e] [b d f] [g h i]`. See {@link multiply}. */\r\nfunction multiplyProjective(m1: Matrix2D, m2: Matrix2D): Matrix2D {\r\n const g1 = m1.g ?? 0, h1 = m1.h ?? 0, i1 = m1.i ?? 1;\r\n const g2 = m2.g ?? 0, h2 = m2.h ?? 0, i2 = m2.i ?? 1;\r\n return {\r\n a: m1.a * m2.a + m1.c * m2.b + m1.e * g2,\r\n c: m1.a * m2.c + m1.c * m2.d + m1.e * h2,\r\n e: m1.a * m2.e + m1.c * m2.f + m1.e * i2,\r\n b: m1.b * m2.a + m1.d * m2.b + m1.f * g2,\r\n d: m1.b * m2.c + m1.d * m2.d + m1.f * h2,\r\n f: m1.b * m2.e + m1.d * m2.f + m1.f * i2,\r\n g: g1 * m2.a + h1 * m2.b + i1 * g2,\r\n h: g1 * m2.c + h1 * m2.d + i1 * h2,\r\n i: g1 * m2.e + h1 * m2.f + i1 * i2,\r\n };\r\n}\r\n\r\n/** @internal Map a point through the transform. */\r\nexport function applyToPoint(m: Matrix2D, p: Vector2): Vector2 {\r\n const x = m.a * p.x + m.c * p.y + m.e;\r\n const y = m.b * p.x + m.d * p.y + m.f;\r\n if (!isProjective(m)) return { x, y };\r\n const w = safeW((m.g ?? 0) * p.x + (m.h ?? 0) * p.y + (m.i ?? 1));\r\n return { x: x / w, y: y / w };\r\n}\r\n\r\n/**\r\n * The inverse transform, or `null` when `m` is singular (a zero scale collapses\r\n * the plane, so no inverse exists). Used to map a viewport-space point back into\r\n * a node's local space for hit testing.\r\n */\r\n/** @internal */\r\nexport function invert(m: Matrix2D): Matrix2D | null {\r\n if (isProjective(m)) return invertProjective(m);\r\n const det = m.a * m.d - m.b * m.c;\r\n if (det === 0 || !Number.isFinite(det)) return null;\r\n const inv = 1 / det;\r\n return {\r\n a: m.d * inv,\r\n b: -m.b * inv,\r\n c: -m.c * inv,\r\n d: m.a * inv,\r\n e: (m.c * m.f - m.d * m.e) * inv,\r\n f: (m.b * m.e - m.a * m.f) * inv,\r\n };\r\n}\r\n\r\n/**\r\n * The inverse of a homography — the adjugate over the determinant, written out\r\n * in this module's row naming. A projective inverse is still a homography, which\r\n * is what lets picking keep mapping a viewport point back into a node's local\r\n * space with nothing but {@link applyToPoint} once the node is tilted.\r\n */\r\nfunction invertProjective(m: Matrix2D): Matrix2D | null {\r\n const { a, b, c, d, e, f } = m;\r\n const g = m.g ?? 0, h = m.h ?? 0, i = m.i ?? 1;\r\n // Cofactors of the 3×3 | a c e | / | b d f | / | g h i |.\r\n const A = d * i - f * h;\r\n const C = f * g - b * i;\r\n const E = b * h - d * g;\r\n const det = a * A + c * C + e * E;\r\n if (det === 0 || !Number.isFinite(det)) return null;\r\n const inv = 1 / det;\r\n return {\r\n a: A * inv,\r\n c: (e * h - c * i) * inv,\r\n e: (c * f - e * d) * inv,\r\n b: C * inv,\r\n d: (a * i - e * g) * inv,\r\n f: (e * b - a * f) * inv,\r\n g: E * inv,\r\n h: (c * g - a * h) * inv,\r\n i: (a * d - c * b) * inv,\r\n };\r\n}\r\n\r\n/**\r\n * The viewport transform a camera scope pushes, in canvas (y-down) space — a\r\n * literal transcription of `RenderContext2D.beginCamera`:\r\n *\r\n * translate(vx, vy) · rotate(-heading) · scale(zoom) · translate(-lookAt.x, +lookAt.y)\r\n *\r\n * `lookAt` is a y-up world point, hence the sign flip on its y. `vx`/`vy` are the\r\n * viewport centre the camera's callers pass (`layoutBounds.x`, `-layoutBounds.y`).\r\n * Kept next to {@link nodeLocalMatrix} so the two stay in step with the renderer.\r\n */\r\n/** @internal */\r\nexport function cameraMatrix(\r\n vx: number, vy: number, lookAt: Vector2, zoom: number, heading: number,\r\n): Matrix2D {\r\n const rad = (-heading * Math.PI) / 180;\r\n const cos = Math.cos(rad);\r\n const sin = Math.sin(rad);\r\n // rotate(-heading) · scale(zoom), the same clockwise canvas convention as\r\n // nodeLocalMatrix's R·S block.\r\n const a = zoom * cos;\r\n const b = zoom * sin;\r\n const c = zoom * -sin;\r\n const d = zoom * cos;\r\n // Fold the trailing translate(-lookAt.x, +lookAt.y) into e/f.\r\n const tx = -lookAt.x;\r\n const ty = lookAt.y;\r\n return { a, b, c, d, e: vx + a * tx + c * ty, f: vy + b * tx + d * ty };\r\n}\r\n\r\n/**\r\n * Build the local transform for a node, matching the renderer's\r\n * `RenderContext2D.transform` exactly (canvas y-down space):\r\n * `T(cx + pivotX, cy + pivotY) · R(deg) · S(scale) · T(-pivotX, -pivotY)`.\r\n *\r\n * @param cx Canvas-space x of the node's layout-cell lookAt.\r\n * @param cy Canvas-space y of the node's layout-cell origin (y-down).\r\n * @param rotation Rotation in degrees, clockwise (canvas convention).\r\n * @param scale Uniform scale factor.\r\n * @param pivotX Pivot offset in pixels, x.\r\n * @param pivotY Pivot offset in pixels, y (canvas y-down).\r\n */\r\n/** @internal */\r\nexport function nodeLocalMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n): Matrix2D {\r\n const rad = (rotation * Math.PI) / 180;\r\n const cos = Math.cos(rad);\r\n const sin = Math.sin(rad);\r\n // R(deg) · S(scale): clockwise rotation in canvas (y-down) is\r\n // | cos -sin | · | s 0 | = | s·cos -s·sin |\r\n // | sin cos | | 0 s | | s·sin s·cos |\r\n const a = scale * cos;\r\n const b = scale * sin;\r\n const c = scale * -sin;\r\n const d = scale * cos;\r\n // Fold the pivot translations into e/f:\r\n // T(cx+pivotX, cy+pivotY) · (RS) · T(-pivotX, -pivotY)\r\n return {\r\n a, b, c, d,\r\n e: cx + pivotX - (a * pivotX + c * pivotY),\r\n f: cy + pivotY - (b * pivotX + d * pivotY),\r\n };\r\n}\r\n\r\n/**\r\n * The out-of-plane half of a node's transform — the mirrors, the two extra\r\n * rotation axes, the push along z and the perspective divide that makes them\r\n * read as depth rather than as squashing. See {@link nodeProjectedMatrix}.\r\n */\r\n/** @internal */\r\nexport interface Projection3D {\r\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\r\n rotationX: number;\r\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\r\n rotationY: number;\r\n /**\r\n * In-plane rotation belonging to the 3D block, degrees clockwise — the Z axis\r\n * of `Rx · Ry · Rz`.\r\n *\r\n * A prop of its own rather than a second name for the node's `rotation`, and\r\n * that is a deliberate separation: `rotation` is the node's **shape** — it\r\n * turns the box, the selection outline turns with it, and handles follow —\r\n * while this is part of the projection, which is paint. The two compose (a\r\n * Z rotation is a Z rotation, so they add), but they are two independent\r\n * numbers and editing one never moves the other.\r\n */\r\n rotationZ: number;\r\n /** Push along the view axis in px, applied after the rotations. Inert without `perspective`. */\r\n depth: number;\r\n /** Viewer distance in px. `0` is no perspective at all — a parallel projection. */\r\n perspective: number;\r\n /** Mirror across the node's vertical centre line. */\r\n flipHorizontal: boolean;\r\n /** Mirror across the node's horizontal centre line. */\r\n flipVertical: boolean;\r\n}\r\n\r\n/** @internal Every field of a {@link Projection3D} at rest — the plain 2D node. */\r\nexport const NO_PROJECTION_3D: Projection3D = {\r\n rotationX: 0,\r\n rotationY: 0,\r\n rotationZ: 0,\r\n depth: 0,\r\n perspective: 0,\r\n flipHorizontal: false,\r\n flipVertical: false,\r\n};\r\n\r\n/**\r\n * Whether `p` asks for anything {@link nodeLocalMatrix} cannot already express.\r\n * The gate in front of every projective path in the engine: a scene with no 3D\r\n * in it keeps the six-number matrix, the decomposed `translate/rotate/scale`\r\n * render path, and the affine `multiply` it always had.\r\n */\r\n/** @internal */\r\nexport function hasProjection3D(p: Projection3D): boolean {\r\n return (\r\n p.rotationX !== 0 ||\r\n p.rotationY !== 0 ||\r\n p.rotationZ !== 0 ||\r\n p.flipHorizontal ||\r\n p.flipVertical ||\r\n (p.perspective !== 0 && p.depth !== 0)\r\n );\r\n}\r\n\r\n/**\r\n * Whether a plane carrying this projection has turned its back on the viewer —\r\n * the test behind `backfaceVisible`.\r\n *\r\n * Read off the tilt alone. The plane's normal starts at `(0,0,1)` and comes out\r\n * of `Rx·Ry` with a z of `cos(rotationX)·cos(rotationY)`; the in-plane rotation\r\n * can't change which way it points, and neither, deliberately, can a *mirror*.\r\n * CSS derives the answer from the whole accumulated matrix, where a `scaleX(-1)`\r\n * inverts orientation and hides the element — which is a surprising way to lose\r\n * a node you only meant to flip. Here a flip is a flip and a turn is a turn.\r\n */\r\n/** @internal */\r\nexport function facesAway(rotationX: number, rotationY: number): boolean {\r\n const rad = Math.PI / 180;\r\n return Math.cos(rotationX * rad) * Math.cos(rotationY * rad) < 0;\r\n}\r\n\r\n/**\r\n * A node's local transform with the out-of-plane half folded in — the same space\r\n * and the same pivot convention as {@link nodeLocalMatrix}, which this reduces to\r\n * exactly when {@link hasProjection3D} is false.\r\n *\r\n * The composition, innermost first:\r\n *\r\n * `T(pivot) · P(perspective) · Tz(depth) · Rx · Ry · Rz(rotationZ + rotation) · S(scale) · T(-pivot) · F(flip)`\r\n *\r\n * — everything about the pivot except the mirrors, which reflect about the\r\n * node's own centre so that flipping cannot move the node (see `F` below),\r\n *\r\n * which is CSS's own order for `rotateX(a) rotateY(b) rotateZ(c)` — the in-plane\r\n * rotation innermost, so that adding a tilt never changes what the node's own\r\n * `rotation` already meant.\r\n *\r\n * The Z angle is the **sum** of the two in-plane rotations the node carries, and\r\n * they stay two: `rotation` turns the node's *shape* — its box turns with it, and\r\n * so does anything reading that box — while {@link Projection3D.rotationZ} is\r\n * part of the projection, which is paint (see `Node2D._localMatrix`). Summing them\r\n * is not a coupling but the definition of composing two rotations about one axis;\r\n * neither number moves when the other is edited.\r\n *\r\n * The content is planar — every point enters with `z = 0` — so the whole thing\r\n * collapses to a 3×3 homography over `(x, y, 1)` rather than needing a 4×4 and a\r\n * separate divide step. The projected z survives only as the perspective row.\r\n *\r\n * @param cx Canvas-space x of the node's positioned centre.\r\n * @param cy Canvas-space y of the node's positioned centre (y-down).\r\n * @param rotation In-plane rotation in degrees, clockwise (the Z axis).\r\n * @param scale Uniform scale factor.\r\n * @param pivotX Pivot offset from the centre in px, x.\r\n * @param pivotY Pivot offset from the centre in px, y (canvas y-down).\r\n * @param p The out-of-plane fields.\r\n */\r\n/** @internal */\r\nexport function nodeProjectedMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n p: Projection3D,\r\n): Matrix2D {\r\n if (!hasProjection3D(p)) {\r\n return nodeLocalMatrix(cx, cy, rotation, scale, pivotX, pivotY);\r\n }\r\n const rad = Math.PI / 180;\r\n const ca = Math.cos(p.rotationX * rad), sa = Math.sin(p.rotationX * rad);\r\n const cb = Math.cos(p.rotationY * rad), sb = Math.sin(p.rotationY * rad);\r\n // The two in-plane rotations compose into one angle — see the note above.\r\n const cz = (rotation + p.rotationZ) * rad;\r\n const cc = Math.cos(cz), sc = Math.sin(cz);\r\n\r\n // The two columns of Rx·Ry·Rz that a z = 0 point can reach, scaled.\r\n const A = cb * cc * scale;\r\n const C = -cb * sc * scale;\r\n const B = (sa * sb * cc + ca * sc) * scale;\r\n const D = (ca * cc - sa * sb * sc) * scale;\r\n // The row that would have been the projected z, had we kept one.\r\n const G = (sa * sc - ca * sb * cc) * scale;\r\n const H = (ca * sb * sc + sa * cc) * scale;\r\n\r\n // Perspective: a point at depth z lands at x/w with w = 1 - z/perspective.\r\n // No perspective means a parallel projection — z is simply dropped, w stays\r\n // 1, and the result is affine (which is also why `depth` alone does nothing).\r\n const invP = p.perspective !== 0 ? 1 / p.perspective : 0;\r\n const g = -G * invP;\r\n const h = -H * invP;\r\n // The z the pivot itself sits at: -(G·pivotX + H·pivotY) is what the shift to\r\n // pivot-relative coordinates leaves in the z row, and `depth` is the push\r\n // along it, applied after the tilt (so it moves the whole tilted plane).\r\n const i = 1 - (p.depth - (G * pivotX + H * pivotY)) * invP;\r\n\r\n // Numerators about the pivot, then the trailing translate folded in. A\r\n // translate composes onto a homography as `+ t·w`, hence the g/h/i terms.\r\n const tx = cx + pivotX;\r\n const ty = cy + pivotY;\r\n\r\n // The mirrors, applied **innermost and about the node's own centre** — a\r\n // final column negation, which is what `M · diag(fx, fy, 1)` comes to.\r\n //\r\n // Not about the pivot, unlike everything else here, and that is the whole\r\n // point: a flip is an in-place reflection. Composing it with the pivot the\r\n // way CSS's `scaleX(-1)` does means a node hinged anywhere but its middle\r\n // *swings* when you flip it — its position readout changes, its corner\r\n // handles land somewhere else, and the gesture stops meaning \"mirror this\"\r\n // and starts meaning \"mirror this and move it\". Every design tool flips\r\n // about the selection's own centre for that reason. Written as a column\r\n // scale rather than a `T(c)·F·T(-c)` sandwich because that is what one\r\n // reduces to here — the local frame is already centred on the node — which\r\n // leaves `e`/`f`/`i` untouched and makes \"a flip cannot move the node\" a\r\n // property of the arithmetic rather than a thing to remember.\r\n const fx = p.flipHorizontal ? -1 : 1;\r\n const fy = p.flipVertical ? -1 : 1;\r\n return {\r\n a: (A + tx * g) * fx,\r\n c: (C + tx * h) * fy,\r\n e: -(A * pivotX + C * pivotY) + tx * i,\r\n b: (B + ty * g) * fx,\r\n d: (D + ty * h) * fy,\r\n f: -(B * pivotX + D * pivotY) + ty * i,\r\n g: g * fx,\r\n h: h * fy,\r\n i,\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"matrix2d.js","sourceRoot":"","sources":["../../../src/attributes/layout/matrix2d.ts"],"names":[],"mappings":"AAqCA,0FAA0F;AAC1F,MAAM,UAAU,YAAY,CAAC,CAAW;IACpC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,KAAK,GAAG,IAAI,CAAC;AACnB,SAAS,KAAK,CAAC,CAAS;IACpB,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AAClC,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,QAAQ;IACpB,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,WAAW,CAAC,EAAU,EAAE,EAAU;IAC9C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;;;GASG;AACH,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,E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AM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC,EAAE,CAAC,GAAG,EAAE;QACT,CAAC,EAAE,CAAC,GAAG,EAAE;QACT,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Vector2 } from \"@/attributes/layout/vector2\";\r\n\r\n/**\r\n * A 2D transform stored as the members of a 3×3 matrix:\r\n *\r\n * ```\r\n * | a c e |\r\n * | b d f |\r\n * | g h i |\r\n * ```\r\n *\r\n * Point mapping is `x' = (a·x + c·y + e) / w`, `y' = (b·x + d·y + f) / w`, with\r\n * `w = g·x + h·y + i`. This is the same column-order convention the DOM\r\n * uses, so matrices compose in draw order: `parent.multiply(child)` is the world\r\n * transform of `child`.\r\n *\r\n * **The bottom row is optional, and leaving it off means `[0 0 1]`** — an\r\n * ordinary affine transform, where `w` is 1 everywhere and the divide falls\r\n * away. Every matrix in the engine was exactly that until\r\n * {@link nodeProjectedMatrix} arrived: a node tilted out of its own plane\r\n * projects through a *homography*, and a homography does not fit in six numbers.\r\n * Rather than a second matrix type — with a second `multiply`, `invert` and\r\n * `applyToPoint` beside it, which is precisely how a renderer and a hit test end\r\n * up disagreeing about where a node is — the row lives here, and everything that\r\n * has no use for it simply omits it.\r\n */\r\n/** @internal */\r\nexport interface Matrix2D {\r\n a: number; b: number; c: number; d: number; e: number; f: number;\r\n /** Perspective row, x term. Omitted on an affine transform (means `0`). */\r\n g?: number;\r\n /** Perspective row, y term. Omitted on an affine transform (means `0`). */\r\n h?: number;\r\n /** Perspective row, constant term. Omitted on an affine transform (means `1`). */\r\n i?: number;\r\n}\r\n\r\n/** @internal Whether `m` carries a perspective row — i.e. whether `w` is not always 1. */\r\nexport function isProjective(m: Matrix2D): boolean {\r\n return (m.g ?? 0) !== 0 || (m.h ?? 0) !== 0 || (m.i ?? 1) !== 1;\r\n}\r\n\r\n/**\r\n * Guard the perspective divide. A point on the vanishing line has `w = 0` and\r\n * projects to infinity, which is a real answer no coordinate can hold; clamping\r\n * to a tiny same-signed `w` sends it far off-screen instead, which is where it\r\n * belongs and is a number the caller can keep doing arithmetic with. Without\r\n * this, one degenerate corner turns an anchor set into `Infinity`/`NaN` and\r\n * takes the selection box, the hit test and any layout reading it with it.\r\n */\r\nconst MIN_W = 1e-6;\r\nfunction safeW(w: number): number {\r\n if (w > MIN_W || w < -MIN_W) return w;\r\n return w < 0 ? -MIN_W : MIN_W;\r\n}\r\n\r\n/** @internal The identity transform — maps every point to itself. */\r\nexport function identity(): Matrix2D {\r\n return { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };\r\n}\r\n\r\n/** @internal Pure translation by (tx, ty). */\r\nexport function translation(tx: number, ty: number): Matrix2D {\r\n return { a: 1, b: 0, c: 0, d: 1, e: tx, f: ty };\r\n}\r\n\r\n/**\r\n * `m1 · m2` — the transform that applies `m2` first, then `m1`. Composing an\r\n * ancestor with a descendant (`ancestor.multiply(descendant)`) yields the\r\n * descendant's world transform.\r\n *\r\n * Two affine matrices take the six-member path they always did — that is every\r\n * composition in a scene with no 3D in it, once per node per parent per frame —\r\n * and the general 3×3 product runs only when one side actually carries a\r\n * perspective row.\r\n */\r\n/** @internal */\r\nexport function multiply(m1: Matrix2D, m2: Matrix2D): Matrix2D {\r\n if (isProjective(m1) || isProjective(m2)) return multiplyProjective(m1, m2);\r\n return {\r\n a: m1.a * m2.a + m1.c * m2.b,\r\n b: m1.b * m2.a + m1.d * m2.b,\r\n c: m1.a * m2.c + m1.c * m2.d,\r\n d: m1.b * m2.c + m1.d * m2.d,\r\n e: m1.a * m2.e + m1.c * m2.f + m1.e,\r\n f: m1.b * m2.e + m1.d * m2.f + m1.f,\r\n };\r\n}\r\n\r\n/** The full 3×3 product, rows `[a c e] [b d f] [g h i]`. See {@link multiply}. */\r\nfunction multiplyProjective(m1: Matrix2D, m2: Matrix2D): Matrix2D {\r\n const g1 = m1.g ?? 0, h1 = m1.h ?? 0, i1 = m1.i ?? 1;\r\n const g2 = m2.g ?? 0, h2 = m2.h ?? 0, i2 = m2.i ?? 1;\r\n return {\r\n a: m1.a * m2.a + m1.c * m2.b + m1.e * g2,\r\n c: m1.a * m2.c + m1.c * m2.d + m1.e * h2,\r\n e: m1.a * m2.e + m1.c * m2.f + m1.e * i2,\r\n b: m1.b * m2.a + m1.d * m2.b + m1.f * g2,\r\n d: m1.b * m2.c + m1.d * m2.d + m1.f * h2,\r\n f: m1.b * m2.e + m1.d * m2.f + m1.f * i2,\r\n g: g1 * m2.a + h1 * m2.b + i1 * g2,\r\n h: g1 * m2.c + h1 * m2.d + i1 * h2,\r\n i: g1 * m2.e + h1 * m2.f + i1 * i2,\r\n };\r\n}\r\n\r\n/** @internal Map a point through the transform. */\r\nexport function applyToPoint(m: Matrix2D, p: Vector2): Vector2 {\r\n const x = m.a * p.x + m.c * p.y + m.e;\r\n const y = m.b * p.x + m.d * p.y + m.f;\r\n if (!isProjective(m)) return { x, y };\r\n const w = safeW((m.g ?? 0) * p.x + (m.h ?? 0) * p.y + (m.i ?? 1));\r\n return { x: x / w, y: y / w };\r\n}\r\n\r\n/**\r\n * The inverse transform, or `null` when `m` is singular (a zero scale collapses\r\n * the plane, so no inverse exists). Used to map a viewport-space point back into\r\n * a node's local space for hit testing.\r\n */\r\n/** @internal */\r\nexport function invert(m: Matrix2D): Matrix2D | null {\r\n if (isProjective(m)) return invertProjective(m);\r\n const det = m.a * m.d - m.b * m.c;\r\n if (det === 0 || !Number.isFinite(det)) return null;\r\n const inv = 1 / det;\r\n return {\r\n a: m.d * inv,\r\n b: -m.b * inv,\r\n c: -m.c * inv,\r\n d: m.a * inv,\r\n e: (m.c * m.f - m.d * m.e) * inv,\r\n f: (m.b * m.e - m.a * m.f) * inv,\r\n };\r\n}\r\n\r\n/**\r\n * The inverse of a homography — the adjugate over the determinant, written out\r\n * in this module's row naming. A projective inverse is still a homography, which\r\n * is what lets picking keep mapping a viewport point back into a node's local\r\n * space with nothing but {@link applyToPoint} once the node is tilted.\r\n */\r\nfunction invertProjective(m: Matrix2D): Matrix2D | null {\r\n const { a, b, c, d, e, f } = m;\r\n const g = m.g ?? 0, h = m.h ?? 0, i = m.i ?? 1;\r\n // Cofactors of the 3×3 | a c e | / | b d f | / | g h i |.\r\n const A = d * i - f * h;\r\n const C = f * g - b * i;\r\n const E = b * h - d * g;\r\n const det = a * A + c * C + e * E;\r\n if (det === 0 || !Number.isFinite(det)) return null;\r\n const inv = 1 / det;\r\n return {\r\n a: A * inv,\r\n c: (e * h - c * i) * inv,\r\n e: (c * f - e * d) * inv,\r\n b: C * inv,\r\n d: (a * i - e * g) * inv,\r\n f: (e * b - a * f) * inv,\r\n g: E * inv,\r\n h: (c * g - a * h) * inv,\r\n i: (a * d - c * b) * inv,\r\n };\r\n}\r\n\r\n/**\r\n * The viewport transform a camera scope pushes, in canvas (y-down) space — a\r\n * literal transcription of `RenderContext2D.beginCamera`:\r\n *\r\n * translate(vx, vy) · rotate(-heading) · scale(zoom) · translate(-lookAt.x, +lookAt.y)\r\n *\r\n * `lookAt` is a y-up world point, hence the sign flip on its y. `vx`/`vy` are the\r\n * viewport centre the camera's callers pass (`layoutBounds.x`, `-layoutBounds.y`).\r\n * Kept next to {@link nodeLocalMatrix} so the two stay in step with the renderer.\r\n */\r\n/** @internal */\r\nexport function cameraMatrix(\r\n vx: number, vy: number, lookAt: Vector2, zoom: number, heading: number,\r\n): Matrix2D {\r\n const rad = (-heading * Math.PI) / 180;\r\n const cos = Math.cos(rad);\r\n const sin = Math.sin(rad);\r\n // rotate(-heading) · scale(zoom), the same clockwise canvas convention as\r\n // nodeLocalMatrix's R·S block.\r\n const a = zoom * cos;\r\n const b = zoom * sin;\r\n const c = zoom * -sin;\r\n const d = zoom * cos;\r\n // Fold the trailing translate(-lookAt.x, +lookAt.y) into e/f.\r\n const tx = -lookAt.x;\r\n const ty = lookAt.y;\r\n return { a, b, c, d, e: vx + a * tx + c * ty, f: vy + b * tx + d * ty };\r\n}\r\n\r\n/**\r\n * Build the local transform for a node, matching the renderer's\r\n * `RenderContext2D.transform` exactly (canvas y-down space):\r\n * `T(cx + pivotX, cy + pivotY) · R(deg) · S(scale) · T(-pivotX, -pivotY)`.\r\n *\r\n * @param cx Canvas-space x of the node's layout-cell lookAt.\r\n * @param cy Canvas-space y of the node's layout-cell origin (y-down).\r\n * @param rotation Rotation in degrees, clockwise (canvas convention).\r\n * @param scale Uniform scale factor.\r\n * @param pivotX Pivot offset in pixels, x.\r\n * @param pivotY Pivot offset in pixels, y (canvas y-down).\r\n */\r\n/** @internal */\r\nexport function nodeLocalMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n): Matrix2D {\r\n const rad = (rotation * Math.PI) / 180;\r\n const cos = Math.cos(rad);\r\n const sin = Math.sin(rad);\r\n // R(deg) · S(scale): clockwise rotation in canvas (y-down) is\r\n // | cos -sin | · | s 0 | = | s·cos -s·sin |\r\n // | sin cos | | 0 s | | s·sin s·cos |\r\n const a = scale * cos;\r\n const b = scale * sin;\r\n const c = scale * -sin;\r\n const d = scale * cos;\r\n // Fold the pivot translations into e/f:\r\n // T(cx+pivotX, cy+pivotY) · (RS) · T(-pivotX, -pivotY)\r\n return {\r\n a, b, c, d,\r\n e: cx + pivotX - (a * pivotX + c * pivotY),\r\n f: cy + pivotY - (b * pivotX + d * pivotY),\r\n };\r\n}\r\n\r\n/**\r\n * The out-of-plane half of a node's transform — the mirrors, the two extra\r\n * rotation axes, the push along z and the perspective divide that makes them\r\n * read as depth rather than as squashing. See {@link nodeProjectedMatrix}.\r\n */\r\n/** @internal */\r\nexport interface Projection3D {\r\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\r\n rotationX: number;\r\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\r\n rotationY: number;\r\n /**\r\n * In-plane rotation belonging to the 3D block, degrees clockwise — the Z axis\r\n * of `Rx · Ry · Rz`.\r\n *\r\n * A prop of its own rather than a second name for the node's `rotation`, and\r\n * that is a deliberate separation: `rotation` is the node's **shape** — it\r\n * turns the box, the selection outline turns with it, and handles follow —\r\n * while this is part of the projection, which is paint. The two compose (a\r\n * Z rotation is a Z rotation, so they add), but they are two independent\r\n * numbers and editing one never moves the other.\r\n */\r\n rotationZ: number;\r\n /** Push along the view axis in px, applied after the rotations. Inert without `perspective`. */\r\n depth: number;\r\n /** Viewer distance in px. `0` is no perspective at all — a parallel projection. */\r\n perspective: number;\r\n /** Mirror across the node's vertical centre line. */\r\n flipHorizontal: boolean;\r\n /** Mirror across the node's horizontal centre line. */\r\n flipVertical: boolean;\r\n}\r\n\r\n/** @internal Every field of a {@link Projection3D} at rest — the plain 2D node. */\r\nexport const NO_PROJECTION_3D: Projection3D = {\r\n rotationX: 0,\r\n rotationY: 0,\r\n rotationZ: 0,\r\n depth: 0,\r\n perspective: 0,\r\n flipHorizontal: false,\r\n flipVertical: false,\r\n};\r\n\r\n/**\r\n * Whether `p` asks for anything {@link nodeLocalMatrix} cannot already express.\r\n * The gate in front of every projective path in the engine: a scene with no 3D\r\n * in it keeps the six-number matrix, the decomposed `translate/rotate/scale`\r\n * render path, and the affine `multiply` it always had.\r\n */\r\n/** @internal */\r\nexport function hasProjection3D(p: Projection3D): boolean {\r\n return (\r\n p.rotationX !== 0 ||\r\n p.rotationY !== 0 ||\r\n p.rotationZ !== 0 ||\r\n p.flipHorizontal ||\r\n p.flipVertical ||\r\n (p.perspective !== 0 && p.depth !== 0)\r\n );\r\n}\r\n\r\n/**\r\n * Whether a plane carrying this projection has turned its back on the viewer —\r\n * the test behind `backfaceVisible`.\r\n *\r\n * Read off the tilt alone. The plane's normal starts at `(0,0,1)` and comes out\r\n * of `Rx·Ry` with a z of `cos(rotationX)·cos(rotationY)`; the in-plane rotation\r\n * can't change which way it points, and neither, deliberately, can a *mirror*.\r\n * CSS derives the answer from the whole accumulated matrix, where a `scaleX(-1)`\r\n * inverts orientation and hides the element — which is a surprising way to lose\r\n * a node you only meant to flip. Here a flip is a flip and a turn is a turn.\r\n */\r\n/** @internal */\r\nexport function facesAway(rotationX: number, rotationY: number): boolean {\r\n const rad = Math.PI / 180;\r\n return Math.cos(rotationX * rad) * Math.cos(rotationY * rad) < 0;\r\n}\r\n\r\n/**\r\n * A node's local transform with the out-of-plane half folded in — the same space\r\n * and the same pivot convention as {@link nodeLocalMatrix}, which this reduces to\r\n * exactly when {@link hasProjection3D} is false.\r\n *\r\n * The composition, innermost first:\r\n *\r\n * `T(pivot) · P(perspective) · Tz(depth) · Rx · Ry · Rz(rotationZ + rotation) · S(scale) · T(-pivot) · F(flip)`\r\n *\r\n * — everything about the pivot except the mirrors, which reflect about the\r\n * node's own centre so that flipping cannot move the node (see `F` below),\r\n *\r\n * which is CSS's own order for `rotateX(a) rotateY(b) rotateZ(c)` — the in-plane\r\n * rotation innermost, so that adding a tilt never changes what the node's own\r\n * `rotation` already meant.\r\n *\r\n * The Z angle is the **sum** of the two in-plane rotations the node carries, and\r\n * they stay two: `rotation` turns the node's *shape* — its box turns with it, and\r\n * so does anything reading that box — while {@link Projection3D.rotationZ} is\r\n * part of the projection, which is paint (see `Node2D._localMatrix`). Summing them\r\n * is not a coupling but the definition of composing two rotations about one axis;\r\n * neither number moves when the other is edited.\r\n *\r\n * The content is planar — every point enters with `z = 0` — so the whole thing\r\n * collapses to a 3×3 homography over `(x, y, 1)` rather than needing a 4×4 and a\r\n * separate divide step. The projected z survives only as the perspective row.\r\n *\r\n * @param cx Canvas-space x of the node's positioned centre.\r\n * @param cy Canvas-space y of the node's positioned centre (y-down).\r\n * @param rotation In-plane rotation in degrees, clockwise (the Z axis).\r\n * @param scale Uniform scale factor.\r\n * @param pivotX Pivot offset from the centre in px, x.\r\n * @param pivotY Pivot offset from the centre in px, y (canvas y-down).\r\n * @param p The out-of-plane fields.\r\n */\r\n/** @internal */\r\nexport function nodeProjectedMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n p: Projection3D,\r\n): Matrix2D {\r\n if (!hasProjection3D(p)) {\r\n return nodeLocalMatrix(cx, cy, rotation, scale, pivotX, pivotY);\r\n }\r\n const rad = Math.PI / 180;\r\n const ca = Math.cos(p.rotationX * rad), sa = Math.sin(p.rotationX * rad);\r\n const cb = Math.cos(p.rotationY * rad), sb = Math.sin(p.rotationY * rad);\r\n // The two in-plane rotations compose into one angle — see the note above.\r\n const cz = (rotation + p.rotationZ) * rad;\r\n const cc = Math.cos(cz), sc = Math.sin(cz);\r\n\r\n // The two columns of Rx·Ry·Rz that a z = 0 point can reach, scaled.\r\n const A = cb * cc * scale;\r\n const C = -cb * sc * scale;\r\n const B = (sa * sb * cc + ca * sc) * scale;\r\n const D = (ca * cc - sa * sb * sc) * scale;\r\n // The row that would have been the projected z, had we kept one.\r\n const G = (sa * sc - ca * sb * cc) * scale;\r\n const H = (ca * sb * sc + sa * cc) * scale;\r\n\r\n // Perspective: a point at depth z lands at x/w with w = 1 - z/perspective.\r\n // No perspective means a parallel projection — z is simply dropped, w stays\r\n // 1, and the result is affine (which is also why `depth` alone does nothing).\r\n const invP = p.perspective !== 0 ? 1 / p.perspective : 0;\r\n const g = -G * invP;\r\n const h = -H * invP;\r\n // The z the pivot itself sits at: -(G·pivotX + H·pivotY) is what the shift to\r\n // pivot-relative coordinates leaves in the z row, and `depth` is the push\r\n // along it, applied after the tilt (so it moves the whole tilted plane).\r\n const i = 1 - (p.depth - (G * pivotX + H * pivotY)) * invP;\r\n\r\n // Numerators about the pivot, then the trailing translate folded in. A\r\n // translate composes onto a homography as `+ t·w`, hence the g/h/i terms.\r\n const tx = cx + pivotX;\r\n const ty = cy + pivotY;\r\n\r\n // The mirrors, applied **innermost and about the node's own centre** — a\r\n // final column negation, which is what `M · diag(fx, fy, 1)` comes to.\r\n //\r\n // Not about the pivot, unlike everything else here, and that is the whole\r\n // point: a flip is an in-place reflection. Composing it with the pivot the\r\n // way CSS's `scaleX(-1)` does means a node hinged anywhere but its middle\r\n // *swings* when you flip it — its position readout changes, its corner\r\n // handles land somewhere else, and the gesture stops meaning \"mirror this\"\r\n // and starts meaning \"mirror this and move it\". Every design tool flips\r\n // about the selection's own centre for that reason. Written as a column\r\n // scale rather than a `T(c)·F·T(-c)` sandwich because that is what one\r\n // reduces to here — the local frame is already centred on the node — which\r\n // leaves `e`/`f`/`i` untouched and makes \"a flip cannot move the node\" a\r\n // property of the arithmetic rather than a thing to remember.\r\n const fx = p.flipHorizontal ? -1 : 1;\r\n const fy = p.flipVertical ? -1 : 1;\r\n return {\r\n a: (A + tx * g) * fx,\r\n c: (C + tx * h) * fy,\r\n e: -(A * pivotX + C * pivotY) + tx * i,\r\n b: (B + ty * g) * fx,\r\n d: (D + ty * h) * fy,\r\n f: -(B * pivotX + D * pivotY) + ty * i,\r\n g: g * fx,\r\n h: h * fy,\r\n i,\r\n };\r\n}\r\n"]}
@@ -139,7 +139,7 @@ export function spacePlane(view, box) {
139
139
  }
140
140
  /**
141
141
  * Below this `w` a point is at or behind the camera. Not zero: a point just in
142
- * front of the lens projects so far out that Skia's float32 path maths loses it,
142
+ * front of the lens projects so far out that float32 path maths loses it,
143
143
  * and at 1/100 the layer is already magnified a hundredfold — well past the edge
144
144
  * of any frame.
145
145
  */
@@ -1 +1 @@
1
- {"version":3,"file":"space3d.js","sourceRoot":"","sources":["../../../src/attributes/layout/space3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,0GAA0G;AAC1G,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC1D,MAAM,GAAG,GAAW,EAAE,CAAC,EAAE,UAAU,CA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AG,CAAC,EAAE,CAAC;QACtB,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;gBAAC,IAAI,GAAG,CAAC,CAAC;gBAAC,MAAM;YAAC,CAAC;QAC3D,CAAC;QACD,IAAI,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;YACd,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACzB,IAAI,IAAI,CAAC,CAAC,CAAC;oBAAE,SAAS;gBACtB,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;oBAAC,GAAG,GAAG,CAAC,CAAC;oBAAC,IAAI,GAAG,CAAC,CAAC;gBAAC,CAAC;YACvC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;YAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { Matrix2D, Projection3D } from \"./matrix2d\";\nimport type { Vector2 } from \"./vector2\";\n\n/**\n * The maths of a 2.5D space: flat nodes placed in one 3D frame and seen through\n * a single orbiting camera, rather than each projecting through a perspective of\n * its own (see {@link import(\"./matrix2d\").nodeProjectedMatrix}).\n *\n * Everything here works in the space root's canvas frame — x right, y **down**,\n * z toward the viewer, the frame `nodeProjectedMatrix` already tilts nodes in —\n * so a node's transform is the same rotation block with the perspective divide\n * lifted out and applied once, by the camera, to the whole scene.\n */\n\n/** A point a camera is aimed at. `z` is depth, toward the viewer, as a node's `depth` is. */\nexport interface LookAt extends Vector2 {\n z?: number;\n}\n\n/** Lerp a {@link LookAt}, leaving `z` off when neither end has one so a flat camera stays two numbers. */\nexport function lerpLookAt(from: LookAt, to: LookAt, t: number): LookAt {\n const out: LookAt = { x: lerpNumber(from.x, to.x, t), y: lerpNumber(from.y, to.y, t) };\n if (from.z !== undefined || to.z !== undefined) out.z = lerpNumber(from.z ?? 0, to.z ?? 0, t);\n return out;\n}\n\n/**\n * A space root's camera for one frame.\n *\n * `orbit`/`elevation` mean what they mean on `Camera3D` (`render3d/camera.ts`,\n * `resolveCameraPlacement`): orbit 0 is head-on, a positive orbit moves the\n * camera toward +x, a positive elevation lifts it. `perspective` is the camera's\n * distance from `lookAt` at `dolly: 0`, CSS's convention, so the focus plane\n * draws 1:1; `0` is a parallel projection. `zoom` and `heading` apply after the\n * projection, which makes them lens zoom and roll exactly.\n */\n/** @internal */\nexport interface SpaceCamera {\n perspective: number;\n orbit: number;\n elevation: number;\n dolly: number;\n /** Authored y-up, like every other scene point. */\n lookAt: LookAt;\n zoom: number;\n heading: number;\n /** The viewport centre in the root's canvas frame. */\n viewportX: number;\n viewportY: number;\n}\n\n/** Row-major 3×4 affine transform: `[r00 r01 r02 tx, r10 r11 r12 ty, r20 r21 r22 tz]`. */\n/** @internal */\nexport type Affine3 = readonly number[];\n\n/** @internal */\nexport const IDENTITY_AFFINE3: Affine3 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0];\n\n/** @internal `a · b` — applies `b` first, the same order as `matrix2d`'s `multiply`. */\nexport function multiplyAffine3(a: Affine3, b: Affine3): Affine3 {\n const out = new Array<number>(12);\n for (let r = 0; r < 3; r++) {\n const a0 = a[r * 4], a1 = a[r * 4 + 1], a2 = a[r * 4 + 2], a3 = a[r * 4 + 3];\n out[r * 4] = a0 * b[0] + a1 * b[4] + a2 * b[8];\n out[r * 4 + 1] = a0 * b[1] + a1 * b[5] + a2 * b[9];\n out[r * 4 + 2] = a0 * b[2] + a1 * b[6] + a2 * b[10];\n out[r * 4 + 3] = a0 * b[3] + a1 * b[7] + a2 * b[11] + a3;\n }\n return out;\n}\n\n/**\n * A node's transform in its parent's 3D frame — {@link import(\"./matrix2d\").nodeProjectedMatrix}\n * without the perspective, which in a space belongs to the camera:\n *\n * `T(cx + pivotX, cy + pivotY, depth) · Rx · Ry · Rz(rotation + rotationZ) · S(scale) · T(-pivot) · F(flip)`\n *\n * `p.perspective` is ignored. The scale is uniform in all three axes, so a\n * scaled group scales the depth its children sit at too.\n */\n/** @internal */\nexport function nodeSpaceMatrix(\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\n p: Projection3D,\n): Affine3 {\n const rad = Math.PI / 180;\n const ca = Math.cos(p.rotationX * rad), sa = Math.sin(p.rotationX * rad);\n const cb = Math.cos(p.rotationY * rad), sb = Math.sin(p.rotationY * rad);\n const cz = (rotation + p.rotationZ) * rad;\n const cc = Math.cos(cz), sc = Math.sin(cz);\n\n const r00 = cb * cc * scale, r01 = -cb * sc * scale, r02 = sb * scale;\n const r10 = (sa * sb * cc + ca * sc) * scale, r11 = (ca * cc - sa * sb * sc) * scale, r12 = -sa * cb * scale;\n const r20 = (sa * sc - ca * sb * cc) * scale, r21 = (ca * sb * sc + sa * cc) * scale, r22 = ca * cb * scale;\n\n // Mirrors negate the two in-plane columns only, about the node's own centre —\n // the same in-place reflection `nodeProjectedMatrix` makes.\n const fx = p.flipHorizontal ? -1 : 1;\n const fy = p.flipVertical ? -1 : 1;\n return [\n r00 * fx, r01 * fy, r02, cx + pivotX - (r00 * pivotX + r01 * pivotY),\n r10 * fx, r11 * fy, r12, cy + pivotY - (r10 * pivotX + r11 * pivotY),\n r20 * fx, r21 * fy, r22, p.depth - (r20 * pivotX + r21 * pivotY),\n ];\n}\n\n/**\n * The camera's view of the root frame: `T(0, 0, dolly) · R(camera)ᵀ · T(-lookAt)`.\n *\n * Built from the camera's own axes rather than from a look-at basis, so there is\n * no pole to clamp: an elevation past 90° keeps turning rather than snapping to\n * an arbitrary roll.\n */\n/** @internal */\nexport function spaceViewMatrix(cam: SpaceCamera): Affine3 {\n const rad = Math.PI / 180;\n const sa = Math.sin(cam.orbit * rad), ca = Math.cos(cam.orbit * rad);\n const se = Math.sin(cam.elevation * rad), ce = Math.cos(cam.elevation * rad);\n // Rows: the camera's right, screen-down and toward-camera axes.\n const r0 = ca, r1 = 0, r2 = -sa;\n const d0 = sa * se, d1 = ce, d2 = ca * se;\n const f0 = sa * ce, f1 = -se, f2 = ca * ce;\n const tx = cam.lookAt.x, ty = -cam.lookAt.y, tz = cam.lookAt.z ?? 0;\n return [\n r0, r1, r2, -(r0 * tx + r1 * ty + r2 * tz),\n d0, d1, d2, -(d0 * tx + d1 * ty + d2 * tz),\n f0, f1, f2, -(f0 * tx + f1 * ty + f2 * tz) + cam.dolly,\n ];\n}\n\n/**\n * Project a view-space transform onto the screen: the homography that maps a\n * node's local `(x, y, 1)` to the root's canvas, perspective divide and the\n * camera's zoom and roll included.\n *\n * At rest — no orbit, elevation, dolly or `lookAt.z`, and a node with no depth\n * or tilt — this is exactly `cameraMatrix · local`, which is what makes turning\n * a space on invisible until something moves in depth.\n */\n/** @internal */\nexport function spaceScreenMatrix(cam: SpaceCamera, view: Affine3): Matrix2D {\n const invP = cam.perspective > 0 ? 1 / cam.perspective : 0;\n const wx = -view[8] * invP;\n const wy = -view[9] * invP;\n const w0 = 1 - view[11] * invP;\n\n const rad = (-cam.heading * Math.PI) / 180;\n const k = cam.zoom;\n const c00 = k * Math.cos(rad), c01 = -k * Math.sin(rad);\n const c10 = k * Math.sin(rad), c11 = k * Math.cos(rad);\n const vx = cam.viewportX, vy = cam.viewportY;\n\n const m: Matrix2D = {\n a: c00 * view[0] + c01 * view[4] + vx * wx,\n c: c00 * view[1] + c01 * view[5] + vx * wy,\n e: c00 * view[3] + c01 * view[7] + vx * w0,\n b: c10 * view[0] + c11 * view[4] + vy * wx,\n d: c10 * view[1] + c11 * view[5] + vy * wy,\n f: c10 * view[3] + c11 * view[7] + vy * w0,\n };\n // A parallel projection stays affine, so it keeps the six-number fast paths.\n if (invP !== 0) {\n m.g = wx;\n m.h = wy;\n m.i = w0;\n }\n return m;\n}\n\n/** A node's box in view space: what sorting, culling and the backface test read. */\n/** @internal */\nexport interface SpacePlane {\n /** The four corners, `x, y, z` each, top-left clockwise. */\n corners: readonly number[];\n cx: number;\n cy: number;\n cz: number;\n /** Unit normal, pointing out of the node's front. */\n nx: number;\n ny: number;\n nz: number;\n}\n\n/**\n * `box` — the node's ink, centred and y-down in its local frame — through `view`.\n *\n * The normal is the transform's z column, which a mirror never touches: a flip\n * reflects the node without turning it around, so it cannot show its back.\n */\n/** @internal */\nexport function spacePlane(view: Affine3, box: { x: number; y: number; width: number; height: number }): SpacePlane {\n const hw = box.width / 2, hh = box.height / 2;\n const us = [box.x - hw, box.x + hw, box.x + hw, box.x - hw];\n const vs = [box.y - hh, box.y - hh, box.y + hh, box.y + hh];\n const corners = new Array<number>(12);\n for (let i = 0; i < 4; i++) {\n const u = us[i], v = vs[i];\n corners[i * 3] = view[0] * u + view[1] * v + view[3];\n corners[i * 3 + 1] = view[4] * u + view[5] * v + view[7];\n corners[i * 3 + 2] = view[8] * u + view[9] * v + view[11];\n }\n const nl = Math.hypot(view[2], view[6], view[10]) || 1;\n return {\n corners,\n cx: view[0] * box.x + view[1] * box.y + view[3],\n cy: view[4] * box.x + view[5] * box.y + view[7],\n cz: view[8] * box.x + view[9] * box.y + view[11],\n nx: view[2] / nl,\n ny: view[6] / nl,\n nz: view[10] / nl,\n };\n}\n\n/**\n * Below this `w` a point is at or behind the camera. Not zero: a point just in\n * front of the lens projects so far out that Skia's float32 path maths loses it,\n * and at 1/100 the layer is already magnified a hundredfold — well past the edge\n * of any frame.\n */\nconst NEAR_W = 0.01;\n\n/** Within this fraction of edge-on, a plane projects to a sliver narrower than a pixel. */\nconst EDGE_ON = 1e-3;\n\n/**\n * How `plane` sits relative to the camera: `side` is positive when the camera\n * is in front of it, `edgeOn` when the camera lies (almost) in its plane.\n */\n/** @internal */\nexport function cameraSide(cam: SpaceCamera, plane: SpacePlane): { side: number; edgeOn: boolean } {\n if (cam.perspective > 0) {\n const dx = -plane.cx, dy = -plane.cy, dz = cam.perspective - plane.cz;\n const side = plane.nx * dx + plane.ny * dy + plane.nz * dz;\n return { side, edgeOn: Math.abs(side) <= EDGE_ON * Math.hypot(dx, dy, dz) };\n }\n return { side: plane.nz, edgeOn: Math.abs(plane.nz) <= EDGE_ON };\n}\n\n/** How much of `plane` is in front of the camera. A parallel projection has no near plane. */\n/** @internal */\nexport function nearCoverage(cam: SpaceCamera, plane: SpacePlane): \"all\" | \"some\" | \"none\" {\n if (cam.perspective <= 0) return \"all\";\n let inFront = 0;\n for (let i = 0; i < 4; i++) {\n if (1 - plane.corners[i * 3 + 2] / cam.perspective > NEAR_W) inFront++;\n }\n return inFront === 4 ? \"all\" : inFront === 0 ? \"none\" : \"some\";\n}\n\n/**\n * The part of `box` (local, y-down) that lies in front of the camera under the\n * homography `screen`, as a polygon in the same frame — or `null` when none of\n * it does. `margin` grows the box first, so a shadow or stroke spilling past the\n * node's ink is not cut along its edge.\n */\n/** @internal */\nexport function nearCutPolygon(\n screen: Matrix2D,\n box: { x: number; y: number; width: number; height: number },\n margin: number,\n): Vector2[] | null {\n const g = screen.g ?? 0, h = screen.h ?? 0, i = screen.i ?? 1;\n const hw = box.width / 2 + margin, hh = box.height / 2 + margin;\n const square: Vector2[] = [\n { x: box.x - hw, y: box.y - hh },\n { x: box.x + hw, y: box.y - hh },\n { x: box.x + hw, y: box.y + hh },\n { x: box.x - hw, y: box.y + hh },\n ];\n const w = (p: Vector2) => g * p.x + h * p.y + i - NEAR_W;\n const out: Vector2[] = [];\n for (let k = 0; k < square.length; k++) {\n const a = square[k], b = square[(k + 1) % square.length];\n const wa = w(a), wb = w(b);\n if (wa >= 0) out.push(a);\n if ((wa >= 0) !== (wb >= 0)) {\n const t = wa / (wa - wb);\n out.push({ x: a.x + (b.x - a.x) * t, y: a.y + (b.y - a.y) * t });\n }\n }\n return out.length >= 3 ? out : null;\n}\n\n/** Two points closer than this in view space (px) count as touching. */\nconst SIDE_EPS = 0.01;\n\n/**\n * Which side of `a`'s plane `b` lies on, as seen from the camera:\n * `1` in front (toward the camera), `-1` behind, `0` straddling it or lying in\n * it. `camSide` is `a`'s {@link cameraSide}.\n */\nfunction sideOf(a: SpacePlane, b: SpacePlane, camSide: number): number {\n let front = 0, back = 0;\n for (let i = 0; i < 4; i++) {\n const d = a.nx * (b.corners[i * 3] - a.cx) + a.ny * (b.corners[i * 3 + 1] - a.cy) + a.nz * (b.corners[i * 3 + 2] - a.cz);\n if (d > SIDE_EPS) front++;\n else if (d < -SIDE_EPS) back++;\n }\n if (front === 0 && back === 0) return 0;\n const facing = camSide > 0 ? 1 : -1;\n if (back === 0) return facing;\n if (front === 0) return -facing;\n return 0;\n}\n\n/** Squared distance from the camera: larger is farther. */\nfunction farness(cam: SpaceCamera, p: SpacePlane): number {\n if (cam.perspective > 0) return p.cx * p.cx + p.cy * p.cy + (cam.perspective - p.cz) ** 2;\n return -p.cz;\n}\n\n/**\n * `-1` when `a` must paint before `b`, `1` after, `0` when either order is right\n * — coplanar siblings, which keep their authored order.\n *\n * A plane test first, since it is exact for anything that does not intersect:\n * whichever node lies wholly on the camera's side of the other's plane is in\n * front. Parallel layers — the whole of a parallax stack — always resolve here,\n * and so do coplanar ones, as a tie. Only planes that cut through each other fall\n * back to the distance of their centres, and no painter's order is right for\n * those anyway.\n */\nfunction compareInSpace(cam: SpaceCamera, a: SpacePlane, b: SpacePlane): number {\n const ca = cameraSide(cam, a);\n if (!ca.edgeOn) {\n const s = sideOf(a, b, ca.side);\n if (s !== 0) return s > 0 ? -1 : 1;\n if (isCoplanar(a, b)) return 0;\n }\n const cb = cameraSide(cam, b);\n if (!cb.edgeOn) {\n const s = sideOf(b, a, cb.side);\n if (s !== 0) return s > 0 ? 1 : -1;\n }\n const fa = farness(cam, a), fb = farness(cam, b);\n return fa === fb ? 0 : fa > fb ? -1 : 1;\n}\n\nfunction isCoplanar(a: SpacePlane, b: SpacePlane): boolean {\n for (let i = 0; i < 4; i++) {\n const d = a.nx * (b.corners[i * 3] - a.cx) + a.ny * (b.corners[i * 3 + 1] - a.cy) + a.nz * (b.corners[i * 3 + 2] - a.cz);\n if (Math.abs(d) > SIDE_EPS) return false;\n }\n return true;\n}\n\n/** A stage's camera as its props state it — what a host reads off the root row. */\nexport interface SpaceCameraProps {\n perspective: number;\n orbit: number;\n elevation: number;\n dolly: number;\n lookAt: LookAt;\n zoom: number;\n heading: number;\n}\n\n/** A point in a space, y-up like every scene point, `z` toward the viewer. */\nexport interface SpacePoint {\n x: number;\n y: number;\n z: number;\n}\n\nfunction rootCamera(props: SpaceCameraProps): SpaceCamera {\n return { ...props, viewportX: 0, viewportY: 0 };\n}\n\n/**\n * The space's camera maths for a host drawing over the picture — a gizmo\n * aiming the camera, a guide marking where it looks — so it asks the renderer's\n * own arithmetic rather than keeping a copy that could drift from it. Points are\n * in viewport space: origin at the centre, y-up.\n */\nexport const space3dOps = {\n lerpLookAt,\n\n /** Where scene point `point` lands in the viewport through `camera`, or `null` behind the lens. */\n project(camera: SpaceCameraProps, point: LookAt): Vector2 | null {\n const cam = rootCamera(camera);\n const v = spaceViewMatrix(cam);\n const x = point.x, y = -point.y, z = point.z ?? 0;\n const vx = v[0] * x + v[1] * y + v[2] * z + v[3];\n const vy = v[4] * x + v[5] * y + v[6] * z + v[7];\n const vz = v[8] * x + v[9] * y + v[10] * z + v[11];\n const w = cam.perspective > 0 ? 1 - vz / cam.perspective : 1;\n if (w <= NEAR_W) return null;\n const rad = (-cam.heading * Math.PI) / 180;\n const px = (cam.zoom * vx) / w, py = (cam.zoom * vy) / w;\n return {\n x: Math.cos(rad) * px - Math.sin(rad) * py,\n y: -(Math.sin(rad) * px + Math.cos(rad) * py),\n };\n },\n\n /**\n * The displacement at the camera's focus — in the plane facing it through\n * `lookAt` — that moves the picture there by `vector`. The inverse of a pan:\n * a hand dragging the picture by `vector` moves `lookAt` by minus this.\n */\n focusVector(camera: SpaceCameraProps, vector: Vector2): SpacePoint {\n const cam = rootCamera(camera);\n const rad = (-cam.heading * Math.PI) / 180;\n const k = cam.zoom || 1;\n const cx = vector.x, cy = -vector.y;\n const px = (Math.cos(rad) * cx + Math.sin(rad) * cy) / k;\n const py = (-Math.sin(rad) * cx + Math.cos(rad) * cy) / k;\n // A focus pushed nearer by the dolly draws larger, so it moves less for the same drag.\n const w = cam.perspective > 0 ? 1 - cam.dolly / cam.perspective : 1;\n const v = spaceViewMatrix(cam);\n const ux = px * w, uy = py * w;\n // The view's first two rows are the camera's right and screen-down axes.\n return {\n x: ux * v[0] + uy * v[4],\n y: -(ux * v[1] + uy * v[5]),\n z: ux * v[2] + uy * v[6],\n };\n },\n};\n\n/** Past this many siblings the pairwise order costs more than it is worth, and the centres decide. */\nconst PAIRWISE_LIMIT = 96;\n\n/**\n * The order to paint siblings in, far to near, as indices into `planes`.\n *\n * Pairwise {@link compareInSpace} relations become edges, and a stable\n * topological sort that always takes the lowest ready index keeps `layerOrder`\n * wherever the geometry has no opinion. A cycle — three planes each overlapping\n * the next, which no painter's order can draw — is broken at its farthest node.\n */\n/** @internal */\nexport function spacePaintOrder(cam: SpaceCamera, planes: readonly SpacePlane[]): number[] {\n const n = planes.length;\n if (n > PAIRWISE_LIMIT) {\n return planes\n .map((_, i) => i)\n .sort((a, b) => farness(cam, planes[b]) - farness(cam, planes[a]) || a - b);\n }\n\n const after: number[][] = Array.from({ length: n }, () => []);\n const blockers = new Array<number>(n).fill(0);\n for (let i = 0; i < n; i++) {\n for (let j = i + 1; j < n; j++) {\n const r = compareInSpace(cam, planes[i], planes[j]);\n if (r < 0) { after[i].push(j); blockers[j]++; }\n else if (r > 0) { after[j].push(i); blockers[i]++; }\n }\n }\n\n const order: number[] = [];\n const done = new Array<boolean>(n).fill(false);\n while (order.length < n) {\n let next = -1;\n for (let i = 0; i < n; i++) {\n if (!done[i] && blockers[i] === 0) { next = i; break; }\n }\n if (next === -1) {\n let far = -Infinity;\n for (let i = 0; i < n; i++) {\n if (done[i]) continue;\n const f = farness(cam, planes[i]);\n if (f > far) { far = f; next = i; }\n }\n }\n done[next] = true;\n order.push(next);\n for (const j of after[next]) blockers[j]--;\n }\n return order;\n}\n"]}
1
+ {"version":3,"file":"space3d.js","sourceRoot":"","sources":["../../../src/attributes/layout/space3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,0GAA0G;AAC1G,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC1D,MAAM,GAAG,GAAW,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IACvF,IAAI,IAAI,CAAC,CAAC,KAAK,SAAS,IAAI,EAAE,CAAC,CAAC,KAAK,SAAS;QAAE,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9F,OAAO,GAAG,CAAC;AACf,CAAC;AA+BD,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE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,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;oBAAC,GAAG,GAAG,CAAC,CAAC;oBAAC,IAAI,GAAG,CAAC,CAAC;gBAAC,CAAC;YACvC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;YAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { Matrix2D, Projection3D } from \"./matrix2d\";\r\nimport type { Vector2 } from \"./vector2\";\r\n\r\n/**\r\n * The maths of a 2.5D space: flat nodes placed in one 3D frame and seen through\r\n * a single orbiting camera, rather than each projecting through a perspective of\r\n * its own (see {@link import(\"./matrix2d\").nodeProjectedMatrix}).\r\n *\r\n * Everything here works in the space root's canvas frame — x right, y **down**,\r\n * z toward the viewer, the frame `nodeProjectedMatrix` already tilts nodes in —\r\n * so a node's transform is the same rotation block with the perspective divide\r\n * lifted out and applied once, by the camera, to the whole scene.\r\n */\r\n\r\n/** A point a camera is aimed at. `z` is depth, toward the viewer, as a node's `depth` is. */\r\nexport interface LookAt extends Vector2 {\r\n z?: number;\r\n}\r\n\r\n/** Lerp a {@link LookAt}, leaving `z` off when neither end has one so a flat camera stays two numbers. */\r\nexport function lerpLookAt(from: LookAt, to: LookAt, t: number): LookAt {\r\n const out: LookAt = { x: lerpNumber(from.x, to.x, t), y: lerpNumber(from.y, to.y, t) };\r\n if (from.z !== undefined || to.z !== undefined) out.z = lerpNumber(from.z ?? 0, to.z ?? 0, t);\r\n return out;\r\n}\r\n\r\n/**\r\n * A space root's camera for one frame.\r\n *\r\n * `orbit`/`elevation` mean what they mean on `Camera3D` (`render3d/camera.ts`,\r\n * `resolveCameraPlacement`): orbit 0 is head-on, a positive orbit moves the\r\n * camera toward +x, a positive elevation lifts it. `perspective` is the camera's\r\n * distance from `lookAt` at `dolly: 0`, CSS's convention, so the focus plane\r\n * draws 1:1; `0` is a parallel projection. `zoom` and `heading` apply after the\r\n * projection, which makes them lens zoom and roll exactly.\r\n */\r\n/** @internal */\r\nexport interface SpaceCamera {\r\n perspective: number;\r\n orbit: number;\r\n elevation: number;\r\n dolly: number;\r\n /** Authored y-up, like every other scene point. */\r\n lookAt: LookAt;\r\n zoom: number;\r\n heading: number;\r\n /** The viewport centre in the root's canvas frame. */\r\n viewportX: number;\r\n viewportY: number;\r\n}\r\n\r\n/** Row-major 3×4 affine transform: `[r00 r01 r02 tx, r10 r11 r12 ty, r20 r21 r22 tz]`. */\r\n/** @internal */\r\nexport type Affine3 = readonly number[];\r\n\r\n/** @internal */\r\nexport const IDENTITY_AFFINE3: Affine3 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0];\r\n\r\n/** @internal `a · b` — applies `b` first, the same order as `matrix2d`'s `multiply`. */\r\nexport function multiplyAffine3(a: Affine3, b: Affine3): Affine3 {\r\n const out = new Array<number>(12);\r\n for (let r = 0; r < 3; r++) {\r\n const a0 = a[r * 4], a1 = a[r * 4 + 1], a2 = a[r * 4 + 2], a3 = a[r * 4 + 3];\r\n out[r * 4] = a0 * b[0] + a1 * b[4] + a2 * b[8];\r\n out[r * 4 + 1] = a0 * b[1] + a1 * b[5] + a2 * b[9];\r\n out[r * 4 + 2] = a0 * b[2] + a1 * b[6] + a2 * b[10];\r\n out[r * 4 + 3] = a0 * b[3] + a1 * b[7] + a2 * b[11] + a3;\r\n }\r\n return out;\r\n}\r\n\r\n/**\r\n * A node's transform in its parent's 3D frame — {@link import(\"./matrix2d\").nodeProjectedMatrix}\r\n * without the perspective, which in a space belongs to the camera:\r\n *\r\n * `T(cx + pivotX, cy + pivotY, depth) · Rx · Ry · Rz(rotation + rotationZ) · S(scale) · T(-pivot) · F(flip)`\r\n *\r\n * `p.perspective` is ignored. The scale is uniform in all three axes, so a\r\n * scaled group scales the depth its children sit at too.\r\n */\r\n/** @internal */\r\nexport function nodeSpaceMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n p: Projection3D,\r\n): Affine3 {\r\n const rad = Math.PI / 180;\r\n const ca = Math.cos(p.rotationX * rad), sa = Math.sin(p.rotationX * rad);\r\n const cb = Math.cos(p.rotationY * rad), sb = Math.sin(p.rotationY * rad);\r\n const cz = (rotation + p.rotationZ) * rad;\r\n const cc = Math.cos(cz), sc = Math.sin(cz);\r\n\r\n const r00 = cb * cc * scale, r01 = -cb * sc * scale, r02 = sb * scale;\r\n const r10 = (sa * sb * cc + ca * sc) * scale, r11 = (ca * cc - sa * sb * sc) * scale, r12 = -sa * cb * scale;\r\n const r20 = (sa * sc - ca * sb * cc) * scale, r21 = (ca * sb * sc + sa * cc) * scale, r22 = ca * cb * scale;\r\n\r\n // Mirrors negate the two in-plane columns only, about the node's own centre —\r\n // the same in-place reflection `nodeProjectedMatrix` makes.\r\n const fx = p.flipHorizontal ? -1 : 1;\r\n const fy = p.flipVertical ? -1 : 1;\r\n return [\r\n r00 * fx, r01 * fy, r02, cx + pivotX - (r00 * pivotX + r01 * pivotY),\r\n r10 * fx, r11 * fy, r12, cy + pivotY - (r10 * pivotX + r11 * pivotY),\r\n r20 * fx, r21 * fy, r22, p.depth - (r20 * pivotX + r21 * pivotY),\r\n ];\r\n}\r\n\r\n/**\r\n * The camera's view of the root frame: `T(0, 0, dolly) · R(camera)ᵀ · T(-lookAt)`.\r\n *\r\n * Built from the camera's own axes rather than from a look-at basis, so there is\r\n * no pole to clamp: an elevation past 90° keeps turning rather than snapping to\r\n * an arbitrary roll.\r\n */\r\n/** @internal */\r\nexport function spaceViewMatrix(cam: SpaceCamera): Affine3 {\r\n const rad = Math.PI / 180;\r\n const sa = Math.sin(cam.orbit * rad), ca = Math.cos(cam.orbit * rad);\r\n const se = Math.sin(cam.elevation * rad), ce = Math.cos(cam.elevation * rad);\r\n // Rows: the camera's right, screen-down and toward-camera axes.\r\n const r0 = ca, r1 = 0, r2 = -sa;\r\n const d0 = sa * se, d1 = ce, d2 = ca * se;\r\n const f0 = sa * ce, f1 = -se, f2 = ca * ce;\r\n const tx = cam.lookAt.x, ty = -cam.lookAt.y, tz = cam.lookAt.z ?? 0;\r\n return [\r\n r0, r1, r2, -(r0 * tx + r1 * ty + r2 * tz),\r\n d0, d1, d2, -(d0 * tx + d1 * ty + d2 * tz),\r\n f0, f1, f2, -(f0 * tx + f1 * ty + f2 * tz) + cam.dolly,\r\n ];\r\n}\r\n\r\n/**\r\n * Project a view-space transform onto the screen: the homography that maps a\r\n * node's local `(x, y, 1)` to the root's canvas, perspective divide and the\r\n * camera's zoom and roll included.\r\n *\r\n * At rest — no orbit, elevation, dolly or `lookAt.z`, and a node with no depth\r\n * or tilt — this is exactly `cameraMatrix · local`, which is what makes turning\r\n * a space on invisible until something moves in depth.\r\n */\r\n/** @internal */\r\nexport function spaceScreenMatrix(cam: SpaceCamera, view: Affine3): Matrix2D {\r\n const invP = cam.perspective > 0 ? 1 / cam.perspective : 0;\r\n const wx = -view[8] * invP;\r\n const wy = -view[9] * invP;\r\n const w0 = 1 - view[11] * invP;\r\n\r\n const rad = (-cam.heading * Math.PI) / 180;\r\n const k = cam.zoom;\r\n const c00 = k * Math.cos(rad), c01 = -k * Math.sin(rad);\r\n const c10 = k * Math.sin(rad), c11 = k * Math.cos(rad);\r\n const vx = cam.viewportX, vy = cam.viewportY;\r\n\r\n const m: Matrix2D = {\r\n a: c00 * view[0] + c01 * view[4] + vx * wx,\r\n c: c00 * view[1] + c01 * view[5] + vx * wy,\r\n e: c00 * view[3] + c01 * view[7] + vx * w0,\r\n b: c10 * view[0] + c11 * view[4] + vy * wx,\r\n d: c10 * view[1] + c11 * view[5] + vy * wy,\r\n f: c10 * view[3] + c11 * view[7] + vy * w0,\r\n };\r\n // A parallel projection stays affine, so it keeps the six-number fast paths.\r\n if (invP !== 0) {\r\n m.g = wx;\r\n m.h = wy;\r\n m.i = w0;\r\n }\r\n return m;\r\n}\r\n\r\n/** A node's box in view space: what sorting, culling and the backface test read. */\r\n/** @internal */\r\nexport interface SpacePlane {\r\n /** The four corners, `x, y, z` each, top-left clockwise. */\r\n corners: readonly number[];\r\n cx: number;\r\n cy: number;\r\n cz: number;\r\n /** Unit normal, pointing out of the node's front. */\r\n nx: number;\r\n ny: number;\r\n nz: number;\r\n}\r\n\r\n/**\r\n * `box` — the node's ink, centred and y-down in its local frame — through `view`.\r\n *\r\n * The normal is the transform's z column, which a mirror never touches: a flip\r\n * reflects the node without turning it around, so it cannot show its back.\r\n */\r\n/** @internal */\r\nexport function spacePlane(view: Affine3, box: { x: number; y: number; width: number; height: number }): SpacePlane {\r\n const hw = box.width / 2, hh = box.height / 2;\r\n const us = [box.x - hw, box.x + hw, box.x + hw, box.x - hw];\r\n const vs = [box.y - hh, box.y - hh, box.y + hh, box.y + hh];\r\n const corners = new Array<number>(12);\r\n for (let i = 0; i < 4; i++) {\r\n const u = us[i], v = vs[i];\r\n corners[i * 3] = view[0] * u + view[1] * v + view[3];\r\n corners[i * 3 + 1] = view[4] * u + view[5] * v + view[7];\r\n corners[i * 3 + 2] = view[8] * u + view[9] * v + view[11];\r\n }\r\n const nl = Math.hypot(view[2], view[6], view[10]) || 1;\r\n return {\r\n corners,\r\n cx: view[0] * box.x + view[1] * box.y + view[3],\r\n cy: view[4] * box.x + view[5] * box.y + view[7],\r\n cz: view[8] * box.x + view[9] * box.y + view[11],\r\n nx: view[2] / nl,\r\n ny: view[6] / nl,\r\n nz: view[10] / nl,\r\n };\r\n}\r\n\r\n/**\r\n * Below this `w` a point is at or behind the camera. Not zero: a point just in\r\n * front of the lens projects so far out that float32 path maths loses it,\r\n * and at 1/100 the layer is already magnified a hundredfold — well past the edge\r\n * of any frame.\r\n */\r\nconst NEAR_W = 0.01;\r\n\r\n/** Within this fraction of edge-on, a plane projects to a sliver narrower than a pixel. */\r\nconst EDGE_ON = 1e-3;\r\n\r\n/**\r\n * How `plane` sits relative to the camera: `side` is positive when the camera\r\n * is in front of it, `edgeOn` when the camera lies (almost) in its plane.\r\n */\r\n/** @internal */\r\nexport function cameraSide(cam: SpaceCamera, plane: SpacePlane): { side: number; edgeOn: boolean } {\r\n if (cam.perspective > 0) {\r\n const dx = -plane.cx, dy = -plane.cy, dz = cam.perspective - plane.cz;\r\n const side = plane.nx * dx + plane.ny * dy + plane.nz * dz;\r\n return { side, edgeOn: Math.abs(side) <= EDGE_ON * Math.hypot(dx, dy, dz) };\r\n }\r\n return { side: plane.nz, edgeOn: Math.abs(plane.nz) <= EDGE_ON };\r\n}\r\n\r\n/** How much of `plane` is in front of the camera. A parallel projection has no near plane. */\r\n/** @internal */\r\nexport function nearCoverage(cam: SpaceCamera, plane: SpacePlane): \"all\" | \"some\" | \"none\" {\r\n if (cam.perspective <= 0) return \"all\";\r\n let inFront = 0;\r\n for (let i = 0; i < 4; i++) {\r\n if (1 - plane.corners[i * 3 + 2] / cam.perspective > NEAR_W) inFront++;\r\n }\r\n return inFront === 4 ? \"all\" : inFront === 0 ? \"none\" : \"some\";\r\n}\r\n\r\n/**\r\n * The part of `box` (local, y-down) that lies in front of the camera under the\r\n * homography `screen`, as a polygon in the same frame — or `null` when none of\r\n * it does. `margin` grows the box first, so a shadow or stroke spilling past the\r\n * node's ink is not cut along its edge.\r\n */\r\n/** @internal */\r\nexport function nearCutPolygon(\r\n screen: Matrix2D,\r\n box: { x: number; y: number; width: number; height: number },\r\n margin: number,\r\n): Vector2[] | null {\r\n const g = screen.g ?? 0, h = screen.h ?? 0, i = screen.i ?? 1;\r\n const hw = box.width / 2 + margin, hh = box.height / 2 + margin;\r\n const square: Vector2[] = [\r\n { x: box.x - hw, y: box.y - hh },\r\n { x: box.x + hw, y: box.y - hh },\r\n { x: box.x + hw, y: box.y + hh },\r\n { x: box.x - hw, y: box.y + hh },\r\n ];\r\n const w = (p: Vector2) => g * p.x + h * p.y + i - NEAR_W;\r\n const out: Vector2[] = [];\r\n for (let k = 0; k < square.length; k++) {\r\n const a = square[k], b = square[(k + 1) % square.length];\r\n const wa = w(a), wb = w(b);\r\n if (wa >= 0) out.push(a);\r\n if ((wa >= 0) !== (wb >= 0)) {\r\n const t = wa / (wa - wb);\r\n out.push({ x: a.x + (b.x - a.x) * t, y: a.y + (b.y - a.y) * t });\r\n }\r\n }\r\n return out.length >= 3 ? out : null;\r\n}\r\n\r\n/** Two points closer than this in view space (px) count as touching. */\r\nconst SIDE_EPS = 0.01;\r\n\r\n/**\r\n * Which side of `a`'s plane `b` lies on, as seen from the camera:\r\n * `1` in front (toward the camera), `-1` behind, `0` straddling it or lying in\r\n * it. `camSide` is `a`'s {@link cameraSide}.\r\n */\r\nfunction sideOf(a: SpacePlane, b: SpacePlane, camSide: number): number {\r\n let front = 0, back = 0;\r\n for (let i = 0; i < 4; i++) {\r\n const d = a.nx * (b.corners[i * 3] - a.cx) + a.ny * (b.corners[i * 3 + 1] - a.cy) + a.nz * (b.corners[i * 3 + 2] - a.cz);\r\n if (d > SIDE_EPS) front++;\r\n else if (d < -SIDE_EPS) back++;\r\n }\r\n if (front === 0 && back === 0) return 0;\r\n const facing = camSide > 0 ? 1 : -1;\r\n if (back === 0) return facing;\r\n if (front === 0) return -facing;\r\n return 0;\r\n}\r\n\r\n/** Squared distance from the camera: larger is farther. */\r\nfunction farness(cam: SpaceCamera, p: SpacePlane): number {\r\n if (cam.perspective > 0) return p.cx * p.cx + p.cy * p.cy + (cam.perspective - p.cz) ** 2;\r\n return -p.cz;\r\n}\r\n\r\n/**\r\n * `-1` when `a` must paint before `b`, `1` after, `0` when either order is right\r\n * — coplanar siblings, which keep their authored order.\r\n *\r\n * A plane test first, since it is exact for anything that does not intersect:\r\n * whichever node lies wholly on the camera's side of the other's plane is in\r\n * front. Parallel layers — the whole of a parallax stack — always resolve here,\r\n * and so do coplanar ones, as a tie. Only planes that cut through each other fall\r\n * back to the distance of their centres, and no painter's order is right for\r\n * those anyway.\r\n */\r\nfunction compareInSpace(cam: SpaceCamera, a: SpacePlane, b: SpacePlane): number {\r\n const ca = cameraSide(cam, a);\r\n if (!ca.edgeOn) {\r\n const s = sideOf(a, b, ca.side);\r\n if (s !== 0) return s > 0 ? -1 : 1;\r\n if (isCoplanar(a, b)) return 0;\r\n }\r\n const cb = cameraSide(cam, b);\r\n if (!cb.edgeOn) {\r\n const s = sideOf(b, a, cb.side);\r\n if (s !== 0) return s > 0 ? 1 : -1;\r\n }\r\n const fa = farness(cam, a), fb = farness(cam, b);\r\n return fa === fb ? 0 : fa > fb ? -1 : 1;\r\n}\r\n\r\nfunction isCoplanar(a: SpacePlane, b: SpacePlane): boolean {\r\n for (let i = 0; i < 4; i++) {\r\n const d = a.nx * (b.corners[i * 3] - a.cx) + a.ny * (b.corners[i * 3 + 1] - a.cy) + a.nz * (b.corners[i * 3 + 2] - a.cz);\r\n if (Math.abs(d) > SIDE_EPS) return false;\r\n }\r\n return true;\r\n}\r\n\r\n/** A stage's camera as its props state it — what a host reads off the root row. */\r\nexport interface SpaceCameraProps {\r\n perspective: number;\r\n orbit: number;\r\n elevation: number;\r\n dolly: number;\r\n lookAt: LookAt;\r\n zoom: number;\r\n heading: number;\r\n}\r\n\r\n/** A point in a space, y-up like every scene point, `z` toward the viewer. */\r\nexport interface SpacePoint {\r\n x: number;\r\n y: number;\r\n z: number;\r\n}\r\n\r\nfunction rootCamera(props: SpaceCameraProps): SpaceCamera {\r\n return { ...props, viewportX: 0, viewportY: 0 };\r\n}\r\n\r\n/**\r\n * The space's camera maths for a host drawing over the picture — a gizmo\r\n * aiming the camera, a guide marking where it looks — so it asks the renderer's\r\n * own arithmetic rather than keeping a copy that could drift from it. Points are\r\n * in viewport space: origin at the centre, y-up.\r\n */\r\nexport const space3dOps = {\r\n lerpLookAt,\r\n\r\n /** Where scene point `point` lands in the viewport through `camera`, or `null` behind the lens. */\r\n project(camera: SpaceCameraProps, point: LookAt): Vector2 | null {\r\n const cam = rootCamera(camera);\r\n const v = spaceViewMatrix(cam);\r\n const x = point.x, y = -point.y, z = point.z ?? 0;\r\n const vx = v[0] * x + v[1] * y + v[2] * z + v[3];\r\n const vy = v[4] * x + v[5] * y + v[6] * z + v[7];\r\n const vz = v[8] * x + v[9] * y + v[10] * z + v[11];\r\n const w = cam.perspective > 0 ? 1 - vz / cam.perspective : 1;\r\n if (w <= NEAR_W) return null;\r\n const rad = (-cam.heading * Math.PI) / 180;\r\n const px = (cam.zoom * vx) / w, py = (cam.zoom * vy) / w;\r\n return {\r\n x: Math.cos(rad) * px - Math.sin(rad) * py,\r\n y: -(Math.sin(rad) * px + Math.cos(rad) * py),\r\n };\r\n },\r\n\r\n /**\r\n * The displacement at the camera's focus — in the plane facing it through\r\n * `lookAt` — that moves the picture there by `vector`. The inverse of a pan:\r\n * a hand dragging the picture by `vector` moves `lookAt` by minus this.\r\n */\r\n focusVector(camera: SpaceCameraProps, vector: Vector2): SpacePoint {\r\n const cam = rootCamera(camera);\r\n const rad = (-cam.heading * Math.PI) / 180;\r\n const k = cam.zoom || 1;\r\n const cx = vector.x, cy = -vector.y;\r\n const px = (Math.cos(rad) * cx + Math.sin(rad) * cy) / k;\r\n const py = (-Math.sin(rad) * cx + Math.cos(rad) * cy) / k;\r\n // A focus pushed nearer by the dolly draws larger, so it moves less for the same drag.\r\n const w = cam.perspective > 0 ? 1 - cam.dolly / cam.perspective : 1;\r\n const v = spaceViewMatrix(cam);\r\n const ux = px * w, uy = py * w;\r\n // The view's first two rows are the camera's right and screen-down axes.\r\n return {\r\n x: ux * v[0] + uy * v[4],\r\n y: -(ux * v[1] + uy * v[5]),\r\n z: ux * v[2] + uy * v[6],\r\n };\r\n },\r\n};\r\n\r\n/** Past this many siblings the pairwise order costs more than it is worth, and the centres decide. */\r\nconst PAIRWISE_LIMIT = 96;\r\n\r\n/**\r\n * The order to paint siblings in, far to near, as indices into `planes`.\r\n *\r\n * Pairwise {@link compareInSpace} relations become edges, and a stable\r\n * topological sort that always takes the lowest ready index keeps `layerOrder`\r\n * wherever the geometry has no opinion. A cycle — three planes each overlapping\r\n * the next, which no painter's order can draw — is broken at its farthest node.\r\n */\r\n/** @internal */\r\nexport function spacePaintOrder(cam: SpaceCamera, planes: readonly SpacePlane[]): number[] {\r\n const n = planes.length;\r\n if (n > PAIRWISE_LIMIT) {\r\n return planes\r\n .map((_, i) => i)\r\n .sort((a, b) => farness(cam, planes[b]) - farness(cam, planes[a]) || a - b);\r\n }\r\n\r\n const after: number[][] = Array.from({ length: n }, () => []);\r\n const blockers = new Array<number>(n).fill(0);\r\n for (let i = 0; i < n; i++) {\r\n for (let j = i + 1; j < n; j++) {\r\n const r = compareInSpace(cam, planes[i], planes[j]);\r\n if (r < 0) { after[i].push(j); blockers[j]++; }\r\n else if (r > 0) { after[j].push(i); blockers[i]++; }\r\n }\r\n }\r\n\r\n const order: number[] = [];\r\n const done = new Array<boolean>(n).fill(false);\r\n while (order.length < n) {\r\n let next = -1;\r\n for (let i = 0; i < n; i++) {\r\n if (!done[i] && blockers[i] === 0) { next = i; break; }\r\n }\r\n if (next === -1) {\r\n let far = -Infinity;\r\n for (let i = 0; i < n; i++) {\r\n if (done[i]) continue;\r\n const f = farness(cam, planes[i]);\r\n if (f > far) { far = f; next = i; }\r\n }\r\n }\r\n done[next] = true;\r\n order.push(next);\r\n for (const j of after[next]) blockers[j]--;\r\n }\r\n return order;\r\n}\r\n"]}
@@ -7,9 +7,9 @@ import { Insets, InsetsResolved } from "../../attributes/layout/insets.js";
7
7
  import { Alignment } from "../../attributes/layout/alignment.js";
8
8
  import { Vector2 } from "../../attributes/layout/vector2.js";
9
9
  import type { FlowMode, FlowResolved } from "../../layout/types.js";
10
- import { type AudioFilter } from "../../attributes/audio/filters/chain.js";
11
- import { AudioFilterItem } from "../../attributes/audio/filters/union.js";
12
- import { type Param } from "../../attributes/audio/filters/curve.js";
10
+ import { type AudioEffectsInput } from "../../attributes/audio/effects/chain.js";
11
+ import { AudioEffect } from "../../attributes/audio/effects/union.js";
12
+ import { type Param } from "../../attributes/audio/ramp.js";
13
13
  import { type Quaternion } from "../../render3d/vector3.js";
14
14
  /**
15
15
  * Attribute-typed variants of `property`, for the props the tree bases declare
@@ -73,19 +73,19 @@ export declare const quaternionProperty: (opts?: (AttributePropOptions<Quaternio
73
73
  *
74
74
  * `Param`, not `number`, because an `AudioRequest` is a schedule record built
75
75
  * once during precomp: a per-frame prop write would be read on whichever frame
76
- * happened to create the request and then never again. A `Curve` *is* the
77
- * automation lane, which is why the tween interpolates between whole curves.
76
+ * happened to create the request and then never again. A `Ramp` *is* the
77
+ * automation lane, which is why the tween interpolates between whole ramps.
78
78
  */
79
79
  export declare const audioParamProperty: (opts?: (AttributePropOptions<Param, Param> & {
80
80
  kind?: string;
81
81
  }) | undefined) => (target: object, propertyKey: string | symbol) => void;
82
82
  /**
83
- * An audio filter chain — the `filters` prop's op set.
83
+ * An audio effect chain — the `effects` prop's op set.
84
84
  *
85
85
  * Without it a chain is an object-valued prop, and `Node._prepareStep` drops
86
86
  * those silently: the tween would run its duration and write nothing.
87
87
  */
88
- export declare const audioFiltersProperty: (opts?: (AttributePropOptions<AudioFilter, AudioFilterItem[]> & {
88
+ export declare const audioEffectsProperty: (opts?: (AttributePropOptions<AudioEffectsInput, AudioEffect[]> & {
89
89
  kind?: string;
90
90
  }) | undefined) => (target: object, propertyKey: string | symbol) => void;
91
91
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,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G,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IACvC,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;CACxB;AAyBD,4HAA4H;AAC5H,eAAO,MAAM,YAAY;WAVoC,MAAM;yEAUkD,CAAC;AAEtH,8DAA8D;AAC9D,eAAO,MAAM,eAAe;WAbiC,MAAM;yEAa6D,CAAC;AAEjI,+EAA+E;AAC/E,eAAO,MAAM,cAAc;WAhBkC,MAAM;yEAgB0D,CAAC;AAE9H;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;WAvB+B,MAAM;yEAuByE,CAAC;AAE7I;;;GAGG;AACH,eAAO,MAAM,YAAY;WA7BoC,MAAM;yEA6B6C,CAAC;AAEjH;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,0DAO/D;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB;WA9C8B,MAAM;yEAgDlE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;WA1D8B,MAAM;yEA0DoD,CAAC;AAExH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;WAlE4B,MAAM;yEAoElE,CAAC"}
@@ -4,8 +4,8 @@ import { effectsOps } from "../../attributes/shape/effects/chain.js";
4
4
  import { insetsOps } from "../../attributes/layout/insets.js";
5
5
  import { alignmentOps } from "../../attributes/layout/alignment.js";
6
6
  import { flowOps } from "../../layout/ops.js";
7
- import { audioFiltersOps } from "../../attributes/audio/filters/registry.js";
8
- import { audioParamOps } from "../../attributes/audio/filters/curve.js";
7
+ import { audioEffectsOps } from "../../attributes/audio/effects/registry.js";
8
+ import { audioParamOps } from "../../attributes/audio/ramp.js";
9
9
  import { quaternionOps, lerpOptionalVector3, resolveOptionalVector3, } from "../../render3d/vector3.js";
10
10
  /**
11
11
  * Build one attribute-typed `property` from its canonical {@link AttributeOps}.
@@ -61,15 +61,15 @@ export const quaternionProperty = attributeProperty(() => ({ x: 0, y: 0, z: 0, w
61
61
  *
62
62
  * `Param`, not `number`, because an `AudioRequest` is a schedule record built
63
63
  * once during precomp: a per-frame prop write would be read on whichever frame
64
- * happened to create the request and then never again. A `Curve` *is* the
65
- * automation lane, which is why the tween interpolates between whole curves.
64
+ * happened to create the request and then never again. A `Ramp` *is* the
65
+ * automation lane, which is why the tween interpolates between whole ramps.
66
66
  */
67
67
  export const audioParamProperty = attributeProperty(() => 0, undefined, audioParamOps.lerp, "audioParam");
68
68
  /**
69
- * An audio filter chain — the `filters` prop's op set.
69
+ * An audio effect chain — the `effects` prop's op set.
70
70
  *
71
71
  * Without it a chain is an object-valued prop, and `Node._prepareStep` drops
72
72
  * those silently: the tween would run its duration and write nothing.
73
73
  */
74
- export const audioFiltersProperty = attributeProperty(() => [], audioFiltersOps.resolve, audioFiltersOps.lerp, "audioFilters");
74
+ export const audioEffectsProperty = attributeProperty(() => [], audioEffectsOps.resolve, audioEffectsOps.lerp, "audioEffects");
75
75
  //# sourceMappingURL=typed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typed.js","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAA0B,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAa,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAc,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EACH,aAAa,EAAE,mBAAmB,EAAE,sBAAsB,GAE7D,MAAM,oBA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E7I;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAyB,GAAG,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjH;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAwB;IAC5D,OAAO,QAAQ,CAAgD;QAC3D,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,sBAAsB;QAC9B,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC;QAC/D,IAAI,EAAE,SAAS;KAClB,CAAC,CAAC;AACP,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAC/C,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAClF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAe,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAExH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CACjD,GAAG,EAAE,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,cAAc,CAC1E,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\r\nimport { property } from \"./decorator\";\r\n\r\nimport { type Fill } from \"@/attributes/shape/fill/chain\";\r\nimport { FillResolved } from \"@/attributes/shape/fill/union\";\r\nimport { fillOps } from \"@/attributes/shape/fill/registry\";\r\n\r\nimport { type Effect, effectsOps } from \"@/attributes/shape/effects/chain\";\r\nimport { NodeEffect } from \"@/attributes/shape/effects/union\";\r\n\r\nimport { Insets, InsetsResolved, insetsOps } from \"@/attributes/layout/insets\";\r\nimport { Alignment, alignmentOps } from \"@/attributes/layout/alignment\";\r\nimport { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { flowOps } from \"@/layout/ops\";\r\nimport type { FlowMode, FlowResolved } from \"@/layout/types\";\r\n\r\nimport { type AudioFilter } from \"@/attributes/audio/filters/chain\";\r\nimport { audioFiltersOps } from \"@/attributes/audio/filters/registry\";\r\nimport { AudioFilterItem } from \"@/attributes/audio/filters/union\";\r\nimport { type Param, audioParamOps } from \"@/attributes/audio/filters/curve\";\r\n\r\nimport {\r\n quaternionOps, lerpOptionalVector3, resolveOptionalVector3,\r\n type Quaternion, type Vector3, type Vector3Input,\r\n} from \"@/render3d/vector3\";\r\n\r\n/**\r\n * Attribute-typed variants of `property`, for the props the tree bases declare\r\n * themselves (`Node2D`, `Node3D`, `NodeAudio`, the root `Canvas2D`).\r\n *\r\n * A rich attribute (a fill, an effect chain, an inset) is only declarative and\r\n * tweenable because its `property` carries the matching *mapper* (loose author\r\n * input → resolved value) and *tween* (how the resolved value interpolates) —\r\n * together, an `AttributeOps` (`attributes/shared/operators.ts`). These pre-bake\r\n * each pair: `fillProperty()` is exactly\r\n * `property({ default: [], mapper: fillOps.resolve, tween: fillOps.lerp, kind: \"fills\" })`.\r\n * A component declares the same pairs as state entries (`Types.fill`, …).\r\n */\r\ninterface AttributePropOptions<Ext, Int> {\r\n /** Initial value, used when the constructor `props` object omits the key. */\r\n default?: Ext;\r\n /** Override the attribute's built-in external → internal mapper. */\r\n mapper?: (ext: Ext, prev?: Int) => Int;\r\n /** Override the attribute's built-in lerp for `to()`. */\r\n tween?: TweenFn<Int>;\r\n}\r\n\r\n/**\r\n * Build one attribute-typed `property` from its canonical {@link AttributeOps}.\r\n *\r\n * `fallback` is a factory rather than a value so array/object defaults aren't a\r\n * single instance shared by every property declared through it. An **explicit**\r\n * `default: undefined` means \"this prop has no default\" and is honoured as such.\r\n */\r\nfunction attributeProperty<Ext, Int>(\r\n fallback: () => Ext,\r\n mapper?: (ext: Ext, prev?: Int) => Int,\r\n tween?: TweenFn<Int>,\r\n /** The control a host draws for this attribute, when it is not the default. */\r\n kind?: string,\r\n) {\r\n return (opts?: AttributePropOptions<Ext, Int> & { kind?: string }) =>\r\n property<Ext, Int>({\r\n default: opts && \"default\" in opts ? opts.default : fallback(),\r\n mapper: opts?.mapper ?? mapper,\r\n tween: opts?.tween ?? tween,\r\n ...(opts?.kind ?? kind ? { kind: opts?.kind ?? kind } : {}),\r\n });\r\n}\r\n\r\n/** A fill-layer property: a CSS string, a fill prop object, a `Fills` chain, or an array of them, lerped layer by layer. */\r\nexport const fillProperty = attributeProperty<Fill, FillResolved[]>(() => [], fillOps.resolve, fillOps.lerp, \"fills\");\r\n\r\n/** An effect-chain property — the `effects` prop's op set. */\r\nexport const effectsProperty = attributeProperty<Effect, NodeEffect[]>(() => [], effectsOps.resolve, effectsOps.lerp, \"effects\");\r\n\r\n/** An edge-inset property: scalar, symmetric or per-edge, tweened per edge. */\r\nexport const insetsProperty = attributeProperty<Insets, InsetsResolved>(() => 0, insetsOps.resolve, insetsOps.lerp, \"insets\");\r\n\r\n/**\r\n * An alignment property: a named position (`'center'`, `'topLeft'`, …) resolved\r\n * to a per-axis {@link Vector2} in `[-1, 1]`, tweened as a vector so\r\n * `'centerLeft' → 'centerRight'` slides.\r\n */\r\nexport const alignmentProperty = attributeProperty<Alignment, Vector2>(() => \"center\", alignmentOps.resolve, alignmentOps.lerp, \"alignment\");\r\n\r\n/**\r\n * A layout-mode property. Mid-tween it holds both modes and how far along, so\r\n * restoring the prop — which is what a seek does — restores the blend with it.\r\n */\r\nexport const flowProperty = attributeProperty<FlowMode, FlowResolved>(() => \"freeform\", undefined, flowOps.lerp);\r\n\r\n/**\r\n * A 3D point that may be unset: a node's `lookAt`. It defaults to unset (not to\r\n * the origin), stays unset when a binding returns `undefined`, and tweens with\r\n * `to()` — from `unset`'s reading of an unset start (see {@link lerpOptionalVector3}).\r\n */\r\nexport function optionalVector3Property(unset: \"origin\" | \"snap\") {\r\n return property<Vector3Input | undefined, Vector3 | undefined>({\r\n default: undefined,\r\n mapper: resolveOptionalVector3,\r\n tween: (from, to, t) => lerpOptionalVector3(from, to, t, unset),\r\n kind: \"vector3\",\r\n });\r\n}\r\n\r\n/** A rotation as a unit quaternion, interpolated with shortest-arc slerp. */\r\nexport const quaternionProperty = attributeProperty<Quaternion, Quaternion>(\r\n () => ({ x: 0, y: 0, z: 0, w: 1 }), undefined, quaternionOps.lerp, \"quaternion\",\r\n);\r\n\r\n/**\r\n * An audio level — a gain, a pan position, anything a clip or a bus schedules.\r\n *\r\n * `Param`, not `number`, because an `AudioRequest` is a schedule record built\r\n * once during precomp: a per-frame prop write would be read on whichever frame\r\n * happened to create the request and then never again. A `Curve` *is* the\r\n * automation lane, which is why the tween interpolates between whole curves.\r\n */\r\nexport const audioParamProperty = attributeProperty<Param, Param>(() => 0, undefined, audioParamOps.lerp, \"audioParam\");\r\n\r\n/**\r\n * An audio filter chain — the `filters` prop's op set.\r\n *\r\n * Without it a chain is an object-valued prop, and `Node._prepareStep` drops\r\n * those silently: the tween would run its duration and write nothing.\r\n */\r\nexport const audioFiltersProperty = attributeProperty<AudioFilter, AudioFilterItem[]>(\r\n () => [], audioFiltersOps.resolve, audioFiltersOps.lerp, \"audioFilters\",\r\n);\r\n"]}
1
+ {"version":3,"file":"typed.js","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAA0B,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EA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,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,cAAc,CAC1E,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\r\nimport { property } from \"./decorator\";\r\n\r\nimport { type Fill } from \"@/attributes/shape/fill/chain\";\r\nimport { FillResolved } from \"@/attributes/shape/fill/union\";\r\nimport { fillOps } from \"@/attributes/shape/fill/registry\";\r\n\r\nimport { type Effect, effectsOps } from \"@/attributes/shape/effects/chain\";\r\nimport { NodeEffect } from \"@/attributes/shape/effects/union\";\r\n\r\nimport { Insets, InsetsResolved, insetsOps } from \"@/attributes/layout/insets\";\r\nimport { Alignment, alignmentOps } from \"@/attributes/layout/alignment\";\r\nimport { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { flowOps } from \"@/layout/ops\";\r\nimport type { FlowMode, FlowResolved } from \"@/layout/types\";\r\n\r\nimport { type AudioEffectsInput } from \"@/attributes/audio/effects/chain\";\r\nimport { audioEffectsOps } from \"@/attributes/audio/effects/registry\";\r\nimport { AudioEffect } from \"@/attributes/audio/effects/union\";\r\nimport { type Param, audioParamOps } from \"@/attributes/audio/ramp\";\r\n\r\nimport {\r\n quaternionOps, lerpOptionalVector3, resolveOptionalVector3,\r\n type Quaternion, type Vector3, type Vector3Input,\r\n} from \"@/render3d/vector3\";\r\n\r\n/**\r\n * Attribute-typed variants of `property`, for the props the tree bases declare\r\n * themselves (`Node2D`, `Node3D`, `NodeAudio`, the root `Canvas2D`).\r\n *\r\n * A rich attribute (a fill, an effect chain, an inset) is only declarative and\r\n * tweenable because its `property` carries the matching *mapper* (loose author\r\n * input → resolved value) and *tween* (how the resolved value interpolates) —\r\n * together, an `AttributeOps` (`attributes/shared/operators.ts`). These pre-bake\r\n * each pair: `fillProperty()` is exactly\r\n * `property({ default: [], mapper: fillOps.resolve, tween: fillOps.lerp, kind: \"fills\" })`.\r\n * A component declares the same pairs as state entries (`Types.fill`, …).\r\n */\r\ninterface AttributePropOptions<Ext, Int> {\r\n /** Initial value, used when the constructor `props` object omits the key. */\r\n default?: Ext;\r\n /** Override the attribute's built-in external → internal mapper. */\r\n mapper?: (ext: Ext, prev?: Int) => Int;\r\n /** Override the attribute's built-in lerp for `to()`. */\r\n tween?: TweenFn<Int>;\r\n}\r\n\r\n/**\r\n * Build one attribute-typed `property` from its canonical {@link AttributeOps}.\r\n *\r\n * `fallback` is a factory rather than a value so array/object defaults aren't a\r\n * single instance shared by every property declared through it. An **explicit**\r\n * `default: undefined` means \"this prop has no default\" and is honoured as such.\r\n */\r\nfunction attributeProperty<Ext, Int>(\r\n fallback: () => Ext,\r\n mapper?: (ext: Ext, prev?: Int) => Int,\r\n tween?: TweenFn<Int>,\r\n /** The control a host draws for this attribute, when it is not the default. */\r\n kind?: string,\r\n) {\r\n return (opts?: AttributePropOptions<Ext, Int> & { kind?: string }) =>\r\n property<Ext, Int>({\r\n default: opts && \"default\" in opts ? opts.default : fallback(),\r\n mapper: opts?.mapper ?? mapper,\r\n tween: opts?.tween ?? tween,\r\n ...(opts?.kind ?? kind ? { kind: opts?.kind ?? kind } : {}),\r\n });\r\n}\r\n\r\n/** A fill-layer property: a CSS string, a fill prop object, a `Fills` chain, or an array of them, lerped layer by layer. */\r\nexport const fillProperty = attributeProperty<Fill, FillResolved[]>(() => [], fillOps.resolve, fillOps.lerp, \"fills\");\r\n\r\n/** An effect-chain property — the `effects` prop's op set. */\r\nexport const effectsProperty = attributeProperty<Effect, NodeEffect[]>(() => [], effectsOps.resolve, effectsOps.lerp, \"effects\");\r\n\r\n/** An edge-inset property: scalar, symmetric or per-edge, tweened per edge. */\r\nexport const insetsProperty = attributeProperty<Insets, InsetsResolved>(() => 0, insetsOps.resolve, insetsOps.lerp, \"insets\");\r\n\r\n/**\r\n * An alignment property: a named position (`'center'`, `'topLeft'`, …) resolved\r\n * to a per-axis {@link Vector2} in `[-1, 1]`, tweened as a vector so\r\n * `'centerLeft' → 'centerRight'` slides.\r\n */\r\nexport const alignmentProperty = attributeProperty<Alignment, Vector2>(() => \"center\", alignmentOps.resolve, alignmentOps.lerp, \"alignment\");\r\n\r\n/**\r\n * A layout-mode property. Mid-tween it holds both modes and how far along, so\r\n * restoring the prop — which is what a seek does — restores the blend with it.\r\n */\r\nexport const flowProperty = attributeProperty<FlowMode, FlowResolved>(() => \"freeform\", undefined, flowOps.lerp);\r\n\r\n/**\r\n * A 3D point that may be unset: a node's `lookAt`. It defaults to unset (not to\r\n * the origin), stays unset when a binding returns `undefined`, and tweens with\r\n * `to()` — from `unset`'s reading of an unset start (see {@link lerpOptionalVector3}).\r\n */\r\nexport function optionalVector3Property(unset: \"origin\" | \"snap\") {\r\n return property<Vector3Input | undefined, Vector3 | undefined>({\r\n default: undefined,\r\n mapper: resolveOptionalVector3,\r\n tween: (from, to, t) => lerpOptionalVector3(from, to, t, unset),\r\n kind: \"vector3\",\r\n });\r\n}\r\n\r\n/** A rotation as a unit quaternion, interpolated with shortest-arc slerp. */\r\nexport const quaternionProperty = attributeProperty<Quaternion, Quaternion>(\r\n () => ({ x: 0, y: 0, z: 0, w: 1 }), undefined, quaternionOps.lerp, \"quaternion\",\r\n);\r\n\r\n/**\r\n * An audio level — a gain, a pan position, anything a clip or a bus schedules.\r\n *\r\n * `Param`, not `number`, because an `AudioRequest` is a schedule record built\r\n * once during precomp: a per-frame prop write would be read on whichever frame\r\n * happened to create the request and then never again. A `Ramp` *is* the\r\n * automation lane, which is why the tween interpolates between whole ramps.\r\n */\r\nexport const audioParamProperty = attributeProperty<Param, Param>(() => 0, undefined, audioParamOps.lerp, \"audioParam\");\r\n\r\n/**\r\n * An audio effect chain — the `effects` prop's op set.\r\n *\r\n * Without it a chain is an object-valued prop, and `Node._prepareStep` drops\r\n * those silently: the tween would run its duration and write nothing.\r\n */\r\nexport const audioEffectsProperty = attributeProperty<AudioEffectsInput, AudioEffect[]>(\r\n () => [], audioEffectsOps.resolve, audioEffectsOps.lerp, \"audioEffects\",\r\n);\r\n"]}
@@ -11,8 +11,7 @@ export type CornerRadiusResolved = Corners<number>;
11
11
  export type RectCornerRadius = CornersInput<number> | CornerRadiusResolved;
12
12
  /**
13
13
  * The corner-radius attribute's op set: `resolve`/`lerp` for `Shapes.corners`,
14
- * plus the uniform/zero checks a renderer needs to pick a cheap draw path (see
15
- * `RectShape.computeGeometry` in `@motionscript/skia-render`).
14
+ * plus the uniform/zero checks a renderer needs to pick a cheap draw path.
16
15
  */
17
16
  export declare const cornerRadiusOps: CornerRadiusOps;
18
17
  //# sourceMappingURL=corner-radius.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"corner-radius.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corner-radius.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAiD,MAAM,WAAW,CAAC;AAEjG,sEAAsE;AACtE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,eAQ7B,CAAC"}
1
+ {"version":3,"file":"corner-radius.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/corners/corner-radius.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAiD,MAAM,WAAW,CAAC;AAEjG,sEAAsE;AACtE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,eAQ7B,CAAC"}
@@ -2,8 +2,7 @@ import { lerpNumber } from "../../../tween/lerp.js";
2
2
  import { resolveCorners, lerpCorners, isUniformCorners } from "./corners.js";
3
3
  /**
4
4
  * The corner-radius attribute's op set: `resolve`/`lerp` for `Shapes.corners`,
5
- * plus the uniform/zero checks a renderer needs to pick a cheap draw path (see
6
- * `RectShape.computeGeometry` in `@motionscript/skia-render`).
5
+ * plus the uniform/zero checks a renderer needs to pick a cheap draw path.
7
6
  */
8
7
  export const cornerRadiusOps = {
9
8
  // A resolved value is structurally a full per-corner `CornersInput<number>`,