@zephyr3d/scene 0.9.5 → 0.9.7

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 (621) hide show
  1. package/dist/animation/joint_dynamics/controller.js +92 -32
  2. package/dist/animation/joint_dynamics/controller.js.map +1 -1
  3. package/dist/animation/joint_dynamics/convex_collider.js +320 -0
  4. package/dist/animation/joint_dynamics/convex_collider.js.map +1 -0
  5. package/dist/animation/joint_dynamics/joint_dynamics_system.js +57 -19
  6. package/dist/animation/joint_dynamics/joint_dynamics_system.js.map +1 -1
  7. package/dist/animation/joint_dynamics/solver.js +71 -27
  8. package/dist/animation/joint_dynamics/solver.js.map +1 -1
  9. package/dist/animation/joint_dynamics_modifier.js +21 -20
  10. package/dist/animation/joint_dynamics_modifier.js.map +1 -1
  11. package/dist/animation/skeleton.js +7 -10
  12. package/dist/animation/skeleton.js.map +1 -1
  13. package/dist/app/engine.js +134 -140
  14. package/dist/app/engine.js.map +1 -1
  15. package/dist/app/scriptregistry.js +47 -16
  16. package/dist/app/scriptregistry.js.map +1 -1
  17. package/dist/asset/assetmanager.js +3 -1
  18. package/dist/asset/assetmanager.js.map +1 -1
  19. package/dist/asset/model.js +346 -7
  20. package/dist/asset/model.js.map +1 -1
  21. package/dist/avatar/wardrobe.js +20 -16
  22. package/dist/avatar/wardrobe.js.map +1 -1
  23. package/dist/camera/camera.js +416 -210
  24. package/dist/camera/camera.js.map +1 -1
  25. package/dist/index.d.ts +1350 -621
  26. package/dist/index.js +6 -11
  27. package/dist/index.js.map +1 -1
  28. package/dist/material/blinn.js +1 -1
  29. package/dist/material/blinn.js.map +1 -1
  30. package/dist/material/lambert.js +1 -1
  31. package/dist/material/lambert.js.map +1 -1
  32. package/dist/material/material.js +23 -1
  33. package/dist/material/material.js.map +1 -1
  34. package/dist/material/meshmaterial.js +178 -23
  35. package/dist/material/meshmaterial.js.map +1 -1
  36. package/dist/material/mixins/albedocolor.js +4 -4
  37. package/dist/material/mixins/albedocolor.js.map +1 -1
  38. package/dist/material/mixins/lightmodel/blinnphong.js +2 -1
  39. package/dist/material/mixins/lightmodel/blinnphong.js.map +1 -1
  40. package/dist/material/mixins/lightmodel/lambert.js +2 -1
  41. package/dist/material/mixins/lightmodel/lambert.js.map +1 -1
  42. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js +63 -16
  43. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js.map +1 -1
  44. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js +105 -32
  45. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  46. package/dist/material/mixins/lightmodel/pbrspecularglossness.js +16 -6
  47. package/dist/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -1
  48. package/dist/material/mixins/lit.js +1 -1
  49. package/dist/material/mixins/lit.js.map +1 -1
  50. package/dist/material/mixins/pbr/common.js +276 -65
  51. package/dist/material/mixins/pbr/common.js.map +1 -1
  52. package/dist/material/mixins/texture.js +3 -3
  53. package/dist/material/mixins/texture.js.map +1 -1
  54. package/dist/material/mixins/vertexcolor.js +2 -2
  55. package/dist/material/mixins/vertexcolor.js.map +1 -1
  56. package/dist/material/msdf_text.js +3 -3
  57. package/dist/material/msdf_text.js.map +1 -1
  58. package/dist/material/mtoon.js +574 -0
  59. package/dist/material/mtoon.js.map +1 -0
  60. package/dist/material/pbrblueprint.js +499 -336
  61. package/dist/material/pbrblueprint.js.map +1 -1
  62. package/dist/material/pbrmr.js +118 -100
  63. package/dist/material/pbrmr.js.map +1 -1
  64. package/dist/material/pbrsg.js +1 -1
  65. package/dist/material/pbrsg.js.map +1 -1
  66. package/dist/material/shader/helper.js +324 -294
  67. package/dist/material/shader/helper.js.map +1 -1
  68. package/dist/material/subsurfaceprofile.js +812 -0
  69. package/dist/material/subsurfaceprofile.js.map +1 -0
  70. package/dist/material/unlit.js +1 -1
  71. package/dist/material/unlit.js.map +1 -1
  72. package/dist/posteffect/compositor.js +46 -11
  73. package/dist/posteffect/compositor.js.map +1 -1
  74. package/dist/posteffect/ssr.js +422 -96
  75. package/dist/posteffect/ssr.js.map +1 -1
  76. package/dist/posteffect/sss.js +1053 -0
  77. package/dist/posteffect/sss.js.map +1 -0
  78. package/dist/posteffect/taa.js +61 -60
  79. package/dist/posteffect/taa.js.map +1 -1
  80. package/dist/render/abuffer_oit.js +63 -12
  81. package/dist/render/abuffer_oit.js.map +1 -1
  82. package/dist/render/cluster_light.js +6 -5
  83. package/dist/render/cluster_light.js.map +1 -1
  84. package/dist/render/drawable.js +1 -5
  85. package/dist/render/drawable.js.map +1 -1
  86. package/dist/render/drawable_mixin.js +2 -1
  87. package/dist/render/drawable_mixin.js.map +1 -1
  88. package/dist/render/fbm_wavegenerator.js +2 -1
  89. package/dist/render/fbm_wavegenerator.js.map +1 -1
  90. package/dist/render/gerstner_wavegenerator.js +2 -1
  91. package/dist/render/gerstner_wavegenerator.js.map +1 -1
  92. package/dist/render/globalbindgroup_allocator.js +2 -1
  93. package/dist/render/globalbindgroup_allocator.js.map +1 -1
  94. package/dist/render/lightpass.js +110 -23
  95. package/dist/render/lightpass.js.map +1 -1
  96. package/dist/render/render_queue.js +51 -8
  97. package/dist/render/render_queue.js.map +1 -1
  98. package/dist/render/renderer.js +80 -66
  99. package/dist/render/renderer.js.map +1 -1
  100. package/dist/render/rendergraph/device_pool_allocator.js +8 -0
  101. package/dist/render/rendergraph/device_pool_allocator.js.map +1 -1
  102. package/dist/render/rendergraph/forward_plus_builder.js +481 -95
  103. package/dist/render/rendergraph/forward_plus_builder.js.map +1 -1
  104. package/dist/render/rendergraph/history_resource_manager.js +55 -0
  105. package/dist/render/rendergraph/history_resource_manager.js.map +1 -1
  106. package/dist/render/rendergraph/history_resources.js +3 -1
  107. package/dist/render/rendergraph/history_resources.js.map +1 -1
  108. package/dist/render/rendergraph/types.js.map +1 -1
  109. package/dist/render/renderpass.js +10 -4
  110. package/dist/render/renderpass.js.map +1 -1
  111. package/dist/render/sky.js +31 -1
  112. package/dist/render/sky.js.map +1 -1
  113. package/dist/render/weightedblended_oit.js +23 -5
  114. package/dist/render/weightedblended_oit.js.map +1 -1
  115. package/dist/scene/basesprite.js +4 -2
  116. package/dist/scene/basesprite.js.map +1 -1
  117. package/dist/scene/batchgroup.js +3 -1
  118. package/dist/scene/batchgroup.js.map +1 -1
  119. package/dist/scene/environment.js +11 -1
  120. package/dist/scene/environment.js.map +1 -1
  121. package/dist/scene/light.js +21 -3
  122. package/dist/scene/light.js.map +1 -1
  123. package/dist/scene/mesh.js +29 -14
  124. package/dist/scene/mesh.js.map +1 -1
  125. package/dist/scene/meshdrawable.js +6 -0
  126. package/dist/scene/meshdrawable.js.map +1 -1
  127. package/dist/scene/msdftext.js +5 -2
  128. package/dist/scene/msdftext.js.map +1 -1
  129. package/dist/scene/msdftextsprite.js +5 -3
  130. package/dist/scene/msdftextsprite.js.map +1 -1
  131. package/dist/scene/particlesys.js +3 -1
  132. package/dist/scene/particlesys.js.map +1 -1
  133. package/dist/scene/scene.js +6 -5
  134. package/dist/scene/scene.js.map +1 -1
  135. package/dist/scene/terrain-cm/grass.js +4 -2
  136. package/dist/scene/terrain-cm/grass.js.map +1 -1
  137. package/dist/scene/terrain-cm/grassmaterial.js +2 -1
  138. package/dist/scene/terrain-cm/grassmaterial.js.map +1 -1
  139. package/dist/scene/terrain-cm/terrain-cm.js +4 -2
  140. package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
  141. package/dist/scene/water.js +4 -2
  142. package/dist/scene/water.js.map +1 -1
  143. package/dist/shaders/shadow.js +26 -393
  144. package/dist/shaders/shadow.js.map +1 -1
  145. package/dist/shadow/esm.js +112 -12
  146. package/dist/shadow/esm.js.map +1 -1
  147. package/dist/shadow/pcf_opt.js +2 -2
  148. package/dist/shadow/pcf_opt.js.map +1 -1
  149. package/dist/shadow/pcf_pd.js +19 -10
  150. package/dist/shadow/pcf_pd.js.map +1 -1
  151. package/dist/shadow/shader.js +58 -7
  152. package/dist/shadow/shader.js.map +1 -1
  153. package/dist/shadow/shadow_impl.js +6 -0
  154. package/dist/shadow/shadow_impl.js.map +1 -1
  155. package/dist/shadow/shadow_region.js +229 -0
  156. package/dist/shadow/shadow_region.js.map +1 -0
  157. package/dist/shadow/shadowmapper.js +67 -59
  158. package/dist/shadow/shadowmapper.js.map +1 -1
  159. package/dist/shadow/vsm.js +45 -19
  160. package/dist/shadow/vsm.js.map +1 -1
  161. package/dist/text/font/cff_font.js +890 -0
  162. package/dist/text/font/cff_font.js.map +1 -0
  163. package/dist/text/font/font_asset.js +17 -3
  164. package/dist/text/font/font_asset.js.map +1 -1
  165. package/dist/utility/blueprint/common/constants.js +8 -8
  166. package/dist/utility/blueprint/common/constants.js.map +1 -1
  167. package/dist/utility/blueprint/material/pbr.js +31 -4
  168. package/dist/utility/blueprint/material/pbr.js.map +1 -1
  169. package/dist/utility/blueprint/material/texture.js +1 -17
  170. package/dist/utility/blueprint/material/texture.js.map +1 -1
  171. package/dist/utility/serialization/manager.js +327 -359
  172. package/dist/utility/serialization/manager.js.map +1 -1
  173. package/dist/utility/serialization/scene/animation.js +5 -2
  174. package/dist/utility/serialization/scene/animation.js.map +1 -1
  175. package/dist/utility/serialization/scene/batch.js +4 -1
  176. package/dist/utility/serialization/scene/batch.js.map +1 -1
  177. package/dist/utility/serialization/scene/camera.js +249 -54
  178. package/dist/utility/serialization/scene/camera.js.map +1 -1
  179. package/dist/utility/serialization/scene/common.js +37 -1
  180. package/dist/utility/serialization/scene/common.js.map +1 -1
  181. package/dist/utility/serialization/scene/light.js +42 -3
  182. package/dist/utility/serialization/scene/light.js.map +1 -1
  183. package/dist/utility/serialization/scene/material.js +1112 -646
  184. package/dist/utility/serialization/scene/material.js.map +1 -1
  185. package/dist/utility/serialization/scene/mesh.js +7 -4
  186. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  187. package/dist/utility/serialization/scene/node.js +31 -12
  188. package/dist/utility/serialization/scene/node.js.map +1 -1
  189. package/dist/utility/serialization/scene/particle.js +4 -1
  190. package/dist/utility/serialization/scene/particle.js.map +1 -1
  191. package/dist/utility/serialization/scene/primitive.js +3 -1
  192. package/dist/utility/serialization/scene/primitive.js.map +1 -1
  193. package/dist/utility/serialization/scene/scene.js +18 -0
  194. package/dist/utility/serialization/scene/scene.js.map +1 -1
  195. package/dist/utility/serialization/scene/sprite.js +6 -3
  196. package/dist/utility/serialization/scene/sprite.js.map +1 -1
  197. package/dist/utility/serialization/scene/terrain.js +5 -2
  198. package/dist/utility/serialization/scene/terrain.js.map +1 -1
  199. package/dist/utility/serialization/scene/text.js +3 -1
  200. package/dist/utility/serialization/scene/text.js.map +1 -1
  201. package/dist/utility/serialization/scene/water.js +4 -1
  202. package/dist/utility/serialization/scene/water.js.map +1 -1
  203. package/dist/utility/textures/ltcdata.js +6 -0
  204. package/dist/utility/textures/ltcdata.js.map +1 -0
  205. package/dist/utility/textures/ltclut.js +61 -0
  206. package/dist/utility/textures/ltclut.js.map +1 -0
  207. package/dist/values.js +9 -1
  208. package/dist/values.js.map +1 -1
  209. package/package.json +3 -3
  210. package/dist/animation/ik/ik_chain_builder.js +0 -68
  211. package/dist/animation/ik/ik_chain_builder.js.map +0 -1
  212. package/dist/animation/ik/ik_pole_constraint.js +0 -123
  213. package/dist/animation/ik/ik_pole_constraint.js.map +0 -1
  214. package/dist/animation/ik/ik_track.js +0 -96
  215. package/dist/animation/ik/ik_track.js.map +0 -1
  216. package/dist/animation/ik_postprocessor.js +0 -71
  217. package/dist/animation/ik_postprocessor.js.map +0 -1
  218. package/dist/animation/joint_dynamics/math.js +0 -16
  219. package/dist/animation/joint_dynamics/math.js.map +0 -1
  220. package/dist/animation/manual_transform_processor.js +0 -156
  221. package/dist/animation/manual_transform_processor.js.map +0 -1
  222. package/dist/animation/skeleton_postprocessor.js +0 -50
  223. package/dist/animation/skeleton_postprocessor.js.map +0 -1
  224. package/dist/animation/spring2/collision.js +0 -469
  225. package/dist/animation/spring2/collision.js.map +0 -1
  226. package/dist/animation/spring2/constraints.js +0 -329
  227. package/dist/animation/spring2/constraints.js.map +0 -1
  228. package/dist/animation/spring2/controller.js +0 -434
  229. package/dist/animation/spring2/controller.js.map +0 -1
  230. package/dist/animation/spring2/math.js +0 -16
  231. package/dist/animation/spring2/math.js.map +0 -1
  232. package/dist/animation/spring2/solver.js +0 -624
  233. package/dist/animation/spring2/solver.js.map +0 -1
  234. package/dist/animation/spring2/spring_system.js +0 -118
  235. package/dist/animation/spring2/spring_system.js.map +0 -1
  236. package/dist/animation/spring2/types.js +0 -19
  237. package/dist/animation/spring2/types.js.map +0 -1
  238. package/dist/animation/spring_postprocessor.js +0 -54
  239. package/dist/animation/spring_postprocessor.js.map +0 -1
  240. package/dist/asset/loaders/gltf/gltf_loader.js +0 -1276
  241. package/dist/asset/loaders/gltf/gltf_loader.js.map +0 -1
  242. package/dist/asset/loaders/gltf/helpers.js +0 -331
  243. package/dist/asset/loaders/gltf/helpers.js.map +0 -1
  244. package/dist/material/sprite3d.js +0 -301
  245. package/dist/material/sprite3d.js.map +0 -1
  246. package/dist/material/sprite3d_std.js +0 -116
  247. package/dist/material/sprite3d_std.js.map +0 -1
  248. package/dist/material/sprite3dblueprint.js +0 -235
  249. package/dist/material/sprite3dblueprint.js.map +0 -1
  250. package/dist/material/sprite_sdf.js +0 -106
  251. package/dist/material/sprite_sdf.js.map +0 -1
  252. package/dist/material/terrainmaterial.js +0 -368
  253. package/dist/material/terrainmaterial.js.map +0 -1
  254. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js +0 -38
  255. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js.map +0 -1
  256. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js +0 -10
  257. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js.map +0 -1
  258. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js +0 -127
  259. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js.map +0 -1
  260. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js +0 -263
  261. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js.map +0 -1
  262. package/dist/render/deferredlightpass.js +0 -510
  263. package/dist/render/deferredlightpass.js.map +0 -1
  264. package/dist/render/deferredshadowlightpass.js +0 -428
  265. package/dist/render/deferredshadowlightpass.js.map +0 -1
  266. package/dist/render/gbufferpass.js +0 -50
  267. package/dist/render/gbufferpass.js.map +0 -1
  268. package/dist/scene/sdftextsprite.js +0 -322
  269. package/dist/scene/sdftextsprite.js.map +0 -1
  270. package/dist/scene/sprite3d.js +0 -18
  271. package/dist/scene/sprite3d.js.map +0 -1
  272. package/dist/scene/terrain/grass.js +0 -280
  273. package/dist/scene/terrain/grass.js.map +0 -1
  274. package/dist/scene/terrain/heightfield.js +0 -475
  275. package/dist/scene/terrain/heightfield.js.map +0 -1
  276. package/dist/scene/terrain/patch.js +0 -532
  277. package/dist/scene/terrain/patch.js.map +0 -1
  278. package/dist/scene/terrain/quadtree.js +0 -461
  279. package/dist/scene/terrain/quadtree.js.map +0 -1
  280. package/dist/scene/terrain/terrain.js +0 -231
  281. package/dist/scene/terrain/terrain.js.map +0 -1
  282. package/dist/src/animation/animation.js +0 -127
  283. package/dist/src/animation/animation.js.map +0 -1
  284. package/dist/src/animation/animationset.js +0 -255
  285. package/dist/src/animation/animationset.js.map +0 -1
  286. package/dist/src/animation/animationtrack.js +0 -34
  287. package/dist/src/animation/animationtrack.js.map +0 -1
  288. package/dist/src/animation/eulerrotationtrack.js +0 -52
  289. package/dist/src/animation/eulerrotationtrack.js.map +0 -1
  290. package/dist/src/animation/morphtarget.js +0 -93
  291. package/dist/src/animation/morphtarget.js.map +0 -1
  292. package/dist/src/animation/morphtrack.js +0 -70
  293. package/dist/src/animation/morphtrack.js.map +0 -1
  294. package/dist/src/animation/proptrack.js +0 -161
  295. package/dist/src/animation/proptrack.js.map +0 -1
  296. package/dist/src/animation/rotationtrack.js +0 -51
  297. package/dist/src/animation/rotationtrack.js.map +0 -1
  298. package/dist/src/animation/scaletrack.js +0 -50
  299. package/dist/src/animation/scaletrack.js.map +0 -1
  300. package/dist/src/animation/skeleton.js +0 -204
  301. package/dist/src/animation/skeleton.js.map +0 -1
  302. package/dist/src/animation/translationtrack.js +0 -50
  303. package/dist/src/animation/translationtrack.js.map +0 -1
  304. package/dist/src/app/app.js +0 -129
  305. package/dist/src/app/app.js.map +0 -1
  306. package/dist/src/app/inputmgr.js +0 -267
  307. package/dist/src/app/inputmgr.js.map +0 -1
  308. package/dist/src/asset/assetmanager.js +0 -404
  309. package/dist/src/asset/assetmanager.js.map +0 -1
  310. package/dist/src/asset/builtin.js +0 -337
  311. package/dist/src/asset/builtin.js.map +0 -1
  312. package/dist/src/asset/loaders/dds/dds.js +0 -470
  313. package/dist/src/asset/loaders/dds/dds.js.map +0 -1
  314. package/dist/src/asset/loaders/dds/dds_loader.js +0 -28
  315. package/dist/src/asset/loaders/dds/dds_loader.js.map +0 -1
  316. package/dist/src/asset/loaders/gltf/gltf_loader.js +0 -1265
  317. package/dist/src/asset/loaders/gltf/gltf_loader.js.map +0 -1
  318. package/dist/src/asset/loaders/gltf/helpers.js +0 -327
  319. package/dist/src/asset/loaders/gltf/helpers.js.map +0 -1
  320. package/dist/src/asset/loaders/hdr/hdr.js +0 -180
  321. package/dist/src/asset/loaders/hdr/hdr.js.map +0 -1
  322. package/dist/src/asset/loaders/image/tga_Loader.js +0 -116
  323. package/dist/src/asset/loaders/image/tga_Loader.js.map +0 -1
  324. package/dist/src/asset/loaders/image/webimage_loader.js +0 -63
  325. package/dist/src/asset/loaders/image/webimage_loader.js.map +0 -1
  326. package/dist/src/asset/loaders/loader.js +0 -45
  327. package/dist/src/asset/loaders/loader.js.map +0 -1
  328. package/dist/src/asset/model.js +0 -414
  329. package/dist/src/asset/model.js.map +0 -1
  330. package/dist/src/blitter/bilateralblur.js +0 -221
  331. package/dist/src/blitter/bilateralblur.js.map +0 -1
  332. package/dist/src/blitter/blitter.js +0 -390
  333. package/dist/src/blitter/blitter.js.map +0 -1
  334. package/dist/src/blitter/box.js +0 -118
  335. package/dist/src/blitter/box.js.map +0 -1
  336. package/dist/src/blitter/copy.js +0 -22
  337. package/dist/src/blitter/copy.js.map +0 -1
  338. package/dist/src/blitter/gaussianblur.js +0 -228
  339. package/dist/src/blitter/gaussianblur.js.map +0 -1
  340. package/dist/src/camera/base.js +0 -92
  341. package/dist/src/camera/base.js.map +0 -1
  342. package/dist/src/camera/camera.js +0 -1005
  343. package/dist/src/camera/camera.js.map +0 -1
  344. package/dist/src/camera/fps.js +0 -238
  345. package/dist/src/camera/fps.js.map +0 -1
  346. package/dist/src/camera/orbit.js +0 -245
  347. package/dist/src/camera/orbit.js.map +0 -1
  348. package/dist/src/camera/orthocamera.js +0 -167
  349. package/dist/src/camera/orthocamera.js.map +0 -1
  350. package/dist/src/camera/perspectivecamera.js +0 -141
  351. package/dist/src/camera/perspectivecamera.js.map +0 -1
  352. package/dist/src/index.js +0 -120
  353. package/dist/src/index.js.map +0 -1
  354. package/dist/src/material/blinn.js +0 -81
  355. package/dist/src/material/blinn.js.map +0 -1
  356. package/dist/src/material/grassmaterial.js +0 -113
  357. package/dist/src/material/grassmaterial.js.map +0 -1
  358. package/dist/src/material/lambert.js +0 -92
  359. package/dist/src/material/lambert.js.map +0 -1
  360. package/dist/src/material/material.js +0 -301
  361. package/dist/src/material/material.js.map +0 -1
  362. package/dist/src/material/meshmaterial.js +0 -704
  363. package/dist/src/material/meshmaterial.js.map +0 -1
  364. package/dist/src/material/mixins/albedocolor.js +0 -76
  365. package/dist/src/material/mixins/albedocolor.js.map +0 -1
  366. package/dist/src/material/mixins/foliage.js +0 -47
  367. package/dist/src/material/mixins/foliage.js.map +0 -1
  368. package/dist/src/material/mixins/lightmodel/blinnphong.js +0 -112
  369. package/dist/src/material/mixins/lightmodel/blinnphong.js.map +0 -1
  370. package/dist/src/material/mixins/lightmodel/lambert.js +0 -58
  371. package/dist/src/material/mixins/lightmodel/lambert.js.map +0 -1
  372. package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js +0 -178
  373. package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js.map +0 -1
  374. package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js +0 -139
  375. package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js.map +0 -1
  376. package/dist/src/material/mixins/lit.js +0 -476
  377. package/dist/src/material/mixins/lit.js.map +0 -1
  378. package/dist/src/material/mixins/pbr/common.js +0 -918
  379. package/dist/src/material/mixins/pbr/common.js.map +0 -1
  380. package/dist/src/material/mixins/texture.js +0 -172
  381. package/dist/src/material/mixins/texture.js.map +0 -1
  382. package/dist/src/material/mixins/vertexcolor.js +0 -56
  383. package/dist/src/material/mixins/vertexcolor.js.map +0 -1
  384. package/dist/src/material/particle.js +0 -178
  385. package/dist/src/material/particle.js.map +0 -1
  386. package/dist/src/material/pbrmr.js +0 -97
  387. package/dist/src/material/pbrmr.js.map +0 -1
  388. package/dist/src/material/pbrsg.js +0 -97
  389. package/dist/src/material/pbrsg.js.map +0 -1
  390. package/dist/src/material/shader/helper.js +0 -1209
  391. package/dist/src/material/shader/helper.js.map +0 -1
  392. package/dist/src/material/terrain-cm.js +0 -606
  393. package/dist/src/material/terrain-cm.js.map +0 -1
  394. package/dist/src/material/terrainmaterial.js +0 -375
  395. package/dist/src/material/terrainmaterial.js.map +0 -1
  396. package/dist/src/material/unlit.js +0 -41
  397. package/dist/src/material/unlit.js.map +0 -1
  398. package/dist/src/material/water.js +0 -417
  399. package/dist/src/material/water.js.map +0 -1
  400. package/dist/src/posteffect/bloom.js +0 -361
  401. package/dist/src/posteffect/bloom.js.map +0 -1
  402. package/dist/src/posteffect/compositor.js +0 -226
  403. package/dist/src/posteffect/compositor.js.map +0 -1
  404. package/dist/src/posteffect/fxaa.js +0 -273
  405. package/dist/src/posteffect/fxaa.js.map +0 -1
  406. package/dist/src/posteffect/grayscale.js +0 -69
  407. package/dist/src/posteffect/grayscale.js.map +0 -1
  408. package/dist/src/posteffect/motionblur.js +0 -96
  409. package/dist/src/posteffect/motionblur.js.map +0 -1
  410. package/dist/src/posteffect/posteffect.js +0 -126
  411. package/dist/src/posteffect/posteffect.js.map +0 -1
  412. package/dist/src/posteffect/sao.js +0 -324
  413. package/dist/src/posteffect/sao.js.map +0 -1
  414. package/dist/src/posteffect/ssr.js +0 -489
  415. package/dist/src/posteffect/ssr.js.map +0 -1
  416. package/dist/src/posteffect/taa.js +0 -172
  417. package/dist/src/posteffect/taa.js.map +0 -1
  418. package/dist/src/posteffect/tonemap.js +0 -94
  419. package/dist/src/posteffect/tonemap.js.map +0 -1
  420. package/dist/src/render/abuffer_oit.js +0 -361
  421. package/dist/src/render/abuffer_oit.js.map +0 -1
  422. package/dist/src/render/clipmap.js +0 -851
  423. package/dist/src/render/clipmap.js.map +0 -1
  424. package/dist/src/render/cluster_light.js +0 -333
  425. package/dist/src/render/cluster_light.js.map +0 -1
  426. package/dist/src/render/cull_visitor.js +0 -187
  427. package/dist/src/render/cull_visitor.js.map +0 -1
  428. package/dist/src/render/depthpass.js +0 -68
  429. package/dist/src/render/depthpass.js.map +0 -1
  430. package/dist/src/render/drawable_mixin.js +0 -227
  431. package/dist/src/render/drawable_mixin.js.map +0 -1
  432. package/dist/src/render/envlight.js +0 -463
  433. package/dist/src/render/envlight.js.map +0 -1
  434. package/dist/src/render/fbm_wavegenerator.js +0 -251
  435. package/dist/src/render/fbm_wavegenerator.js.map +0 -1
  436. package/dist/src/render/fft_wavegenerator.js +0 -1006
  437. package/dist/src/render/fft_wavegenerator.js.map +0 -1
  438. package/dist/src/render/fullscreenquad.js +0 -38
  439. package/dist/src/render/fullscreenquad.js.map +0 -1
  440. package/dist/src/render/gerstner_wavegenerator.js +0 -314
  441. package/dist/src/render/gerstner_wavegenerator.js.map +0 -1
  442. package/dist/src/render/globalbindgroup_allocator.js +0 -60
  443. package/dist/src/render/globalbindgroup_allocator.js.map +0 -1
  444. package/dist/src/render/hzb.js +0 -273
  445. package/dist/src/render/hzb.js.map +0 -1
  446. package/dist/src/render/lightpass.js +0 -172
  447. package/dist/src/render/lightpass.js.map +0 -1
  448. package/dist/src/render/objectcolorpass.js +0 -51
  449. package/dist/src/render/objectcolorpass.js.map +0 -1
  450. package/dist/src/render/primitive.js +0 -364
  451. package/dist/src/render/primitive.js.map +0 -1
  452. package/dist/src/render/render_queue.js +0 -467
  453. package/dist/src/render/render_queue.js.map +0 -1
  454. package/dist/src/render/renderbundle_wrapper.js +0 -152
  455. package/dist/src/render/renderbundle_wrapper.js.map +0 -1
  456. package/dist/src/render/renderer.js +0 -455
  457. package/dist/src/render/renderer.js.map +0 -1
  458. package/dist/src/render/renderpass.js +0 -200
  459. package/dist/src/render/renderpass.js.map +0 -1
  460. package/dist/src/render/shadowmap_pass.js +0 -56
  461. package/dist/src/render/shadowmap_pass.js.map +0 -1
  462. package/dist/src/render/sky.js +0 -1103
  463. package/dist/src/render/sky.js.map +0 -1
  464. package/dist/src/render/weightedblended_oit.js +0 -168
  465. package/dist/src/render/weightedblended_oit.js.map +0 -1
  466. package/dist/src/scene/batchgroup.js +0 -162
  467. package/dist/src/scene/batchgroup.js.map +0 -1
  468. package/dist/src/scene/environment.js +0 -209
  469. package/dist/src/scene/environment.js.map +0 -1
  470. package/dist/src/scene/graph_node.js +0 -72
  471. package/dist/src/scene/graph_node.js.map +0 -1
  472. package/dist/src/scene/light.js +0 -416
  473. package/dist/src/scene/light.js.map +0 -1
  474. package/dist/src/scene/mesh.js +0 -341
  475. package/dist/src/scene/mesh.js.map +0 -1
  476. package/dist/src/scene/octree.js +0 -649
  477. package/dist/src/scene/octree.js.map +0 -1
  478. package/dist/src/scene/particlesys.js +0 -738
  479. package/dist/src/scene/particlesys.js.map +0 -1
  480. package/dist/src/scene/raycast_visitor.js +0 -103
  481. package/dist/src/scene/raycast_visitor.js.map +0 -1
  482. package/dist/src/scene/scene.js +0 -284
  483. package/dist/src/scene/scene.js.map +0 -1
  484. package/dist/src/scene/scene_node.js +0 -732
  485. package/dist/src/scene/scene_node.js.map +0 -1
  486. package/dist/src/scene/terrain/grass.js +0 -278
  487. package/dist/src/scene/terrain/grass.js.map +0 -1
  488. package/dist/src/scene/terrain/heightfield.js +0 -475
  489. package/dist/src/scene/terrain/heightfield.js.map +0 -1
  490. package/dist/src/scene/terrain/patch.js +0 -530
  491. package/dist/src/scene/terrain/patch.js.map +0 -1
  492. package/dist/src/scene/terrain/quadtree.js +0 -461
  493. package/dist/src/scene/terrain/quadtree.js.map +0 -1
  494. package/dist/src/scene/terrain/terrain.js +0 -246
  495. package/dist/src/scene/terrain/terrain.js.map +0 -1
  496. package/dist/src/scene/terrain-cm/grass.js +0 -594
  497. package/dist/src/scene/terrain-cm/grass.js.map +0 -1
  498. package/dist/src/scene/terrain-cm/grassmaterial.js +0 -159
  499. package/dist/src/scene/terrain-cm/grassmaterial.js.map +0 -1
  500. package/dist/src/scene/terrain-cm/terrain-cm.js +0 -538
  501. package/dist/src/scene/terrain-cm/terrain-cm.js.map +0 -1
  502. package/dist/src/scene/water.js +0 -374
  503. package/dist/src/scene/water.js.map +0 -1
  504. package/dist/src/shaders/atmosphere.js +0 -957
  505. package/dist/src/shaders/atmosphere.js.map +0 -1
  506. package/dist/src/shaders/fog.js +0 -112
  507. package/dist/src/shaders/fog.js.map +0 -1
  508. package/dist/src/shaders/misc.js +0 -266
  509. package/dist/src/shaders/misc.js.map +0 -1
  510. package/dist/src/shaders/noise.js +0 -222
  511. package/dist/src/shaders/noise.js.map +0 -1
  512. package/dist/src/shaders/pbr.js +0 -51
  513. package/dist/src/shaders/pbr.js.map +0 -1
  514. package/dist/src/shaders/shadow.js +0 -636
  515. package/dist/src/shaders/shadow.js.map +0 -1
  516. package/dist/src/shaders/ssr.js +0 -490
  517. package/dist/src/shaders/ssr.js.map +0 -1
  518. package/dist/src/shaders/temporal.js +0 -215
  519. package/dist/src/shaders/temporal.js.map +0 -1
  520. package/dist/src/shaders/water.js +0 -756
  521. package/dist/src/shaders/water.js.map +0 -1
  522. package/dist/src/shadow/esm.js +0 -237
  523. package/dist/src/shadow/esm.js.map +0 -1
  524. package/dist/src/shadow/pcf_opt.js +0 -181
  525. package/dist/src/shadow/pcf_opt.js.map +0 -1
  526. package/dist/src/shadow/pcf_pd.js +0 -189
  527. package/dist/src/shadow/pcf_pd.js.map +0 -1
  528. package/dist/src/shadow/shader.js +0 -37
  529. package/dist/src/shadow/shader.js.map +0 -1
  530. package/dist/src/shadow/shadow_impl.js +0 -15
  531. package/dist/src/shadow/shadow_impl.js.map +0 -1
  532. package/dist/src/shadow/shadowmapper.js +0 -790
  533. package/dist/src/shadow/shadowmapper.js.map +0 -1
  534. package/dist/src/shadow/ssm.js +0 -159
  535. package/dist/src/shadow/ssm.js.map +0 -1
  536. package/dist/src/shadow/vsm.js +0 -297
  537. package/dist/src/shadow/vsm.js.map +0 -1
  538. package/dist/src/shapes/box.js +0 -386
  539. package/dist/src/shapes/box.js.map +0 -1
  540. package/dist/src/shapes/cylinder.js +0 -125
  541. package/dist/src/shapes/cylinder.js.map +0 -1
  542. package/dist/src/shapes/plane.js +0 -88
  543. package/dist/src/shapes/plane.js.map +0 -1
  544. package/dist/src/shapes/shape.js +0 -87
  545. package/dist/src/shapes/shape.js.map +0 -1
  546. package/dist/src/shapes/sphere.js +0 -114
  547. package/dist/src/shapes/sphere.js.map +0 -1
  548. package/dist/src/shapes/tetrahedron.js +0 -188
  549. package/dist/src/shapes/tetrahedron.js.map +0 -1
  550. package/dist/src/shapes/torus.js +0 -111
  551. package/dist/src/shapes/torus.js.map +0 -1
  552. package/dist/src/utility/aabbtree.js +0 -400
  553. package/dist/src/utility/aabbtree.js.map +0 -1
  554. package/dist/src/utility/bounding_volume.js +0 -29
  555. package/dist/src/utility/bounding_volume.js.map +0 -1
  556. package/dist/src/utility/debug.js +0 -28
  557. package/dist/src/utility/debug.js.map +0 -1
  558. package/dist/src/utility/draco/decoder.js +0 -116
  559. package/dist/src/utility/draco/decoder.js.map +0 -1
  560. package/dist/src/utility/misc.js +0 -105
  561. package/dist/src/utility/misc.js.map +0 -1
  562. package/dist/src/utility/panorama.js +0 -163
  563. package/dist/src/utility/panorama.js.map +0 -1
  564. package/dist/src/utility/pmrem.js +0 -354
  565. package/dist/src/utility/pmrem.js.map +0 -1
  566. package/dist/src/utility/rendermipmap.js +0 -115
  567. package/dist/src/utility/rendermipmap.js.map +0 -1
  568. package/dist/src/utility/serialization/json.js +0 -402
  569. package/dist/src/utility/serialization/json.js.map +0 -1
  570. package/dist/src/utility/serialization/manager.js +0 -623
  571. package/dist/src/utility/serialization/manager.js.map +0 -1
  572. package/dist/src/utility/serialization/scene/animation.js +0 -248
  573. package/dist/src/utility/serialization/scene/animation.js.map +0 -1
  574. package/dist/src/utility/serialization/scene/batch.js +0 -59
  575. package/dist/src/utility/serialization/scene/batch.js.map +0 -1
  576. package/dist/src/utility/serialization/scene/camera.js +0 -790
  577. package/dist/src/utility/serialization/scene/camera.js.map +0 -1
  578. package/dist/src/utility/serialization/scene/common.js +0 -222
  579. package/dist/src/utility/serialization/scene/common.js.map +0 -1
  580. package/dist/src/utility/serialization/scene/light.js +0 -575
  581. package/dist/src/utility/serialization/scene/light.js.map +0 -1
  582. package/dist/src/utility/serialization/scene/material.js +0 -1111
  583. package/dist/src/utility/serialization/scene/material.js.map +0 -1
  584. package/dist/src/utility/serialization/scene/mesh.js +0 -148
  585. package/dist/src/utility/serialization/scene/mesh.js.map +0 -1
  586. package/dist/src/utility/serialization/scene/misc.js +0 -39
  587. package/dist/src/utility/serialization/scene/misc.js.map +0 -1
  588. package/dist/src/utility/serialization/scene/node.js +0 -451
  589. package/dist/src/utility/serialization/scene/node.js.map +0 -1
  590. package/dist/src/utility/serialization/scene/particle.js +0 -425
  591. package/dist/src/utility/serialization/scene/particle.js.map +0 -1
  592. package/dist/src/utility/serialization/scene/primitive.js +0 -692
  593. package/dist/src/utility/serialization/scene/primitive.js.map +0 -1
  594. package/dist/src/utility/serialization/scene/scene.js +0 -704
  595. package/dist/src/utility/serialization/scene/scene.js.map +0 -1
  596. package/dist/src/utility/serialization/scene/terrain.js +0 -488
  597. package/dist/src/utility/serialization/scene/terrain.js.map +0 -1
  598. package/dist/src/utility/serialization/scene/water.js +0 -465
  599. package/dist/src/utility/serialization/scene/water.js.map +0 -1
  600. package/dist/src/utility/shprojector.js +0 -297
  601. package/dist/src/utility/shprojector.js.map +0 -1
  602. package/dist/src/utility/textures/ggxlut.js +0 -213
  603. package/dist/src/utility/textures/ggxlut.js.map +0 -1
  604. package/dist/src/utility/textures/gradientnoise.js +0 -62
  605. package/dist/src/utility/textures/gradientnoise.js.map +0 -1
  606. package/dist/src/utility/textures/randomnoise.js +0 -41
  607. package/dist/src/utility/textures/randomnoise.js.map +0 -1
  608. package/dist/src/values.js +0 -162
  609. package/dist/src/values.js.map +0 -1
  610. package/dist/utility/blueprint/material/common.js +0 -7
  611. package/dist/utility/blueprint/material/common.js.map +0 -1
  612. package/dist/utility/serialization/blueprint/constants.js +0 -255
  613. package/dist/utility/serialization/blueprint/constants.js.map +0 -1
  614. package/dist/utility/serialization/blueprint/material/constants.js +0 -203
  615. package/dist/utility/serialization/blueprint/material/constants.js.map +0 -1
  616. package/dist/utility/serialization/blueprint/material/texture.js +0 -165
  617. package/dist/utility/serialization/blueprint/material/texture.js.map +0 -1
  618. package/dist/utility/serialization/scene/cloth_script.js +0 -834
  619. package/dist/utility/serialization/scene/cloth_script.js.map +0 -1
  620. package/dist/utility/serialization/scene/spring_script.js +0 -596
  621. package/dist/utility/serialization/scene/spring_script.js.map +0 -1
@@ -3,16 +3,16 @@ import { getAABBClass } from './scene/misc.js';
3
3
  import { getSceneNodeClass, getGraphNodeClass } from './scene/node.js';
4
4
  import { getBatchGroupClass } from './scene/batch.js';
5
5
  import { getCameraClass, getPerspectiveCameraClass, getOrthoCameraClass } from './scene/camera.js';
6
- import { getPunctualLightClass, getDirectionalLightClass, getSpotLightClass, getRectLightClass, getPointLightClass } from './scene/light.js';
7
- import { getMeshMaterialClass, getPBRBluePrintMaterialClass, getSpriteBlueprintMaterialClass, getUnlitMaterialClass, getLambertMaterialClass, getBlinnMaterialClass, getPBRMetallicRoughnessMaterialClass, getPBRSpecularGlossinessMaterialClass, getParticleMaterialClass, getSpriteMaterialClass, getStandardSpriteMaterialClass } from './scene/material.js';
6
+ import { getPunctualLightClass, getDirectionalLightClass, getSpotLightClass, getPointLightClass, getRectLightClass } from './scene/light.js';
7
+ import { getSubsurfaceProfileClass, getMeshMaterialClass, getPBRBluePrintMaterialClass, getSpriteBlueprintMaterialClass, getUnlitMaterialClass, getMToonMaterialClass, getLambertMaterialClass, getBlinnMaterialClass, getPBRMetallicRoughnessMaterialClass, getPBRSpecularGlossinessMaterialClass, getParticleMaterialClass, getSpriteMaterialClass, getStandardSpriteMaterialClass } from './scene/material.js';
8
8
  import { getMeshClass } from './scene/mesh.js';
9
9
  import { getParticleNodeClass } from './scene/particle.js';
10
- import { getBoxShapeClass, getBoxFrameShapeClass, getSphereShapeClass, getTorusShapeClass, getCylinderShapeClass, getPlaneShapeClass, getTetrahedronShapeClass, getCapsuleShapeClass } from './scene/primitive.js';
10
+ import { getBoxShapeClass, getBoxFrameShapeClass, getCapsuleShapeClass, getSphereShapeClass, getTorusShapeClass, getCylinderShapeClass, getPlaneShapeClass, getTetrahedronShapeClass } from './scene/primitive.js';
11
11
  import { getSceneClass } from './scene/scene.js';
12
- import { getScriptAttachmentClass } from './scene/script.js';
13
12
  import { getTerrainClass } from './scene/terrain.js';
14
13
  import { getWaterClass, getFFTWaveGeneratorClass, getFBMWaveGeneratorClass } from './scene/water.js';
15
- import { getInterpolatorClass, getSkeletonRigClass, getSkinBindingClass, getSkeletonClass, getJointDynamicsModifierClass, getAnimationClass, getPropTrackClass, getNodeRotationTrackClass, getNodeScaleTrackClass, getNodeTranslationTrackClass, getNodeEulerRotationTrackClass, getFixedGeometryCacheTrackClass, getPCAGeometryCacheTrackClass, getMorphTrackClass } from './scene/animation.js';
14
+ import { getTextSpriteClass, getMSDFTextSpriteClass, getMSDFTextClass } from './scene/text.js';
15
+ import { getInterpolatorClass, getSkeletonClass, getSkeletonRigClass, getSkinBindingClass, getJointDynamicsModifierClass, getAnimationClass, getPropTrackClass, getNodeRotationTrackClass, getNodeScaleTrackClass, getNodeTranslationTrackClass, getNodeEulerRotationTrackClass, getFixedGeometryCacheTrackClass, getPCAGeometryCacheTrackClass, getMorphTrackClass } from './scene/animation.js';
16
16
  import '../../scene/scene.js';
17
17
  import '../../values.js';
18
18
  import '../../render/render_queue.js';
@@ -23,22 +23,24 @@ import '../../material/lambert.js';
23
23
  import '../../material/blinn.js';
24
24
  import '../../material/unlit.js';
25
25
  import '../../material/particle.js';
26
+ import '../../material/subsurfaceprofile.js';
26
27
  import '../../material/meshmaterial.js';
27
28
  import '../../material/grassmaterial.js';
28
29
  import '../../material/terrain-cm.js';
29
30
  import '../../material/pbrmr.js';
30
31
  import '../../material/pbrsg.js';
32
+ import '../../material/mtoon.js';
31
33
  import '../../material/pbrblueprint.js';
32
34
  import '../../material/sprite.js';
33
35
  import '../../material/sprite_std.js';
34
- import '../../material/msdf_text.js';
35
36
  import { PBRBlockNode, SpriteBlockNode, VertexBlockNode } from '../blueprint/material/pbr.js';
36
37
  import { ConstantScalarNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, ConstantBooleanNode, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node } from '../blueprint/common/constants.js';
37
38
  import { ConstantTexture2DNode, ConstantTexture2DArrayNode, ConstantTextureCubeNode, PannerNode, TextureSampleNode } from '../blueprint/material/texture.js';
38
39
  import { MakeVectorNode, SwizzleNode, EqualNode, NotEqualNode, LogicallyAndNode, LogicallyOrNode, CompComparisonNode, AnyConditionNode, AllConditionNode, SelectionNode, Degrees2RadiansNode, Radians2DegreesNode, SinNode, CosNode, TanNode, ArcSinNode, ArcCosNode, ArcTanNode, ArcTan2Node, SinHNode, CosHNode, TanHNode, ArcsineHNode, ArccosineHNode, ArctangentHNode, ExpNode, Exp2Node, LogNode, Log2Node, SqrtNode, InvSqrtNode, AbsNode, SignNode, FloorNode, CeilNode, FractNode, DDXNode, DDYNode, FWidthNode, CompAddNode, CompSubNode, CompMulNode, CompDivNode, ModNode, MinNode, MaxNode, PowNode, StepNode, SmoothStepNode, FmaNode, ClampNode, SaturateNode, MixNode, NormalizeNode, TransformNode, RotateAboutAxisNode, FaceForwardNode, ReflectNode, RefractNode, LengthNode, DistanceNode, DotProductNode, CrossProductNode, Hash1Node, Hash2Node, Hash3Node, SimplexNoise2DNode, PerlinNoise2DNode } from '../blueprint/common/math.js';
39
- import { VertexOutputNode, VertexIndexNode, InstanceIndexNode, VertexColorNode, VertexUVNode, VertexPositionNode, PixelWorldPositionNode, VertexNormalNode, PixelNormalNode, VertexTangentNode, VertexBinormalNode, ViewMatrixNode, ProjectionMatrixNode, ViewProjMatrixNode, InvProjMatrixNode, InvViewProjMatrixNode, BillboardMatrixNode, CameraPositionNode, CameraVectorNode, CameraNearFarNode, SkyEnvTextureNode, ElapsedTimeNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResolveVertexNormalNode } from '../blueprint/material/inputs.js';
40
+ import { VertexColorNode, VertexUVNode, VertexPositionNode, PixelWorldPositionNode, VertexNormalNode, PixelNormalNode, VertexTangentNode, VertexBinormalNode, ViewMatrixNode, ProjectionMatrixNode, ViewProjMatrixNode, InvProjMatrixNode, InvViewProjMatrixNode, BillboardMatrixNode, CameraPositionNode, CameraVectorNode, CameraNearFarNode, SkyEnvTextureNode, ElapsedTimeNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResolveVertexNormalNode, VertexOutputNode, VertexIndexNode, InstanceIndexNode } from '../blueprint/material/inputs.js';
40
41
  import { FunctionInputNode, FunctionOutputNode, FunctionCallNode } from '../blueprint/material/func.js';
41
42
  import '../../render/rendergraph/forward_plus_builder.js';
43
+ import '../../render/lightpass.js';
42
44
  import '../../render/sky.js';
43
45
  import '../../render/clipmap.js';
44
46
  import '../../shaders/atmosphere.js';
@@ -47,6 +49,7 @@ import '../../shadow/shadowmapper.js';
47
49
  import '../../scene/mesh.js';
48
50
  import '../../scene/basesprite.js';
49
51
  import '../../scene/meshdrawable.js';
52
+ import '../../material/msdf_text.js';
50
53
  import '../../scene/water.js';
51
54
  import '../../scene/particlesys.js';
52
55
  import '../../scene/batchgroup.js';
@@ -60,8 +63,8 @@ import '../../animation/joint_dynamics/collision.js';
60
63
  import '../../animation/joint_dynamics/solver.js';
61
64
  import '../../animation/joint_dynamics/joint_dynamics_system.js';
62
65
  import { getJSONPropClass, getJSONNumberClass, getJSONStringClass, getJSONBoolClass, getJSONObjectClass, getJSONArrayClass } from './json.js';
66
+ import { getScriptAttachmentClass } from './scene/script.js';
63
67
  import { getSpriteClass } from './scene/sprite.js';
64
- import { getTextSpriteClass, getMSDFTextSpriteClass, getMSDFTextClass } from './scene/text.js';
65
68
 
66
69
  const defaultValues = {
67
70
  bool: false,
@@ -114,29 +117,29 @@ const defaultValues = {
114
117
  ],
115
118
  command: null
116
119
  };
117
- /**
118
- * Manages serialization and deserialization of engine objects to/from JSON,
119
- * including asset resolution via a virtual file system (VFS) and asset manager.
120
- *
121
- * @remarks
122
- * - Keeps a registry of serializable classes and their properties.
123
- * - Converts object graphs to JSON using per-class metadata and property accessors.
124
- * - Supports async asset embedding/export and lazy deserialization via phases.
125
- * - Maps loaded assets/objects back to their source IDs for caching and deduplication.
126
- *
127
- * Typical workflow:
128
- * 1. Construct with a `VFS`.
129
- * 2. Optionally `registerClass` for custom types.
130
- * 3. Use `serializeObject` and `deserializeObject` to convert between runtime objects and JSON.
131
- * 4. Use `saveScene` / `loadScene` for scene I/O.
132
- *
133
- * Caching:
134
- * - `getAssetId` returns the known source ID for an allocated asset when available.
135
- *
136
- * Threading:
137
- * - Methods returning Promises perform async I/O using the provided `VFS`/AssetManager.
138
- *
139
- * @public
120
+ /**
121
+ * Manages serialization and deserialization of engine objects to/from JSON,
122
+ * including asset resolution via a virtual file system (VFS) and asset manager.
123
+ *
124
+ * @remarks
125
+ * - Keeps a registry of serializable classes and their properties.
126
+ * - Converts object graphs to JSON using per-class metadata and property accessors.
127
+ * - Supports async asset embedding/export and lazy deserialization via phases.
128
+ * - Maps loaded assets/objects back to their source IDs for caching and deduplication.
129
+ *
130
+ * Typical workflow:
131
+ * 1. Construct with a `VFS`.
132
+ * 2. Optionally `registerClass` for custom types.
133
+ * 3. Use `serializeObject` and `deserializeObject` to convert between runtime objects and JSON.
134
+ * 4. Use `saveScene` / `loadScene` for scene I/O.
135
+ *
136
+ * Caching:
137
+ * - `getAssetId` returns the known source ID for an allocated asset when available.
138
+ *
139
+ * Threading:
140
+ * - Methods returning Promises perform async I/O using the provided `VFS`/AssetManager.
141
+ *
142
+ * @public
140
143
  */ class ResourceManager {
141
144
  _classMap;
142
145
  _vfs;
@@ -146,10 +149,10 @@ const defaultValues = {
146
149
  _assetManager;
147
150
  _editorMode;
148
151
  _allocated;
149
- /**
150
- * Create a ResourceManager bound to a virtual file system.
151
- *
152
- * @param vfs - Virtual file system used for reading/writing assets and scenes.
152
+ /**
153
+ * Create a ResourceManager bound to a virtual file system.
154
+ *
155
+ * @param vfs - Virtual file system used for reading/writing assets and scenes.
153
156
  */ constructor(vfs, editorMode = false){
154
157
  this._vfs = vfs;
155
158
  this._editorMode = editorMode;
@@ -168,9 +171,9 @@ const defaultValues = {
168
171
  getScriptAttachmentClass(),
169
172
  getAABBClass(),
170
173
  getInterpolatorClass(),
174
+ getSkeletonClass(),
171
175
  getSkeletonRigClass(),
172
176
  getSkinBindingClass(),
173
- getSkeletonClass(),
174
177
  getJointDynamicsModifierClass(),
175
178
  getAnimationClass(this),
176
179
  getPropTrackClass(this),
@@ -196,17 +199,19 @@ const defaultValues = {
196
199
  getPunctualLightClass(),
197
200
  getDirectionalLightClass(),
198
201
  getSpotLightClass(),
199
- getRectLightClass(),
200
202
  getPointLightClass(),
203
+ getRectLightClass(),
201
204
  getCameraClass(),
202
205
  getPerspectiveCameraClass(),
203
206
  getOrthoCameraClass(),
204
207
  getBatchGroupClass(),
205
208
  getSceneClass(this),
209
+ getSubsurfaceProfileClass(),
206
210
  ...getMeshMaterialClass(),
207
211
  ...getPBRBluePrintMaterialClass(),
208
212
  ...getSpriteBlueprintMaterialClass(),
209
213
  ...getUnlitMaterialClass(this),
214
+ ...getMToonMaterialClass(this),
210
215
  ...getLambertMaterialClass(this),
211
216
  ...getBlinnMaterialClass(this),
212
217
  ...getPBRMetallicRoughnessMaterialClass(this),
@@ -216,12 +221,12 @@ const defaultValues = {
216
221
  ...getStandardSpriteMaterialClass(this),
217
222
  getBoxShapeClass(),
218
223
  getBoxFrameShapeClass(),
224
+ getCapsuleShapeClass(),
219
225
  getSphereShapeClass(),
220
226
  getTorusShapeClass(),
221
227
  getCylinderShapeClass(),
222
228
  getPlaneShapeClass(),
223
229
  getTetrahedronShapeClass(),
224
- getCapsuleShapeClass(),
225
230
  ConstantScalarNode.getSerializationCls(),
226
231
  ConstantVec2Node.getSerializationCls(),
227
232
  ConstantVec3Node.getSerializationCls(),
@@ -301,9 +306,6 @@ const defaultValues = {
301
306
  Hash3Node.getSerializationCls(),
302
307
  SimplexNoise2DNode.getSerializationCls(),
303
308
  PerlinNoise2DNode.getSerializationCls(),
304
- VertexOutputNode.getSerializationCls(),
305
- VertexIndexNode.getSerializationCls(),
306
- InstanceIndexNode.getSerializationCls(),
307
309
  VertexColorNode.getSerializationCls(),
308
310
  VertexUVNode.getSerializationCls(),
309
311
  VertexPositionNode.getSerializationCls(),
@@ -333,7 +335,10 @@ const defaultValues = {
333
335
  FunctionOutputNode.getSerializationCls(),
334
336
  FunctionCallNode.getSerializationCls(this),
335
337
  PannerNode.getSerializationCls(),
336
- TextureSampleNode.getSerializationCls()
338
+ TextureSampleNode.getSerializationCls(),
339
+ VertexOutputNode.getSerializationCls(),
340
+ VertexIndexNode.getSerializationCls(),
341
+ InstanceIndexNode.getSerializationCls()
337
342
  ].map((val)=>[
338
343
  val.ctor,
339
344
  val
@@ -342,75 +347,67 @@ const defaultValues = {
342
347
  this.registerProps(k[1]);
343
348
  }
344
349
  }
345
- /**
346
- * The virtual file system used by this manager.
347
- *
348
- * @remarks
349
- * Used by asset fetchers and scene save/load operations.
350
+ /**
351
+ * The virtual file system used by this manager.
352
+ *
353
+ * @remarks
354
+ * Used by asset fetchers and scene save/load operations.
350
355
  */ get VFS() {
351
356
  return this._vfs;
352
357
  }
353
358
  set VFS(vfs) {
354
359
  this._vfs = vfs;
355
360
  }
356
- /**
357
- * Wethether editor mode is enabled
358
- *
359
- * @remarks
360
- * In editor mode, some properties will be disabled
361
+ /**
362
+ * Wethether editor mode is enabled
363
+ *
364
+ * @remarks
365
+ * In editor mode, some properties will be disabled
361
366
  */ get editorMode() {
362
367
  return this._editorMode;
363
368
  }
364
- /**
365
- * AssetManager
369
+ /**
370
+ * AssetManager
366
371
  */ get assetManager() {
367
372
  return this._assetManager;
368
373
  }
369
- /**
370
- * Get the list of all registered serializable classes.
371
- *
372
- * @remarks
373
- * Includes built-in classes registered during construction and any custom classes
374
- * registered via `registerClass`.
375
- *
376
- * @returns An array of `SerializableClass` metadata.
374
+ /**
375
+ * Get the list of all registered serializable classes.
376
+ *
377
+ * @remarks
378
+ * Includes built-in classes registered during construction and any custom classes
379
+ * registered via `registerClass`.
380
+ *
381
+ * @returns An array of `SerializableClass` metadata.
377
382
  */ getClasses() {
378
383
  return [
379
384
  ...this._classMap.values()
380
385
  ];
381
386
  }
382
- /**
383
- * Get serialization metadata by a constructor function.
384
- *
385
- * @param ctor - The class constructor to look up.
386
- *
387
- * @returns The `SerializableClass` metadata, or `null` if not found.
387
+ /**
388
+ * Get serialization metadata by a constructor function.
389
+ *
390
+ * @param ctor - The class constructor to look up.
391
+ *
392
+ * @returns The `SerializableClass` metadata, or `null` if not found.
388
393
  */ getClassByConstructor(ctor) {
389
- let current = ctor;
390
- while(typeof current === 'function' && current !== Function.prototype){
391
- const cls = this._classMap.get(current);
392
- if (cls) {
393
- return cls;
394
- }
395
- current = Object.getPrototypeOf(current);
396
- }
397
- return null;
394
+ return this._classMap.get(ctor) ?? null;
398
395
  }
399
- /**
400
- * Get serialization metadata by an object instance.
401
- *
402
- * @param obj - The object whose constructor will be used for the lookup.
403
- *
404
- * @returns The `SerializableClass` metadata, or `null` if not found.
396
+ /**
397
+ * Get serialization metadata by an object instance.
398
+ *
399
+ * @param obj - The object whose constructor will be used for the lookup.
400
+ *
401
+ * @returns The `SerializableClass` metadata, or `null` if not found.
405
402
  */ getClassByObject(obj) {
406
403
  return this.getClassByConstructor(obj.constructor);
407
404
  }
408
- /**
409
- * Get serialization metadata by class name.
410
- *
411
- * @param className - Fully qualified class name as stored in JSON.
412
- *
413
- * @returns The `SerializableClass` metadata, or `null` if not found.
405
+ /**
406
+ * Get serialization metadata by class name.
407
+ *
408
+ * @param className - Fully qualified class name as stored in JSON.
409
+ *
410
+ * @returns The `SerializableClass` metadata, or `null` if not found.
414
411
  */ getClassByName(className) {
415
412
  for (const val of this._classMap){
416
413
  if (val[0].name === className) {
@@ -419,12 +416,12 @@ const defaultValues = {
419
416
  }
420
417
  return null;
421
418
  }
422
- /**
423
- * Find the class that owns a given property accessor.
424
- *
425
- * @param prop - Property accessor to search for.
426
- *
427
- * @returns The `SerializableClass` that declares the property, or `null` if unknown.
419
+ /**
420
+ * Find the class that owns a given property accessor.
421
+ *
422
+ * @param prop - Property accessor to search for.
423
+ *
424
+ * @returns The `SerializableClass` that declares the property, or `null` if unknown.
428
425
  */ getClassByProperty(prop) {
429
426
  for (const k of this._clsPropMap){
430
427
  if (k[1].indexOf(prop) >= 0) {
@@ -433,104 +430,92 @@ const defaultValues = {
433
430
  }
434
431
  return null;
435
432
  }
436
- /**
437
- * Get the properties declared on a given class.
438
- *
439
- * @param cls - Serializable class metadata.
440
- *
441
- * @returns An array of `PropertyAccessor` entries, or `null` if none.
433
+ /**
434
+ * Get the properties declared on a given class.
435
+ *
436
+ * @param cls - Serializable class metadata.
437
+ *
438
+ * @returns An array of `PropertyAccessor` entries, or `null` if none.
442
439
  */ getPropertiesByClass(cls) {
443
440
  return this._clsPropMap.get(cls) ?? null;
444
441
  }
445
- /**
446
- * Get all properties declared on a given class and its ancestors.
447
- *
448
- * @param cls - Serializable class metadata.
449
- *
450
- * @returns An array of `PropertyAccessor` entries, or `null` if none.
442
+ /**
443
+ * Get all properties declared on a class, including inherited serializable properties.
451
444
  */ getAllPropertiesByClass(cls) {
452
- const props = new Map();
453
- while(cls){
454
- const classProps = this.getPropertiesByClass(cls);
455
- if (classProps) {
456
- for (const prop of classProps){
457
- if (!props.has(prop.name)) {
458
- props.set(prop.name, prop);
459
- }
460
- }
461
- }
462
- cls = this.getClassByConstructor(cls.parent);
445
+ const props = [];
446
+ let current = cls;
447
+ while(current){
448
+ props.unshift(...this.getPropertiesByClass(current) ?? []);
449
+ current = current.parent ? this.getClassByConstructor(current.parent) : null;
463
450
  }
464
- return [
465
- ...props.values()
466
- ];
451
+ return props;
467
452
  }
468
- /**
469
- * Get a property accessor by class and property name.
470
- *
471
- * @param cls - Serializable class metadata.
472
- * @param name - Property name to search for.
473
- *
474
- * @returns The `PropertyAccessor`, or `null` if not found.
453
+ /**
454
+ * Get a property accessor by class and property name.
455
+ *
456
+ * @param cls - Serializable class metadata.
457
+ * @param name - Property name to search for.
458
+ *
459
+ * @returns The `PropertyAccessor`, or `null` if not found.
475
460
  */ getPropertyByClass(cls, name) {
476
461
  return this.getPropertiesByClass(cls)?.find((value)=>value.name === name) ?? null;
477
462
  }
478
- /**
479
- * Get a property accessor by its canonical path.
480
- *
481
- * @remarks
482
- * The canonical path format is `/ClassName/propName`.
483
- *
484
- * @param name - Canonical property path.
485
- *
486
- * @returns The `PropertyAccessor`, or `null` if not found.
463
+ /**
464
+ * Get a property accessor by its canonical path.
465
+ *
466
+ * @remarks
467
+ * The canonical path format is `/ClassName/propName`.
468
+ *
469
+ * @param name - Canonical property path.
470
+ *
471
+ * @returns The `PropertyAccessor`, or `null` if not found.
487
472
  */ getPropertyByName(name) {
488
473
  return this._propMap[name] ?? null;
489
474
  }
490
- /**
491
- * Get the canonical path for a property accessor.
492
- *
493
- * @remarks
494
- * Returns a string like `/ClassName/propName` if the property is registered.
495
- *
496
- * @param prop - Property accessor.
497
- *
498
- * @returns The canonical path, or `null` if unknown.
475
+ /**
476
+ * Get the canonical path for a property accessor.
477
+ *
478
+ * @remarks
479
+ * Returns a string like `/ClassName/propName` if the property is registered.
480
+ *
481
+ * @param prop - Property accessor.
482
+ *
483
+ * @returns The canonical path, or `null` if unknown.
499
484
  */ getPropertyName(prop) {
500
485
  return this._propNameMap.get(prop) ?? null;
501
486
  }
502
- /**
503
- * Register a serializable class and its properties.
504
- *
505
- * @remarks
506
- * - No effect if the class is already registered.
507
- * - Also registers the class's properties with canonical paths.
508
- *
509
- * @param cls - Serializable class metadata to register.
487
+ /**
488
+ * Register a serializable class and its properties.
489
+ *
490
+ * @remarks
491
+ * - No effect if the class is already registered.
492
+ * - Also registers the class's properties with canonical paths.
493
+ *
494
+ * @param cls - Serializable class metadata to register.
510
495
  */ registerClass(cls) {
511
496
  if (!this._classMap.has(cls.ctor)) {
512
497
  this._classMap.set(cls.ctor, cls);
513
498
  this.registerProps(cls);
514
499
  }
515
500
  }
516
- /**
517
- * Get the known asset ID previously associated with a loaded/allocated asset.
518
- *
519
- * @remarks
520
- * Returns `null` if the asset was not loaded or tracked by this manager.
521
- *
522
- * @param asset - Asset instance (e.g., texture, model group) to look up.
523
- *
524
- * @returns The asset ID string, or `null` if unknown.
501
+ /**
502
+ * Get the known asset ID previously associated with a loaded/allocated asset.
503
+ *
504
+ * @remarks
505
+ * Returns `null` if the asset was not loaded or tracked by this manager.
506
+ *
507
+ * @param asset - Asset instance (e.g., texture, model group) to look up.
508
+ *
509
+ * @returns The asset ID string, or `null` if unknown.
525
510
  */ getAssetId(asset) {
526
511
  return this._allocated.get(asset) ?? null;
527
512
  }
528
- /**
529
- * Associate an asset ID to a loaded/allocated asset.
530
- *
531
- * @param asset - Asset instance (e.g., texture, model group) to set Id.
532
- * @param id - Asset ID to associated to this asset.
533
- *
513
+ /**
514
+ * Associate an asset ID to a loaded/allocated asset.
515
+ *
516
+ * @param asset - Asset instance (e.g., texture, model group) to set Id.
517
+ * @param id - Asset ID to associated to this asset.
518
+ *
534
519
  */ setAssetId(asset, id) {
535
520
  if (asset) {
536
521
  if (id) {
@@ -540,74 +525,35 @@ const defaultValues = {
540
525
  }
541
526
  }
542
527
  }
543
- /**
544
- * Register a model loader.
545
- *
546
- * @param mimeType - What MIME type of files this loader can load
547
- * @param loader - A concrete model loader implementation.
548
- */ setModelLoader(mimeType, loader) {
549
- this._assetManager.setModelLoader(mimeType, loader);
550
- }
551
- /**
552
- * Fetch a binary asset by ID via the asset manager.
553
- *
554
- * @remarks
555
- * - Associates the returned data with the given ID for future reverse lookup.
556
- * - The ID is typically a VFS path or locator.
557
- *
558
- * @param path - VFS path of the binary asset.
559
- *
560
- * @returns A Promise that resolves to the binary content, or `null` if not found.
561
- */ async fetchBinary(path, options) {
562
- const id = this.VFS.normalizePath(path);
563
- const data = await this._assetManager.fetchBinaryData(id, null, null, options);
528
+ /**
529
+ * Fetch a binary asset by ID via the asset manager.
530
+ *
531
+ * @remarks
532
+ * - Associates the returned data with the given ID for future reverse lookup.
533
+ * - The ID is typically a VFS path or locator.
534
+ *
535
+ * @param id - Asset identifier or path.
536
+ *
537
+ * @returns A Promise that resolves to the binary content, or `null` if not found.
538
+ */ async fetchBinary(id) {
539
+ const data = await this._assetManager.fetchBinaryData(id);
564
540
  if (data) {
565
541
  this._allocated.set(data, id);
566
542
  }
567
543
  return data;
568
544
  }
569
- /**
570
- * Fetch a text asset by ID via the asset manager.
571
- *
572
- * @param path - VFS path of TTF/OTF file.
573
- * @returns A Promise that resolves to the font asset, or `null` if not found.
574
- */ async fetchFontAsset(path, options) {
575
- const id = this.VFS.normalizePath(path);
576
- const fontAsset = await this._assetManager.fetchFontAsset(id, options);
577
- if (fontAsset) {
578
- this._allocated.set(fontAsset, id);
579
- }
580
- return fontAsset;
581
- }
582
- /**
583
- * Get a cached font asset by ID if already loaded.
584
- *
585
- * @param path - VFS path of TTF/OTF file.
586
- * @returns The cached FontAsset if it exists and is loaded, or null if not cached or still loading.
587
- */ getFontAsset(path) {
588
- return this._assetManager.getFontAsset(this.VFS.normalizePath(path));
589
- }
590
- /**
591
- * Removes a cached font asset entry by asset instance or asset ID.
592
- *
593
- * @param asset - Loaded font asset instance or its asset ID/path.
594
- * @returns `true` if a cache entry existed and was removed.
595
- */ releaseFontAsset(asset) {
596
- const path = typeof asset === 'string' ? asset : this.getAssetId(asset);
597
- return path ? this._assetManager.releaseFontAsset(this.VFS.normalizePath(path)) : false;
598
- }
599
- /**
600
- * Serialize an object to a JSON structure using registered class metadata.
601
- *
602
- * @remarks
603
- * - Throws if the object's class is not registered.
604
- * - Populates `asyncTasks` with pending I/O tasks for embedded resources.
605
- *
606
- * @param obj - The object to serialize.
607
- * @param json - Optional existing JSON object to fill.
608
- * @param asyncTasks - Optional list to collect async tasks for embedded asset export.
609
- *
610
- * @returns The serialized JSON structure.
545
+ /**
546
+ * Serialize an object to a JSON structure using registered class metadata.
547
+ *
548
+ * @remarks
549
+ * - Throws if the object's class is not registered.
550
+ * - Populates `asyncTasks` with pending I/O tasks for embedded resources.
551
+ *
552
+ * @param obj - The object to serialize.
553
+ * @param json - Optional existing JSON object to fill.
554
+ * @param asyncTasks - Optional list to collect async tasks for embedded asset export.
555
+ *
556
+ * @returns The serialized JSON structure.
611
557
  */ async serializeObject(obj, json, asyncTasks) {
612
558
  if (obj === null || obj === undefined) {
613
559
  return obj;
@@ -633,14 +579,14 @@ const defaultValues = {
633
579
  }
634
580
  return json;
635
581
  }
636
- /**
637
- * Serialize object properties into a JSON structure.
638
- *
639
- * @param obj - The target object to serialize.
640
- * @param json - The JSON structure to populate.
641
- * @param asyncTasks - Optional list to collect async tasks for embedded asset export.
642
- * @param info - Optional serialization metadata for the object's class.
643
- * @returns A Promise that resolves when serialization is complete.
582
+ /**
583
+ * Serialize object properties into a JSON structure.
584
+ *
585
+ * @param obj - The target object to serialize.
586
+ * @param json - The JSON structure to populate.
587
+ * @param asyncTasks - Optional list to collect async tasks for embedded asset export.
588
+ * @param info - Optional serialization metadata for the object's class.
589
+ * @returns A Promise that resolves when serialization is complete.
644
590
  */ async serializeObjectProps(obj, json, asyncTasks, info) {
645
591
  if (!info) {
646
592
  const cls = this.getClasses();
@@ -657,17 +603,17 @@ const defaultValues = {
657
603
  }
658
604
  return json;
659
605
  }
660
- /**
661
- * Deserialize a JSON structure into an object instance.
662
- *
663
- * @remarks
664
- * - Uses the `ClassName` field to locate the registered class.
665
- * - Supports custom `createFunc` and phased property loading.
666
- *
667
- * @param ctx - Context object passed to custom constructors/resolvers.
668
- * @param json - The serialized JSON structure.
669
- *
670
- * @returns A Promise resolving to the reconstructed object instance, or `null` on failure.
606
+ /**
607
+ * Deserialize a JSON structure into an object instance.
608
+ *
609
+ * @remarks
610
+ * - Uses the `ClassName` field to locate the registered class.
611
+ * - Supports custom `createFunc` and phased property loading.
612
+ *
613
+ * @param ctx - Context object passed to custom constructors/resolvers.
614
+ * @param json - The serialized JSON structure.
615
+ *
616
+ * @returns A Promise resolving to the reconstructed object instance, or `null` on failure.
671
617
  */ async deserializeObject(ctx, json) {
672
618
  const cls = this.getClasses();
673
619
  const className = json['ClassName'];
@@ -700,12 +646,12 @@ const defaultValues = {
700
646
  }
701
647
  return obj;
702
648
  }
703
- /**
704
- * Deserialize object properties from JSON into an existing object instance.
705
- *
706
- * @param obj - The target object to populate.
707
- * @param json - The JSON structure containing serialized properties.
708
- * @param info - Optional serialization metadata for the object's class.
649
+ /**
650
+ * Deserialize object properties from JSON into an existing object instance.
651
+ *
652
+ * @param obj - The target object to populate.
653
+ * @param json - The JSON structure containing serialized properties.
654
+ * @param info - Optional serialization metadata for the object's class.
709
655
  */ async deserializeObjectProps(obj, json, info) {
710
656
  if (!info) {
711
657
  const cls = this.getClasses();
@@ -720,14 +666,14 @@ const defaultValues = {
720
666
  info = this.getClassByConstructor(info.parent);
721
667
  }
722
668
  }
723
- /**
724
- * Load a model by ID and track the allocation for reverse lookup.
725
- *
726
- * @param path - VFS path of the model file.
727
- * @param scene - Scene into which the model is loaded.
728
- * @param options - Optional model fetch options.
729
- *
730
- * @returns A Promise resolving to the loaded model object, or `null` if failed.
669
+ /**
670
+ * Load a model by ID and track the allocation for reverse lookup.
671
+ *
672
+ * @param id - Model identifier or path.
673
+ * @param scene - Scene into which the model is loaded.
674
+ * @param options - Optional model fetch options.
675
+ *
676
+ * @returns A Promise resolving to the loaded model object, or `null` if failed.
731
677
  */ async fetchModel(path, scene, options) {
732
678
  const id = this.VFS.normalizePath(path);
733
679
  const model = await this._assetManager.fetchModel(scene, id, options);
@@ -737,83 +683,106 @@ const defaultValues = {
737
683
  }
738
684
  return model;
739
685
  }
740
- /**
741
- * Load a texture directly from an ArrayBuffer or typed array.
742
- *
743
- * - Chooses an appropriate loader based on the provided MIME type.
744
- * - Can upload into an existing texture if `texture` is specified.
745
- *
746
- * @typeParam T - Expected concrete texture type.
747
- * @param arrayBuffer - Raw texture data buffer.
748
- * @param mimeType - MIME type of the texture (must be supported by a registered loader).
749
- * @param srgb - If true, treat image as sRGB; otherwise linear.
750
- * @param samplerOptions - Optional sampler options passed to the loader path.
751
- * @param texture - Optional destination texture to populate.
752
- * @returns A promise that resolves to the created or populated texture.
686
+ /**
687
+ * Load a texture directly from an ArrayBuffer or typed array.
688
+ *
689
+ * - Chooses an appropriate loader based on the provided MIME type.
690
+ * - Can upload into an existing texture if `texture` is specified.
691
+ *
692
+ * @typeParam T - Expected concrete texture type.
693
+ * @param arrayBuffer - Raw texture data buffer.
694
+ * @param mimeType - MIME type of the texture (must be supported by a registered loader).
695
+ * @param srgb - If true, treat image as sRGB; otherwise linear.
696
+ * @param samplerOptions - Optional sampler options passed to the loader path.
697
+ * @param texture - Optional destination texture to populate.
698
+ * @returns A promise that resolves to the created or populated texture.
753
699
  */ async loadTextureFromBuffer(arrayBuffer, mimeType, srgb, samplerOptions, texture) {
754
700
  return this._assetManager.loadTextureFromBuffer(arrayBuffer, mimeType, srgb, samplerOptions, texture);
755
701
  }
756
- /**
757
- * Load a texture by ID and track the allocation for reverse lookup.
758
- *
759
- * @param path - VFS path of the texture file.
760
- * @param options - Optional texture fetch options.
761
- *
762
- * @returns A Promise resolving to the loaded texture, or `null` if failed.
763
- */ async fetchTexture(path, options) {
764
- const id = this.VFS.normalizePath(path);
702
+ /**
703
+ * Load a texture by ID and track the allocation for reverse lookup.
704
+ *
705
+ * @param id - Texture identifier or path.
706
+ * @param options - Optional texture fetch options.
707
+ *
708
+ * @returns A Promise resolving to the loaded texture, or `null` if failed.
709
+ */ async fetchTexture(id, options) {
765
710
  const texture = await this._assetManager.fetchTexture(id, options);
766
711
  if (texture) {
767
712
  this._allocated.set(texture, id);
768
713
  }
769
714
  return texture;
770
715
  }
771
- /**
772
- * Load a material by ID and track the allocation for reverse lookup.
773
- *
774
- * @param path - VFS path of the material file.
775
- *
776
- * @returns A Promise resolving to the loaded material, or `null` if failed.
777
- */ async fetchMaterial(path, options) {
778
- const id = this.VFS.normalizePath(path);
716
+ /**
717
+ * Load a material by ID and track the allocation for reverse lookup.
718
+ *
719
+ * @param id - Material identifier or path.
720
+ *
721
+ * @returns A Promise resolving to the loaded material, or `null` if failed.
722
+ */ async fetchMaterial(id, options) {
779
723
  const material = await this._assetManager.fetchMaterial(id, options);
780
724
  if (material) {
781
725
  this._allocated.set(material, id);
782
726
  }
783
727
  return material;
784
728
  }
785
- /**
786
- * Reload specific blue print materials
787
- *
788
- * @param filter - Determine whether a blue print material should reload.
789
- *
729
+ /**
730
+ * Reload specific blue print materials
731
+ *
732
+ * @param filter - Determine whether a blue print material should reload.
733
+ *
790
734
  */ async reloadBluePrintMaterials(filter) {
791
735
  await this._assetManager.reloadBluePrintMaterials(filter);
792
736
  }
793
- /**
794
- * Mark specific blue print as changed
795
- * @param path - BluePrint file path
737
+ /**
738
+ * Mark specific blue print as changed
739
+ * @param path - BluePrint file path
796
740
  */ invalidateBluePrint(path) {
797
741
  this._assetManager.invalidateBluePrint(path);
798
742
  }
799
- /**
800
- * Load a primitive by ID and track the allocation for reverse lookup.
801
- *
802
- * @param path - VFS path of the primitive file.
803
- *
804
- * @returns A Promise resolving to the loaded primitive, or `null` if failed.
805
- */ async fetchPrimitive(path, options) {
806
- const id = this.VFS.normalizePath(path);
743
+ /**
744
+ * Register a model loader by MIME type.
745
+ */ setModelLoader(mimeType, loader) {
746
+ this._assetManager.setModelLoader(mimeType, loader);
747
+ }
748
+ /**
749
+ * Load a primitive by ID and track the allocation for reverse lookup.
750
+ *
751
+ * @param id - Primitive identifier or path.
752
+ *
753
+ * @returns A Promise resolving to the loaded primitive, or `null` if failed.
754
+ */ async fetchPrimitive(id, options) {
807
755
  const primitive = await this._assetManager.fetchPrimitive(id, options);
808
756
  if (primitive) {
809
757
  this._allocated.set(primitive, id);
810
758
  }
811
759
  return primitive;
812
760
  }
813
- /**
814
- * Load a prefab content.
815
- * @param path - Path to the prefab JSON file in VFS.
816
- * @returns A Promise resolving to the prefab json object, or `null` on failure.
761
+ /**
762
+ * Load a font asset by path and track the allocation for reverse lookup.
763
+ */ async fetchFontAsset(path, options) {
764
+ const id = this.VFS.normalizePath(path);
765
+ const fontAsset = await this._assetManager.fetchFontAsset(id, options);
766
+ if (fontAsset) {
767
+ this._allocated.set(fontAsset, id);
768
+ }
769
+ return fontAsset;
770
+ }
771
+ /**
772
+ * Returns the cached font asset if it is already loaded.
773
+ */ getFontAsset(path) {
774
+ return this._assetManager.getFontAsset(this.VFS.normalizePath(path));
775
+ }
776
+ /**
777
+ * Releases a cached font asset.
778
+ */ releaseFontAsset(asset) {
779
+ const path = typeof asset === 'string' ? asset : this.getAssetId(asset);
780
+ return path ? this._assetManager.releaseFontAsset(this.VFS.normalizePath(path)) : false;
781
+ }
782
+ /**
783
+ * Load a prefab content.
784
+ * @param path - Path to the prefab JSON file in VFS.
785
+ * @returns A Promise resolving to the prefab json object, or `null` on failure.
817
786
  */ async loadPrefabContent(path) {
818
787
  try {
819
788
  const content = await this._vfs.readFile(path, {
@@ -826,11 +795,11 @@ const defaultValues = {
826
795
  return null;
827
796
  }
828
797
  }
829
- /**
830
- * Instantiate a prefab from a JSON file via VFS.
831
- * @param parent - Parent node to attach the instantiated prefab to.
832
- * @param path - Path to the prefab JSON file in VFS.
833
- * @returns A Promise resolving to the instantiated `SceneNode`, or `null` on failure.
798
+ /**
799
+ * Instantiate a prefab from a JSON file via VFS.
800
+ * @param parent - Parent node to attach the instantiated prefab to.
801
+ * @param path - Path to the prefab JSON file in VFS.
802
+ * @returns A Promise resolving to the instantiated `SceneNode`, or `null` on failure.
834
803
  */ async instantiatePrefab(parent, path) {
835
804
  try {
836
805
  const json = await this.loadPrefabContent(path);
@@ -842,7 +811,6 @@ const defaultValues = {
842
811
  node.prefabId = tmpNode.get().prefabId;
843
812
  node.parent = parent;
844
813
  node.persistentId = randomUUID();
845
- node.animationSet.resetSkeletonModifiers();
846
814
  tmpNode.dispose();
847
815
  return node;
848
816
  } catch (err) {
@@ -850,16 +818,16 @@ const defaultValues = {
850
818
  return null;
851
819
  }
852
820
  }
853
- /**
854
- * Load a scene from a JSON file via VFS.
855
- *
856
- * @remarks
857
- * - Deserializes the scene graph.
858
- * - Attaches scripts referenced by nodes after load (asynchronous).
859
- *
860
- * @param filename - Path to the scene JSON file in VFS.
861
- *
862
- * @returns A Promise resolving to the loaded `Scene`.
821
+ /**
822
+ * Load a scene from a JSON file via VFS.
823
+ *
824
+ * @remarks
825
+ * - Deserializes the scene graph.
826
+ * - Attaches scripts referenced by nodes after load (asynchronous).
827
+ *
828
+ * @param filename - Path to the scene JSON file in VFS.
829
+ *
830
+ * @returns A Promise resolving to the loaded `Scene`.
863
831
  */ async loadScene(filename) {
864
832
  const content = await this._vfs.readFile(filename, {
865
833
  encoding: 'utf8'
@@ -867,15 +835,15 @@ const defaultValues = {
867
835
  const json = JSON.parse(content);
868
836
  return await this.deserializeObject(null, json);
869
837
  }
870
- /**
871
- * Save a scene to a JSON file via VFS.
872
- *
873
- * @remarks
874
- * - Collects async export tasks for embedded resources and awaits them.
875
- * - Writes a UTF-8 JSON representation to VFS.
876
- *
877
- * @param scene - Scene to serialize and save.
878
- * @param filename - Destination path in VFS.
838
+ /**
839
+ * Save a scene to a JSON file via VFS.
840
+ *
841
+ * @remarks
842
+ * - Collects async export tasks for embedded resources and awaits them.
843
+ * - Writes a UTF-8 JSON representation to VFS.
844
+ *
845
+ * @param scene - Scene to serialize and save.
846
+ * @param filename - Destination path in VFS.
879
847
  */ async saveScene(scene, filename) {
880
848
  const asyncTasks = [];
881
849
  const content = await this.serializeObject(scene, null, asyncTasks);
@@ -925,7 +893,7 @@ const defaultValues = {
925
893
  const u = q.shift();
926
894
  const ins = gs.incoming[u] || [];
927
895
  for (const conn of ins){
928
- const v = conn.targetNodeId; // predecessor
896
+ const v = conn.targetNodeId; // 前驱
929
897
  if (!reachable.has(v)) {
930
898
  reachable.add(v);
931
899
  q.push(v);
@@ -965,7 +933,7 @@ const defaultValues = {
965
933
  for (const u of currentLevel){
966
934
  const ins = gs.incoming[u] || [];
967
935
  for (const conn of ins){
968
- const v = conn.targetNodeId; // predecessor
936
+ const v = conn.targetNodeId; // 前驱
969
937
  if (!sub.has(v)) {
970
938
  continue;
971
939
  }
@@ -1007,11 +975,11 @@ const defaultValues = {
1007
975
  async loadBluePrint(path) {
1008
976
  return this._assetManager.loadBluePrint(path);
1009
977
  }
1010
- /**
1011
- * Clear cached allocations and asset-manager caches.
1012
- *
1013
- * @remarks
1014
- * Useful when reloading content or changing VFS mounts.
978
+ /**
979
+ * Clear cached allocations and asset-manager caches.
980
+ *
981
+ * @remarks
982
+ * Useful when reloading content or changing VFS mounts.
1015
983
  */ clearCache() {
1016
984
  this._allocated = new WeakMap();
1017
985
  this._assetManager.clearCache();
@@ -1030,18 +998,18 @@ const defaultValues = {
1030
998
  }
1031
999
  return null;
1032
1000
  }
1033
- /**
1034
- * Find the object targeted by an animation track starting from a node.
1035
- *
1036
- * @remarks
1037
- * - Parses a target path like `prop/subprop[0]/child` where indexed entries
1038
- * require `object_array` type and non-indexed entries require `object` type.
1039
- * - Returns `null` if any segment cannot be resolved through registered metadata.
1040
- *
1041
- * @param node - Root node used as the starting point.
1042
- * @param track - Property track containing a target path.
1043
- *
1044
- * @returns The resolved target object, or `null` if not found.
1001
+ /**
1002
+ * Find the object targeted by an animation track starting from a node.
1003
+ *
1004
+ * @remarks
1005
+ * - Parses a target path like `prop/subprop[0]/child` where indexed entries
1006
+ * require `object_array` type and non-indexed entries require `object` type.
1007
+ * - Returns `null` if any segment cannot be resolved through registered metadata.
1008
+ *
1009
+ * @param node - Root node used as the starting point.
1010
+ * @param track - Property track containing a target path.
1011
+ *
1012
+ * @returns The resolved target object, or `null` if not found.
1045
1013
  */ findAnimationTarget(node, track) {
1046
1014
  const target = track.target ?? '';
1047
1015
  const value = {