@motionscript/core 0.1.0-alpha.3 → 0.1.0-alpha.5

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 (746) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +48 -0
  4. package/README.md +93 -72
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +9 -0
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +11 -0
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts.map +1 -1
  11. package/dist/assets/errors.js +8 -3
  12. package/dist/assets/errors.js.map +1 -1
  13. package/dist/assets/index.js.map +1 -1
  14. package/dist/assets/manager.d.ts +26 -1
  15. package/dist/assets/manager.d.ts.map +1 -1
  16. package/dist/assets/manager.js +79 -4
  17. package/dist/assets/manager.js.map +1 -1
  18. package/dist/assets/manifest.js.map +1 -1
  19. package/dist/assets/record.js.map +1 -1
  20. package/dist/assets/scope.d.ts +3 -3
  21. package/dist/assets/scope.d.ts.map +1 -1
  22. package/dist/assets/scope.js.map +1 -1
  23. package/dist/attributes/audio/filters/chain.d.ts +1 -1
  24. package/dist/attributes/audio/filters/chain.js.map +1 -1
  25. package/dist/attributes/audio/filters/curve.d.ts +8 -8
  26. package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
  27. package/dist/attributes/audio/filters/curve.js +20 -19
  28. package/dist/attributes/audio/filters/curve.js.map +1 -1
  29. package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
  30. package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
  31. package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
  32. package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
  33. package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
  34. package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
  35. package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
  36. package/dist/attributes/audio/filters/index.d.ts +1 -1
  37. package/dist/attributes/audio/filters/index.d.ts.map +1 -1
  38. package/dist/attributes/audio/filters/index.js +1 -1
  39. package/dist/attributes/audio/filters/index.js.map +1 -1
  40. package/dist/attributes/audio/filters/registry.js.map +1 -1
  41. package/dist/attributes/audio/filters/union.js.map +1 -1
  42. package/dist/attributes/audio/request.d.ts +17 -2
  43. package/dist/attributes/audio/request.d.ts.map +1 -1
  44. package/dist/attributes/audio/request.js.map +1 -1
  45. package/dist/attributes/audio/schedule.d.ts +4 -2
  46. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  47. package/dist/attributes/audio/schedule.js +15 -8
  48. package/dist/attributes/audio/schedule.js.map +1 -1
  49. package/dist/attributes/audio/sound.d.ts +4 -2
  50. package/dist/attributes/audio/sound.d.ts.map +1 -1
  51. package/dist/attributes/audio/sound.js +8 -4
  52. package/dist/attributes/audio/sound.js.map +1 -1
  53. package/dist/attributes/index.js.map +1 -1
  54. package/dist/attributes/layout/alignment.js +1 -1
  55. package/dist/attributes/layout/alignment.js.map +1 -1
  56. package/dist/attributes/layout/index.js.map +1 -1
  57. package/dist/attributes/layout/insets.js.map +1 -1
  58. package/dist/attributes/layout/matrix2d.js.map +1 -1
  59. package/dist/attributes/layout/size.js.map +1 -1
  60. package/dist/attributes/layout/transform3d.js.map +1 -1
  61. package/dist/attributes/layout/vector2.js.map +1 -1
  62. package/dist/attributes/layout/world-transform.js.map +1 -1
  63. package/dist/attributes/mask/boolean.js.map +1 -1
  64. package/dist/attributes/mask/mask.js.map +1 -1
  65. package/dist/attributes/properties/decorator.d.ts +3 -1
  66. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  67. package/dist/attributes/properties/decorator.js.map +1 -1
  68. package/dist/attributes/properties/inputs.js.map +1 -1
  69. package/dist/attributes/properties/typed.d.ts +9 -2
  70. package/dist/attributes/properties/typed.d.ts.map +1 -1
  71. package/dist/attributes/properties/typed.js +15 -1
  72. package/dist/attributes/properties/typed.js.map +1 -1
  73. package/dist/attributes/render3d/orbit.d.ts +8 -8
  74. package/dist/attributes/render3d/orbit.js +7 -7
  75. package/dist/attributes/render3d/orbit.js.map +1 -1
  76. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  77. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  78. package/dist/attributes/shape/corners/corners.js.map +1 -1
  79. package/dist/attributes/shape/corners/index.js.map +1 -1
  80. package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
  81. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  82. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  83. package/dist/attributes/shape/effects/chain.d.ts +28 -120
  84. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  85. package/dist/attributes/shape/effects/chain.js +16 -88
  86. package/dist/attributes/shape/effects/chain.js.map +1 -1
  87. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  88. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  89. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  90. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  91. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  92. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  94. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
  96. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  97. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
  98. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  99. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  100. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  101. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  102. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  104. package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
  105. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  106. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  108. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  110. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  112. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
  114. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/shader.js +15 -8
  128. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  136. package/dist/attributes/shape/effects/index.d.ts +2 -6
  137. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  138. package/dist/attributes/shape/effects/index.js.map +1 -1
  139. package/dist/attributes/shape/effects/registry.d.ts +23 -6
  140. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/registry.js +44 -10
  142. package/dist/attributes/shape/effects/registry.js.map +1 -1
  143. package/dist/attributes/shape/effects/union.d.ts +2 -6
  144. package/dist/attributes/shape/effects/union.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/union.js.map +1 -1
  146. package/dist/attributes/shape/fill/blend.js.map +1 -1
  147. package/dist/attributes/shape/fill/chain.js.map +1 -1
  148. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  149. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  150. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  151. package/dist/attributes/shape/fill/color/parser.js +81 -44
  152. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  153. package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
  154. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
  155. package/dist/attributes/shape/fill/gradient-stops.js +65 -0
  156. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
  157. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  158. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  159. package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
  160. package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
  161. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  162. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  163. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  164. package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
  165. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  166. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  167. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  168. package/dist/attributes/shape/fill/implementations/image.js +5 -4
  169. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  170. package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
  171. package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
  172. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  173. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  174. package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
  175. package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
  176. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  177. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  178. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  179. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  180. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  181. package/dist/attributes/shape/fill/index.js.map +1 -1
  182. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  183. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  184. package/dist/attributes/shape/fill/registry.js.map +1 -1
  185. package/dist/attributes/shape/fill/union.js.map +1 -1
  186. package/dist/attributes/shape/filters/chain.d.ts +4 -10
  187. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  188. package/dist/attributes/shape/filters/chain.js +1 -13
  189. package/dist/attributes/shape/filters/chain.js.map +1 -1
  190. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  191. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  192. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  193. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  194. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  195. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  196. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  197. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  198. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  199. package/dist/attributes/shape/filters/index.d.ts +1 -1
  200. package/dist/attributes/shape/filters/index.js.map +1 -1
  201. package/dist/attributes/shape/filters/registry.d.ts +2 -2
  202. package/dist/attributes/shape/filters/registry.js +3 -3
  203. package/dist/attributes/shape/filters/registry.js.map +1 -1
  204. package/dist/attributes/shape/filters/union.d.ts +6 -7
  205. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  206. package/dist/attributes/shape/filters/union.js.map +1 -1
  207. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  208. package/dist/attributes/shape/path/anchors.js +12 -5
  209. package/dist/attributes/shape/path/anchors.js.map +1 -1
  210. package/dist/attributes/shape/path/bezier.js.map +1 -1
  211. package/dist/attributes/shape/path/index.js.map +1 -1
  212. package/dist/attributes/shape/path/measure.js.map +1 -1
  213. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  214. package/dist/attributes/shape/path/morph.js +16 -4
  215. package/dist/attributes/shape/path/morph.js.map +1 -1
  216. package/dist/attributes/shape/path/ops.js.map +1 -1
  217. package/dist/attributes/shape/path/types.js.map +1 -1
  218. package/dist/attributes/shape/path/walk.js.map +1 -1
  219. package/dist/attributes/shape/shaders/index.js.map +1 -1
  220. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  221. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  222. package/dist/attributes/shape/shadow/index.js.map +1 -1
  223. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  224. package/dist/attributes/shape/stroke/index.d.ts +2 -2
  225. package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
  226. package/dist/attributes/shape/stroke/index.js +1 -1
  227. package/dist/attributes/shape/stroke/index.js.map +1 -1
  228. package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
  229. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  230. package/dist/attributes/shape/stroke/stroke.js +22 -2
  231. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  232. package/dist/attributes/shared/operators.js.map +1 -1
  233. package/dist/attributes/text/index.js.map +1 -1
  234. package/dist/attributes/text/ops.d.ts +6 -0
  235. package/dist/attributes/text/ops.d.ts.map +1 -1
  236. package/dist/attributes/text/ops.js +1 -0
  237. package/dist/attributes/text/ops.js.map +1 -1
  238. package/dist/attributes/text/types.js.map +1 -1
  239. package/dist/browser/chunks/chunk-FUZVFT3W.js +18 -0
  240. package/dist/browser/chunks/chunk-FUZVFT3W.js.map +7 -0
  241. package/dist/browser/chunks/chunk-QG6C23IJ.js +3 -0
  242. package/dist/browser/chunks/chunk-QG6C23IJ.js.map +7 -0
  243. package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
  244. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
  245. package/dist/browser/component.js +1 -1
  246. package/dist/browser/component.js.map +1 -1
  247. package/dist/browser/index.js +1 -1
  248. package/dist/browser/index.js.map +4 -4
  249. package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
  250. package/dist/browser/jsx-jsx-runtime.js +1 -1
  251. package/dist/browser/manifest.json +3 -2
  252. package/dist/browser/sdk.js +1 -1
  253. package/dist/component.js.map +1 -1
  254. package/dist/document/audio.d.ts +1 -1
  255. package/dist/document/audio.js +4 -4
  256. package/dist/document/audio.js.map +1 -1
  257. package/dist/document/builtins.d.ts.map +1 -1
  258. package/dist/document/builtins.js +8 -14
  259. package/dist/document/builtins.js.map +1 -1
  260. package/dist/document/command-traits.d.ts +1 -1
  261. package/dist/document/command-traits.js +13 -1
  262. package/dist/document/command-traits.js.map +1 -1
  263. package/dist/document/deny-globals.js.map +1 -1
  264. package/dist/document/diff.js.map +1 -1
  265. package/dist/document/doc-index.d.ts +2 -2
  266. package/dist/document/doc-index.d.ts.map +1 -1
  267. package/dist/document/doc-index.js.map +1 -1
  268. package/dist/document/expression/compile.d.ts.map +1 -1
  269. package/dist/document/expression/compile.js +8 -5
  270. package/dist/document/expression/compile.js.map +1 -1
  271. package/dist/document/expression/index.js.map +1 -1
  272. package/dist/document/expression/ops.js +1 -1
  273. package/dist/document/expression/ops.js.map +1 -1
  274. package/dist/document/expression/parse.d.ts.map +1 -1
  275. package/dist/document/expression/parse.js +15 -6
  276. package/dist/document/expression/parse.js.map +1 -1
  277. package/dist/document/expression/refs.d.ts +1 -1
  278. package/dist/document/expression/refs.js +1 -1
  279. package/dist/document/expression/refs.js.map +1 -1
  280. package/dist/document/expression/types.js.map +1 -1
  281. package/dist/document/expression/walk.d.ts.map +1 -1
  282. package/dist/document/expression/walk.js +2 -1
  283. package/dist/document/expression/walk.js.map +1 -1
  284. package/dist/document/index.d.ts +2 -0
  285. package/dist/document/index.d.ts.map +1 -1
  286. package/dist/document/index.js +2 -0
  287. package/dist/document/index.js.map +1 -1
  288. package/dist/document/node-decorator.js.map +1 -1
  289. package/dist/document/node-descriptor.d.ts +19 -0
  290. package/dist/document/node-descriptor.d.ts.map +1 -1
  291. package/dist/document/node-descriptor.js.map +1 -1
  292. package/dist/document/placement.d.ts +70 -0
  293. package/dist/document/placement.d.ts.map +1 -0
  294. package/dist/document/placement.js +83 -0
  295. package/dist/document/placement.js.map +1 -0
  296. package/dist/document/project.d.ts +2 -2
  297. package/dist/document/project.d.ts.map +1 -1
  298. package/dist/document/project.js.map +1 -1
  299. package/dist/document/registry.d.ts +17 -0
  300. package/dist/document/registry.d.ts.map +1 -1
  301. package/dist/document/registry.js +29 -2
  302. package/dist/document/registry.js.map +1 -1
  303. package/dist/document/timeline-patch.js.map +1 -1
  304. package/dist/document/timeline.d.ts +73 -18
  305. package/dist/document/timeline.d.ts.map +1 -1
  306. package/dist/document/timeline.js +192 -40
  307. package/dist/document/timeline.js.map +1 -1
  308. package/dist/document/types.d.ts +12 -12
  309. package/dist/document/types.d.ts.map +1 -1
  310. package/dist/document/types.js +2 -2
  311. package/dist/document/types.js.map +1 -1
  312. package/dist/document/validate.d.ts +2 -2
  313. package/dist/document/validate.d.ts.map +1 -1
  314. package/dist/document/validate.js +37 -31
  315. package/dist/document/validate.js.map +1 -1
  316. package/dist/document/withdraw.d.ts +28 -0
  317. package/dist/document/withdraw.d.ts.map +1 -0
  318. package/dist/document/withdraw.js +61 -0
  319. package/dist/document/withdraw.js.map +1 -0
  320. package/dist/index.d.ts +1 -0
  321. package/dist/index.d.ts.map +1 -1
  322. package/dist/index.js +1 -0
  323. package/dist/index.js.map +1 -1
  324. package/dist/jsx/jsx-dev-runtime.js.map +1 -1
  325. package/dist/jsx/jsx-runtime.d.ts +9 -1
  326. package/dist/jsx/jsx-runtime.d.ts.map +1 -1
  327. package/dist/jsx/jsx-runtime.js +13 -3
  328. package/dist/jsx/jsx-runtime.js.map +1 -1
  329. package/dist/layout/bounds.d.ts +0 -1
  330. package/dist/layout/bounds.d.ts.map +1 -1
  331. package/dist/layout/bounds.js.map +1 -1
  332. package/dist/layout/constraints.js.map +1 -1
  333. package/dist/layout/flex.d.ts +4 -2
  334. package/dist/layout/flex.d.ts.map +1 -1
  335. package/dist/layout/flex.js +27 -11
  336. package/dist/layout/flex.js.map +1 -1
  337. package/dist/layout/freeform.js.map +1 -1
  338. package/dist/layout/grid.js.map +1 -1
  339. package/dist/layout/index.js.map +1 -1
  340. package/dist/layout/item.js.map +1 -1
  341. package/dist/layout/ops.d.ts +6 -0
  342. package/dist/layout/ops.d.ts.map +1 -1
  343. package/dist/layout/ops.js +6 -0
  344. package/dist/layout/ops.js.map +1 -1
  345. package/dist/layout/types.js.map +1 -1
  346. package/dist/nodes/2d/node-lifecycle.js.map +1 -1
  347. package/dist/nodes/2d/node-motion.js.map +1 -1
  348. package/dist/nodes/2d/node-render.d.ts +3 -3
  349. package/dist/nodes/2d/node-render.d.ts.map +1 -1
  350. package/dist/nodes/2d/node-render.js.map +1 -1
  351. package/dist/nodes/2d/node-transform.js.map +1 -1
  352. package/dist/nodes/2d/node2d.d.ts +115 -3
  353. package/dist/nodes/2d/node2d.d.ts.map +1 -1
  354. package/dist/nodes/2d/node2d.js +180 -28
  355. package/dist/nodes/2d/node2d.js.map +1 -1
  356. package/dist/nodes/2d/paint-node.d.ts +27 -0
  357. package/dist/nodes/2d/paint-node.d.ts.map +1 -1
  358. package/dist/nodes/2d/paint-node.js +42 -0
  359. package/dist/nodes/2d/paint-node.js.map +1 -1
  360. package/dist/nodes/audio/audio-bus.js.map +1 -1
  361. package/dist/nodes/audio/index.js.map +1 -1
  362. package/dist/nodes/audio/node-audio.js.map +1 -1
  363. package/dist/nodes/audio/sound-node.d.ts +2 -2
  364. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  365. package/dist/nodes/audio/sound-node.js +1 -1
  366. package/dist/nodes/audio/sound-node.js.map +1 -1
  367. package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
  368. package/dist/nodes/geometry/bounds-shape-node.js +2 -2
  369. package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
  370. package/dist/nodes/geometry/box-path-node.d.ts +3 -3
  371. package/dist/nodes/geometry/box-path-node.js +2 -2
  372. package/dist/nodes/geometry/box-path-node.js.map +1 -1
  373. package/dist/nodes/geometry/ellipse-node.js.map +1 -1
  374. package/dist/nodes/geometry/group-bounds.d.ts +2 -2
  375. package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
  376. package/dist/nodes/geometry/group-bounds.js +1 -2
  377. package/dist/nodes/geometry/group-bounds.js.map +1 -1
  378. package/dist/nodes/geometry/path-node.d.ts.map +1 -1
  379. package/dist/nodes/geometry/path-node.js +6 -0
  380. package/dist/nodes/geometry/path-node.js.map +1 -1
  381. package/dist/nodes/geometry/polygon-node.js.map +1 -1
  382. package/dist/nodes/geometry/polygram-node.js.map +1 -1
  383. package/dist/nodes/geometry/rect-node.js.map +1 -1
  384. package/dist/nodes/geometry/shape-node.js.map +1 -1
  385. package/dist/nodes/geometry/shape-outline.d.ts +2 -2
  386. package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
  387. package/dist/nodes/geometry/shape-outline.js +2 -13
  388. package/dist/nodes/geometry/shape-outline.js.map +1 -1
  389. package/dist/nodes/index.d.ts +3 -8
  390. package/dist/nodes/index.d.ts.map +1 -1
  391. package/dist/nodes/index.js +3 -8
  392. package/dist/nodes/index.js.map +1 -1
  393. package/dist/nodes/layout/camera-node.d.ts +9 -0
  394. package/dist/nodes/layout/camera-node.d.ts.map +1 -1
  395. package/dist/nodes/layout/camera-node.js +38 -3
  396. package/dist/nodes/layout/camera-node.js.map +1 -1
  397. package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
  398. package/dist/nodes/layout/orbit-camera-node.js +1 -1
  399. package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
  400. package/dist/nodes/layout/rotated-box.js.map +1 -1
  401. package/dist/nodes/media/video-node.d.ts.map +1 -1
  402. package/dist/nodes/media/video-node.js +2 -0
  403. package/dist/nodes/media/video-node.js.map +1 -1
  404. package/dist/nodes/node/declare-paints.js.map +1 -1
  405. package/dist/nodes/node/node-editor-state.js.map +1 -1
  406. package/dist/nodes/node/node-reactive.js.map +1 -1
  407. package/dist/nodes/node/node-time.d.ts +3 -3
  408. package/dist/nodes/node/node-time.d.ts.map +1 -1
  409. package/dist/nodes/node/node-time.js +1 -1
  410. package/dist/nodes/node/node-time.js.map +1 -1
  411. package/dist/nodes/node/node-walk.js.map +1 -1
  412. package/dist/nodes/node/node.d.ts +5 -3
  413. package/dist/nodes/node/node.d.ts.map +1 -1
  414. package/dist/nodes/node/node.js +44 -19
  415. package/dist/nodes/node/node.js.map +1 -1
  416. package/dist/nodes/node/text-defaults.d.ts +10 -12
  417. package/dist/nodes/node/text-defaults.d.ts.map +1 -1
  418. package/dist/nodes/node/text-defaults.js +10 -12
  419. package/dist/nodes/node/text-defaults.js.map +1 -1
  420. package/dist/nodes/{scene → root}/canvas2d-node.d.ts +2 -2
  421. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
  422. package/dist/nodes/{scene → root}/canvas2d-node.js +2 -2
  423. package/dist/nodes/root/canvas2d-node.js.map +1 -0
  424. package/dist/nodes/root/provider-node.d.ts.map +1 -0
  425. package/dist/nodes/root/provider-node.js.map +1 -0
  426. package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
  427. package/dist/nodes/root/theme-provider-node.js.map +1 -0
  428. package/dist/nodes/text/default-text-style-node.d.ts +5 -2
  429. package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
  430. package/dist/nodes/text/default-text-style-node.js +10 -4
  431. package/dist/nodes/text/default-text-style-node.js.map +1 -1
  432. package/dist/nodes/text/number-format.d.ts +1 -1
  433. package/dist/nodes/text/number-format.js +1 -1
  434. package/dist/nodes/text/number-format.js.map +1 -1
  435. package/dist/nodes/text/number-node.js.map +1 -1
  436. package/dist/nodes/text/number-pattern.js.map +1 -1
  437. package/dist/nodes/text/richtext-node.js +1 -1
  438. package/dist/nodes/text/richtext-node.js.map +1 -1
  439. package/dist/nodes/text/text-base.d.ts.map +1 -1
  440. package/dist/nodes/text/text-base.js +1 -1
  441. package/dist/nodes/text/text-base.js.map +1 -1
  442. package/dist/nodes/text/text-node.js.map +1 -1
  443. package/dist/nodes/text/text-selection.js.map +1 -1
  444. package/dist/nodes/three/camera-nodes.d.ts +21 -3
  445. package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
  446. package/dist/nodes/three/camera-nodes.js +42 -1
  447. package/dist/nodes/three/camera-nodes.js.map +1 -1
  448. package/dist/nodes/three/canvas3d-node.d.ts +29 -6
  449. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  450. package/dist/nodes/three/canvas3d-node.js +44 -2
  451. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  452. package/dist/nodes/three/drawable-nodes.d.ts +25 -11
  453. package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
  454. package/dist/nodes/three/drawable-nodes.js +43 -13
  455. package/dist/nodes/three/drawable-nodes.js.map +1 -1
  456. package/dist/nodes/three/environment-nodes.d.ts +9 -3
  457. package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
  458. package/dist/nodes/three/environment-nodes.js.map +1 -1
  459. package/dist/nodes/three/geometry-nodes.d.ts +2 -2
  460. package/dist/nodes/three/geometry-nodes.js +2 -2
  461. package/dist/nodes/three/geometry-nodes.js.map +1 -1
  462. package/dist/nodes/three/grid-geometry3d.js.map +1 -1
  463. package/dist/nodes/three/group3d.js.map +1 -1
  464. package/dist/nodes/three/light-nodes.d.ts.map +1 -1
  465. package/dist/nodes/three/light-nodes.js +3 -3
  466. package/dist/nodes/three/light-nodes.js.map +1 -1
  467. package/dist/nodes/three/mesh3d.js.map +1 -1
  468. package/dist/nodes/three/node3d.d.ts +48 -0
  469. package/dist/nodes/three/node3d.d.ts.map +1 -1
  470. package/dist/nodes/three/node3d.js +53 -3
  471. package/dist/nodes/three/node3d.js.map +1 -1
  472. package/dist/platform/audio-sink.d.ts +2 -2
  473. package/dist/platform/audio-sink.d.ts.map +1 -1
  474. package/dist/platform/audio-sink.js.map +1 -1
  475. package/dist/platform/exporter.d.ts +13 -8
  476. package/dist/platform/exporter.d.ts.map +1 -1
  477. package/dist/platform/exporter.js.map +1 -1
  478. package/dist/platform/index.d.ts +1 -1
  479. package/dist/platform/index.d.ts.map +1 -1
  480. package/dist/platform/index.js.map +1 -1
  481. package/dist/platform/stepped-clock.js.map +1 -1
  482. package/dist/platform/storage-adapter.d.ts +12 -6
  483. package/dist/platform/storage-adapter.d.ts.map +1 -1
  484. package/dist/platform/storage-adapter.js +4 -0
  485. package/dist/platform/storage-adapter.js.map +1 -1
  486. package/dist/platform/ticker.d.ts +6 -0
  487. package/dist/platform/ticker.d.ts.map +1 -1
  488. package/dist/platform/ticker.js +6 -0
  489. package/dist/platform/ticker.js.map +1 -1
  490. package/dist/project/config.js.map +1 -1
  491. package/dist/project/index.js.map +1 -1
  492. package/dist/project/tree.d.ts +3 -3
  493. package/dist/project/tree.d.ts.map +1 -1
  494. package/dist/project/tree.js.map +1 -1
  495. package/dist/props/host.js.map +1 -1
  496. package/dist/props/index.js.map +1 -1
  497. package/dist/props/observer.js.map +1 -1
  498. package/dist/props/slot.js.map +1 -1
  499. package/dist/renamed-scene-names.d.ts +17 -0
  500. package/dist/renamed-scene-names.d.ts.map +1 -0
  501. package/dist/renamed-scene-names.js +9 -0
  502. package/dist/renamed-scene-names.js.map +1 -0
  503. package/dist/render/canvas-render-context2d.d.ts +2 -2
  504. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  505. package/dist/render/canvas-render-context2d.js.map +1 -1
  506. package/dist/render/clip-contains.js.map +1 -1
  507. package/dist/render/clip.js.map +1 -1
  508. package/dist/render/descriptors/ellipse.js.map +1 -1
  509. package/dist/render/descriptors/latex.js.map +1 -1
  510. package/dist/render/descriptors/line.js.map +1 -1
  511. package/dist/render/descriptors/path-builder.js.map +1 -1
  512. package/dist/render/descriptors/path.js.map +1 -1
  513. package/dist/render/descriptors/polygon.js.map +1 -1
  514. package/dist/render/descriptors/polygram.js.map +1 -1
  515. package/dist/render/descriptors/rect.js.map +1 -1
  516. package/dist/render/descriptors/richtext.js.map +1 -1
  517. package/dist/render/descriptors/shape.d.ts +12 -0
  518. package/dist/render/descriptors/shape.d.ts.map +1 -1
  519. package/dist/render/descriptors/shape.js.map +1 -1
  520. package/dist/render/descriptors/text.d.ts +2 -2
  521. package/dist/render/descriptors/text.js +2 -2
  522. package/dist/render/descriptors/text.js.map +1 -1
  523. package/dist/render/descriptors/transform.d.ts +2 -2
  524. package/dist/render/descriptors/transform.d.ts.map +1 -1
  525. package/dist/render/descriptors/transform.js.map +1 -1
  526. package/dist/render/graphics2d.d.ts +3 -3
  527. package/dist/render/graphics2d.d.ts.map +1 -1
  528. package/dist/render/graphics2d.js +1 -1
  529. package/dist/render/graphics2d.js.map +1 -1
  530. package/dist/render/index.js.map +1 -1
  531. package/dist/render/measure-context.js.map +1 -1
  532. package/dist/render/null-render-context.js.map +1 -1
  533. package/dist/render/render-context2d.d.ts +2 -2
  534. package/dist/render/render-context2d.d.ts.map +1 -1
  535. package/dist/render/render-context2d.js.map +1 -1
  536. package/dist/render/surface.js.map +1 -1
  537. package/dist/render/text-defaults.js.map +1 -1
  538. package/dist/render/text-layout.js.map +1 -1
  539. package/dist/render3d/bounds3d.d.ts.map +1 -1
  540. package/dist/render3d/bounds3d.js +4 -2
  541. package/dist/render3d/bounds3d.js.map +1 -1
  542. package/dist/render3d/builders.js.map +1 -1
  543. package/dist/render3d/camera.d.ts +6 -0
  544. package/dist/render3d/camera.d.ts.map +1 -1
  545. package/dist/render3d/camera.js +5 -3
  546. package/dist/render3d/camera.js.map +1 -1
  547. package/dist/render3d/fill3d.d.ts +2 -9
  548. package/dist/render3d/fill3d.d.ts.map +1 -1
  549. package/dist/render3d/fill3d.js +2 -13
  550. package/dist/render3d/fill3d.js.map +1 -1
  551. package/dist/render3d/geometry.d.ts +8 -1
  552. package/dist/render3d/geometry.d.ts.map +1 -1
  553. package/dist/render3d/geometry.js.map +1 -1
  554. package/dist/render3d/graphics3d.d.ts +8 -4
  555. package/dist/render3d/graphics3d.d.ts.map +1 -1
  556. package/dist/render3d/graphics3d.js +18 -10
  557. package/dist/render3d/graphics3d.js.map +1 -1
  558. package/dist/render3d/index.d.ts +1 -1
  559. package/dist/render3d/index.js +1 -1
  560. package/dist/render3d/index.js.map +1 -1
  561. package/dist/render3d/inert.d.ts +14 -0
  562. package/dist/render3d/inert.d.ts.map +1 -0
  563. package/dist/render3d/inert.js +62 -0
  564. package/dist/render3d/inert.js.map +1 -0
  565. package/dist/render3d/light.js.map +1 -1
  566. package/dist/render3d/material.d.ts +10 -5
  567. package/dist/render3d/material.d.ts.map +1 -1
  568. package/dist/render3d/material.js.map +1 -1
  569. package/dist/render3d/matrix4.js.map +1 -1
  570. package/dist/render3d/render-context3d.js.map +1 -1
  571. package/dist/render3d/resources.js.map +1 -1
  572. package/dist/render3d/rounded-box.js.map +1 -1
  573. package/dist/render3d/scene-settings.d.ts +23 -4
  574. package/dist/render3d/scene-settings.d.ts.map +1 -1
  575. package/dist/render3d/scene-settings.js.map +1 -1
  576. package/dist/render3d/scene3d.d.ts +11 -0
  577. package/dist/render3d/scene3d.d.ts.map +1 -1
  578. package/dist/render3d/scene3d.js +39 -6
  579. package/dist/render3d/scene3d.js.map +1 -1
  580. package/dist/render3d/segments.js.map +1 -1
  581. package/dist/render3d/texture.d.ts +9 -0
  582. package/dist/render3d/texture.d.ts.map +1 -1
  583. package/dist/render3d/texture.js +13 -0
  584. package/dist/render3d/texture.js.map +1 -1
  585. package/dist/render3d/tracking.js.map +1 -1
  586. package/dist/render3d/transform.d.ts +1 -1
  587. package/dist/render3d/transform.js.map +1 -1
  588. package/dist/render3d/vector3.d.ts +18 -1
  589. package/dist/render3d/vector3.d.ts.map +1 -1
  590. package/dist/render3d/vector3.js +27 -0
  591. package/dist/render3d/vector3.js.map +1 -1
  592. package/dist/render3d/walk.d.ts +1 -1
  593. package/dist/render3d/walk.d.ts.map +1 -1
  594. package/dist/render3d/walk.js +5 -1
  595. package/dist/render3d/walk.js.map +1 -1
  596. package/dist/runtime/asset-refine.js.map +1 -1
  597. package/dist/runtime/asset-timeline.js.map +1 -1
  598. package/dist/runtime/asset-update.js.map +1 -1
  599. package/dist/runtime/audio-index.js.map +1 -1
  600. package/dist/runtime/builtin-context.js.map +1 -1
  601. package/dist/runtime/clip-instance.d.ts +5 -3
  602. package/dist/runtime/clip-instance.d.ts.map +1 -1
  603. package/dist/runtime/clip-instance.js +10 -6
  604. package/dist/runtime/clip-instance.js.map +1 -1
  605. package/dist/runtime/clip-store.d.ts +9 -0
  606. package/dist/runtime/clip-store.d.ts.map +1 -1
  607. package/dist/runtime/clip-store.js +19 -0
  608. package/dist/runtime/clip-store.js.map +1 -1
  609. package/dist/runtime/engine.d.ts +5 -0
  610. package/dist/runtime/engine.d.ts.map +1 -1
  611. package/dist/runtime/engine.js +2 -0
  612. package/dist/runtime/engine.js.map +1 -1
  613. package/dist/runtime/frame-time.d.ts +31 -0
  614. package/dist/runtime/frame-time.d.ts.map +1 -0
  615. package/dist/runtime/frame-time.js +29 -0
  616. package/dist/runtime/frame-time.js.map +1 -0
  617. package/dist/runtime/index.d.ts +1 -0
  618. package/dist/runtime/index.d.ts.map +1 -1
  619. package/dist/runtime/index.js +1 -0
  620. package/dist/runtime/index.js.map +1 -1
  621. package/dist/runtime/node-picking.d.ts +44 -3
  622. package/dist/runtime/node-picking.d.ts.map +1 -1
  623. package/dist/runtime/node-picking.js +118 -3
  624. package/dist/runtime/node-picking.js.map +1 -1
  625. package/dist/runtime/node-picking3d.d.ts +2 -1
  626. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  627. package/dist/runtime/node-picking3d.js +5 -2
  628. package/dist/runtime/node-picking3d.js.map +1 -1
  629. package/dist/runtime/placement.d.ts.map +1 -1
  630. package/dist/runtime/placement.js +4 -5
  631. package/dist/runtime/placement.js.map +1 -1
  632. package/dist/runtime/playback-controller.d.ts +31 -2
  633. package/dist/runtime/playback-controller.d.ts.map +1 -1
  634. package/dist/runtime/playback-controller.js +63 -6
  635. package/dist/runtime/playback-controller.js.map +1 -1
  636. package/dist/runtime/playback.js.map +1 -1
  637. package/dist/runtime/precompisition.js.map +1 -1
  638. package/dist/runtime/project-assets.js.map +1 -1
  639. package/dist/runtime/session.d.ts +9 -7
  640. package/dist/runtime/session.d.ts.map +1 -1
  641. package/dist/runtime/session.js +12 -4
  642. package/dist/runtime/session.js.map +1 -1
  643. package/dist/runtime/settle.js.map +1 -1
  644. package/dist/runtime/state-evaluator.d.ts +1 -1
  645. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  646. package/dist/runtime/state-evaluator.js +4 -3
  647. package/dist/runtime/state-evaluator.js.map +1 -1
  648. package/dist/runtime/text-geometry.js.map +1 -1
  649. package/dist/sdk/index.d.ts +19 -15
  650. package/dist/sdk/index.d.ts.map +1 -1
  651. package/dist/sdk/index.js +11 -6
  652. package/dist/sdk/index.js.map +1 -1
  653. package/dist/tween/command-decorator.d.ts +2 -0
  654. package/dist/tween/command-decorator.d.ts.map +1 -1
  655. package/dist/tween/command-decorator.js.map +1 -1
  656. package/dist/tween/command.js.map +1 -1
  657. package/dist/tween/ease/constants.d.ts.map +1 -1
  658. package/dist/tween/ease/constants.js +8 -5
  659. package/dist/tween/ease/constants.js.map +1 -1
  660. package/dist/tween/ease/curve.d.ts.map +1 -1
  661. package/dist/tween/ease/curve.js +4 -3
  662. package/dist/tween/ease/curve.js.map +1 -1
  663. package/dist/tween/ease/describe.d.ts +15 -0
  664. package/dist/tween/ease/describe.d.ts.map +1 -0
  665. package/dist/tween/ease/describe.js +37 -0
  666. package/dist/tween/ease/describe.js.map +1 -0
  667. package/dist/tween/ease/type.js.map +1 -1
  668. package/dist/tween/index.js.map +1 -1
  669. package/dist/tween/inert.js.map +1 -1
  670. package/dist/tween/lerp.js.map +1 -1
  671. package/dist/tween/loop.js.map +1 -1
  672. package/dist/tween/prepare.d.ts +3 -3
  673. package/dist/tween/prepare.js +3 -3
  674. package/dist/tween/prepare.js.map +1 -1
  675. package/dist/tween/seekable.d.ts +1 -1
  676. package/dist/tween/seekable.js.map +1 -1
  677. package/dist/tween/stepper.js.map +1 -1
  678. package/dist/tween/to-command.js.map +1 -1
  679. package/dist/util/clamp.js.map +1 -1
  680. package/dist/util/context.js.map +1 -1
  681. package/dist/util/csv.js.map +1 -1
  682. package/dist/util/generateList.js.map +1 -1
  683. package/dist/util/index.js.map +1 -1
  684. package/dist/util/metrics.d.ts +1 -1
  685. package/dist/util/metrics.js +1 -1
  686. package/dist/util/metrics.js.map +1 -1
  687. package/dist/util/random.js.map +1 -1
  688. package/dist/util/reference.js.map +1 -1
  689. package/dist/util/scheduler.js.map +1 -1
  690. package/package.json +2 -1
  691. package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
  692. package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
  693. package/dist/attributes/shape/effects/implementations/displace.js +0 -30
  694. package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
  695. package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
  696. package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
  697. package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
  698. package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
  699. package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
  700. package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
  701. package/dist/attributes/shape/effects/implementations/texture.js +0 -25
  702. package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
  703. package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
  704. package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
  705. package/dist/attributes/shape/effects/implementations/trails.js +0 -22
  706. package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
  707. package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
  708. package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
  709. package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
  710. package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
  711. package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
  712. package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
  713. package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
  714. package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
  715. package/dist/nodes/geometry/dot-grid-node.js +0 -142
  716. package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
  717. package/dist/nodes/geometry/grid-lines.d.ts +0 -101
  718. package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
  719. package/dist/nodes/geometry/grid-lines.js +0 -128
  720. package/dist/nodes/geometry/grid-lines.js.map +0 -1
  721. package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
  722. package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
  723. package/dist/nodes/geometry/grid-pattern-node.js +0 -172
  724. package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
  725. package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
  726. package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
  727. package/dist/nodes/geometry/line-grid-node.js +0 -127
  728. package/dist/nodes/geometry/line-grid-node.js.map +0 -1
  729. package/dist/nodes/geometry/line-node.d.ts +0 -58
  730. package/dist/nodes/geometry/line-node.d.ts.map +0 -1
  731. package/dist/nodes/geometry/line-node.js +0 -123
  732. package/dist/nodes/geometry/line-node.js.map +0 -1
  733. package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
  734. package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
  735. package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
  736. package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
  737. package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
  738. package/dist/nodes/scene/canvas2d-node.js.map +0 -1
  739. package/dist/nodes/scene/provider-node.d.ts.map +0 -1
  740. package/dist/nodes/scene/provider-node.js.map +0 -1
  741. package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
  742. package/dist/nodes/scene/theme-provider-node.js.map +0 -1
  743. /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
  744. /package/dist/nodes/{scene → root}/provider-node.js +0 -0
  745. /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
  746. /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Node } from "../nodes/node/node.js";
2
- import { Node2D } from "../nodes/2d/node2d.js";
2
+ import { Node2D, type NodeHandle } from "../nodes/2d/node2d.js";
3
3
  import { Vector2 } from "../attributes/layout/vector2.js";
4
4
  import { Matrix2D } from "../attributes/layout/matrix2d.js";
5
5
  import { type Node3DFrame } from "./node-picking3d.js";
@@ -37,8 +37,8 @@ export interface NodeBox {
37
37
  /**
38
38
  * Size of the box before rotation/scale, in scene units — the node's layout
39
39
  * size for everything whose drawing fills its cell, and the ink's own extent
40
- * where the two differ (see {@link Node2D._localBounds}; a `Line` reports the
41
- * span of its `points`, not its layout rect).
40
+ * where the two differ (see {@link Node2D._localBounds}; a boolean group
41
+ * reports the extent of its children's ink, not its layout rect).
42
42
  */
43
43
  width: number;
44
44
  height: number;
@@ -90,8 +90,49 @@ export declare function renderMatrix(node: Node2D): Matrix2D;
90
90
  * Two answers differ by exactly the change of `x`/`y` that carries the node from
91
91
  * one point to the other — what a move handle needs once a node can sit in
92
92
  * depth, where a screen delta is no longer a parent delta.
93
+ *
94
+ * Under a parent with coordinates of its own (`Node2D._planeOf`) the answer is
95
+ * in them, and is the `x`/`y` that centres the node on `point`.
93
96
  */
94
97
  export declare function parentPlanePointAt(root: Node2D, path: string, point: Vector2): Vector2 | null;
98
+ /**
99
+ * Where `point` (viewport space) lands in the coordinates the node at `path`
100
+ * positions its children in ({@link Node2D._planeOf}): the `x`/`y` a child takes
101
+ * to be centred there, before it exists. `null` when that node's children are
102
+ * positioned in pixels, which is how a host tells the two apart.
103
+ */
104
+ export declare function childPlanePointAt(root: Node2D, path: string, point: Vector2): Vector2 | null;
105
+ /**
106
+ * What keeps the node at `path` looking exactly as it does once it moves under
107
+ * the node at `parentPath`, as a design tool does: each of `offsets` (an
108
+ * `x`/`y` it takes under its parent now: its own, or where a move takes it)
109
+ * carried to the one that puts its centre at the same place there, and the
110
+ * `turn` to add to its rotation and the `scale` to multiply its scale by so
111
+ * the parents' own turn and scale, cameras included, are undone. `null` when
112
+ * that parent arranges its children in a run or a grid, sits inside the node,
113
+ * or either is not here.
114
+ */
115
+ export declare function reparentPlacementAt(root: Node2D, path: string, parentPath: string, offsets: readonly Vector2[]): ReparentPlacement | null;
116
+ /** What {@link reparentPlacementAt} answers. */
117
+ export interface ReparentPlacement {
118
+ /** Each offset asked about, under the new parent. */
119
+ offsets: Vector2[];
120
+ /** Degrees (clockwise) to add to the node's rotation, and to where its turns end. */
121
+ turn: number;
122
+ /** The factor to multiply the node's scale by, and where its scalings end. */
123
+ scale: number;
124
+ }
125
+ /**
126
+ * The node at `path`'s {@link NodeHandle}s with `at` in viewport space, where the
127
+ * pixels put them; `null` when the path names no 2D node.
128
+ */
129
+ export declare function nodeHandlesAt(root: Node2D, path: string): NodeHandle[] | null;
130
+ /**
131
+ * The value of `prop` that puts its handle on the node at `path` under `point`
132
+ * (viewport space), or `null` when there is no such handle or the point is off
133
+ * the node's plane.
134
+ */
135
+ export declare function handleValueAt(root: Node2D, path: string, prop: string, point: Vector2): Vector2 | null;
95
136
  /** Build the viewport-space box for `node` at the current frame. */
96
137
  export declare function nodeBox(node: Node2D, path: string): NodeBox;
97
138
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"node-picking.d.ts","sourceRoot":"","sources":["../../src/runtime/node-picking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAA2E,MAAM,8BAA8B,CAAC;AAKjI,OAAO,EAAiE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACpB,2FAA2F;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAA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ACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAoBpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAS9D;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,SAAS,OAAO,EAAE,EAChC,WAAW,EAAE,SAAS,OAAO,EAAE,GAChC,WAAW,GAAG,IAAI,CAgBpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,GAAG,IAAI,CAEpF;AAwCD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAkB9F"}
@@ -61,6 +61,9 @@ function childrenMatrix(parent) {
61
61
  * Two answers differ by exactly the change of `x`/`y` that carries the node from
62
62
  * one point to the other — what a move handle needs once a node can sit in
63
63
  * depth, where a screen delta is no longer a parent delta.
64
+ *
65
+ * Under a parent with coordinates of its own (`Node2D._planeOf`) the answer is
66
+ * in them, and is the `x`/`y` that centres the node on `point`.
64
67
  */
65
68
  export function parentPlanePointAt(root, path, point) {
66
69
  if (path === "")
@@ -76,7 +79,119 @@ export function parentPlanePointAt(root, path, point) {
76
79
  const p = applyToPoint(inv, { x: point.x, y: -point.y });
77
80
  if (behindCamera(m, p))
78
81
  return null;
79
- return { x: p.x, y: -p.y };
82
+ const plane = parent._planeOf(node);
83
+ if (!plane)
84
+ return { x: p.x, y: -p.y };
85
+ // A slot's frame is already centred on the node's box; the parent's is not.
86
+ const box = node._placement() ? null : node.layoutBounds;
87
+ return plane.toCoords(p.x - (box?.x ?? 0), (box?.y ?? 0) - p.y);
88
+ }
89
+ /**
90
+ * Where `point` (viewport space) lands in the coordinates the node at `path`
91
+ * positions its children in ({@link Node2D._planeOf}): the `x`/`y` a child takes
92
+ * to be centred there, before it exists. `null` when that node's children are
93
+ * positioned in pixels, which is how a host tells the two apart.
94
+ */
95
+ export function childPlanePointAt(root, path, point) {
96
+ const parent = nodeAt(root, path);
97
+ if (!(parent instanceof Node2D))
98
+ return null;
99
+ const plane = parent._planeOf(null);
100
+ if (!plane)
101
+ return null;
102
+ const inv = invert(childrenMatrix(parent));
103
+ if (!inv)
104
+ return null;
105
+ const p = applyToPoint(inv, { x: point.x, y: -point.y });
106
+ return plane.toCoords(p.x, -p.y);
107
+ }
108
+ /**
109
+ * What keeps the node at `path` looking exactly as it does once it moves under
110
+ * the node at `parentPath`, as a design tool does: each of `offsets` (an
111
+ * `x`/`y` it takes under its parent now: its own, or where a move takes it)
112
+ * carried to the one that puts its centre at the same place there, and the
113
+ * `turn` to add to its rotation and the `scale` to multiply its scale by so
114
+ * the parents' own turn and scale, cameras included, are undone. `null` when
115
+ * that parent arranges its children in a run or a grid, sits inside the node,
116
+ * or either is not here.
117
+ */
118
+ export function reparentPlacementAt(root, path, parentPath, offsets) {
119
+ const node = nodeAt(root, path);
120
+ const to = nodeAt(root, parentPath);
121
+ const from = node instanceof Node2D ? node.parent : null;
122
+ if (!(node instanceof Node2D) || !(from instanceof Node2D) || !(to instanceof Node2D))
123
+ return null;
124
+ for (let at = to; at; at = at.parent)
125
+ if (at === node)
126
+ return null;
127
+ const box = node.layoutBounds;
128
+ const plane = to._planeOf(null);
129
+ const slot = plane ? null : to._slotFor({ width: box?.width ?? 0, height: box?.height ?? 0 });
130
+ if (!plane && !slot)
131
+ return null;
132
+ const along = movePlaneMatrix(node, from);
133
+ const back = invert(along);
134
+ const into = invert(childrenMatrix(to));
135
+ if (!back || !into)
136
+ return null;
137
+ const placed = node._placement();
138
+ const was = childFold(from);
139
+ const will = childFold(to);
140
+ const turn = was.rotation + (placed?.rotation ?? 0) - will.rotation;
141
+ const scale = will.scale === 0 ? 1 : (was.scale * (placed?.scale ?? 1)) / will.scale;
142
+ const shift = node._centreShift(node.rotation + turn, node.scale * scale);
143
+ // The plane the node's x/y move it on, where its centre is drawn now.
144
+ const here = applyToPoint(back, applyToPoint(renderMatrix(node), { x: 0, y: 0 }));
145
+ const own = from._planeOf(node);
146
+ const pixels = (offset) => (own ? { ...own.toOffset(offset.x, offset.y) } : offset);
147
+ const now = pixels({ x: node.x, y: node.y });
148
+ const moved = offsets.map((offset) => {
149
+ const o = pixels(offset);
150
+ const drawn = applyToPoint(along, { x: here.x + o.x - now.x, y: here.y - (o.y - now.y) });
151
+ const centre = applyToPoint(into, drawn);
152
+ const x = centre.x - shift.x;
153
+ const y = centre.y - shift.y;
154
+ return plane ? plane.toCoords(x, -y) : { x: x - slot.x, y: slot.y - y };
155
+ });
156
+ return { offsets: moved, turn, scale };
157
+ }
158
+ /** The rotation and scale a child of `parent` is drawn under: its fold, then the camera it opens. */
159
+ function childFold(parent) {
160
+ const folded = foldedTransform(parent);
161
+ const cam = parent._cameraScope();
162
+ return cam ? { rotation: folded.rotation - cam.heading, scale: folded.scale * cam.zoom } : folded;
163
+ }
164
+ /**
165
+ * The node at `path`'s {@link NodeHandle}s with `at` in viewport space, where the
166
+ * pixels put them; `null` when the path names no 2D node.
167
+ */
168
+ export function nodeHandlesAt(root, path) {
169
+ const node = nodeAt(root, path);
170
+ if (!(node instanceof Node2D))
171
+ return null;
172
+ const m = renderMatrix(node);
173
+ return node._handles().map(({ prop, at }) => {
174
+ const p = applyToPoint(m, { x: at.x, y: -at.y });
175
+ return { prop, at: { x: p.x, y: -p.y } };
176
+ });
177
+ }
178
+ /**
179
+ * The value of `prop` that puts its handle on the node at `path` under `point`
180
+ * (viewport space), or `null` when there is no such handle or the point is off
181
+ * the node's plane.
182
+ */
183
+ export function handleValueAt(root, path, prop, point) {
184
+ const node = nodeAt(root, path);
185
+ if (!(node instanceof Node2D))
186
+ return null;
187
+ const m = renderMatrix(node);
188
+ const inv = invert(m);
189
+ if (!inv)
190
+ return null;
191
+ const p = applyToPoint(inv, { x: point.x, y: -point.y });
192
+ if (behindCamera(m, p))
193
+ return null;
194
+ return node._handleValue(prop, { x: p.x, y: -p.y });
80
195
  }
81
196
  /** The parent's frame at the node's depth, onto the screen: the plane its `x`/`y` slide it across. */
82
197
  function movePlaneMatrix(node, parent) {
@@ -129,7 +244,7 @@ export function nodeBox(node, path) {
129
244
  const b = node._localBounds();
130
245
  // `worldAnchors` maps offsets centred on the matrix's origin, so shift the
131
246
  // matrix onto the bounds' own centre first — that is what lets a node whose
132
- // ink is off-centre (a Line) report a box that actually sits on the ink.
247
+ // ink is off-centre report a box that actually sits on the ink.
133
248
  // The matrix is canvas y-down; the bounds are y-up, hence the sign on y.
134
249
  const m = b.x === 0 && b.y === 0
135
250
  ? renderMatrix(node)
@@ -182,7 +297,7 @@ export function nodeBoxAt(root, path) {
182
297
  if (node instanceof Node2D)
183
298
  return nodeBox(node, path);
184
299
  // A 3D node: ask the viewport that holds it. There is always one — a `Node3D`
185
- // cannot be parented anywhere else (motion-script throws rather than allowing
300
+ // cannot be parented anywhere else (the engine throws rather than allowing
186
301
  // it) — so a `null` here is a malformed tree rather than a missing case.
187
302
  if (!canvas)
188
303
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"node-picking.js","sourceRoot":"","sources":["../../src/runtime/node-picking.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAY,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjI,OAAO,EAAE,YAA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AC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import { Node } from \"@/nodes/node/node\";\nimport { Node2D } from \"@/nodes/2d/node2d\";\nimport { Canvas3D } from \"@/nodes/three/canvas3d-node\";\nimport { Vector2 } from \"@/attributes/layout/vector2\";\nimport { Matrix2D, multiply, invert, applyToPoint, cameraMatrix, translation, isProjective } from \"@/attributes/layout/matrix2d\";\nimport { worldAnchors } from \"@/nodes/2d/node-transform\";\nimport { spaceChildFrame, spaceChildOrder, spaceFrameForChildren, spaceFrameOf, spaceRootFrame } from \"@/nodes/2d/node-space\";\nimport { multiplyAffine3, spaceScreenMatrix } from \"@/attributes/layout/space3d\";\nimport { nodePath } from \"@/project/tree\";\nimport { collectBoxes3D, pickNode3D, projectNode3D, type Canvas3DFrame, type Node3DFrame } from \"./node-picking3d\";\nimport type { Vector3 } from \"@/render3d/vector3\";\n\n/**\n * Pure geometry for editor-style direct manipulation: where a node's pixels\n * landed, and which node is under a point. No controller state, so it can be\n * exercised against hand-built node trees.\n *\n * **Space.** Everything here is in *viewport space*: origin at the viewport\n * centre, y-up, units = the viewport pixels the player was given. That is the\n * same space `Node2D.global` reports, plus the camera — see {@link renderMatrix}.\n */\n\n/**\n * A node's on-screen box at the current frame, in viewport space (origin at the\n * viewport centre, y-up).\n *\n * Unlike {@link Node2D.global} this folds in any active camera scope, so it\n * describes where the node's pixels actually landed — which is what an editor\n * overlay needs in order to draw a selection box over them.\n */\nexport interface NodeBox {\n /** Per-instance id — changes on every rebuild. Use {@link path} to key across rebuilds. */\n id: string;\n /** Structural path from the scene root (`\"\"` is the root); stable across rebuilds. */\n path: string;\n /** Node2D class name, e.g. `Rect`, `Text`. */\n type: string;\n /** Corners in draw order, viewport space. Rotated/scaled — not axis-aligned. */\n topLeft: Vector2;\n topRight: Vector2;\n bottomRight: Vector2;\n bottomLeft: Vector2;\n center: Vector2;\n /**\n * Size of the box before rotation/scale, in scene units — the node's layout\n * size for everything whose drawing fills its cell, and the ink's own extent\n * where the two differ (see {@link Node2D._localBounds}; a `Line` reports the\n * span of its `points`, not its layout rect).\n */\n width: number;\n height: number;\n /** Folded rotation (degrees clockwise) and uniform scale, camera included. */\n rotation: number;\n scale: number;\n /** Effective alpha; `0` means the node is present but invisible. */\n opacity: number;\n /**\n * The editor's padlock — see {@link NodeEditorState.locked}.\n *\n * Carried here rather than left for the host to look up, because the two\n * things that need it are a marquee sweep and a gizmo's handles, and both are\n * already holding the box. A locked node is never returned by\n * {@link pickNode}; it appears in {@link collectBoxes} so a host can still\n * outline one selected from its layer tree.\n */\n locked: boolean;\n}\n\n/**\n * The renderer's CTM at `node` — every ancestor's local matrix from the scene\n * root down, with a camera scope inserted wherever an ancestor pushes one\n * ({@link Node2D._cameraScope}; `Canvas2D`/`Camera` call `beginCamera` between\n * their own transform and their children's).\n *\n * A node inside a 2.5D space is placed by its frame instead — the whole\n * projection from its own plane to the space root's, built by the same\n * `node-space.ts` the renderer uses — so it is a homography, and `nodeBox`\n * reports the projected corners.\n *\n * Mirrors the render walk exactly, including the camera's `translate(rect.x,\n * -rect.y)` — if a box ever disagrees with the pixels, the divergence is here.\n *\n * `@internal`, and shared with `text-geometry.ts`: a caret drawn over a node has\n * to land in the same space as the box drawn around it, so both must come from\n * this one walk rather than two that agree by inspection.\n */\n/** @internal */\nexport function renderMatrix(node: Node2D): Matrix2D {\n const frame = spaceFrameOf(node);\n if (frame) return multiply(renderMatrix(frame.root), frame.screen);\n const parent = node.parent;\n return parent ? multiply(childrenMatrix(parent), node._localMatrix()) : node._localMatrix();\n}\n\n/**\n * The CTM `parent`'s children are placed under, before their own transform: its\n * render matrix, then whatever camera it opens. For a space root that is the\n * camera over its own plane; inside a space it is the parent's own frame, since\n * a child's place is measured in its parent's plane.\n */\nfunction childrenMatrix(parent: Node2D): Matrix2D {\n const m = renderMatrix(parent);\n const camera = parent._spaceCamera();\n if (camera) return multiply(m, spaceRootFrame(parent, camera).screen);\n const cam = parent._cameraScope();\n if (!cam) return m;\n const r = parent.layoutBounds;\n return multiply(m, cameraMatrix(r.x, -r.y, cam.lookAt, cam.zoom, cam.heading));\n}\n\n/**\n * Where `point` (viewport space) lands on the plane the node at `path` moves in\n * when its `x`/`y` change — its parent's, through any camera in between, pushed\n * out to the node's own `depth` in a space — in its parent's frame: centred on\n * the parent (on its slot, for a node a parent places — see `ChildPlacement`),\n * y-up. `null` when the path does not name a 2D node below the\n * root, or that plane cannot be reached at that point (edge-on, or the point is\n * behind the camera).\n *\n * Two answers differ by exactly the change of `x`/`y` that carries the node from\n * one point to the other — what a move handle needs once a node can sit in\n * depth, where a screen delta is no longer a parent delta.\n */\nexport function parentPlanePointAt(root: Node2D, path: string, point: Vector2): Vector2 | null {\n if (path === \"\") return null;\n const node = nodeAt(root, path);\n const parent = node instanceof Node2D ? node.parent : null;\n if (!(node instanceof Node2D) || !parent) return null;\n const m = movePlaneMatrix(node, parent);\n const inv = invert(m);\n if (!inv) return null;\n const p = applyToPoint(inv, { x: point.x, y: -point.y });\n if (behindCamera(m, p)) return null;\n return { x: p.x, y: -p.y };\n}\n\n/** The parent's frame at the node's depth, onto the screen: the plane its `x`/`y` slide it across. */\nfunction movePlaneMatrix(node: Node2D, parent: Node2D): Matrix2D {\n const frame = spaceFrameOf(node) ? spaceFrameForChildren(parent) : null;\n if (!frame) {\n // A slotted node's `x`/`y` move it within its slot, which may be turned.\n const slot = node._slotMatrix();\n return slot ? multiply(childrenMatrix(parent), slot) : childrenMatrix(parent);\n }\n const slot = node._slotAffine();\n const plane = slot ? multiplyAffine3(frame.view, slot) : frame.view;\n const atDepth = multiplyAffine3(plane, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, node.depth]);\n return multiply(renderMatrix(frame.root), spaceScreenMatrix(frame.camera, atDepth));\n}\n\n/**\n * Under a perspective the inverse also answers for the plane's reflection behind\n * the camera: a point there projects to the same pixel with a negative `w`, and\n * is not on screen at all.\n */\nfunction behindCamera(m: Matrix2D, local: Vector2): boolean {\n return isProjective(m) && (m.g ?? 0) * local.x + (m.h ?? 0) * local.y + (m.i ?? 1) <= 0;\n}\n\n/**\n * Folded rotation / scale / opacity from the scene root down to `node`, matching\n * the renderer's nested transforms and its pass-through alpha fold. The same\n * accumulation {@link Node2D.global} does, extended with the camera scopes: a\n * camera multiplies the scale by its `zoom` and adds `-heading` to the rotation\n * (the renderer applies `rotate(-heading)`).\n */\nfunction foldedTransform(node: Node2D): { rotation: number; scale: number; opacity: number } {\n let rotation = 0;\n let scale = 1;\n let opacity = 1;\n for (let n: Node2D | null = node; n; n = n.parent) {\n const slot = n._placement();\n rotation += n.rotation + (slot?.rotation ?? 0);\n scale *= n.scale * (slot?.scale ?? 1);\n opacity *= n.opacity * (slot?.opacity ?? 1);\n // Skip the node's own camera: it scopes its children, not itself.\n const cam = n !== node ? n._cameraScope() : null;\n if (cam) {\n rotation -= cam.heading;\n scale *= cam.zoom;\n }\n }\n return { rotation, scale, opacity };\n}\n\n/** Build the viewport-space box for `node` at the current frame. */\nexport function nodeBox(node: Node2D, path: string): NodeBox {\n const b = node._localBounds();\n // `worldAnchors` maps offsets centred on the matrix's origin, so shift the\n // matrix onto the bounds' own centre first — that is what lets a node whose\n // ink is off-centre (a Line) report a box that actually sits on the ink.\n // The matrix is canvas y-down; the bounds are y-up, hence the sign on y.\n const m = b.x === 0 && b.y === 0\n ? renderMatrix(node)\n : multiply(renderMatrix(node), translation(b.x, -b.y));\n const anchors = worldAnchors(m, b.width / 2, b.height / 2);\n const folded = foldedTransform(node);\n return {\n id: node.id,\n path,\n type: node.className,\n topLeft: anchors.topLeft,\n topRight: anchors.topRight,\n bottomRight: anchors.bottomRight,\n bottomLeft: anchors.bottomLeft,\n center: anchors.center,\n width: b.width,\n height: b.height,\n rotation: folded.rotation,\n scale: folded.scale,\n opacity: folded.opacity,\n locked: node.locked,\n };\n}\n\n/**\n * The box at a structural path, in either dimension, or `null` when the path\n * doesn't resolve.\n *\n * The one entry point that answers for a 3D node as well as a 2D one, which a\n * bare {@link nodeBox} cannot: a mesh is not a `Node2D` and has no box of its\n * own — what it has is a projection into the viewport that holds it, and finding\n * that viewport is part of resolving the path (see `node-picking3d.ts`).\n *\n * Walks {@link Node._allChildren}, so the paths it accepts are the ones every\n * other structural walk in the engine produces.\n */\nexport function nodeBoxAt(root: Node2D, path: string): NodeBox | null {\n if (path === \"\") return nodeBox(root, path);\n\n let node: Node = root;\n let canvas: { node: Canvas3D; path: string } | null = null;\n const segments = path.split(\".\");\n for (let i = 0; i < segments.length; i++) {\n if (node instanceof Canvas3D) canvas = { node, path: prefixPath(segments, i) };\n const next = node._allChildren[Number(segments[i])];\n if (!next) return null;\n node = next;\n }\n\n if (node instanceof Node2D) return nodeBox(node, path);\n // A 3D node: ask the viewport that holds it. There is always one — a `Node3D`\n // cannot be parented anywhere else (motion-script throws rather than allowing\n // it) — so a `null` here is a malformed tree rather than a missing case.\n if (!canvas) return null;\n const frame = canvas3DFrame(canvas.node, canvas.path);\n return collectBoxes3D(canvas.node, frame, canvas.path).find((box) => box.path === path) ?? null;\n}\n\n/**\n * The node at a structural path, in either dimension, or `null` when the path\n * doesn't resolve.\n *\n * The resolution half of {@link nodeBoxAt}, split out for callers that want the\n * node rather than its box — `PlaybackController.getNodePropsAt`, which reads a\n * node's own props in its own space. Walks {@link Node._allChildren}, so it\n * accepts the same paths every other structural walk in the engine produces.\n */\nexport function nodeAt(root: Node2D, path: string): Node | null {\n if (path === \"\") return root;\n let node: Node = root;\n for (const segment of path.split(\".\")) {\n const next = node._allChildren[Number(segment)];\n if (!next) return null;\n node = next;\n }\n return node;\n}\n\n/** The first `count` segments of a split path, rejoined. */\nfunction prefixPath(segments: readonly string[], count: number): string {\n return segments.slice(0, count).join(\".\");\n}\n\n/**\n * Project a handful of points around the `Node3D` at `path`, or `null` when\n * the path doesn't resolve to a 3D node — a gizmo's counterpart to\n * {@link nodeBoxAt}, for the one thing a box can't answer: where would an\n * arbitrary point *near* the node, not just its extent, land on screen. See\n * {@link Node3DFrame} for the two point sets and the space each is in.\n *\n * `null` for a 2D path too, unlike `nodeBoxAt` — a `Node2D` has no matrix a\n * caller would ask this for; {@link nodeBox} already answers everything a 2D\n * handle needs directly in viewport space.\n */\nexport function projectNode3DAt(\n root: Node2D,\n path: string,\n parentPoints: readonly Vector3[],\n localPoints: readonly Vector3[],\n): Node3DFrame | null {\n if (path === \"\") return null;\n\n let node: Node = root;\n let canvas: { node: Canvas3D; path: string } | null = null;\n const segments = path.split(\".\");\n for (let i = 0; i < segments.length; i++) {\n if (node instanceof Canvas3D) canvas = { node, path: prefixPath(segments, i) };\n const next = node._allChildren[Number(segments[i])];\n if (!next) return null;\n node = next;\n }\n\n if (node instanceof Node2D || !canvas) return null;\n const frame = canvas3DFrame(canvas.node, canvas.path);\n return projectNode3D(canvas.node, frame, canvas.path, path, parentPoints, localPoints);\n}\n\n/**\n * The topmost node whose hit region contains `point` (viewport space, y-up,\n * origin at the viewport centre), or `null`. Children paint over their parent and\n * later siblings over earlier ones, so the walk tests children last-to-first\n * before falling back to the node itself.\n *\n * Skips fully transparent nodes — a scene built with spawn delays keeps\n * not-yet-visible nodes in the tree at `opacity: 0`, and those must not be\n * selectable. A node that clips (or pushes a camera, which clips to its viewport)\n * confines its subtree: a point outside its box cannot hit anything inside it.\n * The scene root is never returned; it is the stage, not a selectable node.\n *\n * The hit region is {@link Node2D.hitTestSelf} — the rotated layout box by default,\n * narrowed to the declared outline for shapes. A click in the corner of a rect's\n * box selects it; a click in the empty notch of a star's box does not.\n *\n * `tolerance` is grab-slop in scene units, applied outward from the ink. A host\n * passes its zoom-corrected pixel slop so the grab area stays constant on screen.\n * It is what makes thin shapes reachable.\n *\n * Cost: {@link renderMatrix} walks to the root per node, making a pick O(depth²).\n * Scene trees here are shallow (tens of nodes, depth < 10), so this is fine at\n * pointer rate. If it ever matters, thread the parent's accumulated matrix down\n * through the walk instead of recomputing — a change confined to this file.\n */\nexport function pickNode(root: Node2D, point: Vector2, tolerance = 0): NodeBox | null {\n return pickIn(root, \"\", point, tolerance, true);\n}\n\nfunction pickIn(node: Node2D, path: string, point: Vector2, tolerance: number, isRoot: boolean): NodeBox | null {\n if (node.opacity === 0 || node.hidden) return null;\n const drawn = spaceVisibility(node, isRoot);\n if (drawn === \"none\") return null;\n\n const inside = drawn === \"all\" && containsPoint(node, point, tolerance);\n // A clipping node (or one that opens a camera viewport) gates its subtree —\n // unless it is drawing nothing of its own, when it clips nothing either.\n if (!inside && drawn === \"all\" && node._confinesChildren()) return null;\n\n // A `Canvas3D`'s children come in both dimensions, and its 2D ones are\n // indexed against the *whole* list — see {@link childSlots}.\n const children = childSlots(node);\n const order = paintOrder(node, children);\n for (let k = order.length - 1; k >= 0; k--) {\n const i = order[k];\n const slot = children[i];\n if (slot === null) continue;\n const hit = pickIn(slot, nodePath(path, i), point, tolerance, false);\n if (hit) return hit;\n }\n\n // The 3D scene draws under the 2D children and over the canvas's own fill, so\n // it is tested in that order too: a HUD label wins over the mesh behind it,\n // and the mesh wins over the viewport it sits in.\n if (node instanceof Canvas3D && inside) {\n const hit = pickNode3D(node, canvas3DFrame(node, path), point, tolerance, path);\n if (hit) return hit;\n }\n\n if (isRoot) return null;\n // A locked node declines to *be* the answer while still having gated its\n // subtree above — so a click inside a locked group lands on nothing rather\n // than falling through to whatever is behind the group.\n if (node.locked) return null;\n return inside ? nodeBox(node, path) : null;\n}\n\n/**\n * Collect every visible node's box in draw order (parents before children, so a\n * host can paint them in the order the renderer did). Skips `opacity: 0` nodes\n * and the scene root, matching {@link pickNode}.\n *\n * A `Canvas3D` also contributes a box per `Node3D` inside it, projected into its\n * plane — see `node-picking3d.ts`. They sit after the viewport's own box and\n * before its 2D children's, which is where the 3D pass is painted; among\n * themselves they are ordered **near camera first**, because a 3D scene has no\n * draw order of its own for them to be in.\n */\nexport function collectBoxes(node: Node2D, path: string, out: NodeBox[], isRoot: boolean): void {\n if (node.opacity === 0 || node.hidden) return;\n const drawn = spaceVisibility(node, isRoot);\n if (drawn === \"none\") return;\n // Locked nodes keep their box — a host still has to draw a selection outline\n // around one picked from its layer tree. What the box carries is the flag, so\n // a marquee can leave it out without a second walk.\n if (!isRoot && drawn === \"all\") out.push(nodeBox(node, path));\n\n if (node instanceof Canvas3D) {\n for (const box of collectBoxes3D(node, canvas3DFrame(node, path), path)) out.push(box);\n }\n\n const children = childSlots(node);\n for (const i of paintOrder(node, children)) {\n const slot = children[i];\n if (slot !== null) collectBoxes(slot, nodePath(path, i), out, false);\n }\n}\n\n/**\n * How much of `node` a space lets the renderer draw: `\"all\"` outside a space and\n * for a node facing the camera in front of it; `\"children\"` for one edge-on or\n * behind the lens, whose own paint is skipped while its children, placed by\n * frames of their own, are not; `\"none\"` for one the renderer skips outright — a\n * hidden back face, or a flattening node with nothing on screen.\n */\nfunction spaceVisibility(node: Node2D, isRoot: boolean): \"all\" | \"children\" | \"none\" {\n if (isRoot) return \"all\";\n const frame = spaceFrameOf(node);\n if (!frame) return \"all\";\n if (!node.backfaceVisible && frame.facesAway) return \"none\";\n if (frame.paints) return \"all\";\n return node._rendersChildrenInSpace() ? \"children\" : \"none\";\n}\n\n/**\n * The slots of `children` in the order the renderer paints them: authored\n * order, except among siblings in a space, which paint far to near.\n */\nfunction paintOrder(node: Node2D, children: readonly (Node2D | null)[]): number[] {\n const natural = children.map((_, i) => i);\n const frame = spaceFrameForChildren(node);\n if (!frame) return natural;\n const slots = natural.filter((i) => children[i] !== null);\n const frames = slots.map((i) => spaceChildFrame(frame, children[i]!));\n return spaceChildOrder(frames).map((k) => slots[k]);\n}\n\n/**\n * The node's children as **index slots**, with a `null` wherever the slot holds\n * something this walk doesn't descend into.\n *\n * Everywhere but a `Canvas3D` this is just `children`, and the array is returned\n * untouched. A `Canvas3D` is the one node holding both dimensions, and its\n * `Node2D.children` drops the meshes — which would renumber its HUD children and\n * hand every one of them the path of an earlier sibling. So its slots are taken\n * from the authored list with the 3D ones blanked out: same indices as the\n * document, and the meshes reached through their own walk instead.\n */\nfunction childSlots(node: Node2D): readonly (Node2D | null)[] {\n if (!(node instanceof Canvas3D)) return node.children;\n return node._allChildren.map((child) => (child instanceof Node2D ? child : null));\n}\n\n/** What the 3D walk needs to know about the viewport it is projecting into. */\nfunction canvas3DFrame(canvas: Canvas3D, path: string): Canvas3DFrame {\n return { box: nodeBox(canvas, path), matrix: renderMatrix(canvas) };\n}\n\n/** Map `point` into `node`'s local space and ask the node whether it was hit. */\nfunction containsPoint(node: Node2D, point: Vector2, tolerance: number): boolean {\n const m = renderMatrix(node);\n const inv = invert(m);\n if (!inv) return false; // zero scale — nothing to hit\n // The render matrix works in canvas (y-down) space; `worldAnchors` flips y in\n // and back out, so the inverse does the same to land in the node's centred,\n // y-up local frame — the space `hitTestSelf` and the clip descriptors use.\n const p = applyToPoint(inv, { x: point.x, y: -point.y });\n if (behindCamera(m, p)) return false;\n return node._hitTestSelf({ x: p.x, y: -p.y }, tolerance);\n}\n"]}
1
+ {"version":3,"file":"node-picking.js","sourceRoot":"","sources":["../../src/runtime/node-picking.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAY,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjI,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC9H,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAA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AAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import { Node } from \"@/nodes/node/node\";\r\nimport { Node2D, type NodeHandle } from \"@/nodes/2d/node2d\";\r\nimport { Canvas3D } from \"@/nodes/three/canvas3d-node\";\r\nimport { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { Matrix2D, multiply, invert, applyToPoint, cameraMatrix, translation, isProjective } from \"@/attributes/layout/matrix2d\";\r\nimport { worldAnchors } from \"@/nodes/2d/node-transform\";\r\nimport { spaceChildFrame, spaceChildOrder, spaceFrameForChildren, spaceFrameOf, spaceRootFrame } from \"@/nodes/2d/node-space\";\r\nimport { multiplyAffine3, spaceScreenMatrix } from \"@/attributes/layout/space3d\";\r\nimport { nodePath } from \"@/project/tree\";\r\nimport { collectBoxes3D, pickNode3D, projectNode3D, type Canvas3DFrame, type Node3DFrame } from \"./node-picking3d\";\r\nimport type { Vector3 } from \"@/render3d/vector3\";\r\n\r\n/**\r\n * Pure geometry for editor-style direct manipulation: where a node's pixels\r\n * landed, and which node is under a point. No controller state, so it can be\r\n * exercised against hand-built node trees.\r\n *\r\n * **Space.** Everything here is in *viewport space*: origin at the viewport\r\n * centre, y-up, units = the viewport pixels the player was given. That is the\r\n * same space `Node2D.global` reports, plus the camera — see {@link renderMatrix}.\r\n */\r\n\r\n/**\r\n * A node's on-screen box at the current frame, in viewport space (origin at the\r\n * viewport centre, y-up).\r\n *\r\n * Unlike {@link Node2D.global} this folds in any active camera scope, so it\r\n * describes where the node's pixels actually landed — which is what an editor\r\n * overlay needs in order to draw a selection box over them.\r\n */\r\nexport interface NodeBox {\r\n /** Per-instance id — changes on every rebuild. Use {@link path} to key across rebuilds. */\r\n id: string;\r\n /** Structural path from the scene root (`\"\"` is the root); stable across rebuilds. */\r\n path: string;\r\n /** Node2D class name, e.g. `Rect`, `Text`. */\r\n type: string;\r\n /** Corners in draw order, viewport space. Rotated/scaled — not axis-aligned. */\r\n topLeft: Vector2;\r\n topRight: Vector2;\r\n bottomRight: Vector2;\r\n bottomLeft: Vector2;\r\n center: Vector2;\r\n /**\r\n * Size of the box before rotation/scale, in scene units — the node's layout\r\n * size for everything whose drawing fills its cell, and the ink's own extent\r\n * where the two differ (see {@link Node2D._localBounds}; a boolean group\r\n * reports the extent of its children's ink, not its layout rect).\r\n */\r\n width: number;\r\n height: number;\r\n /** Folded rotation (degrees clockwise) and uniform scale, camera included. */\r\n rotation: number;\r\n scale: number;\r\n /** Effective alpha; `0` means the node is present but invisible. */\r\n opacity: number;\r\n /**\r\n * The editor's padlock — see {@link NodeEditorState.locked}.\r\n *\r\n * Carried here rather than left for the host to look up, because the two\r\n * things that need it are a marquee sweep and a gizmo's handles, and both are\r\n * already holding the box. A locked node is never returned by\r\n * {@link pickNode}; it appears in {@link collectBoxes} so a host can still\r\n * outline one selected from its layer tree.\r\n */\r\n locked: boolean;\r\n}\r\n\r\n/**\r\n * The renderer's CTM at `node` — every ancestor's local matrix from the scene\r\n * root down, with a camera scope inserted wherever an ancestor pushes one\r\n * ({@link Node2D._cameraScope}; `Canvas2D`/`Camera` call `beginCamera` between\r\n * their own transform and their children's).\r\n *\r\n * A node inside a 2.5D space is placed by its frame instead — the whole\r\n * projection from its own plane to the space root's, built by the same\r\n * `node-space.ts` the renderer uses — so it is a homography, and `nodeBox`\r\n * reports the projected corners.\r\n *\r\n * Mirrors the render walk exactly, including the camera's `translate(rect.x,\r\n * -rect.y)` — if a box ever disagrees with the pixels, the divergence is here.\r\n *\r\n * `@internal`, and shared with `text-geometry.ts`: a caret drawn over a node has\r\n * to land in the same space as the box drawn around it, so both must come from\r\n * this one walk rather than two that agree by inspection.\r\n */\r\n/** @internal */\r\nexport function renderMatrix(node: Node2D): Matrix2D {\r\n const frame = spaceFrameOf(node);\r\n if (frame) return multiply(renderMatrix(frame.root), frame.screen);\r\n const parent = node.parent;\r\n return parent ? multiply(childrenMatrix(parent), node._localMatrix()) : node._localMatrix();\r\n}\r\n\r\n/**\r\n * The CTM `parent`'s children are placed under, before their own transform: its\r\n * render matrix, then whatever camera it opens. For a space root that is the\r\n * camera over its own plane; inside a space it is the parent's own frame, since\r\n * a child's place is measured in its parent's plane.\r\n */\r\nfunction childrenMatrix(parent: Node2D): Matrix2D {\r\n const m = renderMatrix(parent);\r\n const camera = parent._spaceCamera();\r\n if (camera) return multiply(m, spaceRootFrame(parent, camera).screen);\r\n const cam = parent._cameraScope();\r\n if (!cam) return m;\r\n const r = parent.layoutBounds;\r\n return multiply(m, cameraMatrix(r.x, -r.y, cam.lookAt, cam.zoom, cam.heading));\r\n}\r\n\r\n/**\r\n * Where `point` (viewport space) lands on the plane the node at `path` moves in\r\n * when its `x`/`y` change — its parent's, through any camera in between, pushed\r\n * out to the node's own `depth` in a space — in its parent's frame: centred on\r\n * the parent (on its slot, for a node a parent places — see `ChildPlacement`),\r\n * y-up. `null` when the path does not name a 2D node below the\r\n * root, or that plane cannot be reached at that point (edge-on, or the point is\r\n * behind the camera).\r\n *\r\n * Two answers differ by exactly the change of `x`/`y` that carries the node from\r\n * one point to the other — what a move handle needs once a node can sit in\r\n * depth, where a screen delta is no longer a parent delta.\r\n *\r\n * Under a parent with coordinates of its own (`Node2D._planeOf`) the answer is\r\n * in them, and is the `x`/`y` that centres the node on `point`.\r\n */\r\nexport function parentPlanePointAt(root: Node2D, path: string, point: Vector2): Vector2 | null {\r\n if (path === \"\") return null;\r\n const node = nodeAt(root, path);\r\n const parent = node instanceof Node2D ? node.parent : null;\r\n if (!(node instanceof Node2D) || !parent) return null;\r\n const m = movePlaneMatrix(node, parent);\r\n const inv = invert(m);\r\n if (!inv) return null;\r\n const p = applyToPoint(inv, { x: point.x, y: -point.y });\r\n if (behindCamera(m, p)) return null;\r\n const plane = parent._planeOf(node);\r\n if (!plane) return { x: p.x, y: -p.y };\r\n // A slot's frame is already centred on the node's box; the parent's is not.\r\n const box = node._placement() ? null : node.layoutBounds;\r\n return plane.toCoords(p.x - (box?.x ?? 0), (box?.y ?? 0) - p.y);\r\n}\r\n\r\n/**\r\n * Where `point` (viewport space) lands in the coordinates the node at `path`\r\n * positions its children in ({@link Node2D._planeOf}): the `x`/`y` a child takes\r\n * to be centred there, before it exists. `null` when that node's children are\r\n * positioned in pixels, which is how a host tells the two apart.\r\n */\r\nexport function childPlanePointAt(root: Node2D, path: string, point: Vector2): Vector2 | null {\r\n const parent = nodeAt(root, path);\r\n if (!(parent instanceof Node2D)) return null;\r\n const plane = parent._planeOf(null);\r\n if (!plane) return null;\r\n const inv = invert(childrenMatrix(parent));\r\n if (!inv) return null;\r\n const p = applyToPoint(inv, { x: point.x, y: -point.y });\r\n return plane.toCoords(p.x, -p.y);\r\n}\r\n\r\n/**\r\n * What keeps the node at `path` looking exactly as it does once it moves under\r\n * the node at `parentPath`, as a design tool does: each of `offsets` (an\r\n * `x`/`y` it takes under its parent now: its own, or where a move takes it)\r\n * carried to the one that puts its centre at the same place there, and the\r\n * `turn` to add to its rotation and the `scale` to multiply its scale by so\r\n * the parents' own turn and scale, cameras included, are undone. `null` when\r\n * that parent arranges its children in a run or a grid, sits inside the node,\r\n * or either is not here.\r\n */\r\nexport function reparentPlacementAt(\r\n root: Node2D, path: string, parentPath: string, offsets: readonly Vector2[],\r\n): ReparentPlacement | null {\r\n const node = nodeAt(root, path);\r\n const to = nodeAt(root, parentPath);\r\n const from = node instanceof Node2D ? node.parent : null;\r\n if (!(node instanceof Node2D) || !(from instanceof Node2D) || !(to instanceof Node2D)) return null;\r\n for (let at: Node | null = to; at; at = at.parent) if (at === node) return null;\r\n const box = node.layoutBounds;\r\n const plane = to._planeOf(null);\r\n const slot = plane ? null : to._slotFor({ width: box?.width ?? 0, height: box?.height ?? 0 });\r\n if (!plane && !slot) return null;\r\n const along = movePlaneMatrix(node, from);\r\n const back = invert(along);\r\n const into = invert(childrenMatrix(to));\r\n if (!back || !into) return null;\r\n\r\n const placed = node._placement();\r\n const was = childFold(from);\r\n const will = childFold(to);\r\n const turn = was.rotation + (placed?.rotation ?? 0) - will.rotation;\r\n const scale = will.scale === 0 ? 1 : (was.scale * (placed?.scale ?? 1)) / will.scale;\r\n const shift = node._centreShift(node.rotation + turn, node.scale * scale);\r\n\r\n // The plane the node's x/y move it on, where its centre is drawn now.\r\n const here = applyToPoint(back, applyToPoint(renderMatrix(node), { x: 0, y: 0 }));\r\n const own = from._planeOf(node);\r\n const pixels = (offset: Vector2): Vector2 => (own ? { ...own.toOffset(offset.x, offset.y) } : offset);\r\n const now = pixels({ x: node.x, y: node.y });\r\n const moved = offsets.map((offset) => {\r\n const o = pixels(offset);\r\n const drawn = applyToPoint(along, { x: here.x + o.x - now.x, y: here.y - (o.y - now.y) });\r\n const centre = applyToPoint(into, drawn);\r\n const x = centre.x - shift.x;\r\n const y = centre.y - shift.y;\r\n return plane ? plane.toCoords(x, -y) : { x: x - slot!.x, y: slot!.y - y };\r\n });\r\n return { offsets: moved, turn, scale };\r\n}\r\n\r\n/** What {@link reparentPlacementAt} answers. */\r\nexport interface ReparentPlacement {\r\n /** Each offset asked about, under the new parent. */\r\n offsets: Vector2[];\r\n /** Degrees (clockwise) to add to the node's rotation, and to where its turns end. */\r\n turn: number;\r\n /** The factor to multiply the node's scale by, and where its scalings end. */\r\n scale: number;\r\n}\r\n\r\n/** The rotation and scale a child of `parent` is drawn under: its fold, then the camera it opens. */\r\nfunction childFold(parent: Node2D): { rotation: number; scale: number } {\r\n const folded = foldedTransform(parent);\r\n const cam = parent._cameraScope();\r\n return cam ? { rotation: folded.rotation - cam.heading, scale: folded.scale * cam.zoom } : folded;\r\n}\r\n\r\n/**\r\n * The node at `path`'s {@link NodeHandle}s with `at` in viewport space, where the\r\n * pixels put them; `null` when the path names no 2D node.\r\n */\r\nexport function nodeHandlesAt(root: Node2D, path: string): NodeHandle[] | null {\r\n const node = nodeAt(root, path);\r\n if (!(node instanceof Node2D)) return null;\r\n const m = renderMatrix(node);\r\n return node._handles().map(({ prop, at }) => {\r\n const p = applyToPoint(m, { x: at.x, y: -at.y });\r\n return { prop, at: { x: p.x, y: -p.y } };\r\n });\r\n}\r\n\r\n/**\r\n * The value of `prop` that puts its handle on the node at `path` under `point`\r\n * (viewport space), or `null` when there is no such handle or the point is off\r\n * the node's plane.\r\n */\r\nexport function handleValueAt(root: Node2D, path: string, prop: string, point: Vector2): Vector2 | null {\r\n const node = nodeAt(root, path);\r\n if (!(node instanceof Node2D)) return null;\r\n const m = renderMatrix(node);\r\n const inv = invert(m);\r\n if (!inv) return null;\r\n const p = applyToPoint(inv, { x: point.x, y: -point.y });\r\n if (behindCamera(m, p)) return null;\r\n return node._handleValue(prop, { x: p.x, y: -p.y });\r\n}\r\n\r\n/** The parent's frame at the node's depth, onto the screen: the plane its `x`/`y` slide it across. */\r\nfunction movePlaneMatrix(node: Node2D, parent: Node2D): Matrix2D {\r\n const frame = spaceFrameOf(node) ? spaceFrameForChildren(parent) : null;\r\n if (!frame) {\r\n // A slotted node's `x`/`y` move it within its slot, which may be turned.\r\n const slot = node._slotMatrix();\r\n return slot ? multiply(childrenMatrix(parent), slot) : childrenMatrix(parent);\r\n }\r\n const slot = node._slotAffine();\r\n const plane = slot ? multiplyAffine3(frame.view, slot) : frame.view;\r\n const atDepth = multiplyAffine3(plane, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, node.depth]);\r\n return multiply(renderMatrix(frame.root), spaceScreenMatrix(frame.camera, atDepth));\r\n}\r\n\r\n/**\r\n * Under a perspective the inverse also answers for the plane's reflection behind\r\n * the camera: a point there projects to the same pixel with a negative `w`, and\r\n * is not on screen at all.\r\n */\r\nfunction behindCamera(m: Matrix2D, local: Vector2): boolean {\r\n return isProjective(m) && (m.g ?? 0) * local.x + (m.h ?? 0) * local.y + (m.i ?? 1) <= 0;\r\n}\r\n\r\n/**\r\n * Folded rotation / scale / opacity from the scene root down to `node`, matching\r\n * the renderer's nested transforms and its pass-through alpha fold. The same\r\n * accumulation {@link Node2D.global} does, extended with the camera scopes: a\r\n * camera multiplies the scale by its `zoom` and adds `-heading` to the rotation\r\n * (the renderer applies `rotate(-heading)`).\r\n */\r\nfunction foldedTransform(node: Node2D): { rotation: number; scale: number; opacity: number } {\r\n let rotation = 0;\r\n let scale = 1;\r\n let opacity = 1;\r\n for (let n: Node2D | null = node; n; n = n.parent) {\r\n const slot = n._placement();\r\n rotation += n.rotation + (slot?.rotation ?? 0);\r\n scale *= n.scale * (slot?.scale ?? 1);\r\n opacity *= n.opacity * (slot?.opacity ?? 1);\r\n // Skip the node's own camera: it scopes its children, not itself.\r\n const cam = n !== node ? n._cameraScope() : null;\r\n if (cam) {\r\n rotation -= cam.heading;\r\n scale *= cam.zoom;\r\n }\r\n }\r\n return { rotation, scale, opacity };\r\n}\r\n\r\n/** Build the viewport-space box for `node` at the current frame. */\r\nexport function nodeBox(node: Node2D, path: string): NodeBox {\r\n const b = node._localBounds();\r\n // `worldAnchors` maps offsets centred on the matrix's origin, so shift the\r\n // matrix onto the bounds' own centre first — that is what lets a node whose\r\n // ink is off-centre report a box that actually sits on the ink.\r\n // The matrix is canvas y-down; the bounds are y-up, hence the sign on y.\r\n const m = b.x === 0 && b.y === 0\r\n ? renderMatrix(node)\r\n : multiply(renderMatrix(node), translation(b.x, -b.y));\r\n const anchors = worldAnchors(m, b.width / 2, b.height / 2);\r\n const folded = foldedTransform(node);\r\n return {\r\n id: node.id,\r\n path,\r\n type: node.className,\r\n topLeft: anchors.topLeft,\r\n topRight: anchors.topRight,\r\n bottomRight: anchors.bottomRight,\r\n bottomLeft: anchors.bottomLeft,\r\n center: anchors.center,\r\n width: b.width,\r\n height: b.height,\r\n rotation: folded.rotation,\r\n scale: folded.scale,\r\n opacity: folded.opacity,\r\n locked: node.locked,\r\n };\r\n}\r\n\r\n/**\r\n * The box at a structural path, in either dimension, or `null` when the path\r\n * doesn't resolve.\r\n *\r\n * The one entry point that answers for a 3D node as well as a 2D one, which a\r\n * bare {@link nodeBox} cannot: a mesh is not a `Node2D` and has no box of its\r\n * own — what it has is a projection into the viewport that holds it, and finding\r\n * that viewport is part of resolving the path (see `node-picking3d.ts`).\r\n *\r\n * Walks {@link Node._allChildren}, so the paths it accepts are the ones every\r\n * other structural walk in the engine produces.\r\n */\r\nexport function nodeBoxAt(root: Node2D, path: string): NodeBox | null {\r\n if (path === \"\") return nodeBox(root, path);\r\n\r\n let node: Node = root;\r\n let canvas: { node: Canvas3D; path: string } | null = null;\r\n const segments = path.split(\".\");\r\n for (let i = 0; i < segments.length; i++) {\r\n if (node instanceof Canvas3D) canvas = { node, path: prefixPath(segments, i) };\r\n const next = node._allChildren[Number(segments[i])];\r\n if (!next) return null;\r\n node = next;\r\n }\r\n\r\n if (node instanceof Node2D) return nodeBox(node, path);\r\n // A 3D node: ask the viewport that holds it. There is always one — a `Node3D`\r\n // cannot be parented anywhere else (the engine throws rather than allowing\r\n // it) — so a `null` here is a malformed tree rather than a missing case.\r\n if (!canvas) return null;\r\n const frame = canvas3DFrame(canvas.node, canvas.path);\r\n return collectBoxes3D(canvas.node, frame, canvas.path).find((box) => box.path === path) ?? null;\r\n}\r\n\r\n/**\r\n * The node at a structural path, in either dimension, or `null` when the path\r\n * doesn't resolve.\r\n *\r\n * The resolution half of {@link nodeBoxAt}, split out for callers that want the\r\n * node rather than its box — `PlaybackController.getNodePropsAt`, which reads a\r\n * node's own props in its own space. Walks {@link Node._allChildren}, so it\r\n * accepts the same paths every other structural walk in the engine produces.\r\n */\r\nexport function nodeAt(root: Node2D, path: string): Node | null {\r\n if (path === \"\") return root;\r\n let node: Node = root;\r\n for (const segment of path.split(\".\")) {\r\n const next = node._allChildren[Number(segment)];\r\n if (!next) return null;\r\n node = next;\r\n }\r\n return node;\r\n}\r\n\r\n/** The first `count` segments of a split path, rejoined. */\r\nfunction prefixPath(segments: readonly string[], count: number): string {\r\n return segments.slice(0, count).join(\".\");\r\n}\r\n\r\n/**\r\n * Project a handful of points around the `Node3D` at `path`, or `null` when\r\n * the path doesn't resolve to a 3D node — a gizmo's counterpart to\r\n * {@link nodeBoxAt}, for the one thing a box can't answer: where would an\r\n * arbitrary point *near* the node, not just its extent, land on screen. See\r\n * {@link Node3DFrame} for the two point sets and the space each is in.\r\n *\r\n * `null` for a 2D path too, unlike `nodeBoxAt` — a `Node2D` has no matrix a\r\n * caller would ask this for; {@link nodeBox} already answers everything a 2D\r\n * handle needs directly in viewport space.\r\n */\r\nexport function projectNode3DAt(\r\n root: Node2D,\r\n path: string,\r\n parentPoints: readonly Vector3[],\r\n localPoints: readonly Vector3[],\r\n): Node3DFrame | null {\r\n if (path === \"\") return null;\r\n\r\n let node: Node = root;\r\n let canvas: { node: Canvas3D; path: string } | null = null;\r\n const segments = path.split(\".\");\r\n for (let i = 0; i < segments.length; i++) {\r\n if (node instanceof Canvas3D) canvas = { node, path: prefixPath(segments, i) };\r\n const next = node._allChildren[Number(segments[i])];\r\n if (!next) return null;\r\n node = next;\r\n }\r\n\r\n if (node instanceof Node2D || !canvas) return null;\r\n const frame = canvas3DFrame(canvas.node, canvas.path);\r\n return projectNode3D(canvas.node, frame, canvas.path, path, parentPoints, localPoints);\r\n}\r\n\r\n/**\r\n * The topmost node whose hit region contains `point` (viewport space, y-up,\r\n * origin at the viewport centre), or `null`. Children paint over their parent and\r\n * later siblings over earlier ones, so the walk tests children last-to-first\r\n * before falling back to the node itself.\r\n *\r\n * Skips fully transparent nodes — a scene built with spawn delays keeps\r\n * not-yet-visible nodes in the tree at `opacity: 0`, and those must not be\r\n * selectable. A node that clips (or pushes a camera, which clips to its viewport)\r\n * confines its subtree: a point outside its box cannot hit anything inside it.\r\n * The scene root is never returned; it is the stage, not a selectable node.\r\n *\r\n * The hit region is {@link Node2D.hitTestSelf} — the rotated layout box by default,\r\n * narrowed to the declared outline for shapes. A click in the corner of a rect's\r\n * box selects it; a click in the empty notch of a star's box does not.\r\n *\r\n * `tolerance` is grab-slop in scene units, applied outward from the ink. A host\r\n * passes its zoom-corrected pixel slop so the grab area stays constant on screen.\r\n * It is what makes thin shapes reachable.\r\n *\r\n * Cost: {@link renderMatrix} walks to the root per node, making a pick O(depth²).\r\n * Scene trees here are shallow (tens of nodes, depth < 10), so this is fine at\r\n * pointer rate. If it ever matters, thread the parent's accumulated matrix down\r\n * through the walk instead of recomputing — a change confined to this file.\r\n */\r\nexport function pickNode(root: Node2D, point: Vector2, tolerance = 0): NodeBox | null {\r\n return pickIn(root, \"\", point, tolerance, true);\r\n}\r\n\r\nfunction pickIn(node: Node2D, path: string, point: Vector2, tolerance: number, isRoot: boolean): NodeBox | null {\r\n if (node.opacity === 0 || node.hidden) return null;\r\n const drawn = spaceVisibility(node, isRoot);\r\n if (drawn === \"none\") return null;\r\n\r\n const inside = drawn === \"all\" && containsPoint(node, point, tolerance);\r\n // A clipping node (or one that opens a camera viewport) gates its subtree —\r\n // unless it is drawing nothing of its own, when it clips nothing either.\r\n if (!inside && drawn === \"all\" && node._confinesChildren()) return null;\r\n\r\n // A `Canvas3D`'s children come in both dimensions, and its 2D ones are\r\n // indexed against the *whole* list — see {@link childSlots}.\r\n const children = childSlots(node);\r\n const order = paintOrder(node, children);\r\n for (let k = order.length - 1; k >= 0; k--) {\r\n const i = order[k];\r\n const slot = children[i];\r\n if (slot === null) continue;\r\n const hit = pickIn(slot, nodePath(path, i), point, tolerance, false);\r\n if (hit) return hit;\r\n }\r\n\r\n // The 3D scene draws under the 2D children and over the canvas's own fill, so\r\n // it is tested in that order too: a HUD label wins over the mesh behind it,\r\n // and the mesh wins over the viewport it sits in.\r\n if (node instanceof Canvas3D && inside) {\r\n const hit = pickNode3D(node, canvas3DFrame(node, path), point, tolerance, path);\r\n if (hit) return hit;\r\n }\r\n\r\n if (isRoot) return null;\r\n // A locked node declines to *be* the answer while still having gated its\r\n // subtree above — so a click inside a locked group lands on nothing rather\r\n // than falling through to whatever is behind the group.\r\n if (node.locked) return null;\r\n return inside ? nodeBox(node, path) : null;\r\n}\r\n\r\n/**\r\n * Collect every visible node's box in draw order (parents before children, so a\r\n * host can paint them in the order the renderer did). Skips `opacity: 0` nodes\r\n * and the scene root, matching {@link pickNode}.\r\n *\r\n * A `Canvas3D` also contributes a box per `Node3D` inside it, projected into its\r\n * plane — see `node-picking3d.ts`. They sit after the viewport's own box and\r\n * before its 2D children's, which is where the 3D pass is painted; among\r\n * themselves they are ordered **near camera first**, because a 3D scene has no\r\n * draw order of its own for them to be in.\r\n */\r\nexport function collectBoxes(node: Node2D, path: string, out: NodeBox[], isRoot: boolean): void {\r\n if (node.opacity === 0 || node.hidden) return;\r\n const drawn = spaceVisibility(node, isRoot);\r\n if (drawn === \"none\") return;\r\n // Locked nodes keep their box — a host still has to draw a selection outline\r\n // around one picked from its layer tree. What the box carries is the flag, so\r\n // a marquee can leave it out without a second walk.\r\n if (!isRoot && drawn === \"all\") out.push(nodeBox(node, path));\r\n\r\n if (node instanceof Canvas3D) {\r\n for (const box of collectBoxes3D(node, canvas3DFrame(node, path), path)) out.push(box);\r\n }\r\n\r\n const children = childSlots(node);\r\n for (const i of paintOrder(node, children)) {\r\n const slot = children[i];\r\n if (slot !== null) collectBoxes(slot, nodePath(path, i), out, false);\r\n }\r\n}\r\n\r\n/**\r\n * How much of `node` a space lets the renderer draw: `\"all\"` outside a space and\r\n * for a node facing the camera in front of it; `\"children\"` for one edge-on or\r\n * behind the lens, whose own paint is skipped while its children, placed by\r\n * frames of their own, are not; `\"none\"` for one the renderer skips outright — a\r\n * hidden back face, or a flattening node with nothing on screen.\r\n */\r\nfunction spaceVisibility(node: Node2D, isRoot: boolean): \"all\" | \"children\" | \"none\" {\r\n if (isRoot) return \"all\";\r\n const frame = spaceFrameOf(node);\r\n if (!frame) return \"all\";\r\n if (!node.backfaceVisible && frame.facesAway) return \"none\";\r\n if (frame.paints) return \"all\";\r\n return node._rendersChildrenInSpace() ? \"children\" : \"none\";\r\n}\r\n\r\n/**\r\n * The slots of `children` in the order the renderer paints them: authored\r\n * order, except among siblings in a space, which paint far to near.\r\n */\r\nfunction paintOrder(node: Node2D, children: readonly (Node2D | null)[]): number[] {\r\n const natural = children.map((_, i) => i);\r\n const frame = spaceFrameForChildren(node);\r\n if (!frame) return natural;\r\n const slots = natural.filter((i) => children[i] !== null);\r\n const frames = slots.map((i) => spaceChildFrame(frame, children[i]!));\r\n return spaceChildOrder(frames).map((k) => slots[k]);\r\n}\r\n\r\n/**\r\n * The node's children as **index slots**, with a `null` wherever the slot holds\r\n * something this walk doesn't descend into.\r\n *\r\n * Everywhere but a `Canvas3D` this is just `children`, and the array is returned\r\n * untouched. A `Canvas3D` is the one node holding both dimensions, and its\r\n * `Node2D.children` drops the meshes — which would renumber its HUD children and\r\n * hand every one of them the path of an earlier sibling. So its slots are taken\r\n * from the authored list with the 3D ones blanked out: same indices as the\r\n * document, and the meshes reached through their own walk instead.\r\n */\r\nfunction childSlots(node: Node2D): readonly (Node2D | null)[] {\r\n if (!(node instanceof Canvas3D)) return node.children;\r\n return node._allChildren.map((child) => (child instanceof Node2D ? child : null));\r\n}\r\n\r\n/** What the 3D walk needs to know about the viewport it is projecting into. */\r\nfunction canvas3DFrame(canvas: Canvas3D, path: string): Canvas3DFrame {\r\n return { box: nodeBox(canvas, path), matrix: renderMatrix(canvas) };\r\n}\r\n\r\n/** Map `point` into `node`'s local space and ask the node whether it was hit. */\r\nfunction containsPoint(node: Node2D, point: Vector2, tolerance: number): boolean {\r\n const m = renderMatrix(node);\r\n const inv = invert(m);\r\n if (!inv) return false; // zero scale — nothing to hit\r\n // The render matrix works in canvas (y-down) space; `worldAnchors` flips y in\r\n // and back out, so the inverse does the same to land in the node's centred,\r\n // y-up local frame — the space `hitTestSelf` and the clip descriptors use.\r\n const p = applyToPoint(inv, { x: point.x, y: -point.y });\r\n if (behindCamera(m, p)) return false;\r\n return node._hitTestSelf({ x: p.x, y: -p.y }, tolerance);\r\n}\r\n"]}
@@ -97,7 +97,8 @@ export interface Node3DFrame {
97
97
  origin: Vector2 | null;
98
98
  /**
99
99
  * `parentPoints` transformed by the node's **parent's** world matrix, then
100
- * projected. The frame `Node3DProps.position` is itself expressed in, so
100
+ * projected, through the parent's own coordinates where it places its
101
+ * children by them. The frame `Node3DProps.position` is itself expressed in, so
101
102
  * this is the space a move or scale handle belongs in: a point named
102
103
  * `{ ...position, x: position.x + 1 }` projects to where nudging `x` by
103
104
  * one unit would actually land, with no need to know whether "one unit"
@@ -1 +1 @@
1
- {"version":3,"file":"node-picking3d.d.ts","sourceRoot":"","sources":["../../src/runtime/node-picking3d.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWnF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,oEAAoE;AACpE,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC1B;;;;;OAKG;IACH,GAAG,EAAE,OAAO,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,gBAAgB;AAChB,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CAmB9F;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IACxB,4DAA4D;IAC5D,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB;;;;;;;OAOG;IACH,YAAY,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IACjC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,OAAO,GA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AmB9F;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IACxB,4DAA4D;IAC5D,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB;;;;;;;;OAQG;IACH,YAAY,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IACjC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;CACnC;AAID;;;;;;;;;GASG;AACH,gBAAgB;AAChB,wBAAgB,aAAa,CACzB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,SAAS,OAAO,EAAE,EAChC,WAAW,EAAE,SAAS,OAAO,EAAE,GAChC,WAAW,GAAG,IAAI,CAuBpB;AA4BD;;;;;;;;GAQG;AACH,gBAAgB;AAChB,wBAAgB,UAAU,CACtB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACb,OAAO,GAAG,IAAI,CAwBhB"}
@@ -1,4 +1,4 @@
1
- import { Node3D } from "../nodes/three/node3d.js";
1
+ import { Node3D, parentSpaceOf } from "../nodes/three/node3d.js";
2
2
  import { applyToPoint, invert } from "../attributes/layout/matrix2d.js";
3
3
  import { resolveCameraPlacement } from "../render3d/camera.js";
4
4
  import { geometryBounds3D, transformBox3, unionBox3, centeredBox3, corners3, } from "../render3d/bounds3d.js";
@@ -64,9 +64,12 @@ export function projectNode3D(canvas, frame, canvasPath, targetPath, parentPoint
64
64
  if (!own || !parent)
65
65
  return null;
66
66
  const project = (matrix, points) => points.map((point) => projectPoint3(matrix, point, projection, frame));
67
+ // A parent with coordinates of its own places the node by them, so that is the frame its position is in.
68
+ const space = parentSpaceOf(entry.node);
69
+ const placed = space ? parentPoints.map((point) => space.toLocal(point.x, point.y, point.z)) : parentPoints;
67
70
  return {
68
71
  origin: projectPoint3(own, ORIGIN_3D, projection, frame),
69
- parentPoints: project(parent, parentPoints),
72
+ parentPoints: project(parent, placed),
70
73
  localPoints: project(own, localPoints),
71
74
  };
72
75
  }