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

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 (1133) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +49 -48
  4. package/README.md +91 -91
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.js.map +1 -1
  7. package/dist/assets/errors.js.map +1 -1
  8. package/dist/assets/index.js.map +1 -1
  9. package/dist/assets/manager.d.ts.map +1 -1
  10. package/dist/assets/manager.js +7 -5
  11. package/dist/assets/manager.js.map +1 -1
  12. package/dist/assets/manifest.js.map +1 -1
  13. package/dist/assets/record.js.map +1 -1
  14. package/dist/assets/scope.js.map +1 -1
  15. package/dist/attributes/audio/effects/chain.d.ts +73 -0
  16. package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
  17. package/dist/attributes/audio/effects/chain.js +67 -0
  18. package/dist/attributes/audio/effects/chain.js.map +1 -0
  19. package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
  20. package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
  21. package/dist/attributes/audio/{filters → effects}/implementations/echo.js +2 -2
  22. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
  23. package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
  24. package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
  25. package/dist/attributes/audio/{filters → effects}/implementations/gain.js +2 -2
  26. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
  27. package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
  28. package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
  29. package/dist/attributes/audio/{filters → effects}/implementations/highpass.js +2 -2
  30. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
  31. package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
  32. package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
  33. package/dist/attributes/audio/{filters → effects}/implementations/lowpass.js +2 -2
  34. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
  35. package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
  36. package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
  37. package/dist/attributes/audio/{filters → effects}/implementations/tremolo.js +2 -2
  38. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
  39. package/dist/attributes/audio/effects/index.d.ts +12 -0
  40. package/dist/attributes/audio/effects/index.d.ts.map +1 -0
  41. package/dist/attributes/audio/effects/index.js +4 -0
  42. package/dist/attributes/audio/effects/index.js.map +1 -0
  43. package/dist/attributes/audio/effects/registry.d.ts +36 -0
  44. package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
  45. package/dist/attributes/audio/effects/registry.js +80 -0
  46. package/dist/attributes/audio/effects/registry.js.map +1 -0
  47. package/dist/attributes/audio/effects/union.d.ts +14 -0
  48. package/dist/attributes/audio/effects/union.d.ts.map +1 -0
  49. package/dist/attributes/audio/effects/union.js +24 -0
  50. package/dist/attributes/audio/effects/union.js.map +1 -0
  51. package/dist/attributes/audio/ramp.d.ts +103 -0
  52. package/dist/attributes/audio/ramp.d.ts.map +1 -0
  53. package/dist/attributes/audio/ramp.js +246 -0
  54. package/dist/attributes/audio/ramp.js.map +1 -0
  55. package/dist/attributes/audio/request.d.ts +24 -13
  56. package/dist/attributes/audio/request.d.ts.map +1 -1
  57. package/dist/attributes/audio/request.js +4 -3
  58. package/dist/attributes/audio/request.js.map +1 -1
  59. package/dist/attributes/audio/schedule.d.ts +21 -13
  60. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  61. package/dist/attributes/audio/schedule.js +42 -28
  62. package/dist/attributes/audio/schedule.js.map +1 -1
  63. package/dist/attributes/audio/sound.d.ts +15 -12
  64. package/dist/attributes/audio/sound.d.ts.map +1 -1
  65. package/dist/attributes/audio/sound.js +8 -10
  66. package/dist/attributes/audio/sound.js.map +1 -1
  67. package/dist/attributes/audio/transition.d.ts +33 -0
  68. package/dist/attributes/audio/transition.d.ts.map +1 -0
  69. package/dist/attributes/audio/transition.js +48 -0
  70. package/dist/attributes/audio/transition.js.map +1 -0
  71. package/dist/attributes/index.d.ts +4 -3
  72. package/dist/attributes/index.d.ts.map +1 -1
  73. package/dist/attributes/index.js +4 -7
  74. package/dist/attributes/index.js.map +1 -1
  75. package/dist/attributes/layout/alignment.js.map +1 -1
  76. package/dist/attributes/layout/index.js.map +1 -1
  77. package/dist/attributes/layout/insets.js.map +1 -1
  78. package/dist/attributes/layout/matrix2d.d.ts +2 -2
  79. package/dist/attributes/layout/matrix2d.js.map +1 -1
  80. package/dist/attributes/layout/size.js.map +1 -1
  81. package/dist/attributes/layout/space3d.js +1 -1
  82. package/dist/attributes/layout/space3d.js.map +1 -1
  83. package/dist/attributes/layout/transform3d.js.map +1 -1
  84. package/dist/attributes/layout/vector2.js.map +1 -1
  85. package/dist/attributes/layout/world-transform.js.map +1 -1
  86. package/dist/attributes/mask/boolean.js.map +1 -1
  87. package/dist/attributes/mask/mask.js.map +1 -1
  88. package/dist/attributes/properties/decorator.js.map +1 -1
  89. package/dist/attributes/properties/inputs.js.map +1 -1
  90. package/dist/attributes/properties/typed.d.ts +7 -7
  91. package/dist/attributes/properties/typed.d.ts.map +1 -1
  92. package/dist/attributes/properties/typed.js +6 -6
  93. package/dist/attributes/properties/typed.js.map +1 -1
  94. package/dist/attributes/render3d/orbit.js.map +1 -1
  95. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -2
  96. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  97. package/dist/attributes/shape/corners/corner-radius.js +1 -2
  98. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  99. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js.map +1 -1
  101. package/dist/attributes/shape/corners/index.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  103. package/dist/attributes/shape/effects/chain.d.ts +96 -409
  104. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  105. package/dist/attributes/shape/effects/chain.js +93 -283
  106. package/dist/attributes/shape/effects/chain.js.map +1 -1
  107. package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
  108. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
  110. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
  112. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
  114. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
  116. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
  118. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
  120. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
  122. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
  124. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
  126. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/blur.js +13 -5
  128. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
  130. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
  132. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
  134. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
  136. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
  138. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
  140. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  141. package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
  142. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  143. package/dist/attributes/shape/effects/implementations/curves.js +26 -23
  144. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  145. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
  146. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  147. package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
  148. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  149. package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
  150. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  151. package/dist/attributes/shape/effects/implementations/dither.js +26 -20
  152. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  153. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +46 -14
  154. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  155. package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
  156. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  157. package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
  158. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  159. package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
  160. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  161. package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
  162. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  163. package/dist/attributes/shape/effects/implementations/edges.js +17 -14
  164. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  165. package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
  166. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  167. package/dist/attributes/shape/effects/implementations/glass.js +28 -22
  168. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  169. package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
  170. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  171. package/dist/attributes/shape/effects/implementations/glow.js +74 -72
  172. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  173. package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
  174. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  175. package/dist/attributes/shape/effects/implementations/grain.js +21 -18
  176. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  177. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
  178. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  179. package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
  180. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  181. package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
  182. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  183. package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
  184. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  185. package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
  186. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  187. package/dist/attributes/shape/effects/implementations/invert.js +15 -10
  188. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  189. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
  190. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  191. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
  192. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  193. package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
  194. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  195. package/dist/attributes/shape/effects/implementations/lut.js +20 -16
  196. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  197. package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
  198. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  199. package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
  200. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  201. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
  202. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  203. package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
  204. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  205. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
  206. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  207. package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
  208. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  209. package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
  210. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  211. package/dist/attributes/shape/effects/implementations/outline.js +18 -17
  212. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  213. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
  214. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  215. package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
  216. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  217. package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
  218. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  219. package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
  220. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  221. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
  222. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  223. package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
  224. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  225. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
  226. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  227. package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
  228. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  229. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
  230. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  231. package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
  232. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  233. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
  234. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  235. package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
  236. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  237. package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
  238. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  239. package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
  240. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  241. package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
  242. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  243. package/dist/attributes/shape/effects/implementations/shader.js +42 -26
  244. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  245. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
  246. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  247. package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
  248. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  249. package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
  250. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  251. package/dist/attributes/shape/effects/implementations/streak.js +19 -16
  252. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  253. package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
  254. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  255. package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
  256. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  257. package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
  258. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  259. package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
  260. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  261. package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
  262. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  263. package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
  264. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  265. package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
  266. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  267. package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
  268. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  269. package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
  270. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  271. package/dist/attributes/shape/effects/implementations/wave.js +26 -23
  272. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  273. package/dist/attributes/shape/effects/index.d.ts +4 -2
  274. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  275. package/dist/attributes/shape/effects/index.js +1 -1
  276. package/dist/attributes/shape/effects/index.js.map +1 -1
  277. package/dist/attributes/shape/effects/registry.d.ts +11 -0
  278. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  279. package/dist/attributes/shape/effects/registry.js +113 -102
  280. package/dist/attributes/shape/effects/registry.js.map +1 -1
  281. package/dist/attributes/shape/effects/spec.d.ts +229 -0
  282. package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
  283. package/dist/attributes/shape/effects/spec.js +178 -0
  284. package/dist/attributes/shape/effects/spec.js.map +1 -0
  285. package/dist/attributes/shape/effects/union.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.js.map +1 -1
  287. package/dist/attributes/shape/fill/chain.d.ts +7 -9
  288. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  289. package/dist/attributes/shape/fill/chain.js +9 -11
  290. package/dist/attributes/shape/fill/chain.js.map +1 -1
  291. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  292. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  293. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  294. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  295. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  296. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  297. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  298. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  299. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  300. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  301. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  302. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  303. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  304. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  305. package/dist/attributes/shape/fill/implementations/shader.d.ts +27 -26
  306. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  307. package/dist/attributes/shape/fill/implementations/shader.js +20 -14
  308. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  309. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  311. package/dist/attributes/shape/fill/index.d.ts +1 -1
  312. package/dist/attributes/shape/fill/index.d.ts.map +1 -1
  313. package/dist/attributes/shape/fill/index.js.map +1 -1
  314. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  315. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  316. package/dist/attributes/shape/fill/registry.d.ts +1 -2
  317. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  318. package/dist/attributes/shape/fill/registry.js +1 -2
  319. package/dist/attributes/shape/fill/registry.js.map +1 -1
  320. package/dist/attributes/shape/fill/union.js.map +1 -1
  321. package/dist/attributes/shape/filters/chain.d.ts +2 -6
  322. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  323. package/dist/attributes/shape/filters/chain.js +1 -5
  324. package/dist/attributes/shape/filters/chain.js.map +1 -1
  325. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  326. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  327. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  328. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
  329. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  330. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  331. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  332. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  333. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  334. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  335. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  336. package/dist/attributes/shape/filters/index.js.map +1 -1
  337. package/dist/attributes/shape/filters/registry.d.ts +1 -1
  338. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  339. package/dist/attributes/shape/filters/registry.js +3 -3
  340. package/dist/attributes/shape/filters/registry.js.map +1 -1
  341. package/dist/attributes/shape/filters/union.d.ts +2 -3
  342. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  343. package/dist/attributes/shape/filters/union.js.map +1 -1
  344. package/dist/attributes/shape/path/anchors.js.map +1 -1
  345. package/dist/attributes/shape/path/bezier.js.map +1 -1
  346. package/dist/attributes/shape/path/index.js.map +1 -1
  347. package/dist/attributes/shape/path/measure.js.map +1 -1
  348. package/dist/attributes/shape/path/morph.js.map +1 -1
  349. package/dist/attributes/shape/path/ops.js.map +1 -1
  350. package/dist/attributes/shape/path/types.js.map +1 -1
  351. package/dist/attributes/shape/path/walk.js.map +1 -1
  352. package/dist/attributes/shape/shaders/index.d.ts +2 -0
  353. package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
  354. package/dist/attributes/shape/shaders/index.js +2 -0
  355. package/dist/attributes/shape/shaders/index.js.map +1 -1
  356. package/dist/attributes/shape/shaders/language.d.ts +26 -0
  357. package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
  358. package/dist/attributes/shape/shaders/language.js +20 -0
  359. package/dist/attributes/shape/shaders/language.js.map +1 -0
  360. package/dist/attributes/shape/shaders/pack.d.ts +25 -11
  361. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  362. package/dist/attributes/shape/shaders/pack.js +9 -4
  363. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  364. package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
  365. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  366. package/dist/attributes/shape/shaders/resolve.js +3 -6
  367. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  368. package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
  369. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
  370. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  371. package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
  372. package/dist/attributes/shape/shadow/index.js.map +1 -1
  373. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  374. package/dist/attributes/shape/stroke/index.js.map +1 -1
  375. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  376. package/dist/attributes/shared/operators.js.map +1 -1
  377. package/dist/attributes/text/index.js.map +1 -1
  378. package/dist/attributes/text/ops.js.map +1 -1
  379. package/dist/attributes/text/types.js.map +1 -1
  380. package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
  381. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
  382. package/dist/browser/chunks/chunk-7DB6BI27.js +6 -0
  383. package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
  384. package/dist/browser/chunks/chunk-IX53IFBD.js +13 -0
  385. package/dist/browser/chunks/chunk-IX53IFBD.js.map +7 -0
  386. package/dist/browser/chunks/{chunk-ZRPZPWZU.js → chunk-Q55UPA3E.js} +1 -1
  387. package/dist/browser/chunks/chunk-Q55UPA3E.js.map +7 -0
  388. package/dist/browser/component.js +1 -1
  389. package/dist/browser/experimental.js +1 -1
  390. package/dist/browser/experimental.js.map +4 -4
  391. package/dist/browser/index.js +1 -1
  392. package/dist/browser/index.js.map +2 -2
  393. package/dist/browser/manifest.json +1 -1
  394. package/dist/browser/sdk.js +1 -1
  395. package/dist/component.js.map +1 -1
  396. package/dist/components/builtins/audio/audio.d.ts +14 -5
  397. package/dist/components/builtins/audio/audio.d.ts.map +1 -1
  398. package/dist/components/builtins/audio/audio.js +10 -13
  399. package/dist/components/builtins/audio/audio.js.map +1 -1
  400. package/dist/components/builtins/geometry/composite.d.ts +3 -3
  401. package/dist/components/builtins/geometry/composite.js.map +1 -1
  402. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  403. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  404. package/dist/components/builtins/layout/layout.js.map +1 -1
  405. package/dist/components/builtins/media/media.d.ts +7 -7
  406. package/dist/components/builtins/media/media.d.ts.map +1 -1
  407. package/dist/components/builtins/media/media.js +4 -10
  408. package/dist/components/builtins/media/media.js.map +1 -1
  409. package/dist/components/builtins/providers/providers.js.map +1 -1
  410. package/dist/components/builtins/text/number-format.js.map +1 -1
  411. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  412. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  413. package/dist/components/builtins/text/text-layout.js.map +1 -1
  414. package/dist/components/builtins/text/text.d.ts +9 -9
  415. package/dist/components/builtins/text/text.d.ts.map +1 -1
  416. package/dist/components/builtins/text/text.js +3 -0
  417. package/dist/components/builtins/text/text.js.map +1 -1
  418. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  419. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  420. package/dist/components/builtins/three/three.js.map +1 -1
  421. package/dist/components/factory/api.d.ts +38 -11
  422. package/dist/components/factory/api.d.ts.map +1 -1
  423. package/dist/components/factory/api.js.map +1 -1
  424. package/dist/components/factory/clip-of.js.map +1 -1
  425. package/dist/components/factory/commands-for.js.map +1 -1
  426. package/dist/components/factory/component-audio.js.map +1 -1
  427. package/dist/components/factory/component2d.js.map +1 -1
  428. package/dist/components/factory/component3d.d.ts.map +1 -1
  429. package/dist/components/factory/component3d.js +11 -3
  430. package/dist/components/factory/component3d.js.map +1 -1
  431. package/dist/components/factory/factory.d.ts +3 -0
  432. package/dist/components/factory/factory.d.ts.map +1 -1
  433. package/dist/components/factory/factory.js +39 -5
  434. package/dist/components/factory/factory.js.map +1 -1
  435. package/dist/components/factory/timeline.js.map +1 -1
  436. package/dist/components/factory/type-def.js.map +1 -1
  437. package/dist/components/factory/types.js.map +1 -1
  438. package/dist/components/factory/views.js.map +1 -1
  439. package/dist/components/modules/aim.js.map +1 -1
  440. package/dist/components/modules/corners.js.map +1 -1
  441. package/dist/components/modules/flow.js.map +1 -1
  442. package/dist/components/modules/material.js.map +1 -1
  443. package/dist/components/modules/paint.js.map +1 -1
  444. package/dist/components/modules/shapes.js.map +1 -1
  445. package/dist/components/modules/text-layout.js.map +1 -1
  446. package/dist/components/modules/text-style.js.map +1 -1
  447. package/dist/components/modules/three-entries.js.map +1 -1
  448. package/dist/components/modules/view3d.js.map +1 -1
  449. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  450. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  451. package/dist/components/trees/2d/node-motion.js.map +1 -1
  452. package/dist/components/trees/2d/node-render.d.ts +1 -1
  453. package/dist/components/trees/2d/node-render.js +1 -1
  454. package/dist/components/trees/2d/node-render.js.map +1 -1
  455. package/dist/components/trees/2d/node-space.js.map +1 -1
  456. package/dist/components/trees/2d/node-transform.js.map +1 -1
  457. package/dist/components/trees/2d/node2d.d.ts +1 -1
  458. package/dist/components/trees/2d/node2d.js +1 -1
  459. package/dist/components/trees/2d/node2d.js.map +1 -1
  460. package/dist/components/trees/audio/index.js.map +1 -1
  461. package/dist/components/trees/audio/node-audio.d.ts +16 -9
  462. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  463. package/dist/components/trees/audio/node-audio.js +15 -11
  464. package/dist/components/trees/audio/node-audio.js.map +1 -1
  465. package/dist/components/trees/index.js.map +1 -1
  466. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  467. package/dist/components/trees/node/node-reactive.js.map +1 -1
  468. package/dist/components/trees/node/node-time.js.map +1 -1
  469. package/dist/components/trees/node/node-walk.js.map +1 -1
  470. package/dist/components/trees/node/node.js.map +1 -1
  471. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  472. package/dist/components/trees/three/node3d.js.map +1 -1
  473. package/dist/document/audio.js.map +1 -1
  474. package/dist/document/builtins.js.map +1 -1
  475. package/dist/document/command-traits.d.ts +12 -2
  476. package/dist/document/command-traits.d.ts.map +1 -1
  477. package/dist/document/command-traits.js +34 -6
  478. package/dist/document/command-traits.js.map +1 -1
  479. package/dist/document/deny-globals.js.map +1 -1
  480. package/dist/document/diff.js.map +1 -1
  481. package/dist/document/doc-index.js.map +1 -1
  482. package/dist/document/expression/compile.js.map +1 -1
  483. package/dist/document/expression/index.js.map +1 -1
  484. package/dist/document/expression/ops.js.map +1 -1
  485. package/dist/document/expression/parse.js.map +1 -1
  486. package/dist/document/expression/refs.js.map +1 -1
  487. package/dist/document/expression/types.js.map +1 -1
  488. package/dist/document/expression/walk.js.map +1 -1
  489. package/dist/document/index.d.ts +8 -0
  490. package/dist/document/index.d.ts.map +1 -1
  491. package/dist/document/index.js +4 -0
  492. package/dist/document/index.js.map +1 -1
  493. package/dist/document/migrate.d.ts +70 -0
  494. package/dist/document/migrate.d.ts.map +1 -0
  495. package/dist/document/migrate.js +202 -0
  496. package/dist/document/migrate.js.map +1 -0
  497. package/dist/document/missing-node.d.ts +27 -0
  498. package/dist/document/missing-node.d.ts.map +1 -0
  499. package/dist/document/missing-node.js +48 -0
  500. package/dist/document/missing-node.js.map +1 -0
  501. package/dist/document/node-decorator.js.map +1 -1
  502. package/dist/document/node-descriptor.d.ts +4 -0
  503. package/dist/document/node-descriptor.d.ts.map +1 -1
  504. package/dist/document/node-descriptor.js.map +1 -1
  505. package/dist/document/placement.d.ts +2 -1
  506. package/dist/document/placement.d.ts.map +1 -1
  507. package/dist/document/placement.js.map +1 -1
  508. package/dist/document/project.d.ts +2 -0
  509. package/dist/document/project.d.ts.map +1 -1
  510. package/dist/document/project.js +1 -0
  511. package/dist/document/project.js.map +1 -1
  512. package/dist/document/prop-evolution.d.ts +51 -0
  513. package/dist/document/prop-evolution.d.ts.map +1 -0
  514. package/dist/document/prop-evolution.js +83 -0
  515. package/dist/document/prop-evolution.js.map +1 -0
  516. package/dist/document/registry.d.ts +16 -0
  517. package/dist/document/registry.d.ts.map +1 -1
  518. package/dist/document/registry.js +30 -4
  519. package/dist/document/registry.js.map +1 -1
  520. package/dist/document/settled-index.d.ts +2 -0
  521. package/dist/document/settled-index.d.ts.map +1 -1
  522. package/dist/document/settled-index.js +5 -5
  523. package/dist/document/settled-index.js.map +1 -1
  524. package/dist/document/timeline-patch.d.ts +4 -0
  525. package/dist/document/timeline-patch.d.ts.map +1 -1
  526. package/dist/document/timeline-patch.js +28 -3
  527. package/dist/document/timeline-patch.js.map +1 -1
  528. package/dist/document/timeline.d.ts +45 -1
  529. package/dist/document/timeline.d.ts.map +1 -1
  530. package/dist/document/timeline.js +172 -42
  531. package/dist/document/timeline.js.map +1 -1
  532. package/dist/document/types.d.ts +14 -28
  533. package/dist/document/types.d.ts.map +1 -1
  534. package/dist/document/types.js.map +1 -1
  535. package/dist/document/validate.d.ts +17 -5
  536. package/dist/document/validate.d.ts.map +1 -1
  537. package/dist/document/validate.js +158 -21
  538. package/dist/document/validate.js.map +1 -1
  539. package/dist/document/vocabulary.d.ts +28 -0
  540. package/dist/document/vocabulary.d.ts.map +1 -0
  541. package/dist/document/vocabulary.js +42 -0
  542. package/dist/document/vocabulary.js.map +1 -0
  543. package/dist/experimental.d.ts +68 -8
  544. package/dist/experimental.d.ts.map +1 -1
  545. package/dist/experimental.js +22 -8
  546. package/dist/experimental.js.map +1 -1
  547. package/dist/index.js.map +1 -1
  548. package/dist/layout/bounds.js.map +1 -1
  549. package/dist/layout/constraints.js.map +1 -1
  550. package/dist/layout/flex.js.map +1 -1
  551. package/dist/layout/freeform.js.map +1 -1
  552. package/dist/layout/grid.js.map +1 -1
  553. package/dist/layout/index.js.map +1 -1
  554. package/dist/layout/item.js.map +1 -1
  555. package/dist/layout/ops.js.map +1 -1
  556. package/dist/layout/types.js.map +1 -1
  557. package/dist/platform/audio-sink.js.map +1 -1
  558. package/dist/platform/exporter.d.ts +13 -0
  559. package/dist/platform/exporter.d.ts.map +1 -1
  560. package/dist/platform/exporter.js.map +1 -1
  561. package/dist/platform/index.js.map +1 -1
  562. package/dist/platform/stepped-clock.js.map +1 -1
  563. package/dist/platform/storage-adapter.js.map +1 -1
  564. package/dist/platform/ticker.js.map +1 -1
  565. package/dist/project/config.js.map +1 -1
  566. package/dist/project/index.js.map +1 -1
  567. package/dist/project/tree.js.map +1 -1
  568. package/dist/props/host.js.map +1 -1
  569. package/dist/props/index.js.map +1 -1
  570. package/dist/props/observer.js.map +1 -1
  571. package/dist/props/slot.js.map +1 -1
  572. package/dist/renamed-scene-names.d.ts +1 -1
  573. package/dist/renamed-scene-names.d.ts.map +1 -1
  574. package/dist/renamed-scene-names.js +1 -1
  575. package/dist/renamed-scene-names.js.map +1 -1
  576. package/dist/render/canvas-render-context2d.d.ts +9 -0
  577. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  578. package/dist/render/canvas-render-context2d.js +10 -0
  579. package/dist/render/canvas-render-context2d.js.map +1 -1
  580. package/dist/render/clip-contains.js +1 -1
  581. package/dist/render/clip-contains.js.map +1 -1
  582. package/dist/render/clip.js.map +1 -1
  583. package/dist/render/descriptors/ellipse.js.map +1 -1
  584. package/dist/render/descriptors/line.js.map +1 -1
  585. package/dist/render/descriptors/path-builder.js.map +1 -1
  586. package/dist/render/descriptors/path.js.map +1 -1
  587. package/dist/render/descriptors/polygon.js.map +1 -1
  588. package/dist/render/descriptors/polygram.js.map +1 -1
  589. package/dist/render/descriptors/rect.js.map +1 -1
  590. package/dist/render/descriptors/richtext.js.map +1 -1
  591. package/dist/render/descriptors/shape.js.map +1 -1
  592. package/dist/render/descriptors/text.d.ts +2 -2
  593. package/dist/render/descriptors/text.js +2 -2
  594. package/dist/render/descriptors/text.js.map +1 -1
  595. package/dist/render/descriptors/transform.js.map +1 -1
  596. package/dist/render/graphics2d.js.map +1 -1
  597. package/dist/render/index.d.ts +2 -0
  598. package/dist/render/index.d.ts.map +1 -1
  599. package/dist/render/index.js +1 -0
  600. package/dist/render/index.js.map +1 -1
  601. package/dist/render/measure-context.js.map +1 -1
  602. package/dist/render/null-render-context.js.map +1 -1
  603. package/dist/render/render-context2d.d.ts +1 -1
  604. package/dist/render/render-context2d.js.map +1 -1
  605. package/dist/render/render-issue.d.ts +39 -0
  606. package/dist/render/render-issue.d.ts.map +1 -0
  607. package/dist/render/render-issue.js +29 -0
  608. package/dist/render/render-issue.js.map +1 -0
  609. package/dist/render/surface.d.ts +2 -2
  610. package/dist/render/surface.js.map +1 -1
  611. package/dist/render/text-defaults.js.map +1 -1
  612. package/dist/render/text-layout.js.map +1 -1
  613. package/dist/render3d/bounds3d.js.map +1 -1
  614. package/dist/render3d/builders.js.map +1 -1
  615. package/dist/render3d/camera.js.map +1 -1
  616. package/dist/render3d/fill3d.js.map +1 -1
  617. package/dist/render3d/geometry.js.map +1 -1
  618. package/dist/render3d/graphics3d.d.ts.map +1 -1
  619. package/dist/render3d/graphics3d.js +54 -5
  620. package/dist/render3d/graphics3d.js.map +1 -1
  621. package/dist/render3d/index.js.map +1 -1
  622. package/dist/render3d/inert.js.map +1 -1
  623. package/dist/render3d/light.js.map +1 -1
  624. package/dist/render3d/material.js.map +1 -1
  625. package/dist/render3d/matrix4.js.map +1 -1
  626. package/dist/render3d/render-context3d.js.map +1 -1
  627. package/dist/render3d/resources.js.map +1 -1
  628. package/dist/render3d/rounded-box.js.map +1 -1
  629. package/dist/render3d/scene-settings.js.map +1 -1
  630. package/dist/render3d/scene3d.js.map +1 -1
  631. package/dist/render3d/segments.js.map +1 -1
  632. package/dist/render3d/texture.js.map +1 -1
  633. package/dist/render3d/tracking.js.map +1 -1
  634. package/dist/render3d/transform.js.map +1 -1
  635. package/dist/render3d/vector3.js.map +1 -1
  636. package/dist/render3d/walk.js.map +1 -1
  637. package/dist/runtime/asset-refine.js +2 -1
  638. package/dist/runtime/asset-refine.js.map +1 -1
  639. package/dist/runtime/asset-timeline.d.ts +10 -0
  640. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  641. package/dist/runtime/asset-timeline.js.map +1 -1
  642. package/dist/runtime/asset-update.d.ts.map +1 -1
  643. package/dist/runtime/asset-update.js +7 -0
  644. package/dist/runtime/asset-update.js.map +1 -1
  645. package/dist/runtime/audio-index.js.map +1 -1
  646. package/dist/runtime/builtin-context.js.map +1 -1
  647. package/dist/runtime/clip-instance.d.ts +3 -1
  648. package/dist/runtime/clip-instance.d.ts.map +1 -1
  649. package/dist/runtime/clip-instance.js +4 -0
  650. package/dist/runtime/clip-instance.js.map +1 -1
  651. package/dist/runtime/clip-store.d.ts.map +1 -1
  652. package/dist/runtime/clip-store.js +17 -2
  653. package/dist/runtime/clip-store.js.map +1 -1
  654. package/dist/runtime/engine.d.ts +5 -3
  655. package/dist/runtime/engine.d.ts.map +1 -1
  656. package/dist/runtime/engine.js +2 -1
  657. package/dist/runtime/engine.js.map +1 -1
  658. package/dist/runtime/frame-time.js.map +1 -1
  659. package/dist/runtime/index.js.map +1 -1
  660. package/dist/runtime/node-picking.js.map +1 -1
  661. package/dist/runtime/node-picking3d.js.map +1 -1
  662. package/dist/runtime/placement.js.map +1 -1
  663. package/dist/runtime/playback-controller.d.ts.map +1 -1
  664. package/dist/runtime/playback-controller.js +14 -4
  665. package/dist/runtime/playback-controller.js.map +1 -1
  666. package/dist/runtime/playback.js.map +1 -1
  667. package/dist/runtime/precompisition.js.map +1 -1
  668. package/dist/runtime/project-assets.js.map +1 -1
  669. package/dist/runtime/session.d.ts +7 -3
  670. package/dist/runtime/session.d.ts.map +1 -1
  671. package/dist/runtime/session.js +11 -4
  672. package/dist/runtime/session.js.map +1 -1
  673. package/dist/runtime/settle.js.map +1 -1
  674. package/dist/runtime/state-evaluator.js.map +1 -1
  675. package/dist/runtime/text-geometry.d.ts +1 -1
  676. package/dist/runtime/text-geometry.js.map +1 -1
  677. package/dist/sdk/index.d.ts +8 -6
  678. package/dist/sdk/index.d.ts.map +1 -1
  679. package/dist/sdk/index.js +10 -3
  680. package/dist/sdk/index.js.map +1 -1
  681. package/dist/tween/command-decorator.d.ts +7 -0
  682. package/dist/tween/command-decorator.d.ts.map +1 -1
  683. package/dist/tween/command-decorator.js +1 -0
  684. package/dist/tween/command-decorator.js.map +1 -1
  685. package/dist/tween/command.js.map +1 -1
  686. package/dist/tween/ease/constants.js.map +1 -1
  687. package/dist/tween/ease/curve.js.map +1 -1
  688. package/dist/tween/ease/describe.d.ts +2 -0
  689. package/dist/tween/ease/describe.d.ts.map +1 -1
  690. package/dist/tween/ease/describe.js +4 -0
  691. package/dist/tween/ease/describe.js.map +1 -1
  692. package/dist/tween/ease/spec.d.ts +31 -0
  693. package/dist/tween/ease/spec.d.ts.map +1 -0
  694. package/dist/tween/ease/spec.js +51 -0
  695. package/dist/tween/ease/spec.js.map +1 -0
  696. package/dist/tween/ease/type.js.map +1 -1
  697. package/dist/tween/index.d.ts +1 -0
  698. package/dist/tween/index.d.ts.map +1 -1
  699. package/dist/tween/index.js +1 -0
  700. package/dist/tween/index.js.map +1 -1
  701. package/dist/tween/inert.js.map +1 -1
  702. package/dist/tween/lerp.js.map +1 -1
  703. package/dist/tween/loop.js.map +1 -1
  704. package/dist/tween/prepare.js.map +1 -1
  705. package/dist/tween/stepper.js.map +1 -1
  706. package/dist/tween/to-command.js.map +1 -1
  707. package/dist/util/clamp.js.map +1 -1
  708. package/dist/util/context.js.map +1 -1
  709. package/dist/util/csv.js.map +1 -1
  710. package/dist/util/generateList.js.map +1 -1
  711. package/dist/util/index.js.map +1 -1
  712. package/dist/util/metrics.js.map +1 -1
  713. package/dist/util/random.js.map +1 -1
  714. package/dist/util/reference.js.map +1 -1
  715. package/dist/util/scheduler.js.map +1 -1
  716. package/package.json +2 -2
  717. package/dist/attributes/audio/filters/chain.d.ts +0 -113
  718. package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
  719. package/dist/attributes/audio/filters/chain.js +0 -104
  720. package/dist/attributes/audio/filters/chain.js.map +0 -1
  721. package/dist/attributes/audio/filters/curve.d.ts +0 -152
  722. package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
  723. package/dist/attributes/audio/filters/curve.js +0 -250
  724. package/dist/attributes/audio/filters/curve.js.map +0 -1
  725. package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
  726. package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
  727. package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
  728. package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
  729. package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
  730. package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
  731. package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
  732. package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
  733. package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
  734. package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
  735. package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
  736. package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
  737. package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
  738. package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
  739. package/dist/attributes/audio/filters/implementations/speed.js +0 -6
  740. package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
  741. package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
  742. package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
  743. package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
  744. package/dist/attributes/audio/filters/index.d.ts +0 -22
  745. package/dist/attributes/audio/filters/index.d.ts.map +0 -1
  746. package/dist/attributes/audio/filters/index.js +0 -8
  747. package/dist/attributes/audio/filters/index.js.map +0 -1
  748. package/dist/attributes/audio/filters/registry.d.ts +0 -36
  749. package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
  750. package/dist/attributes/audio/filters/registry.js +0 -82
  751. package/dist/attributes/audio/filters/registry.js.map +0 -1
  752. package/dist/attributes/audio/filters/union.d.ts +0 -18
  753. package/dist/attributes/audio/filters/union.d.ts.map +0 -1
  754. package/dist/attributes/audio/filters/union.js +0 -28
  755. package/dist/attributes/audio/filters/union.js.map +0 -1
  756. package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
  757. package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
  758. package/dist/attributes/shape/sksl-uniforms.js +0 -0
  759. package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
  760. package/dist/browser/chunks/chunk-D4FSTPML.js +0 -14
  761. package/dist/browser/chunks/chunk-D4FSTPML.js.map +0 -7
  762. package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
  763. package/dist/browser/chunks/chunk-RTNATFWX.js +0 -5
  764. package/dist/browser/chunks/chunk-RTNATFWX.js.map +0 -7
  765. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
  766. package/dist/component/api.d.ts +0 -508
  767. package/dist/component/api.d.ts.map +0 -1
  768. package/dist/component/api.js +0 -4
  769. package/dist/component/api.js.map +0 -1
  770. package/dist/component/builtins/audio.d.ts +0 -26
  771. package/dist/component/builtins/audio.d.ts.map +0 -1
  772. package/dist/component/builtins/audio.js +0 -41
  773. package/dist/component/builtins/audio.js.map +0 -1
  774. package/dist/component/builtins/canvas3d.d.ts +0 -98
  775. package/dist/component/builtins/canvas3d.d.ts.map +0 -1
  776. package/dist/component/builtins/canvas3d.js +0 -21
  777. package/dist/component/builtins/canvas3d.js.map +0 -1
  778. package/dist/component/builtins/composite.d.ts +0 -56
  779. package/dist/component/builtins/composite.d.ts.map +0 -1
  780. package/dist/component/builtins/composite.js +0 -25
  781. package/dist/component/builtins/composite.js.map +0 -1
  782. package/dist/component/builtins/geometry.d.ts +0 -505
  783. package/dist/component/builtins/geometry.d.ts.map +0 -1
  784. package/dist/component/builtins/geometry.js +0 -107
  785. package/dist/component/builtins/geometry.js.map +0 -1
  786. package/dist/component/builtins/layout.d.ts +0 -88
  787. package/dist/component/builtins/layout.d.ts.map +0 -1
  788. package/dist/component/builtins/layout.js +0 -84
  789. package/dist/component/builtins/layout.js.map +0 -1
  790. package/dist/component/builtins/media.d.ts +0 -95
  791. package/dist/component/builtins/media.d.ts.map +0 -1
  792. package/dist/component/builtins/media.js +0 -149
  793. package/dist/component/builtins/media.js.map +0 -1
  794. package/dist/component/builtins/providers.d.ts +0 -23
  795. package/dist/component/builtins/providers.d.ts.map +0 -1
  796. package/dist/component/builtins/providers.js +0 -30
  797. package/dist/component/builtins/providers.js.map +0 -1
  798. package/dist/component/builtins/text.d.ts +0 -193
  799. package/dist/component/builtins/text.d.ts.map +0 -1
  800. package/dist/component/builtins/text.js +0 -113
  801. package/dist/component/builtins/text.js.map +0 -1
  802. package/dist/component/builtins/three.d.ts +0 -1085
  803. package/dist/component/builtins/three.d.ts.map +0 -1
  804. package/dist/component/builtins/three.js +0 -265
  805. package/dist/component/builtins/three.js.map +0 -1
  806. package/dist/component/clip-of.d.ts +0 -5
  807. package/dist/component/clip-of.d.ts.map +0 -1
  808. package/dist/component/clip-of.js +0 -33
  809. package/dist/component/clip-of.js.map +0 -1
  810. package/dist/component/commands-for.d.ts +0 -19
  811. package/dist/component/commands-for.d.ts.map +0 -1
  812. package/dist/component/commands-for.js +0 -5
  813. package/dist/component/commands-for.js.map +0 -1
  814. package/dist/component/component-audio.d.ts +0 -9
  815. package/dist/component/component-audio.d.ts.map +0 -1
  816. package/dist/component/component-audio.js +0 -18
  817. package/dist/component/component-audio.js.map +0 -1
  818. package/dist/component/component2d.d.ts +0 -9
  819. package/dist/component/component2d.d.ts.map +0 -1
  820. package/dist/component/component2d.js +0 -239
  821. package/dist/component/component2d.js.map +0 -1
  822. package/dist/component/component3d.d.ts +0 -9
  823. package/dist/component/component3d.d.ts.map +0 -1
  824. package/dist/component/component3d.js +0 -99
  825. package/dist/component/component3d.js.map +0 -1
  826. package/dist/component/factory.d.ts +0 -63
  827. package/dist/component/factory.d.ts.map +0 -1
  828. package/dist/component/factory.js +0 -313
  829. package/dist/component/factory.js.map +0 -1
  830. package/dist/component/modules/aim.d.ts +0 -30
  831. package/dist/component/modules/aim.d.ts.map +0 -1
  832. package/dist/component/modules/aim.js +0 -39
  833. package/dist/component/modules/aim.js.map +0 -1
  834. package/dist/component/modules/corners.d.ts +0 -13
  835. package/dist/component/modules/corners.d.ts.map +0 -1
  836. package/dist/component/modules/corners.js +0 -12
  837. package/dist/component/modules/corners.js.map +0 -1
  838. package/dist/component/modules/flow.d.ts +0 -26
  839. package/dist/component/modules/flow.d.ts.map +0 -1
  840. package/dist/component/modules/flow.js +0 -55
  841. package/dist/component/modules/flow.js.map +0 -1
  842. package/dist/component/modules/material.d.ts +0 -40
  843. package/dist/component/modules/material.d.ts.map +0 -1
  844. package/dist/component/modules/material.js +0 -75
  845. package/dist/component/modules/material.js.map +0 -1
  846. package/dist/component/modules/paint.d.ts +0 -71
  847. package/dist/component/modules/paint.d.ts.map +0 -1
  848. package/dist/component/modules/paint.js +0 -106
  849. package/dist/component/modules/paint.js.map +0 -1
  850. package/dist/component/modules/shapes.d.ts +0 -31
  851. package/dist/component/modules/shapes.d.ts.map +0 -1
  852. package/dist/component/modules/shapes.js +0 -43
  853. package/dist/component/modules/shapes.js.map +0 -1
  854. package/dist/component/modules/text-layout.d.ts +0 -26
  855. package/dist/component/modules/text-layout.d.ts.map +0 -1
  856. package/dist/component/modules/text-layout.js +0 -57
  857. package/dist/component/modules/text-layout.js.map +0 -1
  858. package/dist/component/modules/text-style.d.ts +0 -48
  859. package/dist/component/modules/text-style.d.ts.map +0 -1
  860. package/dist/component/modules/text-style.js +0 -63
  861. package/dist/component/modules/text-style.js.map +0 -1
  862. package/dist/component/modules/three-entries.d.ts +0 -23
  863. package/dist/component/modules/three-entries.d.ts.map +0 -1
  864. package/dist/component/modules/three-entries.js +0 -41
  865. package/dist/component/modules/three-entries.js.map +0 -1
  866. package/dist/component/modules/view3d.d.ts +0 -55
  867. package/dist/component/modules/view3d.d.ts.map +0 -1
  868. package/dist/component/modules/view3d.js +0 -160
  869. package/dist/component/modules/view3d.js.map +0 -1
  870. package/dist/component/timeline.d.ts +0 -22
  871. package/dist/component/timeline.d.ts.map +0 -1
  872. package/dist/component/timeline.js +0 -128
  873. package/dist/component/timeline.js.map +0 -1
  874. package/dist/component/type-def.d.ts +0 -26
  875. package/dist/component/type-def.d.ts.map +0 -1
  876. package/dist/component/type-def.js +0 -16
  877. package/dist/component/type-def.js.map +0 -1
  878. package/dist/component/types.d.ts +0 -91
  879. package/dist/component/types.d.ts.map +0 -1
  880. package/dist/component/types.js +0 -88
  881. package/dist/component/types.js.map +0 -1
  882. package/dist/component/views.d.ts +0 -121
  883. package/dist/component/views.d.ts.map +0 -1
  884. package/dist/component/views.js +0 -413
  885. package/dist/component/views.js.map +0 -1
  886. package/dist/document/withdraw.d.ts +0 -28
  887. package/dist/document/withdraw.d.ts.map +0 -1
  888. package/dist/document/withdraw.js +0 -61
  889. package/dist/document/withdraw.js.map +0 -1
  890. package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
  891. package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
  892. package/dist/jsx/jsx-dev-runtime.js +0 -3
  893. package/dist/jsx/jsx-dev-runtime.js.map +0 -1
  894. package/dist/jsx/jsx-runtime.d.ts +0 -27
  895. package/dist/jsx/jsx-runtime.d.ts.map +0 -1
  896. package/dist/jsx/jsx-runtime.js +0 -26
  897. package/dist/jsx/jsx-runtime.js.map +0 -1
  898. package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
  899. package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
  900. package/dist/nodes/2d/node-lifecycle.js +0 -264
  901. package/dist/nodes/2d/node-lifecycle.js.map +0 -1
  902. package/dist/nodes/2d/node-motion.d.ts +0 -56
  903. package/dist/nodes/2d/node-motion.d.ts.map +0 -1
  904. package/dist/nodes/2d/node-motion.js +0 -86
  905. package/dist/nodes/2d/node-motion.js.map +0 -1
  906. package/dist/nodes/2d/node-render.d.ts +0 -44
  907. package/dist/nodes/2d/node-render.d.ts.map +0 -1
  908. package/dist/nodes/2d/node-render.js +0 -80
  909. package/dist/nodes/2d/node-render.js.map +0 -1
  910. package/dist/nodes/2d/node-space.d.ts +0 -63
  911. package/dist/nodes/2d/node-space.d.ts.map +0 -1
  912. package/dist/nodes/2d/node-space.js +0 -131
  913. package/dist/nodes/2d/node-space.js.map +0 -1
  914. package/dist/nodes/2d/node-transform.d.ts +0 -55
  915. package/dist/nodes/2d/node-transform.d.ts.map +0 -1
  916. package/dist/nodes/2d/node-transform.js +0 -73
  917. package/dist/nodes/2d/node-transform.js.map +0 -1
  918. package/dist/nodes/2d/node2d.d.ts +0 -1111
  919. package/dist/nodes/2d/node2d.d.ts.map +0 -1
  920. package/dist/nodes/2d/node2d.js +0 -1665
  921. package/dist/nodes/2d/node2d.js.map +0 -1
  922. package/dist/nodes/2d/paint-node.d.ts +0 -142
  923. package/dist/nodes/2d/paint-node.d.ts.map +0 -1
  924. package/dist/nodes/2d/paint-node.js +0 -232
  925. package/dist/nodes/2d/paint-node.js.map +0 -1
  926. package/dist/nodes/audio/audio-bus.d.ts +0 -28
  927. package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
  928. package/dist/nodes/audio/audio-bus.js +0 -33
  929. package/dist/nodes/audio/audio-bus.js.map +0 -1
  930. package/dist/nodes/audio/index.d.ts +0 -4
  931. package/dist/nodes/audio/index.d.ts.map +0 -1
  932. package/dist/nodes/audio/index.js +0 -2
  933. package/dist/nodes/audio/index.js.map +0 -1
  934. package/dist/nodes/audio/node-audio.d.ts +0 -107
  935. package/dist/nodes/audio/node-audio.d.ts.map +0 -1
  936. package/dist/nodes/audio/node-audio.js +0 -179
  937. package/dist/nodes/audio/node-audio.js.map +0 -1
  938. package/dist/nodes/audio/sound-node.d.ts +0 -41
  939. package/dist/nodes/audio/sound-node.d.ts.map +0 -1
  940. package/dist/nodes/audio/sound-node.js +0 -71
  941. package/dist/nodes/audio/sound-node.js.map +0 -1
  942. package/dist/nodes/geometry/boolean-node.d.ts +0 -28
  943. package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
  944. package/dist/nodes/geometry/boolean-node.js +0 -81
  945. package/dist/nodes/geometry/boolean-node.js.map +0 -1
  946. package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
  947. package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
  948. package/dist/nodes/geometry/bounds-shape-node.js +0 -181
  949. package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
  950. package/dist/nodes/geometry/box-path-node.d.ts +0 -89
  951. package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
  952. package/dist/nodes/geometry/box-path-node.js +0 -116
  953. package/dist/nodes/geometry/box-path-node.js.map +0 -1
  954. package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
  955. package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
  956. package/dist/nodes/geometry/ellipse-node.js +0 -45
  957. package/dist/nodes/geometry/ellipse-node.js.map +0 -1
  958. package/dist/nodes/geometry/group-bounds.d.ts +0 -56
  959. package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
  960. package/dist/nodes/geometry/group-bounds.js +0 -87
  961. package/dist/nodes/geometry/group-bounds.js.map +0 -1
  962. package/dist/nodes/geometry/mask-node.d.ts +0 -33
  963. package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
  964. package/dist/nodes/geometry/mask-node.js +0 -66
  965. package/dist/nodes/geometry/mask-node.js.map +0 -1
  966. package/dist/nodes/geometry/path-node.d.ts +0 -26
  967. package/dist/nodes/geometry/path-node.d.ts.map +0 -1
  968. package/dist/nodes/geometry/path-node.js +0 -58
  969. package/dist/nodes/geometry/path-node.js.map +0 -1
  970. package/dist/nodes/geometry/polygon-node.d.ts +0 -26
  971. package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
  972. package/dist/nodes/geometry/polygon-node.js +0 -47
  973. package/dist/nodes/geometry/polygon-node.js.map +0 -1
  974. package/dist/nodes/geometry/polygram-node.d.ts +0 -33
  975. package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
  976. package/dist/nodes/geometry/polygram-node.js +0 -52
  977. package/dist/nodes/geometry/polygram-node.js.map +0 -1
  978. package/dist/nodes/geometry/rect-node.d.ts +0 -38
  979. package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
  980. package/dist/nodes/geometry/rect-node.js +0 -56
  981. package/dist/nodes/geometry/rect-node.js.map +0 -1
  982. package/dist/nodes/geometry/shape-node.d.ts +0 -71
  983. package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
  984. package/dist/nodes/geometry/shape-node.js +0 -140
  985. package/dist/nodes/geometry/shape-node.js.map +0 -1
  986. package/dist/nodes/geometry/shape-outline.d.ts +0 -93
  987. package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
  988. package/dist/nodes/geometry/shape-outline.js +0 -470
  989. package/dist/nodes/geometry/shape-outline.js.map +0 -1
  990. package/dist/nodes/index.d.ts +0 -53
  991. package/dist/nodes/index.d.ts.map +0 -1
  992. package/dist/nodes/index.js +0 -35
  993. package/dist/nodes/index.js.map +0 -1
  994. package/dist/nodes/layout/camera-node.d.ts +0 -80
  995. package/dist/nodes/layout/camera-node.d.ts.map +0 -1
  996. package/dist/nodes/layout/camera-node.js +0 -153
  997. package/dist/nodes/layout/camera-node.js.map +0 -1
  998. package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
  999. package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
  1000. package/dist/nodes/layout/orbit-camera-node.js +0 -118
  1001. package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
  1002. package/dist/nodes/layout/rotated-box.d.ts +0 -20
  1003. package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
  1004. package/dist/nodes/layout/rotated-box.js +0 -76
  1005. package/dist/nodes/layout/rotated-box.js.map +0 -1
  1006. package/dist/nodes/media/video-node.d.ts +0 -229
  1007. package/dist/nodes/media/video-node.d.ts.map +0 -1
  1008. package/dist/nodes/media/video-node.js +0 -350
  1009. package/dist/nodes/media/video-node.js.map +0 -1
  1010. package/dist/nodes/node/declare-paints.d.ts +0 -19
  1011. package/dist/nodes/node/declare-paints.d.ts.map +0 -1
  1012. package/dist/nodes/node/declare-paints.js +0 -27
  1013. package/dist/nodes/node/declare-paints.js.map +0 -1
  1014. package/dist/nodes/node/node-editor-state.d.ts +0 -53
  1015. package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
  1016. package/dist/nodes/node/node-editor-state.js +0 -23
  1017. package/dist/nodes/node/node-editor-state.js.map +0 -1
  1018. package/dist/nodes/node/node-reactive.d.ts +0 -89
  1019. package/dist/nodes/node/node-reactive.d.ts.map +0 -1
  1020. package/dist/nodes/node/node-reactive.js +0 -135
  1021. package/dist/nodes/node/node-reactive.js.map +0 -1
  1022. package/dist/nodes/node/node-time.d.ts +0 -39
  1023. package/dist/nodes/node/node-time.d.ts.map +0 -1
  1024. package/dist/nodes/node/node-time.js +0 -14
  1025. package/dist/nodes/node/node-time.js.map +0 -1
  1026. package/dist/nodes/node/node-walk.d.ts +0 -46
  1027. package/dist/nodes/node/node-walk.d.ts.map +0 -1
  1028. package/dist/nodes/node/node-walk.js +0 -74
  1029. package/dist/nodes/node/node-walk.js.map +0 -1
  1030. package/dist/nodes/node/node.d.ts +0 -445
  1031. package/dist/nodes/node/node.d.ts.map +0 -1
  1032. package/dist/nodes/node/node.js +0 -745
  1033. package/dist/nodes/node/node.js.map +0 -1
  1034. package/dist/nodes/node/text-defaults.d.ts +0 -32
  1035. package/dist/nodes/node/text-defaults.d.ts.map +0 -1
  1036. package/dist/nodes/node/text-defaults.js +0 -37
  1037. package/dist/nodes/node/text-defaults.js.map +0 -1
  1038. package/dist/nodes/root/canvas2d-node.d.ts +0 -163
  1039. package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
  1040. package/dist/nodes/root/canvas2d-node.js +0 -264
  1041. package/dist/nodes/root/canvas2d-node.js.map +0 -1
  1042. package/dist/nodes/root/provider-node.d.ts +0 -47
  1043. package/dist/nodes/root/provider-node.d.ts.map +0 -1
  1044. package/dist/nodes/root/provider-node.js +0 -63
  1045. package/dist/nodes/root/provider-node.js.map +0 -1
  1046. package/dist/nodes/root/theme-provider-node.d.ts +0 -29
  1047. package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
  1048. package/dist/nodes/root/theme-provider-node.js +0 -43
  1049. package/dist/nodes/root/theme-provider-node.js.map +0 -1
  1050. package/dist/nodes/text/default-text-style-node.d.ts +0 -103
  1051. package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
  1052. package/dist/nodes/text/default-text-style-node.js +0 -146
  1053. package/dist/nodes/text/default-text-style-node.js.map +0 -1
  1054. package/dist/nodes/text/number-format.d.ts +0 -66
  1055. package/dist/nodes/text/number-format.d.ts.map +0 -1
  1056. package/dist/nodes/text/number-format.js +0 -227
  1057. package/dist/nodes/text/number-format.js.map +0 -1
  1058. package/dist/nodes/text/number-node.d.ts +0 -94
  1059. package/dist/nodes/text/number-node.d.ts.map +0 -1
  1060. package/dist/nodes/text/number-node.js +0 -86
  1061. package/dist/nodes/text/number-node.js.map +0 -1
  1062. package/dist/nodes/text/number-pattern.d.ts +0 -51
  1063. package/dist/nodes/text/number-pattern.d.ts.map +0 -1
  1064. package/dist/nodes/text/number-pattern.js +0 -77
  1065. package/dist/nodes/text/number-pattern.js.map +0 -1
  1066. package/dist/nodes/text/richtext-node.d.ts +0 -68
  1067. package/dist/nodes/text/richtext-node.d.ts.map +0 -1
  1068. package/dist/nodes/text/richtext-node.js +0 -78
  1069. package/dist/nodes/text/richtext-node.js.map +0 -1
  1070. package/dist/nodes/text/text-base.d.ts +0 -118
  1071. package/dist/nodes/text/text-base.d.ts.map +0 -1
  1072. package/dist/nodes/text/text-base.js +0 -153
  1073. package/dist/nodes/text/text-base.js.map +0 -1
  1074. package/dist/nodes/text/text-layout.d.ts +0 -87
  1075. package/dist/nodes/text/text-layout.d.ts.map +0 -1
  1076. package/dist/nodes/text/text-layout.js +0 -368
  1077. package/dist/nodes/text/text-layout.js.map +0 -1
  1078. package/dist/nodes/text/text-node.d.ts +0 -84
  1079. package/dist/nodes/text/text-node.d.ts.map +0 -1
  1080. package/dist/nodes/text/text-node.js +0 -188
  1081. package/dist/nodes/text/text-node.js.map +0 -1
  1082. package/dist/nodes/text/text-selection.d.ts +0 -125
  1083. package/dist/nodes/text/text-selection.d.ts.map +0 -1
  1084. package/dist/nodes/text/text-selection.js +0 -209
  1085. package/dist/nodes/text/text-selection.js.map +0 -1
  1086. package/dist/nodes/three/camera-nodes.d.ts +0 -109
  1087. package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
  1088. package/dist/nodes/three/camera-nodes.js +0 -112
  1089. package/dist/nodes/three/camera-nodes.js.map +0 -1
  1090. package/dist/nodes/three/canvas3d-node.d.ts +0 -295
  1091. package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
  1092. package/dist/nodes/three/canvas3d-node.js +0 -486
  1093. package/dist/nodes/three/canvas3d-node.js.map +0 -1
  1094. package/dist/nodes/three/drawable-nodes.d.ts +0 -173
  1095. package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
  1096. package/dist/nodes/three/drawable-nodes.js +0 -284
  1097. package/dist/nodes/three/drawable-nodes.js.map +0 -1
  1098. package/dist/nodes/three/environment-nodes.d.ts +0 -106
  1099. package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
  1100. package/dist/nodes/three/environment-nodes.js +0 -134
  1101. package/dist/nodes/three/environment-nodes.js.map +0 -1
  1102. package/dist/nodes/three/geometry-nodes.d.ts +0 -197
  1103. package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
  1104. package/dist/nodes/three/geometry-nodes.js +0 -322
  1105. package/dist/nodes/three/geometry-nodes.js.map +0 -1
  1106. package/dist/nodes/three/grid-geometry3d.d.ts +0 -62
  1107. package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
  1108. package/dist/nodes/three/grid-geometry3d.js +0 -114
  1109. package/dist/nodes/three/grid-geometry3d.js.map +0 -1
  1110. package/dist/nodes/three/group3d.d.ts +0 -23
  1111. package/dist/nodes/three/group3d.d.ts.map +0 -1
  1112. package/dist/nodes/three/group3d.js +0 -21
  1113. package/dist/nodes/three/group3d.js.map +0 -1
  1114. package/dist/nodes/three/light-nodes.d.ts +0 -120
  1115. package/dist/nodes/three/light-nodes.d.ts.map +0 -1
  1116. package/dist/nodes/three/light-nodes.js +0 -173
  1117. package/dist/nodes/three/light-nodes.js.map +0 -1
  1118. package/dist/nodes/three/mesh3d.d.ts +0 -117
  1119. package/dist/nodes/three/mesh3d.d.ts.map +0 -1
  1120. package/dist/nodes/three/mesh3d.js +0 -147
  1121. package/dist/nodes/three/mesh3d.js.map +0 -1
  1122. package/dist/nodes/three/node3d.d.ts +0 -230
  1123. package/dist/nodes/three/node3d.d.ts.map +0 -1
  1124. package/dist/nodes/three/node3d.js +0 -337
  1125. package/dist/nodes/three/node3d.js.map +0 -1
  1126. package/dist/render/descriptors/latex.d.ts +0 -6
  1127. package/dist/render/descriptors/latex.d.ts.map +0 -1
  1128. package/dist/render/descriptors/latex.js +0 -2
  1129. package/dist/render/descriptors/latex.js.map +0 -1
  1130. package/dist/tween/seekable.d.ts +0 -81
  1131. package/dist/tween/seekable.d.ts.map +0 -1
  1132. package/dist/tween/seekable.js +0 -137
  1133. package/dist/tween/seekable.js.map +0 -1
@@ -1,63 +0,0 @@
1
- import { textOps } from "../../attributes/text/ops.js";
2
- import { TextStyleToken } from "../../runtime/builtin-context.js";
3
- import { provides } from "../../component/api.js";
4
- import { Types } from "../../component/types.js";
5
- /**
6
- * The face text is set in, each field taken, when the author leaves it unset,
7
- * from the cascade: the theme's `default` typography, under the nearest
8
- * provider's style, under the node's own `variant` preset.
9
- */
10
- function cascade(use, given) {
11
- const variant = given.variant;
12
- return textOps.mergeStyle(textOps.mergeStyle(textOps.preset("default"), use(TextStyleToken)), variant ? textOps.preset(variant) : undefined);
13
- }
14
- /** What `key` inherits. `autofit: false` refuses an inherited `'autofit'` size, for a node that can't fit to its box. */
15
- export function inherit(key, options = {}) {
16
- return (use, given) => {
17
- const value = cascade(use, given)[key];
18
- return key === "fontSize" && value === "autofit" && options.autofit === false ? undefined : value;
19
- };
20
- }
21
- export const state = {
22
- // No default: a face nobody chose is one never declared and never loaded, so the renderer says so.
23
- fontFamily: Types.custom(undefined, { inherit: inherit("fontFamily") }),
24
- fontSize: Types.custom(48, {
25
- lerp: (a, b, t) => textOps.lerpFontSize(a, b, t),
26
- inherit: inherit("fontSize"),
27
- }),
28
- fontWeight: Types.number(400, { inherit: inherit("fontWeight") }),
29
- fontStyle: Types.custom("normal", { inherit: inherit("fontStyle") }),
30
- letterSpacing: Types.number(0, { inherit: inherit("letterSpacing") }),
31
- lineHeight: Types.number(1.2, { inherit: inherit("lineHeight") }),
32
- textAlign: Types.custom("center", { inherit: inherit("textAlign") }),
33
- verticalAlign: Types.oneOf(["top", "center", "bottom"], { default: "center" }),
34
- textDecoration: Types.oneOf(["none", "underline", "line-through"]),
35
- textCase: Types.oneOf(["none", "upper", "lower", "title"]),
36
- minFontSize: Types.number(12),
37
- variant: Types.custom(undefined),
38
- fill: Types.fill(undefined, { inherit: inherit("fill") }),
39
- stroke: Types.stroke(undefined, { inherit: inherit("stroke") }),
40
- shadow: Types.shadow(undefined, { inherit: inherit("shadow") }),
41
- };
42
- /** The style a provider sets: each field left unset is inherited from above. */
43
- export const provided = {
44
- fontFamily: Types.custom(undefined),
45
- fontSize: Types.custom(undefined),
46
- fontWeight: Types.custom(undefined),
47
- fontStyle: Types.custom(undefined),
48
- letterSpacing: Types.custom(undefined),
49
- lineHeight: Types.custom(undefined),
50
- textAlign: Types.custom(undefined),
51
- fill: Types.custom(undefined),
52
- stroke: Types.custom(undefined),
53
- shadow: Types.custom(undefined),
54
- };
55
- /** The subtree's style: the inherited one with this provider's fields laid over it. */
56
- export function provide(s, inherited) {
57
- return [provides(TextStyleToken, textOps.mergeStyle(inherited(TextStyleToken), s))];
58
- }
59
- /** This provider's own fields, as the default for text drawn under it. */
60
- export function current(s) {
61
- return textOps.mergeStyle({}, s);
62
- }
63
- //# sourceMappingURL=text-style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text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fill } from \"@/attributes/shape/fill/chain\";\r\nimport type { Shadow } from \"@/attributes/shape/shadow/shadow\";\r\nimport type { Stroke } from \"@/attributes/shape/stroke/stroke\";\r\nimport { textOps } from \"@/attributes/text/ops\";\r\nimport type { FontStyle, TextAlign, TextStyle } from \"@/attributes/text/types\";\r\nimport { TextStyleToken } from \"@/runtime/builtin-context\";\r\nimport { provides, type Provided, type Values } from \"@/component/api\";\r\nimport type { Inherit } from \"@/component/type-def\";\r\nimport { Types } from \"@/component/types\";\r\n\r\n/**\r\n * The face text is set in, each field taken, when the author leaves it unset,\r\n * from the cascade: the theme's `default` typography, under the nearest\r\n * provider's style, under the node's own `variant` preset.\r\n */\r\n\r\nfunction cascade(use: Parameters<Inherit>[0], given: Readonly<Record<string, unknown>>): TextStyle {\r\n const variant = given.variant as string | undefined;\r\n return textOps.mergeStyle(\r\n textOps.mergeStyle(textOps.preset(\"default\"), use(TextStyleToken)),\r\n variant ? textOps.preset(variant) : undefined,\r\n );\r\n}\r\n\r\n/** What `key` inherits. `autofit: false` refuses an inherited `'autofit'` size, for a node that can't fit to its box. */\r\nexport function inherit(key: keyof TextStyle, options: { readonly autofit?: boolean } = {}): Inherit {\r\n return (use, given) => {\r\n const value = cascade(use, given)[key];\r\n return key === \"fontSize\" && value === \"autofit\" && options.autofit === false ? undefined : value;\r\n };\r\n}\r\n\r\nexport const state = {\r\n // No default: a face nobody chose is one never declared and never loaded, so the renderer says so.\r\n fontFamily: Types.custom<string>(undefined as unknown as string, { inherit: inherit(\"fontFamily\") }),\r\n fontSize: Types.custom<number | \"autofit\">(48, {\r\n lerp: (a, b, t) => textOps.lerpFontSize(a, b, t) as number | \"autofit\",\r\n inherit: inherit(\"fontSize\"),\r\n }),\r\n fontWeight: Types.number(400, { inherit: inherit(\"fontWeight\") }),\r\n fontStyle: Types.custom<FontStyle>(\"normal\", { inherit: inherit(\"fontStyle\") }),\r\n letterSpacing: Types.number(0, { inherit: inherit(\"letterSpacing\") }),\r\n lineHeight: Types.number(1.2, { inherit: inherit(\"lineHeight\") }),\r\n textAlign: Types.custom<TextAlign>(\"center\", { inherit: inherit(\"textAlign\") }),\r\n verticalAlign: Types.oneOf([\"top\", \"center\", \"bottom\"], { default: \"center\" }),\r\n textDecoration: Types.oneOf([\"none\", \"underline\", \"line-through\"]),\r\n textCase: Types.oneOf([\"none\", \"upper\", \"lower\", \"title\"]),\r\n minFontSize: Types.number(12),\r\n variant: Types.custom<string | undefined>(undefined),\r\n fill: Types.fill(undefined, { inherit: inherit(\"fill\") }),\r\n stroke: Types.stroke(undefined, { inherit: inherit(\"stroke\") }),\r\n shadow: Types.shadow(undefined, { inherit: inherit(\"shadow\") }),\r\n};\r\n\r\n/** The style a provider sets: each field left unset is inherited from above. */\r\nexport const provided = {\r\n fontFamily: Types.custom<string | undefined>(undefined),\r\n fontSize: Types.custom<number | \"autofit\" | undefined>(undefined),\r\n fontWeight: Types.custom<number | undefined>(undefined),\r\n fontStyle: Types.custom<FontStyle | undefined>(undefined),\r\n letterSpacing: Types.custom<number | undefined>(undefined),\r\n lineHeight: Types.custom<number | undefined>(undefined),\r\n textAlign: Types.custom<TextAlign | undefined>(undefined),\r\n fill: Types.custom<Fill | undefined>(undefined),\r\n stroke: Types.custom<Stroke | undefined>(undefined),\r\n shadow: Types.custom<Shadow | undefined>(undefined),\r\n};\r\n\r\n/** The subtree's style: the inherited one with this provider's fields laid over it. */\r\nexport function provide(s: Values<typeof provided>, inherited: <T>(context: { readonly id: symbol; readonly defaultValue: T }) => T): readonly Provided[] {\r\n return [provides(TextStyleToken, textOps.mergeStyle(inherited(TextStyleToken), s as TextStyle))];\r\n}\r\n\r\n/** This provider's own fields, as the default for text drawn under it. */\r\nexport function current(s: Values<typeof provided>): TextStyle {\r\n return textOps.mergeStyle({}, s as TextStyle);\r\n}\r\n"]}
@@ -1,23 +0,0 @@
1
- import type { Color, NormalizedColor } from "../../attributes/shape/fill/color/parser.js";
2
- import { type Vector3, type Vector3Input } from "../../render3d/vector3.js";
3
- import type { Type } from "../../component/api.js";
4
- import { type EntryOptions } from "../../component/types.js";
5
- /** The 3D tree's entries that start unset: the renderer's own default applies until one is given. */
6
- export declare function optional<T>(): Type<T | undefined>;
7
- /** A number, unset until given, with a number's hints. */
8
- export declare function optionalNumber<const H extends NumberHints>(hints: H): Type<number | undefined>;
9
- interface NumberHints extends EntryOptions {
10
- readonly min?: number;
11
- readonly max?: number;
12
- readonly step?: number;
13
- readonly unit?: string;
14
- }
15
- export declare function optionalColor(): Type<Color | undefined, NormalizedColor | undefined>;
16
- /** A point, unset until given: tweening from unset starts at the origin, or snaps. */
17
- export declare function optionalVector3(unset: "origin" | "snap"): Type<Vector3Input | undefined, Vector3 | undefined>;
18
- /** Each of `keys` the state has set: what a scene descriptor takes. */
19
- export declare function defined<T>(s: object, keys: readonly string[]): T;
20
- /** `{ type, ...defined(s, keys) }`. */
21
- export declare function stated<T>(type: string, s: object, keys: readonly string[]): T;
22
- export {};
23
- //# sourceMappingURL=three-entries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"three-entries.d.ts","sourceRoot":"","sources":["../../../src/component/modules/three-entries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEnF,OAAO,EAA+C,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE7D,qGAAqG;AAErG,wBAAgB,QAAQ,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC,CAEjD;AAED,0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,CAE9F;AAED,UAAU,WAAY,SAAQ,YAAY;IACtC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,aAAa,IAAI,IAAI,CAAC,KAAK,GAAG,SAAS,EAAE,eAAe,GAAG,SAAS,CAAC,CAMpF;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,YAAY,GAAG,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC,CAM7G;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,CAOhE;AAED,uCAAuC;AACvC,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,CAE7E"}
@@ -1,41 +0,0 @@
1
- import { colorOps } from "../../attributes/shape/fill/lerp.js";
2
- import { lerpOptionalVector3, resolveOptionalVector3 } from "../../render3d/vector3.js";
3
- import { Types } from "../../component/types.js";
4
- /** The 3D tree's entries that start unset: the renderer's own default applies until one is given. */
5
- export function optional() {
6
- return Types.custom(undefined);
7
- }
8
- /** A number, unset until given, with a number's hints. */
9
- export function optionalNumber(hints) {
10
- return Types.custom(undefined, { kind: "number", ...hints });
11
- }
12
- export function optionalColor() {
13
- return Types.custom(undefined, {
14
- resolve: (v) => (v === undefined ? undefined : colorOps.resolve(v)),
15
- lerp: colorOps.lerp,
16
- kind: "color",
17
- });
18
- }
19
- /** A point, unset until given: tweening from unset starts at the origin, or snaps. */
20
- export function optionalVector3(unset) {
21
- return Types.custom(undefined, {
22
- resolve: resolveOptionalVector3,
23
- lerp: (from, to, t) => lerpOptionalVector3(from, to, t, unset),
24
- kind: "vector3",
25
- });
26
- }
27
- /** Each of `keys` the state has set: what a scene descriptor takes. */
28
- export function defined(s, keys) {
29
- const out = {};
30
- for (const key of keys) {
31
- const value = s[key];
32
- if (value !== undefined)
33
- out[key] = value;
34
- }
35
- return out;
36
- }
37
- /** `{ type, ...defined(s, keys) }`. */
38
- export function stated(type, s, keys) {
39
- return { type, ...defined(s, keys) };
40
- }
41
- //# sourceMappingURL=three-entries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"three-entries.js","sourceRoot":"","sources":["../../../src/component/modules/three-entries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAmC,MAAM,oBAAoB,CAAC;AAElH,OAAO,EAAE,KAAK,EAAqB,MAAM,mBAAmB,CAAC;AAE7D,qGAAqG;AAErG,MAAM,UAAU,QAAQ;IACpB,OAAO,KAAK,CAAC,MAAM,CAAgB,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,cAAc,CAA8B,KAAQ;IAChE,OAAO,KAAK,CAAC,MAAM,CAA4C,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,CAA6B,CAAC;AACxI,CAAC;AASD,MAAM,UAAU,aAAa;IACzB,OAAO,KAAK,CAAC,MAAM,CAAiD,SAAS,EAAE;QAC3E,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACnE,IAAI,EAAE,QAAQ,CAAC,IAAsH;QACrI,IAAI,EAAE,OAAO;KAChB,CAAC,CAAC;AACP,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,eAAe,CAAC,KAAwB;IACpD,OAAO,KAAK,CAAC,MAAM,CAAgD,SAAS,EAAE;QAC1E,OAAO,EAAE,sBAAsB;QAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC;QAC9D,IAAI,EAAE,SAAS;KAClB,CAAC,CAAC;AACP,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,OAAO,CAAI,CAAS,EAAE,IAAuB;IACzD,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,KAAK,GAAI,CAA6B,CAAC,GAAG,CAAC,CAAC;QAClD,IAAI,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC9C,CAAC;IACD,OAAO,GAAQ,CAAC;AACpB,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,MAAM,CAAI,IAAY,EAAE,CAAS,EAAE,IAAuB;IACtE,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,CAAS,CAAC,EAAE,IAAI,CAAC,EAAO,CAAC;AACtD,CAAC","sourcesContent":["import type { Color, NormalizedColor } from \"@/attributes/shape/fill/color/parser\";\r\nimport { colorOps } from \"@/attributes/shape/fill/lerp\";\r\nimport { lerpOptionalVector3, resolveOptionalVector3, type Vector3, type Vector3Input } from \"@/render3d/vector3\";\r\nimport type { Type } from \"@/component/api\";\r\nimport { Types, type EntryOptions } from \"@/component/types\";\r\n\r\n/** The 3D tree's entries that start unset: the renderer's own default applies until one is given. */\r\n\r\nexport function optional<T>(): Type<T | undefined> {\r\n return Types.custom<T | undefined>(undefined);\r\n}\r\n\r\n/** A number, unset until given, with a number's hints. */\r\nexport function optionalNumber<const H extends NumberHints>(hints: H): Type<number | undefined> {\r\n return Types.custom<number | undefined, number | undefined, H>(undefined, { kind: \"number\", ...hints }) as Type<number | undefined>;\r\n}\r\n\r\ninterface NumberHints extends EntryOptions {\r\n readonly min?: number;\r\n readonly max?: number;\r\n readonly step?: number;\r\n readonly unit?: string;\r\n}\r\n\r\nexport function optionalColor(): Type<Color | undefined, NormalizedColor | undefined> {\r\n return Types.custom<Color | undefined, NormalizedColor | undefined>(undefined, {\r\n resolve: (v) => (v === undefined ? undefined : colorOps.resolve(v)),\r\n lerp: colorOps.lerp as (from: NormalizedColor | undefined, to: NormalizedColor | undefined, t: number) => NormalizedColor | undefined,\r\n kind: \"color\",\r\n });\r\n}\r\n\r\n/** A point, unset until given: tweening from unset starts at the origin, or snaps. */\r\nexport function optionalVector3(unset: \"origin\" | \"snap\"): Type<Vector3Input | undefined, Vector3 | undefined> {\r\n return Types.custom<Vector3Input | undefined, Vector3 | undefined>(undefined, {\r\n resolve: resolveOptionalVector3,\r\n lerp: (from, to, t) => lerpOptionalVector3(from, to, t, unset),\r\n kind: \"vector3\",\r\n });\r\n}\r\n\r\n/** Each of `keys` the state has set: what a scene descriptor takes. */\r\nexport function defined<T>(s: object, keys: readonly string[]): T {\r\n const out: Record<string, unknown> = {};\r\n for (const key of keys) {\r\n const value = (s as Record<string, unknown>)[key];\r\n if (value !== undefined) out[key] = value;\r\n }\r\n return out as T;\r\n}\r\n\r\n/** `{ type, ...defined(s, keys) }`. */\r\nexport function stated<T>(type: string, s: object, keys: readonly string[]): T {\r\n return { type, ...defined<object>(s, keys) } as T;\r\n}\r\n"]}
@@ -1,55 +0,0 @@
1
- import type { Color, NormalizedColor } from "../../attributes/shape/fill/color/parser.js";
2
- import type { FillResolved } from "../../attributes/shape/fill/union.js";
3
- import { type PostEffect3D, type Shadows3D, type ToneMapping3D } from "../../render3d/scene-settings.js";
4
- import type { Scene3D } from "../../render3d/scene3d.js";
5
- import type { Loader, RenderContext2D, Type, Values } from "../../component/api.js";
6
- import * as Corners from "../../component/modules/corners.js";
7
- import * as Paint from "../../component/modules/paint.js";
8
- export declare const state: {
9
- orbit: Type<number, number, false>;
10
- elevation: Type<number, number, false>;
11
- zoom: Type<number, number, false>;
12
- fov: Type<number, number, false>;
13
- ambientIntensity: Type<number, number, false>;
14
- ambientColor: Type<Color, NormalizedColor, false>;
15
- keyIntensity: Type<number, number, false>;
16
- keyColor: Type<Color, NormalizedColor, false>;
17
- showGrid: Type<boolean, boolean, false>;
18
- gridSize: Type<number, number, false>;
19
- gridDivisions: Type<number, number, false>;
20
- gridMajorEvery: Type<number, number, false>;
21
- gridColor: Type<Color, NormalizedColor, false>;
22
- gridMajorColor: Type<Color, NormalizedColor, false>;
23
- showAxes: Type<boolean, boolean, false>;
24
- axisXColor: Type<Color, NormalizedColor, false>;
25
- axisZColor: Type<Color, NormalizedColor, false>;
26
- gridFade: Type<number, number, false>;
27
- gridFadeColor: Type<Color, NormalizedColor, false>;
28
- maxPixelRatio: Type<number, number, false>;
29
- antialias: Type<boolean, boolean, false>;
30
- shadows: Type<Shadows3D, Shadows3D, false>;
31
- tone: Type<ToneMapping3D | undefined, ToneMapping3D | undefined, false>;
32
- exposure: Type<number | undefined, number | undefined, false>;
33
- post: Type<PostEffect3D | readonly PostEffect3D[] | undefined, PostEffect3D | readonly PostEffect3D[] | undefined, false>;
34
- };
35
- export declare const commands: {
36
- /** Swing the default camera: only the angles given move. */
37
- orbitTo: {
38
- args: readonly ["orbit", "elevation", "zoom"];
39
- };
40
- };
41
- type ViewState = Values<typeof state> & {
42
- readonly fill: FillResolved[];
43
- };
44
- /** The 3D runtime, warmed before the first frame. */
45
- export declare function load(loader: Loader): void;
46
- /**
47
- * Your 3D children's scene with this view's settings, its grid, and the default
48
- * camera and lights where the scene has none; `extend` draws more into it last.
49
- * `null` when there is nothing to show.
50
- */
51
- export declare function scene(ctx: RenderContext2D, s: ViewState, extend?: (scene: Scene3D) => void): Scene3D | null;
52
- /** The box painted, with the scene as its top fill layer. */
53
- export declare function draw(ctx: RenderContext2D, s: ViewState & Parameters<typeof Paint.draw>[1] & Values<typeof Corners.state>, extend?: (scene: Scene3D) => void): void;
54
- export {};
55
- //# sourceMappingURL=view3d.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view3d.d.ts","sourceRoot":"","sources":["../../../src/component/modules/view3d.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAKlE,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACpH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AAYnD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjB,CAAC;AAEF,eAAO,MAAM,QAAQ;IACjB,4DAA4D;;;;CAE/D,CAAC;AAEF,KAAK,SAAS,GAAG,MAAM,CAAC,OAAO,KAAK,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC;AAM1E,qDAAqD;AACrD,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEzC;AAID;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,eAAe,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,GAAG,IAAI,CA+B3G;AAED,6DAA6D;AAC7D,wBAAgB,IAAI,CAAC,GAAG,EAAE,eAAe,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAelK"}
@@ -1,160 +0,0 @@
1
- import { cameraOrbit, lerpColor3D, resolveColor3D } from "../../attributes/render3d/orbit.js";
2
- import { Fills } from "../../attributes/shape/fill/chain.js";
3
- import { gridGeometry3D } from "../../nodes/three/grid-geometry3d.js";
4
- import { Graphics3D } from "../../render3d/graphics3d.js";
5
- import { warmCanvas3D } from "../../render3d/resources.js";
6
- import { resolveShadows3D } from "../../render3d/scene-settings.js";
7
- import { isSurfaceTexture3D, resolveSurfaceSource } from "../../render3d/texture.js";
8
- import { forEachTexture3D } from "../../render3d/walk.js";
9
- import { Types } from "../../component/types.js";
10
- import { internalsOf } from "../../component/views.js";
11
- import * as Corners from "../../component/modules/corners.js";
12
- import * as Paint from "../../component/modules/paint.js";
13
- import { optional } from "../../component/modules/three-entries.js";
14
- /**
15
- * A viewport onto its 3D children: the default camera and light rig a scene
16
- * gets when it has none of its own, the floor grid, and the render settings.
17
- */
18
- function color3D(initial) {
19
- return Types.custom(initial, { resolve: resolveColor3D, lerp: lerpColor3D });
20
- }
21
- export const state = {
22
- orbit: Types.number(35, { step: 1, unit: "°" }),
23
- elevation: Types.number(20, { min: -89, max: 89, step: 1, unit: "°" }),
24
- zoom: Types.number(12, { min: 0.01, step: 0.1 }),
25
- fov: Types.custom(45),
26
- ambientIntensity: Types.custom(0.45),
27
- ambientColor: color3D("#ffffff"),
28
- keyIntensity: Types.custom(2.4),
29
- keyColor: color3D("#ffffff"),
30
- showGrid: Types.custom(false),
31
- gridSize: Types.custom(40),
32
- gridDivisions: Types.custom(40),
33
- gridMajorEvery: Types.custom(5),
34
- gridColor: color3D("#26292f"),
35
- gridMajorColor: color3D("#363a42"),
36
- showAxes: Types.custom(false),
37
- axisXColor: color3D("#c8404f"),
38
- axisZColor: color3D("#2f6fd0"),
39
- gridFade: Types.custom(0.55),
40
- gridFadeColor: color3D("#0b0d12"),
41
- maxPixelRatio: Types.custom(2),
42
- antialias: Types.custom(true),
43
- shadows: Types.custom(false),
44
- tone: optional(),
45
- exposure: optional(),
46
- post: optional(),
47
- };
48
- export const commands = {
49
- /** Swing the default camera: only the angles given move. */
50
- orbitTo: { args: ["orbit", "elevation", "zoom"] },
51
- };
52
- const loadThreeRuntime = async () => {
53
- await warmCanvas3D();
54
- };
55
- /** The 3D runtime, warmed before the first frame. */
56
- export function load(loader) {
57
- loader.task("three:runtime", loadThreeRuntime);
58
- }
59
- const grids = new WeakMap();
60
- /**
61
- * Your 3D children's scene with this view's settings, its grid, and the default
62
- * camera and lights where the scene has none; `extend` draws more into it last.
63
- * `null` when there is nothing to show.
64
- */
65
- export function scene(ctx, s, extend) {
66
- const scene = ctx.scene3D();
67
- const hasChildren = scene.ops().length > 0;
68
- const shadows = resolveShadows3D(s.shadows);
69
- if (shadows)
70
- scene.shadows(shadows);
71
- if (s.tone !== undefined || s.exposure !== undefined)
72
- scene.tone({ mapping: s.tone, exposure: s.exposure });
73
- if (s.post !== undefined)
74
- scene.post(s.post);
75
- const fog = scene.fogDescriptor();
76
- if (fog && fog.color === undefined) {
77
- const base = baseColor(s.fill);
78
- if (base !== undefined)
79
- scene.fog({ ...fog, color: base });
80
- }
81
- if (s.showGrid) {
82
- scene.draw(new Graphics3D().line({
83
- geometry: gridOf(internalsOf(ctx).host, s),
84
- segments: true,
85
- material: { type: "lineBasic", vertexColors: true, toneMapped: false },
86
- }));
87
- }
88
- if (!extend && scene.isEmpty() && !hasChildren)
89
- return null;
90
- if (scene.cameraDescriptor() === null) {
91
- scene.perspective({ fov: s.fov, orbit: cameraOrbit(s.orbit), elevation: s.elevation, distance: s.zoom });
92
- }
93
- if (!scene.ops().some((op) => op.kind === "light")) {
94
- scene
95
- .light({ type: "ambient", intensity: s.ambientIntensity, color: s.ambientColor })
96
- .light({ type: "directional", intensity: s.keyIntensity, color: s.keyColor }, { position: [4, 6, 3] })
97
- .light({ type: "directional", intensity: s.keyIntensity * 0.35, color: s.keyColor }, { position: [-5, -2, -4] });
98
- }
99
- extend?.(scene);
100
- return scene.isEmpty() ? null : scene;
101
- }
102
- /** The box painted, with the scene as its top fill layer. */
103
- export function draw(ctx, s, extend) {
104
- const built = scene(ctx, s, extend);
105
- const internals = internalsOf(ctx);
106
- if (built && !internals.probing) {
107
- built.assertBalanced();
108
- // A surface texture draws a detached 2D node: it renders in this node's scope.
109
- const host = internals.host;
110
- forEachTexture3D(built, (texture) => {
111
- if (!isSurfaceTexture3D(texture))
112
- return;
113
- const source = resolveSurfaceSource(texture.source);
114
- if (source.kind === "node")
115
- host.attachDetached(source.node);
116
- });
117
- }
118
- const fill = built ? [...s.fill, ...Fills.canvas3D(built, { maxPixelRatio: s.maxPixelRatio, antialias: s.antialias })] : s.fill;
119
- Paint.draw(ctx, s, Corners.rect(ctx.size, s), { fill: fill });
120
- }
121
- function gridOf(host, s) {
122
- const options = {
123
- size: s.gridSize,
124
- divisions: Math.max(1, Math.round(s.gridDivisions)),
125
- majorEvery: Math.max(1, Math.round(s.gridMajorEvery)),
126
- minorColor: s.gridColor,
127
- majorColor: s.gridMajorColor,
128
- axisXColor: s.axisXColor,
129
- axisZColor: s.axisZColor,
130
- showAxes: s.showAxes,
131
- fadeTo: fadeColor(s),
132
- fade: s.gridFade,
133
- };
134
- const key = JSON.stringify(options);
135
- let kept = grids.get(host);
136
- if (kept?.key !== key)
137
- grids.set(host, kept = { key, geometry: gridGeometry3D(options) });
138
- return kept.geometry;
139
- }
140
- /** The grid fades into the first visible solid fill, so it melts into the background. */
141
- function fadeColor(s) {
142
- for (const layer of s.fill) {
143
- if (layer?.type !== "solid")
144
- continue;
145
- const color = layer.color;
146
- if (typeof color === "string")
147
- return color;
148
- if (Array.isArray(color) && (color[3] ?? 1) > 0)
149
- return color;
150
- }
151
- return s.gridFadeColor;
152
- }
153
- function baseColor(fill) {
154
- for (const layer of fill) {
155
- if (layer && layer.type === "solid")
156
- return layer.color;
157
- }
158
- return undefined;
159
- }
160
- //# sourceMappingURL=view3d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view3d.js","sourceRoot":"","sources":["../../../src/component/modules/view3d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEvF,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAsB,MAAM,+BAA+B,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAyD,MAAM,2BAA2B,CAAC;AAEpH,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D;;;GAGG;AAEH,SAAS,OAAO,CAAC,OAAc;IAC3B,OAAO,KAAK,CAAC,MAAM,CAAyB,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AACzG,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,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AAS,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,IAAI,EAAE,GAAG,KAAK,GAAG;QAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC1F,OAAO,IAAI,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED,yFAAyF;AACzF,SAAS,SAAS,CAAC,CAAY;IAC3B,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,IAAyE,EAAE,CAAC;QAC9F,IAAI,KAAK,EAAE,IAAI,KAAK,OAAO;YAAE,SAAS;QACtC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;YAAE,OAAO,KAAc,CAAC;IAC3E,CAAC;IACD,OAAO,CAAC,CAAC,aAAa,CAAC;AAC3B,CAAC;AAED,SAAS,SAAS,CAAC,IAA6B;IAC5C,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,KAAK,IAAK,KAA2B,CAAC,IAAI,KAAK,OAAO;YAAE,OAAQ,KAAqC,CAAC,KAAK,CAAC;IACpH,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC","sourcesContent":["import type { LoaderFn } from \"@/assets/record\";\r\nimport { cameraOrbit, lerpColor3D, resolveColor3D } from \"@/attributes/render3d/orbit\";\r\nimport type { Color, NormalizedColor } from \"@/attributes/shape/fill/color/parser\";\r\nimport { Fills } from \"@/attributes/shape/fill/chain\";\r\nimport type { FillResolved } from \"@/attributes/shape/fill/union\";\r\nimport { gridGeometry3D, type Grid3DOptions } from \"@/nodes/three/grid-geometry3d\";\r\nimport type { BufferGeometry3D } from \"@/render3d/geometry\";\r\nimport { Graphics3D } from \"@/render3d/graphics3d\";\r\nimport { warmCanvas3D } from \"@/render3d/resources\";\r\nimport { resolveShadows3D, type PostEffect3D, type Shadows3D, type ToneMapping3D } from \"@/render3d/scene-settings\";\r\nimport type { Scene3D } from \"@/render3d/scene3d\";\r\nimport { isSurfaceTexture3D, resolveSurfaceSource } from \"@/render3d/texture\";\r\nimport { forEachTexture3D } from \"@/render3d/walk\";\r\nimport type { Loader, RenderContext2D, Type, Values } from \"@/component/api\";\r\nimport { Types } from \"@/component/types\";\r\nimport { internalsOf } from \"@/component/views\";\r\nimport * as Corners from \"@/component/modules/corners\";\r\nimport * as Paint from \"@/component/modules/paint\";\r\nimport { optional } from \"@/component/modules/three-entries\";\r\n\r\n/**\r\n * A viewport onto its 3D children: the default camera and light rig a scene\r\n * gets when it has none of its own, the floor grid, and the render settings.\r\n */\r\n\r\nfunction color3D(initial: Color): Type<Color, NormalizedColor> {\r\n return Types.custom<Color, NormalizedColor>(initial, { resolve: resolveColor3D, lerp: lerpColor3D });\r\n}\r\n\r\nexport const state = {\r\n orbit: Types.number(35, { step: 1, unit: \"°\" }),\r\n elevation: Types.number(20, { min: -89, max: 89, step: 1, unit: \"°\" }),\r\n zoom: Types.number(12, { min: 0.01, step: 0.1 }),\r\n fov: Types.custom(45),\r\n ambientIntensity: Types.custom(0.45),\r\n ambientColor: color3D(\"#ffffff\"),\r\n keyIntensity: Types.custom(2.4),\r\n keyColor: color3D(\"#ffffff\"),\r\n showGrid: Types.custom(false),\r\n gridSize: Types.custom(40),\r\n gridDivisions: Types.custom(40),\r\n gridMajorEvery: Types.custom(5),\r\n gridColor: color3D(\"#26292f\"),\r\n gridMajorColor: color3D(\"#363a42\"),\r\n showAxes: Types.custom(false),\r\n axisXColor: color3D(\"#c8404f\"),\r\n axisZColor: color3D(\"#2f6fd0\"),\r\n gridFade: Types.custom(0.55),\r\n gridFadeColor: color3D(\"#0b0d12\"),\r\n maxPixelRatio: Types.custom(2),\r\n antialias: Types.custom(true),\r\n shadows: Types.custom<Shadows3D>(false),\r\n tone: optional<ToneMapping3D>(),\r\n exposure: optional<number>(),\r\n post: optional<PostEffect3D | readonly PostEffect3D[]>(),\r\n};\r\n\r\nexport const commands = {\r\n /** Swing the default camera: only the angles given move. */\r\n orbitTo: { args: [\"orbit\", \"elevation\", \"zoom\"] as const },\r\n};\r\n\r\ntype ViewState = Values<typeof state> & { readonly fill: FillResolved[] };\r\n\r\nconst loadThreeRuntime: LoaderFn = async () => {\r\n await warmCanvas3D();\r\n};\r\n\r\n/** The 3D runtime, warmed before the first frame. */\r\nexport function load(loader: Loader): void {\r\n loader.task(\"three:runtime\", loadThreeRuntime);\r\n}\r\n\r\nconst grids = new WeakMap<object, { readonly key: string; readonly geometry: BufferGeometry3D }>();\r\n\r\n/**\r\n * Your 3D children's scene with this view's settings, its grid, and the default\r\n * camera and lights where the scene has none; `extend` draws more into it last.\r\n * `null` when there is nothing to show.\r\n */\r\nexport function scene(ctx: RenderContext2D, s: ViewState, extend?: (scene: Scene3D) => void): Scene3D | null {\r\n const scene = ctx.scene3D();\r\n const hasChildren = scene.ops().length > 0;\r\n const shadows = resolveShadows3D(s.shadows);\r\n if (shadows) scene.shadows(shadows);\r\n if (s.tone !== undefined || s.exposure !== undefined) scene.tone({ mapping: s.tone, exposure: s.exposure });\r\n if (s.post !== undefined) scene.post(s.post);\r\n const fog = scene.fogDescriptor();\r\n if (fog && fog.color === undefined) {\r\n const base = baseColor(s.fill);\r\n if (base !== undefined) scene.fog({ ...fog, color: base });\r\n }\r\n if (s.showGrid) {\r\n scene.draw(new Graphics3D().line({\r\n geometry: gridOf(internalsOf(ctx).host, s),\r\n segments: true,\r\n material: { type: \"lineBasic\", vertexColors: true, toneMapped: false },\r\n }));\r\n }\r\n if (!extend && scene.isEmpty() && !hasChildren) return null;\r\n if (scene.cameraDescriptor() === null) {\r\n scene.perspective({ fov: s.fov, orbit: cameraOrbit(s.orbit), elevation: s.elevation, distance: s.zoom });\r\n }\r\n if (!scene.ops().some((op) => op.kind === \"light\")) {\r\n scene\r\n .light({ type: \"ambient\", intensity: s.ambientIntensity, color: s.ambientColor })\r\n .light({ type: \"directional\", intensity: s.keyIntensity, color: s.keyColor }, { position: [4, 6, 3] })\r\n .light({ type: \"directional\", intensity: s.keyIntensity * 0.35, color: s.keyColor }, { position: [-5, -2, -4] });\r\n }\r\n extend?.(scene);\r\n return scene.isEmpty() ? null : scene;\r\n}\r\n\r\n/** The box painted, with the scene as its top fill layer. */\r\nexport function draw(ctx: RenderContext2D, s: ViewState & Parameters<typeof Paint.draw>[1] & Values<typeof Corners.state>, extend?: (scene: Scene3D) => void): void {\r\n const built = scene(ctx, s, extend);\r\n const internals = internalsOf(ctx);\r\n if (built && !internals.probing) {\r\n built.assertBalanced();\r\n // A surface texture draws a detached 2D node: it renders in this node's scope.\r\n const host = internals.host as unknown as { attachDetached(node: object): void };\r\n forEachTexture3D(built, (texture) => {\r\n if (!isSurfaceTexture3D(texture)) return;\r\n const source = resolveSurfaceSource(texture.source);\r\n if (source.kind === \"node\") host.attachDetached(source.node);\r\n });\r\n }\r\n const fill = built ? [...s.fill, ...Fills.canvas3D(built, { maxPixelRatio: s.maxPixelRatio, antialias: s.antialias })] : s.fill;\r\n Paint.draw(ctx, s, Corners.rect(ctx.size, s), { fill: fill as never });\r\n}\r\n\r\nfunction gridOf(host: object, s: ViewState): BufferGeometry3D {\r\n const options: Grid3DOptions = {\r\n size: s.gridSize,\r\n divisions: Math.max(1, Math.round(s.gridDivisions)),\r\n majorEvery: Math.max(1, Math.round(s.gridMajorEvery)),\r\n minorColor: s.gridColor,\r\n majorColor: s.gridMajorColor,\r\n axisXColor: s.axisXColor,\r\n axisZColor: s.axisZColor,\r\n showAxes: s.showAxes,\r\n fadeTo: fadeColor(s),\r\n fade: s.gridFade,\r\n };\r\n const key = JSON.stringify(options);\r\n let kept = grids.get(host);\r\n if (kept?.key !== key) grids.set(host, kept = { key, geometry: gridGeometry3D(options) });\r\n return kept.geometry;\r\n}\r\n\r\n/** The grid fades into the first visible solid fill, so it melts into the background. */\r\nfunction fadeColor(s: ViewState): Color {\r\n for (const layer of s.fill as unknown as readonly ({ type?: string; color?: unknown } | null)[]) {\r\n if (layer?.type !== \"solid\") continue;\r\n const color = layer.color;\r\n if (typeof color === \"string\") return color;\r\n if (Array.isArray(color) && (color[3] ?? 1) > 0) return color as Color;\r\n }\r\n return s.gridFadeColor;\r\n}\r\n\r\nfunction baseColor(fill: readonly FillResolved[]): Color | undefined {\r\n for (const layer of fill) {\r\n if (layer && (layer as { type?: string }).type === \"solid\") return (layer as unknown as { color: Color }).color;\r\n }\r\n return undefined;\r\n}\r\n"]}
@@ -1,22 +0,0 @@
1
- import type { Node } from "../nodes/node/node.js";
2
- import { type Command } from "../tween/command.js";
3
- import type { EasingFunction } from "../tween/ease/type.js";
4
- import type { NodeView, Piece, SoundOptions, Timeline } from "../component/api.js";
5
- import type { ComponentHost } from "../component/views.js";
6
- /** What a command is handed for one placement: its args and timing, and the builders for its pieces. */
7
- export declare function makeTimeline(args: object, duration: number, easing: EasingFunction | undefined, node: NodeView): Timeline<any, any>;
8
- /** A sound a command plays, in seconds from the command's start; `until` absent plays to its own end. */
9
- export interface CommandSound {
10
- readonly at: number;
11
- readonly until: number | undefined;
12
- readonly src: string;
13
- readonly options: SoundOptions;
14
- }
15
- /** The sounds a built command plays, and the node playing them. */
16
- export declare function commandSoundsOf(command: object): {
17
- readonly host: Node;
18
- readonly sounds: readonly CommandSound[];
19
- } | undefined;
20
- /** The command a component's function returned, as the timeline places it. */
21
- export declare function commandOf(host: ComponentHost, p: Piece, duration: number, easing: EasingFunction | undefined): Command<Record<string, unknown>>;
22
- //# sourceMappingURL=timeline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/component/timeline.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veCommand, settles, settling } from "../tween/command.js";
3
- const piece = (data) => ({ _piece: data });
4
- /** What a command is handed for one placement: its args and timing, and the builders for its pieces. */
5
- export function makeTimeline(args, duration, easing, node) {
6
- return {
7
- args,
8
- duration,
9
- easing,
10
- node,
11
- tween: (targets) => piece({ kind: "tween", targets: targets }),
12
- animate: (frame, options) => piece({ kind: "animate", frame: frame, eased: options?.eased !== false }),
13
- ease: (t) => (easing ? easing(t) : t),
14
- sound: (src, options) => piece({ kind: "sound", src, options: options ?? {} }),
15
- wait: (seconds) => piece({ kind: "wait", seconds }),
16
- together: (pieces) => piece({ kind: "together", pieces }),
17
- sequence: (pieces) => piece({ kind: "sequence", pieces }),
18
- stagger: (pieces, options) => piece({ kind: "stagger", pieces, overlap: options?.overlap ?? 0 }),
19
- };
20
- }
21
- const SILENT = [];
22
- /**
23
- * A leaf, built and run to its end at once, so the piece after it reads where
24
- * it finished — the rule the timeline already keeps between whole commands.
25
- */
26
- function leaf(command, duration, pure = true) {
27
- command.at(1);
28
- return { duration, settles: pure, sounds: SILENT, apply: (elapsed) => command.at(duration > 0 ? elapsed / duration : 1) };
29
- }
30
- function placed(parts, offsets) {
31
- const duration = parts.reduce((max, part, i) => Math.max(max, offsets[i] + part.duration), 0);
32
- return {
33
- duration,
34
- settles: parts.every((part) => part.settles),
35
- sounds: parts.flatMap((part, i) => part.sounds.map((s) => ({
36
- ...s, at: s.at + offsets[i], until: s.until === undefined ? undefined : s.until + offsets[i],
37
- }))),
38
- apply(elapsed) {
39
- // A part that hasn't started writes nothing: what came before it stands.
40
- for (let i = 0; i < parts.length; i++) {
41
- if (elapsed < offsets[i])
42
- continue;
43
- parts[i].apply(Math.min(elapsed - offsets[i], parts[i].duration));
44
- }
45
- },
46
- };
47
- }
48
- /** A piece built against the tree as the pieces before it left it, spread over `duration`. */
49
- function timedOf(host, p, duration, easing) {
50
- const data = p._piece;
51
- switch (data.kind) {
52
- case "tween":
53
- return leaf(host.to({ data: data.targets, duration, easing }), duration);
54
- case "animate":
55
- return leaf(host._animate(data.frame, duration, data.eased ? easing : undefined), duration);
56
- case "child":
57
- return leaf(data.node.to({ data: data.targets, duration, easing }), duration);
58
- case "run": {
59
- // Any command of the child's, so it settles only if that one does.
60
- const run = runCommand(data.node, data.name, data.args, duration, easing);
61
- return leaf(run, duration, settles(run));
62
- }
63
- case "wait":
64
- return { duration: data.seconds, settles: true, sounds: SILENT, apply: () => { } };
65
- case "sound":
66
- // Scheduled ahead of time, not written per frame: the clip's audio reads it off the built command.
67
- return { duration: 0, settles: true, sounds: data.src ? [{ at: 0, until: undefined, src: data.src, options: data.options }] : SILENT, apply: () => { } };
68
- case "together": {
69
- const parts = data.pieces.map((part) => timedOf(host, part, duration, easing));
70
- return placed(parts, parts.map(() => 0));
71
- }
72
- case "sequence": {
73
- // Untimed pieces share what fixed `wait`s leave of the span.
74
- const fixed = data.pieces.reduce((sum, part) => sum + (part._piece.kind === "wait" ? part._piece.seconds : 0), 0);
75
- const flexible = data.pieces.filter((part) => part._piece.kind !== "wait").length;
76
- const each = flexible > 0 ? Math.max(0, duration - fixed) / flexible : 0;
77
- const parts = [];
78
- const offsets = [];
79
- let cursor = 0;
80
- for (const part of data.pieces) {
81
- const timed = timedOf(host, part, each, easing);
82
- parts.push(timed);
83
- offsets.push(cursor);
84
- cursor += timed.duration;
85
- }
86
- return placed(parts, offsets);
87
- }
88
- case "stagger": {
89
- const n = data.pieces.length;
90
- if (n === 0)
91
- return { duration, settles: true, sounds: SILENT, apply: () => { } };
92
- const step = 1 - Math.min(1, Math.max(0, data.overlap));
93
- // n pieces, each `each` long, started `each * step` apart, span the command exactly.
94
- const each = duration / (1 + (n - 1) * step);
95
- const parts = data.pieces.map((part) => timedOf(host, part, each, easing));
96
- return placed(parts, parts.map((_, i) => i * each * step));
97
- }
98
- }
99
- }
100
- function runCommand(node, name, args, duration, easing) {
101
- const meta = getCommandMeta(node).find((m) => m.key === name);
102
- const method = meta ? node[meta.method] : undefined;
103
- if (typeof method !== "function")
104
- throw new Error(`${node.className} has no command "${name}".`);
105
- const built = method.call(node, { data: (args ?? {}), duration, easing });
106
- if (!built || typeof built !== "object" || !("at" in built))
107
- throw new Error(`${node.className}.${name} did not return a command.`);
108
- return built;
109
- }
110
- const SOUNDS = new WeakMap();
111
- /** The sounds a built command plays, and the node playing them. */
112
- export function commandSoundsOf(command) {
113
- return SOUNDS.get(command);
114
- }
115
- /** The command a component's function returned, as the timeline places it. */
116
- export function commandOf(host, p, duration, easing) {
117
- // A lone tween is the engine's own `to`, exactly as a class's command would return it.
118
- if (p._piece.kind === "tween")
119
- return settling(host.to({ data: p._piece.targets, duration, easing }));
120
- const timed = timedOf(host, p, duration, easing);
121
- const command = driveCommand(duration, (t) => timed.apply(t * duration));
122
- // A sound is cut when its command ends; a command with no length lets it play out.
123
- const sounds = timed.sounds.map((s) => (s.until === undefined && duration > 0 ? { ...s, until: duration } : s));
124
- if (sounds.length > 0)
125
- SOUNDS.set(command, { host, sounds });
126
- return timed.settles ? settling(command) : command;
127
- }
128
- //# sourceMappingURL=timeline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../src/component/timeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,iBAAiB,CAAC;AAKlG,MAAM,KAAK,GAAG,CAAC,IAAe,EAAS,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAE7D,wGAAwG;AACxG,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,QAAgB,EAAE,MAAkC,EAAE,IAAc;IAC3G,OAAO;QACH,IAAI;QACJ,QAAQ;QACR,MAAM;QACN,IAAI;QACJ,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OA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\r\nimport { driveCommand, settles, settling, type Command, type CommandArgs } from \"@/tween/command\";\r\nimport type { EasingFunction } from \"@/tween/ease/type\";\r\nimport type { NodeView, Piece, PieceData, SoundOptions, Timeline } from \"@/component/api\";\r\nimport type { ComponentHost } from \"@/component/views\";\r\n\r\nconst piece = (data: PieceData): Piece => ({ _piece: data });\r\n\r\n/** What a command is handed for one placement: its args and timing, and the builders for its pieces. */\r\nexport function makeTimeline(args: object, duration: number, easing: EasingFunction | undefined, node: NodeView): Timeline<any, any> {\r\n return {\r\n args,\r\n duration,\r\n easing,\r\n node,\r\n tween: (targets) => piece({ kind: \"tween\", targets: targets as Record<string, unknown> }),\r\n animate: (frame, options) => piece({ kind: \"animate\", frame: frame as (t: number) => Record<string, unknown>, eased: options?.eased !== false }),\r\n ease: (t) => (easing ? easing(t) : t),\r\n sound: (src, options) => piece({ kind: \"sound\", src, options: options ?? {} }),\r\n wait: (seconds) => piece({ kind: \"wait\", seconds }),\r\n together: (pieces) => piece({ kind: \"together\", pieces }),\r\n sequence: (pieces) => piece({ kind: \"sequence\", pieces }),\r\n stagger: (pieces, options) => piece({ kind: \"stagger\", pieces, overlap: options?.overlap ?? 0 }),\r\n };\r\n}\r\n\r\n/** A sound a command plays, in seconds from the command's start; `until` absent plays to its own end. */\r\nexport interface CommandSound {\r\n readonly at: number;\r\n readonly until: number | undefined;\r\n readonly src: string;\r\n readonly options: SoundOptions;\r\n}\r\n\r\n/** A built piece: how long it lasts, the frame it writes `elapsed` seconds in, whether that only tweens slots, and its sounds. */\r\ninterface Timed {\r\n readonly duration: number;\r\n readonly settles: boolean;\r\n readonly sounds: readonly CommandSound[];\r\n apply(elapsed: number): void;\r\n}\r\n\r\nconst SILENT: readonly CommandSound[] = [];\r\n\r\n/**\r\n * A leaf, built and run to its end at once, so the piece after it reads where\r\n * it finished — the rule the timeline already keeps between whole commands.\r\n */\r\nfunction leaf(command: Command<Record<string, unknown>>, duration: number, pure = true): Timed {\r\n command.at(1);\r\n return { duration, settles: pure, sounds: SILENT, apply: (elapsed) => command.at(duration > 0 ? elapsed / duration : 1) };\r\n}\r\n\r\nfunction placed(parts: readonly Timed[], offsets: readonly number[]): Timed {\r\n const duration = parts.reduce((max, part, i) => Math.max(max, offsets[i] + part.duration), 0);\r\n return {\r\n duration,\r\n settles: parts.every((part) => part.settles),\r\n sounds: parts.flatMap((part, i) => part.sounds.map((s) => ({\r\n ...s, at: s.at + offsets[i], until: s.until === undefined ? undefined : s.until + offsets[i],\r\n }))),\r\n apply(elapsed) {\r\n // A part that hasn't started writes nothing: what came before it stands.\r\n for (let i = 0; i < parts.length; i++) {\r\n if (elapsed < offsets[i]) continue;\r\n parts[i].apply(Math.min(elapsed - offsets[i], parts[i].duration));\r\n }\r\n },\r\n };\r\n}\r\n\r\n/** A piece built against the tree as the pieces before it left it, spread over `duration`. */\r\nfunction timedOf(host: ComponentHost, p: Piece, duration: number, easing: EasingFunction | undefined): Timed {\r\n const data = p._piece;\r\n switch (data.kind) {\r\n case \"tween\":\r\n return leaf(host.to({ data: data.targets, duration, easing }) as Command<Record<string, unknown>>, duration);\r\n case \"animate\":\r\n return leaf(host._animate(data.frame, duration, data.eased ? easing : undefined) as Command<Record<string, unknown>>, duration);\r\n case \"child\":\r\n return leaf((data.node as Node).to({ data: data.targets, duration, easing }) as Command<Record<string, unknown>>, duration);\r\n case \"run\": {\r\n // Any command of the child's, so it settles only if that one does.\r\n const run = runCommand(data.node as Node, data.name, data.args, duration, easing);\r\n return leaf(run, duration, settles(run));\r\n }\r\n case \"wait\":\r\n return { duration: data.seconds, settles: true, sounds: SILENT, apply: () => { } };\r\n case \"sound\":\r\n // Scheduled ahead of time, not written per frame: the clip's audio reads it off the built command.\r\n return { duration: 0, settles: true, sounds: data.src ? [{ at: 0, until: undefined, src: data.src, options: data.options }] : SILENT, apply: () => { } };\r\n case \"together\": {\r\n const parts = data.pieces.map((part) => timedOf(host, part, duration, easing));\r\n return placed(parts, parts.map(() => 0));\r\n }\r\n case \"sequence\": {\r\n // Untimed pieces share what fixed `wait`s leave of the span.\r\n const fixed = data.pieces.reduce((sum, part) => sum + (part._piece.kind === \"wait\" ? part._piece.seconds : 0), 0);\r\n const flexible = data.pieces.filter((part) => part._piece.kind !== \"wait\").length;\r\n const each = flexible > 0 ? Math.max(0, duration - fixed) / flexible : 0;\r\n const parts: Timed[] = [];\r\n const offsets: number[] = [];\r\n let cursor = 0;\r\n for (const part of data.pieces) {\r\n const timed = timedOf(host, part, each, easing);\r\n parts.push(timed);\r\n offsets.push(cursor);\r\n cursor += timed.duration;\r\n }\r\n return placed(parts, offsets);\r\n }\r\n case \"stagger\": {\r\n const n = data.pieces.length;\r\n if (n === 0) return { duration, settles: true, sounds: SILENT, apply: () => { } };\r\n const step = 1 - Math.min(1, Math.max(0, data.overlap));\r\n // n pieces, each `each` long, started `each * step` apart, span the command exactly.\r\n const each = duration / (1 + (n - 1) * step);\r\n const parts = data.pieces.map((part) => timedOf(host, part, each, easing));\r\n return placed(parts, parts.map((_, i) => i * each * step));\r\n }\r\n }\r\n}\r\n\r\nfunction runCommand(node: Node, name: string, args: object | undefined, duration: number, easing: EasingFunction | undefined): Command<Record<string, unknown>> {\r\n const meta = getCommandMeta(node).find((m) => m.key === name);\r\n const method = meta ? (node as unknown as Record<string, unknown>)[meta.method] : undefined;\r\n if (typeof method !== \"function\") throw new Error(`${node.className} has no command \"${name}\".`);\r\n const built = (method as (args: CommandArgs) => unknown).call(node, { data: (args ?? {}) as Record<string, unknown>, duration, easing });\r\n if (!built || typeof built !== \"object\" || !(\"at\" in built)) throw new Error(`${node.className}.${name} did not return a command.`);\r\n return built as Command<Record<string, unknown>>;\r\n}\r\n\r\nconst SOUNDS = new WeakMap<object, { readonly host: Node; readonly sounds: readonly CommandSound[] }>();\r\n\r\n/** The sounds a built command plays, and the node playing them. */\r\nexport function commandSoundsOf(command: object): { readonly host: Node; readonly sounds: readonly CommandSound[] } | undefined {\r\n return SOUNDS.get(command);\r\n}\r\n\r\n/** The command a component's function returned, as the timeline places it. */\r\nexport function commandOf(host: ComponentHost, p: Piece, duration: number, easing: EasingFunction | undefined): Command<Record<string, unknown>> {\r\n // A lone tween is the engine's own `to`, exactly as a class's command would return it.\r\n if (p._piece.kind === \"tween\") return settling(host.to({ data: p._piece.targets, duration, easing }) as Command<Record<string, unknown>>);\r\n const timed = timedOf(host, p, duration, easing);\r\n const command = driveCommand(duration, (t) => timed.apply(t * duration)) as unknown as Command<Record<string, unknown>>;\r\n // A sound is cut when its command ends; a command with no length lets it play out.\r\n const sounds = timed.sounds.map((s) => (s.until === undefined && duration > 0 ? { ...s, until: duration } : s));\r\n if (sounds.length > 0) SOUNDS.set(command, { host, sounds });\r\n return timed.settles ? settling(command) : command;\r\n}\r\n"]}