@zephyr3d/scene 0.9.2 → 0.9.3

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 (420) hide show
  1. package/dist/animation/animationset.js +135 -135
  2. package/dist/animation/animationset.js.map +1 -1
  3. package/dist/animation/ik/ik_chain_builder.js +68 -0
  4. package/dist/animation/ik/ik_chain_builder.js.map +1 -0
  5. package/dist/animation/ik/ik_pole_constraint.js +2 -7
  6. package/dist/animation/ik/ik_pole_constraint.js.map +1 -1
  7. package/dist/animation/joint_dynamics/controller.js +146 -146
  8. package/dist/animation/joint_dynamics/controller.js.map +1 -1
  9. package/dist/animation/joint_dynamics/math.js +16 -0
  10. package/dist/animation/joint_dynamics/math.js.map +1 -0
  11. package/dist/animation/spring/spring_particle.js +4 -4
  12. package/dist/animation/spring/spring_particle.js.map +1 -1
  13. package/dist/animation/spring/spring_system.js +75 -75
  14. package/dist/animation/spring/spring_system.js.map +1 -1
  15. package/dist/animation/spring2/constraints.js.map +1 -1
  16. package/dist/animation/spring2/controller.js +64 -64
  17. package/dist/animation/spring2/controller.js.map +1 -1
  18. package/dist/animation/spring2/math.js.map +1 -1
  19. package/dist/animation/spring2/spring_system.js +8 -8
  20. package/dist/animation/spring2/spring_system.js.map +1 -1
  21. package/dist/asset/model.js +57 -57
  22. package/dist/asset/model.js.map +1 -1
  23. package/dist/camera/camera.js +184 -184
  24. package/dist/camera/camera.js.map +1 -1
  25. package/dist/index.d.ts +2 -6
  26. package/dist/index.js +1 -1
  27. package/dist/material/material.js +288 -288
  28. package/dist/material/material.js.map +1 -1
  29. package/dist/material/shader/helper.js +281 -278
  30. package/dist/material/shader/helper.js.map +1 -1
  31. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js +38 -0
  32. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js.map +1 -0
  33. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js +10 -0
  34. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js.map +1 -0
  35. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js +127 -0
  36. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js.map +1 -0
  37. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js +263 -0
  38. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js.map +1 -0
  39. package/dist/render/cluster_light.js +3 -4
  40. package/dist/render/cluster_light.js.map +1 -1
  41. package/dist/render/rendergraph/history_resource_manager.js +93 -93
  42. package/dist/render/rendergraph/history_resource_manager.js.map +1 -1
  43. package/dist/render/rendergraph/history_resources.js +3 -3
  44. package/dist/render/rendergraph/history_resources.js.map +1 -1
  45. package/dist/render/rendergraph/types.js +22 -22
  46. package/dist/render/rendergraph/types.js.map +1 -1
  47. package/dist/scene/mesh.js +80 -80
  48. package/dist/scene/mesh.js.map +1 -1
  49. package/dist/scene/scene_node.js +228 -228
  50. package/dist/scene/scene_node.js.map +1 -1
  51. package/dist/shapes/torus.js +90 -59
  52. package/dist/shapes/torus.js.map +1 -1
  53. package/dist/src/animation/animation.js +127 -0
  54. package/dist/src/animation/animation.js.map +1 -0
  55. package/dist/src/animation/animationset.js +255 -0
  56. package/dist/src/animation/animationset.js.map +1 -0
  57. package/dist/src/animation/animationtrack.js +34 -0
  58. package/dist/src/animation/animationtrack.js.map +1 -0
  59. package/dist/src/animation/eulerrotationtrack.js +52 -0
  60. package/dist/src/animation/eulerrotationtrack.js.map +1 -0
  61. package/dist/src/animation/morphtarget.js +93 -0
  62. package/dist/src/animation/morphtarget.js.map +1 -0
  63. package/dist/src/animation/morphtrack.js +70 -0
  64. package/dist/src/animation/morphtrack.js.map +1 -0
  65. package/dist/src/animation/proptrack.js +161 -0
  66. package/dist/src/animation/proptrack.js.map +1 -0
  67. package/dist/src/animation/rotationtrack.js +51 -0
  68. package/dist/src/animation/rotationtrack.js.map +1 -0
  69. package/dist/src/animation/scaletrack.js +50 -0
  70. package/dist/src/animation/scaletrack.js.map +1 -0
  71. package/dist/src/animation/skeleton.js +204 -0
  72. package/dist/src/animation/skeleton.js.map +1 -0
  73. package/dist/src/animation/translationtrack.js +50 -0
  74. package/dist/src/animation/translationtrack.js.map +1 -0
  75. package/dist/src/app/app.js +129 -0
  76. package/dist/src/app/app.js.map +1 -0
  77. package/dist/src/app/inputmgr.js +267 -0
  78. package/dist/src/app/inputmgr.js.map +1 -0
  79. package/dist/src/asset/assetmanager.js +404 -0
  80. package/dist/src/asset/assetmanager.js.map +1 -0
  81. package/dist/src/asset/builtin.js +337 -0
  82. package/dist/src/asset/builtin.js.map +1 -0
  83. package/dist/src/asset/loaders/dds/dds.js +470 -0
  84. package/dist/src/asset/loaders/dds/dds.js.map +1 -0
  85. package/dist/src/asset/loaders/dds/dds_loader.js +28 -0
  86. package/dist/src/asset/loaders/dds/dds_loader.js.map +1 -0
  87. package/dist/src/asset/loaders/gltf/gltf_loader.js +1265 -0
  88. package/dist/src/asset/loaders/gltf/gltf_loader.js.map +1 -0
  89. package/dist/src/asset/loaders/gltf/helpers.js +327 -0
  90. package/dist/src/asset/loaders/gltf/helpers.js.map +1 -0
  91. package/dist/src/asset/loaders/hdr/hdr.js +180 -0
  92. package/dist/src/asset/loaders/hdr/hdr.js.map +1 -0
  93. package/dist/src/asset/loaders/image/tga_Loader.js +116 -0
  94. package/dist/src/asset/loaders/image/tga_Loader.js.map +1 -0
  95. package/dist/src/asset/loaders/image/webimage_loader.js +63 -0
  96. package/dist/src/asset/loaders/image/webimage_loader.js.map +1 -0
  97. package/dist/src/asset/loaders/loader.js +45 -0
  98. package/dist/src/asset/loaders/loader.js.map +1 -0
  99. package/dist/src/asset/model.js +414 -0
  100. package/dist/src/asset/model.js.map +1 -0
  101. package/dist/src/blitter/bilateralblur.js +221 -0
  102. package/dist/src/blitter/bilateralblur.js.map +1 -0
  103. package/dist/src/blitter/blitter.js +390 -0
  104. package/dist/src/blitter/blitter.js.map +1 -0
  105. package/dist/src/blitter/box.js +118 -0
  106. package/dist/src/blitter/box.js.map +1 -0
  107. package/dist/src/blitter/copy.js +22 -0
  108. package/dist/src/blitter/copy.js.map +1 -0
  109. package/dist/src/blitter/gaussianblur.js +228 -0
  110. package/dist/src/blitter/gaussianblur.js.map +1 -0
  111. package/dist/src/camera/base.js +92 -0
  112. package/dist/src/camera/base.js.map +1 -0
  113. package/dist/src/camera/camera.js +1005 -0
  114. package/dist/src/camera/camera.js.map +1 -0
  115. package/dist/src/camera/fps.js +238 -0
  116. package/dist/src/camera/fps.js.map +1 -0
  117. package/dist/src/camera/orbit.js +245 -0
  118. package/dist/src/camera/orbit.js.map +1 -0
  119. package/dist/src/camera/orthocamera.js +167 -0
  120. package/dist/src/camera/orthocamera.js.map +1 -0
  121. package/dist/src/camera/perspectivecamera.js +141 -0
  122. package/dist/src/camera/perspectivecamera.js.map +1 -0
  123. package/dist/src/index.js +120 -0
  124. package/dist/src/index.js.map +1 -0
  125. package/dist/src/material/blinn.js +81 -0
  126. package/dist/src/material/blinn.js.map +1 -0
  127. package/dist/src/material/grassmaterial.js +113 -0
  128. package/dist/src/material/grassmaterial.js.map +1 -0
  129. package/dist/src/material/lambert.js +92 -0
  130. package/dist/src/material/lambert.js.map +1 -0
  131. package/dist/src/material/material.js +301 -0
  132. package/dist/src/material/material.js.map +1 -0
  133. package/dist/src/material/meshmaterial.js +704 -0
  134. package/dist/src/material/meshmaterial.js.map +1 -0
  135. package/dist/src/material/mixins/albedocolor.js +76 -0
  136. package/dist/src/material/mixins/albedocolor.js.map +1 -0
  137. package/dist/src/material/mixins/foliage.js +47 -0
  138. package/dist/src/material/mixins/foliage.js.map +1 -0
  139. package/dist/src/material/mixins/lightmodel/blinnphong.js +112 -0
  140. package/dist/src/material/mixins/lightmodel/blinnphong.js.map +1 -0
  141. package/dist/src/material/mixins/lightmodel/lambert.js +58 -0
  142. package/dist/src/material/mixins/lightmodel/lambert.js.map +1 -0
  143. package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js +178 -0
  144. package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -0
  145. package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js +139 -0
  146. package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -0
  147. package/dist/src/material/mixins/lit.js +476 -0
  148. package/dist/src/material/mixins/lit.js.map +1 -0
  149. package/dist/src/material/mixins/pbr/common.js +918 -0
  150. package/dist/src/material/mixins/pbr/common.js.map +1 -0
  151. package/dist/src/material/mixins/texture.js +172 -0
  152. package/dist/src/material/mixins/texture.js.map +1 -0
  153. package/dist/src/material/mixins/vertexcolor.js +56 -0
  154. package/dist/src/material/mixins/vertexcolor.js.map +1 -0
  155. package/dist/src/material/particle.js +178 -0
  156. package/dist/src/material/particle.js.map +1 -0
  157. package/dist/src/material/pbrmr.js +97 -0
  158. package/dist/src/material/pbrmr.js.map +1 -0
  159. package/dist/src/material/pbrsg.js +97 -0
  160. package/dist/src/material/pbrsg.js.map +1 -0
  161. package/dist/src/material/shader/helper.js +1209 -0
  162. package/dist/src/material/shader/helper.js.map +1 -0
  163. package/dist/src/material/terrain-cm.js +606 -0
  164. package/dist/src/material/terrain-cm.js.map +1 -0
  165. package/dist/src/material/terrainmaterial.js +375 -0
  166. package/dist/src/material/terrainmaterial.js.map +1 -0
  167. package/dist/src/material/unlit.js +41 -0
  168. package/dist/src/material/unlit.js.map +1 -0
  169. package/dist/src/material/water.js +417 -0
  170. package/dist/src/material/water.js.map +1 -0
  171. package/dist/src/posteffect/bloom.js +361 -0
  172. package/dist/src/posteffect/bloom.js.map +1 -0
  173. package/dist/src/posteffect/compositor.js +226 -0
  174. package/dist/src/posteffect/compositor.js.map +1 -0
  175. package/dist/src/posteffect/fxaa.js +273 -0
  176. package/dist/src/posteffect/fxaa.js.map +1 -0
  177. package/dist/src/posteffect/grayscale.js +69 -0
  178. package/dist/src/posteffect/grayscale.js.map +1 -0
  179. package/dist/src/posteffect/motionblur.js +96 -0
  180. package/dist/src/posteffect/motionblur.js.map +1 -0
  181. package/dist/src/posteffect/posteffect.js +126 -0
  182. package/dist/src/posteffect/posteffect.js.map +1 -0
  183. package/dist/src/posteffect/sao.js +324 -0
  184. package/dist/src/posteffect/sao.js.map +1 -0
  185. package/dist/src/posteffect/ssr.js +489 -0
  186. package/dist/src/posteffect/ssr.js.map +1 -0
  187. package/dist/src/posteffect/taa.js +172 -0
  188. package/dist/src/posteffect/taa.js.map +1 -0
  189. package/dist/src/posteffect/tonemap.js +94 -0
  190. package/dist/src/posteffect/tonemap.js.map +1 -0
  191. package/dist/src/render/abuffer_oit.js +361 -0
  192. package/dist/src/render/abuffer_oit.js.map +1 -0
  193. package/dist/src/render/clipmap.js +851 -0
  194. package/dist/src/render/clipmap.js.map +1 -0
  195. package/dist/src/render/cluster_light.js +333 -0
  196. package/dist/src/render/cluster_light.js.map +1 -0
  197. package/dist/src/render/cull_visitor.js +187 -0
  198. package/dist/src/render/cull_visitor.js.map +1 -0
  199. package/dist/src/render/depthpass.js +68 -0
  200. package/dist/src/render/depthpass.js.map +1 -0
  201. package/dist/src/render/drawable_mixin.js +227 -0
  202. package/dist/src/render/drawable_mixin.js.map +1 -0
  203. package/dist/src/render/envlight.js +463 -0
  204. package/dist/src/render/envlight.js.map +1 -0
  205. package/dist/src/render/fbm_wavegenerator.js +251 -0
  206. package/dist/src/render/fbm_wavegenerator.js.map +1 -0
  207. package/dist/src/render/fft_wavegenerator.js +1006 -0
  208. package/dist/src/render/fft_wavegenerator.js.map +1 -0
  209. package/dist/src/render/fullscreenquad.js +38 -0
  210. package/dist/src/render/fullscreenquad.js.map +1 -0
  211. package/dist/src/render/gerstner_wavegenerator.js +314 -0
  212. package/dist/src/render/gerstner_wavegenerator.js.map +1 -0
  213. package/dist/src/render/globalbindgroup_allocator.js +60 -0
  214. package/dist/src/render/globalbindgroup_allocator.js.map +1 -0
  215. package/dist/src/render/hzb.js +273 -0
  216. package/dist/src/render/hzb.js.map +1 -0
  217. package/dist/src/render/lightpass.js +172 -0
  218. package/dist/src/render/lightpass.js.map +1 -0
  219. package/dist/src/render/objectcolorpass.js +51 -0
  220. package/dist/src/render/objectcolorpass.js.map +1 -0
  221. package/dist/src/render/primitive.js +364 -0
  222. package/dist/src/render/primitive.js.map +1 -0
  223. package/dist/src/render/render_queue.js +467 -0
  224. package/dist/src/render/render_queue.js.map +1 -0
  225. package/dist/src/render/renderbundle_wrapper.js +152 -0
  226. package/dist/src/render/renderbundle_wrapper.js.map +1 -0
  227. package/dist/src/render/renderer.js +455 -0
  228. package/dist/src/render/renderer.js.map +1 -0
  229. package/dist/src/render/renderpass.js +200 -0
  230. package/dist/src/render/renderpass.js.map +1 -0
  231. package/dist/src/render/shadowmap_pass.js +56 -0
  232. package/dist/src/render/shadowmap_pass.js.map +1 -0
  233. package/dist/src/render/sky.js +1103 -0
  234. package/dist/src/render/sky.js.map +1 -0
  235. package/dist/src/render/weightedblended_oit.js +168 -0
  236. package/dist/src/render/weightedblended_oit.js.map +1 -0
  237. package/dist/src/scene/batchgroup.js +162 -0
  238. package/dist/src/scene/batchgroup.js.map +1 -0
  239. package/dist/src/scene/environment.js +209 -0
  240. package/dist/src/scene/environment.js.map +1 -0
  241. package/dist/src/scene/graph_node.js +72 -0
  242. package/dist/src/scene/graph_node.js.map +1 -0
  243. package/dist/src/scene/light.js +416 -0
  244. package/dist/src/scene/light.js.map +1 -0
  245. package/dist/src/scene/mesh.js +341 -0
  246. package/dist/src/scene/mesh.js.map +1 -0
  247. package/dist/src/scene/octree.js +649 -0
  248. package/dist/src/scene/octree.js.map +1 -0
  249. package/dist/src/scene/particlesys.js +738 -0
  250. package/dist/src/scene/particlesys.js.map +1 -0
  251. package/dist/src/scene/raycast_visitor.js +103 -0
  252. package/dist/src/scene/raycast_visitor.js.map +1 -0
  253. package/dist/src/scene/scene.js +284 -0
  254. package/dist/src/scene/scene.js.map +1 -0
  255. package/dist/src/scene/scene_node.js +732 -0
  256. package/dist/src/scene/scene_node.js.map +1 -0
  257. package/dist/src/scene/terrain/grass.js +278 -0
  258. package/dist/src/scene/terrain/grass.js.map +1 -0
  259. package/dist/src/scene/terrain/heightfield.js +475 -0
  260. package/dist/src/scene/terrain/heightfield.js.map +1 -0
  261. package/dist/src/scene/terrain/patch.js +530 -0
  262. package/dist/src/scene/terrain/patch.js.map +1 -0
  263. package/dist/src/scene/terrain/quadtree.js +461 -0
  264. package/dist/src/scene/terrain/quadtree.js.map +1 -0
  265. package/dist/src/scene/terrain/terrain.js +246 -0
  266. package/dist/src/scene/terrain/terrain.js.map +1 -0
  267. package/dist/src/scene/terrain-cm/grass.js +594 -0
  268. package/dist/src/scene/terrain-cm/grass.js.map +1 -0
  269. package/dist/src/scene/terrain-cm/grassmaterial.js +159 -0
  270. package/dist/src/scene/terrain-cm/grassmaterial.js.map +1 -0
  271. package/dist/src/scene/terrain-cm/terrain-cm.js +538 -0
  272. package/dist/src/scene/terrain-cm/terrain-cm.js.map +1 -0
  273. package/dist/src/scene/water.js +374 -0
  274. package/dist/src/scene/water.js.map +1 -0
  275. package/dist/src/shaders/atmosphere.js +957 -0
  276. package/dist/src/shaders/atmosphere.js.map +1 -0
  277. package/dist/src/shaders/fog.js +112 -0
  278. package/dist/src/shaders/fog.js.map +1 -0
  279. package/dist/src/shaders/misc.js +266 -0
  280. package/dist/src/shaders/misc.js.map +1 -0
  281. package/dist/src/shaders/noise.js +222 -0
  282. package/dist/src/shaders/noise.js.map +1 -0
  283. package/dist/src/shaders/pbr.js +51 -0
  284. package/dist/src/shaders/pbr.js.map +1 -0
  285. package/dist/src/shaders/shadow.js +636 -0
  286. package/dist/src/shaders/shadow.js.map +1 -0
  287. package/dist/src/shaders/ssr.js +490 -0
  288. package/dist/src/shaders/ssr.js.map +1 -0
  289. package/dist/src/shaders/temporal.js +215 -0
  290. package/dist/src/shaders/temporal.js.map +1 -0
  291. package/dist/src/shaders/water.js +756 -0
  292. package/dist/src/shaders/water.js.map +1 -0
  293. package/dist/src/shadow/esm.js +237 -0
  294. package/dist/src/shadow/esm.js.map +1 -0
  295. package/dist/src/shadow/pcf_opt.js +181 -0
  296. package/dist/src/shadow/pcf_opt.js.map +1 -0
  297. package/dist/src/shadow/pcf_pd.js +189 -0
  298. package/dist/src/shadow/pcf_pd.js.map +1 -0
  299. package/dist/src/shadow/shader.js +37 -0
  300. package/dist/src/shadow/shader.js.map +1 -0
  301. package/dist/src/shadow/shadow_impl.js +15 -0
  302. package/dist/src/shadow/shadow_impl.js.map +1 -0
  303. package/dist/src/shadow/shadowmapper.js +790 -0
  304. package/dist/src/shadow/shadowmapper.js.map +1 -0
  305. package/dist/src/shadow/ssm.js +159 -0
  306. package/dist/src/shadow/ssm.js.map +1 -0
  307. package/dist/src/shadow/vsm.js +297 -0
  308. package/dist/src/shadow/vsm.js.map +1 -0
  309. package/dist/src/shapes/box.js +386 -0
  310. package/dist/src/shapes/box.js.map +1 -0
  311. package/dist/src/shapes/cylinder.js +125 -0
  312. package/dist/src/shapes/cylinder.js.map +1 -0
  313. package/dist/src/shapes/plane.js +88 -0
  314. package/dist/src/shapes/plane.js.map +1 -0
  315. package/dist/src/shapes/shape.js +87 -0
  316. package/dist/src/shapes/shape.js.map +1 -0
  317. package/dist/src/shapes/sphere.js +114 -0
  318. package/dist/src/shapes/sphere.js.map +1 -0
  319. package/dist/src/shapes/tetrahedron.js +188 -0
  320. package/dist/src/shapes/tetrahedron.js.map +1 -0
  321. package/dist/src/shapes/torus.js +111 -0
  322. package/dist/src/shapes/torus.js.map +1 -0
  323. package/dist/src/utility/aabbtree.js +400 -0
  324. package/dist/src/utility/aabbtree.js.map +1 -0
  325. package/dist/src/utility/bounding_volume.js +29 -0
  326. package/dist/src/utility/bounding_volume.js.map +1 -0
  327. package/dist/src/utility/debug.js +28 -0
  328. package/dist/src/utility/debug.js.map +1 -0
  329. package/dist/src/utility/draco/decoder.js +116 -0
  330. package/dist/src/utility/draco/decoder.js.map +1 -0
  331. package/dist/src/utility/misc.js +105 -0
  332. package/dist/src/utility/misc.js.map +1 -0
  333. package/dist/src/utility/panorama.js +163 -0
  334. package/dist/src/utility/panorama.js.map +1 -0
  335. package/dist/src/utility/pmrem.js +354 -0
  336. package/dist/src/utility/pmrem.js.map +1 -0
  337. package/dist/src/utility/rendermipmap.js +115 -0
  338. package/dist/src/utility/rendermipmap.js.map +1 -0
  339. package/dist/src/utility/serialization/json.js +402 -0
  340. package/dist/src/utility/serialization/json.js.map +1 -0
  341. package/dist/src/utility/serialization/manager.js +623 -0
  342. package/dist/src/utility/serialization/manager.js.map +1 -0
  343. package/dist/src/utility/serialization/scene/animation.js +248 -0
  344. package/dist/src/utility/serialization/scene/animation.js.map +1 -0
  345. package/dist/src/utility/serialization/scene/batch.js +59 -0
  346. package/dist/src/utility/serialization/scene/batch.js.map +1 -0
  347. package/dist/src/utility/serialization/scene/camera.js +790 -0
  348. package/dist/src/utility/serialization/scene/camera.js.map +1 -0
  349. package/dist/src/utility/serialization/scene/common.js +222 -0
  350. package/dist/src/utility/serialization/scene/common.js.map +1 -0
  351. package/dist/src/utility/serialization/scene/light.js +575 -0
  352. package/dist/src/utility/serialization/scene/light.js.map +1 -0
  353. package/dist/src/utility/serialization/scene/material.js +1111 -0
  354. package/dist/src/utility/serialization/scene/material.js.map +1 -0
  355. package/dist/src/utility/serialization/scene/mesh.js +148 -0
  356. package/dist/src/utility/serialization/scene/mesh.js.map +1 -0
  357. package/dist/src/utility/serialization/scene/misc.js +39 -0
  358. package/dist/src/utility/serialization/scene/misc.js.map +1 -0
  359. package/dist/src/utility/serialization/scene/node.js +451 -0
  360. package/dist/src/utility/serialization/scene/node.js.map +1 -0
  361. package/dist/src/utility/serialization/scene/particle.js +425 -0
  362. package/dist/src/utility/serialization/scene/particle.js.map +1 -0
  363. package/dist/src/utility/serialization/scene/primitive.js +692 -0
  364. package/dist/src/utility/serialization/scene/primitive.js.map +1 -0
  365. package/dist/src/utility/serialization/scene/scene.js +704 -0
  366. package/dist/src/utility/serialization/scene/scene.js.map +1 -0
  367. package/dist/src/utility/serialization/scene/terrain.js +488 -0
  368. package/dist/src/utility/serialization/scene/terrain.js.map +1 -0
  369. package/dist/src/utility/serialization/scene/water.js +465 -0
  370. package/dist/src/utility/serialization/scene/water.js.map +1 -0
  371. package/dist/src/utility/shprojector.js +297 -0
  372. package/dist/src/utility/shprojector.js.map +1 -0
  373. package/dist/src/utility/textures/ggxlut.js +213 -0
  374. package/dist/src/utility/textures/ggxlut.js.map +1 -0
  375. package/dist/src/utility/textures/gradientnoise.js +62 -0
  376. package/dist/src/utility/textures/gradientnoise.js.map +1 -0
  377. package/dist/src/utility/textures/randomnoise.js +41 -0
  378. package/dist/src/utility/textures/randomnoise.js.map +1 -0
  379. package/dist/src/values.js +162 -0
  380. package/dist/src/values.js.map +1 -0
  381. package/dist/utility/blueprint/material/common.js +7 -0
  382. package/dist/utility/blueprint/material/common.js.map +1 -0
  383. package/dist/utility/blueprint/material/ir.js +489 -489
  384. package/dist/utility/blueprint/material/ir.js.map +1 -1
  385. package/dist/utility/serialization/blueprint/constants.js +255 -0
  386. package/dist/utility/serialization/blueprint/constants.js.map +1 -0
  387. package/dist/utility/serialization/blueprint/material/constants.js +203 -0
  388. package/dist/utility/serialization/blueprint/material/constants.js.map +1 -0
  389. package/dist/utility/serialization/blueprint/material/texture.js +165 -0
  390. package/dist/utility/serialization/blueprint/material/texture.js.map +1 -0
  391. package/dist/utility/serialization/manager.js +271 -271
  392. package/dist/utility/serialization/manager.js.map +1 -1
  393. package/dist/utility/serialization/scene/animation.js.map +1 -1
  394. package/dist/utility/serialization/scene/camera.js.map +1 -1
  395. package/dist/utility/serialization/scene/common.js.map +1 -1
  396. package/dist/utility/serialization/scene/light.js.map +1 -1
  397. package/dist/utility/serialization/scene/material.js.map +1 -1
  398. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  399. package/dist/utility/serialization/scene/node.js.map +1 -1
  400. package/dist/utility/serialization/scene/particle.js.map +1 -1
  401. package/dist/utility/serialization/scene/primitive.js.map +1 -1
  402. package/dist/utility/serialization/scene/scene.js.map +1 -1
  403. package/dist/utility/serialization/scene/terrain.js.map +1 -1
  404. package/dist/utility/serialization/types.js +4 -4
  405. package/dist/utility/serialization/types.js.map +1 -1
  406. package/dist/values.js +49 -53
  407. package/dist/values.js.map +1 -1
  408. package/package.json +1 -1
  409. package/dist/animation/joint_dynamics/vrm_spring_bone.js +0 -46
  410. package/dist/animation/joint_dynamics/vrm_spring_bone.js.map +0 -1
  411. package/dist/animation/spring/spring_bone.js +0 -240
  412. package/dist/animation/spring/spring_bone.js.map +0 -1
  413. package/dist/animation/spring/spring_bone_collider.js +0 -198
  414. package/dist/animation/spring/spring_bone_collider.js.map +0 -1
  415. package/dist/animation/spring/spring_bone_constraint.js +0 -170
  416. package/dist/animation/spring/spring_bone_constraint.js.map +0 -1
  417. package/dist/animation/spring/spring_bone_system.js +0 -328
  418. package/dist/animation/spring/spring_bone_system.js.map +0 -1
  419. package/dist/render/sky_motion_vector.js +0 -85
  420. package/dist/render/sky_motion_vector.js.map +0 -1
@@ -3,33 +3,33 @@ import { AnimationSet } from '../animation/animationset.js';
3
3
  import { getEngine } from '../app/api.js';
4
4
  import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttachments } from './script_attachment.js';
5
5
 
6
- /**
7
- * The base class of all scene graph objects.
8
- *
9
- * @remarks
10
- * Responsibilities:
11
- * - Defines hierarchical transform (position, rotation, scale) with lazily computed matrices.
12
- * - Integrates with the scene graph (parent/children, attachment notifications).
13
- * - Provides traversal utilities (`iterate`, `iterateBottomToTop`, `traverse`).
14
- * - Manages visibility state and CPU/GPU picking flags.
15
- * - Computes and caches local/world bounding volumes, notifies scene for spatial updates.
16
- * - Supports cloning and shared model instancing.
17
- * - Emits events on visibility, transform, bounding volume, attachment, and disposal.
18
- *
19
- * Performance:
20
- * - `localMatrix`, `worldMatrix`, and `invWorldMatrix` are cached until invalidated.
21
- * - Transform mutations and `invalidateBoundingVolume` update caches and spatial structures.
22
- *
23
- * Events:
24
- * - `nodeattached`, `noderemoved`, `visiblechanged`, `transformchanged`, `bvchanged`, `dispose`.
25
- *
26
- * @public
6
+ /**
7
+ * The base class of all scene graph objects.
8
+ *
9
+ * @remarks
10
+ * Responsibilities:
11
+ * - Defines hierarchical transform (position, rotation, scale) with lazily computed matrices.
12
+ * - Integrates with the scene graph (parent/children, attachment notifications).
13
+ * - Provides traversal utilities (`iterate`, `iterateBottomToTop`, `traverse`).
14
+ * - Manages visibility state and CPU/GPU picking flags.
15
+ * - Computes and caches local/world bounding volumes, notifies scene for spatial updates.
16
+ * - Supports cloning and shared model instancing.
17
+ * - Emits events on visibility, transform, bounding volume, attachment, and disposal.
18
+ *
19
+ * Performance:
20
+ * - `localMatrix`, `worldMatrix`, and `invWorldMatrix` are cached until invalidated.
21
+ * - Transform mutations and `invalidateBoundingVolume` update caches and spatial structures.
22
+ *
23
+ * Events:
24
+ * - `nodeattached`, `noderemoved`, `visiblechanged`, `transformchanged`, `bvchanged`, `dispose`.
25
+ *
26
+ * @public
27
27
  */ class SceneNode extends makeObservable(Disposable)() {
28
28
  static _runTimeId = 1;
29
- /*
30
- static readonly PICK_INHERITED = -1;
31
- static readonly PICK_DISABLED = 0;
32
- static readonly PICK_ENABLED = 1;
29
+ /*
30
+ static readonly PICK_INHERITED = -1;
31
+ static readonly PICK_DISABLED = 0;
32
+ static readonly PICK_ENABLED = 1;
33
33
  */ /** Bounding-box draw mode inherited from nearest graph ancestor. */ static BBOXDRAW_INHERITED = -1;
34
34
  /** Disable bounding-box visualization. */ static BBOXDRAW_DISABLED = 0;
35
35
  /** Draw local-space bounding box. */ static BBOXDRAW_LOCAL = 1;
@@ -70,14 +70,14 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
70
70
  /** @internal Arbitrary metadata payload for this node. */ _metaData;
71
71
  /** @internal If greater than zero, suppress transform-change callbacks (during bulk updates). */ _disableCallback;
72
72
  /** @internal User-attached script entries (engine-defined). */ _scripts;
73
- /**
74
- * Construct a scene node.
75
- *
76
- * @remarks
77
- * If a `scene` is provided and this is not the root node, the node is reparented
78
- * under the scene's root immediately.
79
- *
80
- * @param scene - Scene that will own this node.
73
+ /**
74
+ * Construct a scene node.
75
+ *
76
+ * @remarks
77
+ * If a `scene` is provided and this is not the root node, the node is reparented
78
+ * under the scene's root immediately.
79
+ *
80
+ * @param scene - Scene that will own this node.
81
81
  */ constructor(scene){
82
82
  super();
83
83
  this._runtimeId = SceneNode._runTimeId++;
@@ -118,11 +118,11 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
118
118
  this._parent = null;
119
119
  this.reparent(scene?.rootNode ?? null);
120
120
  }
121
- /**
122
- * Whether the node should be inserted into the scene's spatial structure.
123
- *
124
- * @remarks
125
- * Toggling this hints the scene to (re)place the node in octree/acceleration structures.
121
+ /**
122
+ * Whether the node should be inserted into the scene's spatial structure.
123
+ *
124
+ * @remarks
125
+ * Toggling this hints the scene to (re)place the node in octree/acceleration structures.
126
126
  */ get placeToOctree() {
127
127
  return this._placeToOctree;
128
128
  }
@@ -134,88 +134,88 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
134
134
  }
135
135
  }
136
136
  }
137
- /**
138
- * Node's runtime unique identifier
137
+ /**
138
+ * Node's runtime unique identifier
139
139
  */ get runtimeId() {
140
140
  return this._runtimeId;
141
141
  }
142
- /**
143
- * Node's persistent identifier.
144
- *
145
- * @remarks
146
- * Changing this affects serialization and registry lookup; ensure uniqueness.
142
+ /**
143
+ * Node's persistent identifier.
144
+ *
145
+ * @remarks
146
+ * Changing this affects serialization and registry lookup; ensure uniqueness.
147
147
  */ get persistentId() {
148
148
  return this._id;
149
149
  }
150
150
  set persistentId(id) {
151
151
  this._id = id;
152
152
  }
153
- /**
154
- * If not empty, this node was loaded from a prefab
155
- *
156
- * @remarks
157
- * Internal used for serialization
153
+ /**
154
+ * If not empty, this node was loaded from a prefab
155
+ *
156
+ * @remarks
157
+ * Internal used for serialization
158
158
  */ get prefabId() {
159
159
  return this._prefabId;
160
160
  }
161
161
  set prefabId(id) {
162
162
  this._prefabId = id;
163
163
  }
164
- /**
165
- * Get prefab node this node belongs to, or null if this node does not belongs to any prefab
166
- * @returns prefab node this node belongs to
164
+ /**
165
+ * Get prefab node this node belongs to, or null if this node does not belongs to any prefab
166
+ * @returns prefab node this node belongs to
167
167
  */ getPrefabNode() {
168
168
  return this._prefabId ? this : this.parent?.getPrefabNode() ?? null;
169
169
  }
170
- /**
171
- * Translation type if this is a joint node of any skeleton
172
- *
173
- * @remarks
174
- * Internal used for serialization
170
+ /**
171
+ * Translation type if this is a joint node of any skeleton
172
+ *
173
+ * @remarks
174
+ * Internal used for serialization
175
175
  */ get jointTypeT() {
176
176
  return this._jointTypeT;
177
177
  }
178
178
  set jointTypeT(val) {
179
179
  this._jointTypeT = val;
180
180
  }
181
- /**
182
- * Scale type if this is a joint node of any skeleton
183
- *
184
- * @remarks
185
- * Internal used for serialization
181
+ /**
182
+ * Scale type if this is a joint node of any skeleton
183
+ *
184
+ * @remarks
185
+ * Internal used for serialization
186
186
  */ get jointTypeS() {
187
187
  return this._jointTypeS;
188
188
  }
189
189
  set jointTypeS(val) {
190
190
  this._jointTypeS = val;
191
191
  }
192
- /**
193
- * Rotation type if this is a joint node of any skeleton
194
- *
195
- * @remarks
196
- * Internal used for serialization
192
+ /**
193
+ * Rotation type if this is a joint node of any skeleton
194
+ *
195
+ * @remarks
196
+ * Internal used for serialization
197
197
  */ get jointTypeR() {
198
198
  return this._jointTypeR;
199
199
  }
200
200
  set jointTypeR(val) {
201
201
  this._jointTypeR = val;
202
202
  }
203
- /**
204
- * Arbitrary metadata associated with this node.
205
- *
206
- * @remarks
207
- * Stored and transported with the node; format is application-defined.
203
+ /**
204
+ * Arbitrary metadata associated with this node.
205
+ *
206
+ * @remarks
207
+ * Stored and transported with the node; format is application-defined.
208
208
  */ get metaData() {
209
209
  return this._metaData;
210
210
  }
211
211
  set metaData(val) {
212
212
  this._metaData = val;
213
213
  }
214
- /**
215
- * Attached script filename or identifier (engine-specific).
216
- *
217
- * @remarks
218
- * Integrates with the engine’s scripting system if available.
214
+ /**
215
+ * Attached script filename or identifier (engine-specific).
216
+ *
217
+ * @remarks
218
+ * Integrates with the engine’s scripting system if available.
219
219
  */ get script() {
220
220
  return this._scripts[0]?.script ?? '';
221
221
  }
@@ -229,8 +229,8 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
229
229
  this._scripts.unshift(new ScriptAttachment(script));
230
230
  }
231
231
  }
232
- /**
233
- * Script component configuration payload used by editor/runtime script components.
232
+ /**
233
+ * Script component configuration payload used by editor/runtime script components.
234
234
  */ get scriptConfig() {
235
235
  return this._scripts[0]?.config ?? null;
236
236
  }
@@ -245,16 +245,16 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
245
245
  this._scripts.splice(0, 1);
246
246
  }
247
247
  }
248
- /**
249
- * All script attachments on this node.
248
+ /**
249
+ * All script attachments on this node.
250
250
  */ get scripts() {
251
251
  return this._scripts;
252
252
  }
253
253
  set scripts(value) {
254
254
  this._scripts = normalizeScriptAttachments(value);
255
255
  }
256
- /**
257
- * Script configs for all script attachments.
256
+ /**
257
+ * Script configs for all script attachments.
258
258
  */ get scriptConfigs() {
259
259
  return this._scripts.map((item)=>item.config);
260
260
  }
@@ -270,8 +270,8 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
270
270
  }
271
271
  this._scripts = this._scripts.filter((item)=>item.script || item.config != null);
272
272
  }
273
- /**
274
- * Display name of the node (for UI/debugging).
273
+ /**
274
+ * Display name of the node (for UI/debugging).
275
275
  */ get name() {
276
276
  return this._name;
277
277
  }
@@ -281,8 +281,8 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
281
281
  /** The owning scene. */ get scene() {
282
282
  return this._scene;
283
283
  }
284
- /**
285
- * Whether this node is currently attached under the scene's root.
284
+ /**
285
+ * Whether this node is currently attached under the scene's root.
286
286
  */ get attached() {
287
287
  if (!this._scene) {
288
288
  return false;
@@ -293,20 +293,20 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
293
293
  }
294
294
  return node === this._scene.rootNode;
295
295
  }
296
- /**
297
- * If true, the node is logically sealed; some operations (like cloning as child)
298
- * may be restricted by engine policies.
296
+ /**
297
+ * If true, the node is logically sealed; some operations (like cloning as child)
298
+ * may be restricted by engine policies.
299
299
  */ get sealed() {
300
300
  return this._sealed;
301
301
  }
302
302
  set sealed(val) {
303
303
  this._sealed = val;
304
304
  }
305
- /**
306
- * Lazily created animation set for this node.
307
- *
308
- * @remarks
309
- * Accessing this schedules the node for update in the scene.
305
+ /**
306
+ * Lazily created animation set for this node.
307
+ *
308
+ * @remarks
309
+ * Accessing this schedules the node for update in the scene.
310
310
  */ get animationSet() {
311
311
  if (!this._animationSet.get()) {
312
312
  this._animationSet.set(new AnimationSet(this));
@@ -314,24 +314,24 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
314
314
  }
315
315
  return this._animationSet.get();
316
316
  }
317
- /**
318
- * Shared model reference for instancing/streaming systems.
317
+ /**
318
+ * Shared model reference for instancing/streaming systems.
319
319
  */ get sharedModel() {
320
320
  return this._sharedModel.get();
321
321
  }
322
322
  set sharedModel(model) {
323
323
  this._sharedModel.set(model);
324
324
  }
325
- /**
326
- * Clone this node.
327
- *
328
- * @remarks
329
- * If a shared model exists, it may create an instanced node. The clone is
330
- * attached under the same parent; children are cloned based on `method` and `recursive`.
331
- *
332
- * @param method - Clone method ('deep' or 'instance').
333
- * @param recursive - Whether children are cloned recursively.
334
- * @returns New node instance
325
+ /**
326
+ * Clone this node.
327
+ *
328
+ * @remarks
329
+ * If a shared model exists, it may create an instanced node. The clone is
330
+ * attached under the same parent; children are cloned based on `method` and `recursive`.
331
+ *
332
+ * @param method - Clone method ('deep' or 'instance').
333
+ * @param recursive - Whether children are cloned recursively.
334
+ * @returns New node instance
335
335
  */ async clone() {
336
336
  this.iterate((node)=>{
337
337
  if (node.isClipmapTerrain()) {
@@ -357,53 +357,53 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
357
357
  }
358
358
  return other;
359
359
  }
360
- /**
361
- * Whether the given node is a direct child of this node.
362
- * @param child - The node to be checked
363
- * @returns true if the given node is a direct child of this node, false otherwise
360
+ /**
361
+ * Whether the given node is a direct child of this node.
362
+ * @param child - The node to be checked
363
+ * @returns true if the given node is a direct child of this node, false otherwise
364
364
  */ hasChild(child) {
365
365
  return child && child.parent === this;
366
366
  }
367
- /**
368
- * Remove all children from this node.
367
+ /**
368
+ * Remove all children from this node.
369
369
  */ removeChildren() {
370
370
  while(this._children.length){
371
371
  this._children[0].get().remove();
372
372
  }
373
373
  }
374
- /**
375
- * Whether this node is an ancestor (direct or indirect) of the given node.
374
+ /**
375
+ * Whether this node is an ancestor (direct or indirect) of the given node.
376
376
  */ isParentOf(child) {
377
377
  while(child && child !== this){
378
378
  child = child.parent;
379
379
  }
380
380
  return child === this;
381
381
  }
382
- /**
383
- * Detach this node from its parent.
384
- *
385
- * @returns this
382
+ /**
383
+ * Detach this node from its parent.
384
+ *
385
+ * @returns this
386
386
  */ remove() {
387
387
  this.parent = null;
388
388
  return this;
389
389
  }
390
- /**
391
- * Depth-first traversal of this node's subtree (pre-order).
392
- *
393
- * @param v - Visitor invoked on each node.
390
+ /**
391
+ * Depth-first traversal of this node's subtree (pre-order).
392
+ *
393
+ * @param v - Visitor invoked on each node.
394
394
  */ traverse(v) {
395
395
  v.visit(this);
396
396
  for (const child of this._children){
397
397
  child.get().traverse(v);
398
398
  }
399
399
  }
400
- /**
401
- * Iterate self and descendants in pre-order.
402
- *
403
- * Warning: Do not remove children during this iteration. To allow removal, use `iterateBottomToTop`.
404
- *
405
- * @param callback - Called for each node; if returns true, iteration stops.
406
- * @returns If returns true, the iteration will immediately stop.
400
+ /**
401
+ * Iterate self and descendants in pre-order.
402
+ *
403
+ * Warning: Do not remove children during this iteration. To allow removal, use `iterateBottomToTop`.
404
+ *
405
+ * @param callback - Called for each node; if returns true, iteration stops.
406
+ * @returns If returns true, the iteration will immediately stop.
407
407
  */ iterate(callback) {
408
408
  if (callback(this)) {
409
409
  return true;
@@ -415,13 +415,13 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
415
415
  }
416
416
  return false;
417
417
  }
418
- /**
419
- * Iterate self and descendants in reverse post-order (bottom-to-top).
420
- *
421
- * Child nodes can be safely removed during this iteration.
422
- *
423
- * @param callback - Called for each node; if returns true, iteration stops.
424
- * @returns If returns true, the iteration will immediately stop.
418
+ /**
419
+ * Iterate self and descendants in reverse post-order (bottom-to-top).
420
+ *
421
+ * Child nodes can be safely removed during this iteration.
422
+ *
423
+ * @param callback - Called for each node; if returns true, iteration stops.
424
+ * @returns If returns true, the iteration will immediately stop.
425
425
  */ iterateBottomToTop(callback) {
426
426
  for(let i = this._children.length - 1; i >= 0; i--){
427
427
  const child = this._children[i];
@@ -464,15 +464,15 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
464
464
  /** true if this is a punctual light node, false otherwise */ isPunctualLight() {
465
465
  return false;
466
466
  }
467
- /**
468
- * Computes the bounding volume of the node
469
- * @returns The output bounding volume
467
+ /**
468
+ * Computes the bounding volume of the node
469
+ * @returns The output bounding volume
470
470
  */ computeBoundingVolume() {
471
471
  return null;
472
472
  }
473
- /**
474
- * Gets the bounding volume of the node
475
- * @returns The bounding volume of the node
473
+ /**
474
+ * Gets the bounding volume of the node
475
+ * @returns The bounding volume of the node
476
476
  */ getBoundingVolume() {
477
477
  if (this._bvDirty) {
478
478
  this._bv = this.computeBoundingVolume();
@@ -480,9 +480,9 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
480
480
  }
481
481
  return this._bv;
482
482
  }
483
- /**
484
- * Sets the bounding volume of the node
485
- * @param bv - The bounding volume to set
483
+ /**
484
+ * Sets the bounding volume of the node
485
+ * @param bv - The bounding volume to set
486
486
  */ setBoundingVolume(bv) {
487
487
  if (bv !== this._bv) {
488
488
  this._bv = bv;
@@ -490,23 +490,23 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
490
490
  this.invalidateWorldBoundingVolume(false);
491
491
  }
492
492
  }
493
- /**
494
- * Gets the world space bounding volume of the node
495
- * @returns The world space bounding volume of the node
493
+ /**
494
+ * Gets the world space bounding volume of the node
495
+ * @returns The world space bounding volume of the node
496
496
  */ getWorldBoundingVolume() {
497
497
  if (!this._bvWorld) {
498
498
  this._bvWorld = this.computeWorldBoundingVolume(this.getBoundingVolume());
499
499
  }
500
500
  return this._bvWorld;
501
501
  }
502
- /**
503
- * Computes the world space bounding volume of the node
504
- * @returns The output bounding volume
502
+ /**
503
+ * Computes the world space bounding volume of the node
504
+ * @returns The output bounding volume
505
505
  */ computeWorldBoundingVolume(localBV) {
506
506
  return localBV?.transform(this.worldMatrix) ?? null;
507
507
  }
508
- /**
509
- * Force the bounding volume to be recalculated
508
+ /**
509
+ * Force the bounding volume to be recalculated
510
510
  */ invalidateBoundingVolume() {
511
511
  this._bvDirty = true;
512
512
  this.invalidateWorldBoundingVolume(false);
@@ -571,12 +571,12 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
571
571
  set gpuPickable(val) {
572
572
  this._gpuPickable = !!val;
573
573
  }
574
- /**
575
- * Finds a scene node by its persistent ID.
576
- *
577
- * @typeParam T - Expected node type.
578
- * @param id - Persistent identifier to match against `SceneNode.persistentId`.
579
- * @returns The first matching node, or `null` if not found.
574
+ /**
575
+ * Finds a scene node by its persistent ID.
576
+ *
577
+ * @typeParam T - Expected node type.
578
+ * @param id - Persistent identifier to match against `SceneNode.persistentId`.
579
+ * @returns The first matching node, or `null` if not found.
580
580
  */ findNodeById(id) {
581
581
  let node = null;
582
582
  this.iterate((child)=>{
@@ -587,10 +587,10 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
587
587
  });
588
588
  return node;
589
589
  }
590
- /**
591
- * Finds a skeleton object by its persistent ID.
592
- * @param id - Persistent identifier to match against `Skeleton.persistentId`.
593
- * @returns The first matchign node, or `null` if not found.
590
+ /**
591
+ * Finds a skeleton object by its persistent ID.
592
+ * @param id - Persistent identifier to match against `Skeleton.persistentId`.
593
+ * @returns The first matchign node, or `null` if not found.
594
594
  */ findSkeletonById(id) {
595
595
  const prefabNode = this.getPrefabNode() ?? this;
596
596
  let sk = null;
@@ -601,18 +601,18 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
601
601
  // avoid ts2339 compilation error (maybe a typescript bug?)
602
602
  return sk?.get() ?? null;
603
603
  }
604
- /**
605
- * Finds a scene node by name.
606
- *
607
- * If multiple nodes share the same name, returns the first match encountered
608
- * during traversal.
609
- *
610
- * @typeParam T - Expected node type.
611
- * @param name - Node name to match.
612
- * @returns The first matching node, or `null` if not found.
613
- *
614
- * @remarks
615
- * Names are not guaranteed unique. Prefer IDs for stable references.
604
+ /**
605
+ * Finds a scene node by name.
606
+ *
607
+ * If multiple nodes share the same name, returns the first match encountered
608
+ * during traversal.
609
+ *
610
+ * @typeParam T - Expected node type.
611
+ * @param name - Node name to match.
612
+ * @returns The first matching node, or `null` if not found.
613
+ *
614
+ * @remarks
615
+ * Names are not guaranteed unique. Prefer IDs for stable references.
616
616
  */ findNodeByName(name) {
617
617
  let node = null;
618
618
  this.iterate((child)=>{
@@ -704,11 +704,11 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
704
704
  }
705
705
  }
706
706
  }
707
- /**
708
- * Get called when this node is attached to scene
707
+ /**
708
+ * Get called when this node is attached to scene
709
709
  */ _onAttached() {}
710
- /**
711
- * Get called when this node is detached from scene
710
+ /**
711
+ * Get called when this node is detached from scene
712
712
  */ _onDetached() {}
713
713
  /** @internal */ _attached() {
714
714
  this.iterate((child)=>{
@@ -741,24 +741,24 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
741
741
  /** Children of this xform */ get children() {
742
742
  return this._children.map((child)=>child.get());
743
743
  }
744
- /**
745
- * Position of the xform relative to it's parent
744
+ /**
745
+ * Position of the xform relative to it's parent
746
746
  */ get position() {
747
747
  return this._position;
748
748
  }
749
749
  set position(val) {
750
750
  this._position.setXYZ(val[0], val[1], val[2]);
751
751
  }
752
- /**
753
- * Scaling of the xform
752
+ /**
753
+ * Scaling of the xform
754
754
  */ get scale() {
755
755
  return this._scaling;
756
756
  }
757
757
  set scale(val) {
758
758
  this._scaling.setXYZ(val[0], val[1], val[2]);
759
759
  }
760
- /**
761
- * Rotation of the xform
760
+ /**
761
+ * Rotation of the xform
762
762
  */ get rotation() {
763
763
  return this._rotation;
764
764
  }
@@ -793,32 +793,32 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
793
793
  thisToOther(other, v, result) {
794
794
  return other.worldToThis(this.thisToWorld(v, result), result);
795
795
  }
796
- /**
797
- * Gets the position of the xform in world space
798
- * @returns position of the xform in world space
796
+ /**
797
+ * Gets the position of the xform in world space
798
+ * @returns position of the xform in world space
799
799
  */ getWorldPosition(outPos) {
800
800
  return outPos?.setXYZ(this.worldMatrix.m03, this.worldMatrix.m13, this.worldMatrix.m23) ?? new Vector3(this.worldMatrix.m03, this.worldMatrix.m13, this.worldMatrix.m23);
801
801
  }
802
- /**
803
- * Moves the xform by an offset vector
804
- * @param delta - The offset vector
805
- * @returns self
802
+ /**
803
+ * Moves the xform by an offset vector
804
+ * @param delta - The offset vector
805
+ * @returns self
806
806
  */ moveBy(delta) {
807
807
  this._position.addBy(delta);
808
808
  return this;
809
809
  }
810
- /**
811
- * Scales the xform by a given scale factor
812
- * @param factor - The scale factor
813
- * @returns self
810
+ /**
811
+ * Scales the xform by a given scale factor
812
+ * @param factor - The scale factor
813
+ * @returns self
814
814
  */ scaleBy(factor) {
815
815
  this._scaling.mulBy(factor);
816
816
  return this;
817
817
  }
818
- /**
819
- * Sets the local transform matrix of the xform
820
- * @param matrix - The transform matrix to set
821
- * @returns self
818
+ /**
819
+ * Sets the local transform matrix of the xform
820
+ * @param matrix - The transform matrix to set
821
+ * @returns self
822
822
  */ setLocalTransform(matrix) {
823
823
  this._disableCallback++;
824
824
  matrix.decompose(this._scaling, this._rotation, this._position);
@@ -848,15 +848,15 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
848
848
  this.syncTransform();
849
849
  return this._invWorldMatrix;
850
850
  }
851
- /**
852
- * Calculate local transform matrix
853
- * @param outMatrix - Matrix object that holds the result of calculation
851
+ /**
852
+ * Calculate local transform matrix
853
+ * @param outMatrix - Matrix object that holds the result of calculation
854
854
  */ calculateLocalTransform(outMatrix) {
855
855
  outMatrix.compose(this._scaling, this._rotation, this._position);
856
856
  }
857
- /**
858
- * Calculate world transform matrix
859
- * @param outMatrix - Matrix object that holds the result of calculation
857
+ /**
858
+ * Calculate world transform matrix
859
+ * @param outMatrix - Matrix object that holds the result of calculation
860
860
  */ calculateWorldTransform(outMatrix) {
861
861
  if (this._parent) {
862
862
  Matrix4x4.multiplyAffine(this._parent.worldMatrix, this.localMatrix, outMatrix);
@@ -864,21 +864,21 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
864
864
  outMatrix.set(this.localMatrix);
865
865
  }
866
866
  }
867
- /**
868
- * Sets the local tranformation matrix by a look-at matrix
869
- * @param eye - The eye position used to make the look-at matrix
870
- * @param target - The target position used to make the look-at matrix
871
- * @param up - The up vector used to make the look-at matrix
872
- * @returns self
867
+ /**
868
+ * Sets the local tranformation matrix by a look-at matrix
869
+ * @param eye - The eye position used to make the look-at matrix
870
+ * @param target - The target position used to make the look-at matrix
871
+ * @param up - The up vector used to make the look-at matrix
872
+ * @returns self
873
873
  */ lookAt(eye, target, up) {
874
874
  this.setLocalTransform(Matrix4x4.lookAt(eye, target, up));
875
875
  return this;
876
876
  }
877
- /**
878
- * Update node state once per-frame
879
- * @param frameId - Current frame id
880
- * @param elapsedInSeconds - Elapsed time from game start in seconds
881
- * @param deltaInSeconds - Elapsed time since previous frame in seconds
877
+ /**
878
+ * Update node state once per-frame
879
+ * @param frameId - Current frame id
880
+ * @param elapsedInSeconds - Elapsed time from game start in seconds
881
+ * @param deltaInSeconds - Elapsed time since previous frame in seconds
882
882
  */ update(frameId, elapsedInSeconds, deltaInSeconds) {
883
883
  if (!this.attached) {
884
884
  return;
@@ -893,16 +893,16 @@ import { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttac
893
893
  }
894
894
  }
895
895
  }
896
- /**
897
- * Update node state once per-camera
898
- * @param _camera - Updates according to which camera
899
- * @param _elapsedInSeconds - Elapsed time from game start in seconds
900
- * @param _deltaInSeconds - Elapsed time since previous frame in seconds
896
+ /**
897
+ * Update node state once per-camera
898
+ * @param _camera - Updates according to which camera
899
+ * @param _elapsedInSeconds - Elapsed time from game start in seconds
900
+ * @param _deltaInSeconds - Elapsed time since previous frame in seconds
901
901
  */ updatePerCamera(_camera, _elapsedInSeconds, _deltaInSeconds) {}
902
- /**
903
- * Removes this node from it's parent and add this node to another parent node if required
904
- * @param p - The new parent node that this node should be added to or null
905
- * @returns self
902
+ /**
903
+ * Removes this node from it's parent and add this node to another parent node if required
904
+ * @param p - The new parent node that this node should be added to or null
905
+ * @returns self
906
906
  */ reparent(p) {
907
907
  this.parent = p ?? null;
908
908
  return this;