@zephyr3d/scene 0.9.4 → 0.9.6

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 (517) hide show
  1. package/dist/animation/animationmask.js +224 -0
  2. package/dist/animation/animationmask.js.map +1 -0
  3. package/dist/animation/animationset.js +268 -67
  4. package/dist/animation/animationset.js.map +1 -1
  5. package/dist/animation/animationtrack.js.map +1 -1
  6. package/dist/animation/eulerrotationtrack.js +3 -0
  7. package/dist/animation/eulerrotationtrack.js.map +1 -1
  8. package/dist/animation/fixed_geometry_cache_track.js +7 -0
  9. package/dist/animation/fixed_geometry_cache_track.js.map +1 -1
  10. package/dist/animation/ik_modifier.js.map +1 -1
  11. package/dist/animation/joint_dynamics/collision.js +6 -4
  12. package/dist/animation/joint_dynamics/collision.js.map +1 -1
  13. package/dist/animation/joint_dynamics/controller.js +390 -43
  14. package/dist/animation/joint_dynamics/controller.js.map +1 -1
  15. package/dist/animation/joint_dynamics/joint_dynamics_system.js +62 -3
  16. package/dist/animation/joint_dynamics/joint_dynamics_system.js.map +1 -1
  17. package/dist/animation/joint_dynamics/solver.js +4 -3
  18. package/dist/animation/joint_dynamics/solver.js.map +1 -1
  19. package/dist/animation/joint_dynamics/types.js.map +1 -1
  20. package/dist/animation/joint_dynamics_modifier.js +2 -0
  21. package/dist/animation/joint_dynamics_modifier.js.map +1 -1
  22. package/dist/animation/morphtarget.js +3 -72
  23. package/dist/animation/morphtarget.js.map +1 -1
  24. package/dist/animation/morphtrack.js +3 -0
  25. package/dist/animation/morphtrack.js.map +1 -1
  26. package/dist/animation/pca_geometry_cache_track.js +3 -0
  27. package/dist/animation/pca_geometry_cache_track.js.map +1 -1
  28. package/dist/animation/proptrack.js +3 -0
  29. package/dist/animation/proptrack.js.map +1 -1
  30. package/dist/animation/rotationtrack.js +3 -0
  31. package/dist/animation/rotationtrack.js.map +1 -1
  32. package/dist/animation/scaletrack.js +3 -0
  33. package/dist/animation/scaletrack.js.map +1 -1
  34. package/dist/animation/skeleton.js +254 -79
  35. package/dist/animation/skeleton.js.map +1 -1
  36. package/dist/animation/skeleton_modifier.js.map +1 -1
  37. package/dist/animation/spring_modifier.js.map +1 -1
  38. package/dist/animation/translationtrack.js +3 -0
  39. package/dist/animation/translationtrack.js.map +1 -1
  40. package/dist/app/engine.js +171 -107
  41. package/dist/app/engine.js.map +1 -1
  42. package/dist/app/scriptregistry.js +251 -80
  43. package/dist/app/scriptregistry.js.map +1 -1
  44. package/dist/asset/assetmanager.js +344 -365
  45. package/dist/asset/assetmanager.js.map +1 -1
  46. package/dist/asset/loaders/loader.js +1 -6
  47. package/dist/asset/loaders/loader.js.map +1 -1
  48. package/dist/asset/loaders/zabc/zabc_loader.js.map +1 -1
  49. package/dist/asset/model.js +1000 -131
  50. package/dist/asset/model.js.map +1 -1
  51. package/dist/avatar/wardrobe.js +474 -0
  52. package/dist/avatar/wardrobe.js.map +1 -0
  53. package/dist/index.d.ts +1126 -199
  54. package/dist/index.js +3 -2
  55. package/dist/index.js.map +1 -1
  56. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js +6 -3
  57. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  58. package/dist/material/mixins/pbr/common.js +72 -15
  59. package/dist/material/mixins/pbr/common.js.map +1 -1
  60. package/dist/material/msdf_text.js +3 -3
  61. package/dist/material/msdf_text.js.map +1 -1
  62. package/dist/material/msdf_text_sprite.js +4 -4
  63. package/dist/material/msdf_text_sprite.js.map +1 -1
  64. package/dist/material/pbrblueprint.js +102 -102
  65. package/dist/material/pbrblueprint.js.map +1 -1
  66. package/dist/render/envlight.js +54 -1
  67. package/dist/render/envlight.js.map +1 -1
  68. package/dist/render/sky.js +9 -0
  69. package/dist/render/sky.js.map +1 -1
  70. package/dist/scene/batchgroup.js +11 -13
  71. package/dist/scene/batchgroup.js.map +1 -1
  72. package/dist/scene/environment.js +15 -2
  73. package/dist/scene/environment.js.map +1 -1
  74. package/dist/scene/mesh.js +79 -16
  75. package/dist/scene/mesh.js.map +1 -1
  76. package/dist/scene/scene.js +1 -0
  77. package/dist/scene/scene.js.map +1 -1
  78. package/dist/scene/scene_node.js +203 -2
  79. package/dist/scene/scene_node.js.map +1 -1
  80. package/dist/text/font/cff_font.js +890 -0
  81. package/dist/text/font/cff_font.js.map +1 -0
  82. package/dist/text/font/font_asset.js +17 -3
  83. package/dist/text/font/font_asset.js.map +1 -1
  84. package/dist/text/msdf/generator.js.map +1 -1
  85. package/dist/text/msdf/shape.js +4 -1
  86. package/dist/text/msdf/shape.js.map +1 -1
  87. package/dist/text/runtime/msdf_text_atlas_manager.js +4 -1
  88. package/dist/text/runtime/msdf_text_atlas_manager.js.map +1 -1
  89. package/dist/utility/blueprint/material/inputs.js +1157 -1154
  90. package/dist/utility/blueprint/material/inputs.js.map +1 -1
  91. package/dist/utility/bounding_volume.js.map +1 -1
  92. package/dist/utility/pmrem.js +34 -8
  93. package/dist/utility/pmrem.js.map +1 -1
  94. package/dist/utility/serialization/manager.js +22 -9
  95. package/dist/utility/serialization/manager.js.map +1 -1
  96. package/dist/utility/serialization/scene/animation.js +700 -7
  97. package/dist/utility/serialization/scene/animation.js.map +1 -1
  98. package/dist/utility/serialization/scene/mesh.js +64 -4
  99. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  100. package/dist/utility/serialization/scene/node.js +187 -8
  101. package/dist/utility/serialization/scene/node.js.map +1 -1
  102. package/dist/utility/serialization/types.js.map +1 -1
  103. package/dist/utility/textures/sheenlut.js +138 -0
  104. package/dist/utility/textures/sheenlut.js.map +1 -0
  105. package/package.json +2 -2
  106. package/dist/animation/ik/ik_chain_builder.js +0 -68
  107. package/dist/animation/ik/ik_chain_builder.js.map +0 -1
  108. package/dist/animation/ik/ik_pole_constraint.js +0 -123
  109. package/dist/animation/ik/ik_pole_constraint.js.map +0 -1
  110. package/dist/animation/ik/ik_track.js +0 -96
  111. package/dist/animation/ik/ik_track.js.map +0 -1
  112. package/dist/animation/ik_postprocessor.js +0 -71
  113. package/dist/animation/ik_postprocessor.js.map +0 -1
  114. package/dist/animation/joint_dynamics/math.js +0 -16
  115. package/dist/animation/joint_dynamics/math.js.map +0 -1
  116. package/dist/animation/manual_transform_processor.js +0 -156
  117. package/dist/animation/manual_transform_processor.js.map +0 -1
  118. package/dist/animation/skeleton_postprocessor.js +0 -50
  119. package/dist/animation/skeleton_postprocessor.js.map +0 -1
  120. package/dist/animation/spring2/collision.js +0 -469
  121. package/dist/animation/spring2/collision.js.map +0 -1
  122. package/dist/animation/spring2/constraints.js +0 -329
  123. package/dist/animation/spring2/constraints.js.map +0 -1
  124. package/dist/animation/spring2/controller.js +0 -434
  125. package/dist/animation/spring2/controller.js.map +0 -1
  126. package/dist/animation/spring2/math.js +0 -16
  127. package/dist/animation/spring2/math.js.map +0 -1
  128. package/dist/animation/spring2/solver.js +0 -624
  129. package/dist/animation/spring2/solver.js.map +0 -1
  130. package/dist/animation/spring2/spring_system.js +0 -118
  131. package/dist/animation/spring2/spring_system.js.map +0 -1
  132. package/dist/animation/spring2/types.js +0 -19
  133. package/dist/animation/spring2/types.js.map +0 -1
  134. package/dist/animation/spring_postprocessor.js +0 -54
  135. package/dist/animation/spring_postprocessor.js.map +0 -1
  136. package/dist/asset/loaders/gltf/gltf_loader.js +0 -1273
  137. package/dist/asset/loaders/gltf/gltf_loader.js.map +0 -1
  138. package/dist/asset/loaders/gltf/helpers.js +0 -331
  139. package/dist/asset/loaders/gltf/helpers.js.map +0 -1
  140. package/dist/material/sprite3d.js +0 -301
  141. package/dist/material/sprite3d.js.map +0 -1
  142. package/dist/material/sprite3d_std.js +0 -116
  143. package/dist/material/sprite3d_std.js.map +0 -1
  144. package/dist/material/sprite3dblueprint.js +0 -235
  145. package/dist/material/sprite3dblueprint.js.map +0 -1
  146. package/dist/material/sprite_sdf.js +0 -106
  147. package/dist/material/sprite_sdf.js.map +0 -1
  148. package/dist/material/terrainmaterial.js +0 -368
  149. package/dist/material/terrainmaterial.js.map +0 -1
  150. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js +0 -38
  151. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js.map +0 -1
  152. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js +0 -10
  153. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js.map +0 -1
  154. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js +0 -127
  155. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js.map +0 -1
  156. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js +0 -263
  157. package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js.map +0 -1
  158. package/dist/render/deferredlightpass.js +0 -510
  159. package/dist/render/deferredlightpass.js.map +0 -1
  160. package/dist/render/deferredshadowlightpass.js +0 -428
  161. package/dist/render/deferredshadowlightpass.js.map +0 -1
  162. package/dist/render/gbufferpass.js +0 -50
  163. package/dist/render/gbufferpass.js.map +0 -1
  164. package/dist/scene/sdftextsprite.js +0 -322
  165. package/dist/scene/sdftextsprite.js.map +0 -1
  166. package/dist/scene/sprite3d.js +0 -18
  167. package/dist/scene/sprite3d.js.map +0 -1
  168. package/dist/scene/terrain/grass.js +0 -280
  169. package/dist/scene/terrain/grass.js.map +0 -1
  170. package/dist/scene/terrain/heightfield.js +0 -475
  171. package/dist/scene/terrain/heightfield.js.map +0 -1
  172. package/dist/scene/terrain/patch.js +0 -532
  173. package/dist/scene/terrain/patch.js.map +0 -1
  174. package/dist/scene/terrain/quadtree.js +0 -461
  175. package/dist/scene/terrain/quadtree.js.map +0 -1
  176. package/dist/scene/terrain/terrain.js +0 -231
  177. package/dist/scene/terrain/terrain.js.map +0 -1
  178. package/dist/src/animation/animation.js +0 -127
  179. package/dist/src/animation/animation.js.map +0 -1
  180. package/dist/src/animation/animationset.js +0 -255
  181. package/dist/src/animation/animationset.js.map +0 -1
  182. package/dist/src/animation/animationtrack.js +0 -34
  183. package/dist/src/animation/animationtrack.js.map +0 -1
  184. package/dist/src/animation/eulerrotationtrack.js +0 -52
  185. package/dist/src/animation/eulerrotationtrack.js.map +0 -1
  186. package/dist/src/animation/morphtarget.js +0 -93
  187. package/dist/src/animation/morphtarget.js.map +0 -1
  188. package/dist/src/animation/morphtrack.js +0 -70
  189. package/dist/src/animation/morphtrack.js.map +0 -1
  190. package/dist/src/animation/proptrack.js +0 -161
  191. package/dist/src/animation/proptrack.js.map +0 -1
  192. package/dist/src/animation/rotationtrack.js +0 -51
  193. package/dist/src/animation/rotationtrack.js.map +0 -1
  194. package/dist/src/animation/scaletrack.js +0 -50
  195. package/dist/src/animation/scaletrack.js.map +0 -1
  196. package/dist/src/animation/skeleton.js +0 -204
  197. package/dist/src/animation/skeleton.js.map +0 -1
  198. package/dist/src/animation/translationtrack.js +0 -50
  199. package/dist/src/animation/translationtrack.js.map +0 -1
  200. package/dist/src/app/app.js +0 -129
  201. package/dist/src/app/app.js.map +0 -1
  202. package/dist/src/app/inputmgr.js +0 -267
  203. package/dist/src/app/inputmgr.js.map +0 -1
  204. package/dist/src/asset/assetmanager.js +0 -404
  205. package/dist/src/asset/assetmanager.js.map +0 -1
  206. package/dist/src/asset/builtin.js +0 -337
  207. package/dist/src/asset/builtin.js.map +0 -1
  208. package/dist/src/asset/loaders/dds/dds.js +0 -470
  209. package/dist/src/asset/loaders/dds/dds.js.map +0 -1
  210. package/dist/src/asset/loaders/dds/dds_loader.js +0 -28
  211. package/dist/src/asset/loaders/dds/dds_loader.js.map +0 -1
  212. package/dist/src/asset/loaders/gltf/gltf_loader.js +0 -1265
  213. package/dist/src/asset/loaders/gltf/gltf_loader.js.map +0 -1
  214. package/dist/src/asset/loaders/gltf/helpers.js +0 -327
  215. package/dist/src/asset/loaders/gltf/helpers.js.map +0 -1
  216. package/dist/src/asset/loaders/hdr/hdr.js +0 -180
  217. package/dist/src/asset/loaders/hdr/hdr.js.map +0 -1
  218. package/dist/src/asset/loaders/image/tga_Loader.js +0 -116
  219. package/dist/src/asset/loaders/image/tga_Loader.js.map +0 -1
  220. package/dist/src/asset/loaders/image/webimage_loader.js +0 -63
  221. package/dist/src/asset/loaders/image/webimage_loader.js.map +0 -1
  222. package/dist/src/asset/loaders/loader.js +0 -45
  223. package/dist/src/asset/loaders/loader.js.map +0 -1
  224. package/dist/src/asset/model.js +0 -414
  225. package/dist/src/asset/model.js.map +0 -1
  226. package/dist/src/blitter/bilateralblur.js +0 -221
  227. package/dist/src/blitter/bilateralblur.js.map +0 -1
  228. package/dist/src/blitter/blitter.js +0 -390
  229. package/dist/src/blitter/blitter.js.map +0 -1
  230. package/dist/src/blitter/box.js +0 -118
  231. package/dist/src/blitter/box.js.map +0 -1
  232. package/dist/src/blitter/copy.js +0 -22
  233. package/dist/src/blitter/copy.js.map +0 -1
  234. package/dist/src/blitter/gaussianblur.js +0 -228
  235. package/dist/src/blitter/gaussianblur.js.map +0 -1
  236. package/dist/src/camera/base.js +0 -92
  237. package/dist/src/camera/base.js.map +0 -1
  238. package/dist/src/camera/camera.js +0 -1005
  239. package/dist/src/camera/camera.js.map +0 -1
  240. package/dist/src/camera/fps.js +0 -238
  241. package/dist/src/camera/fps.js.map +0 -1
  242. package/dist/src/camera/orbit.js +0 -245
  243. package/dist/src/camera/orbit.js.map +0 -1
  244. package/dist/src/camera/orthocamera.js +0 -167
  245. package/dist/src/camera/orthocamera.js.map +0 -1
  246. package/dist/src/camera/perspectivecamera.js +0 -141
  247. package/dist/src/camera/perspectivecamera.js.map +0 -1
  248. package/dist/src/index.js +0 -120
  249. package/dist/src/index.js.map +0 -1
  250. package/dist/src/material/blinn.js +0 -81
  251. package/dist/src/material/blinn.js.map +0 -1
  252. package/dist/src/material/grassmaterial.js +0 -113
  253. package/dist/src/material/grassmaterial.js.map +0 -1
  254. package/dist/src/material/lambert.js +0 -92
  255. package/dist/src/material/lambert.js.map +0 -1
  256. package/dist/src/material/material.js +0 -301
  257. package/dist/src/material/material.js.map +0 -1
  258. package/dist/src/material/meshmaterial.js +0 -704
  259. package/dist/src/material/meshmaterial.js.map +0 -1
  260. package/dist/src/material/mixins/albedocolor.js +0 -76
  261. package/dist/src/material/mixins/albedocolor.js.map +0 -1
  262. package/dist/src/material/mixins/foliage.js +0 -47
  263. package/dist/src/material/mixins/foliage.js.map +0 -1
  264. package/dist/src/material/mixins/lightmodel/blinnphong.js +0 -112
  265. package/dist/src/material/mixins/lightmodel/blinnphong.js.map +0 -1
  266. package/dist/src/material/mixins/lightmodel/lambert.js +0 -58
  267. package/dist/src/material/mixins/lightmodel/lambert.js.map +0 -1
  268. package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js +0 -178
  269. package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js.map +0 -1
  270. package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js +0 -139
  271. package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js.map +0 -1
  272. package/dist/src/material/mixins/lit.js +0 -476
  273. package/dist/src/material/mixins/lit.js.map +0 -1
  274. package/dist/src/material/mixins/pbr/common.js +0 -918
  275. package/dist/src/material/mixins/pbr/common.js.map +0 -1
  276. package/dist/src/material/mixins/texture.js +0 -172
  277. package/dist/src/material/mixins/texture.js.map +0 -1
  278. package/dist/src/material/mixins/vertexcolor.js +0 -56
  279. package/dist/src/material/mixins/vertexcolor.js.map +0 -1
  280. package/dist/src/material/particle.js +0 -178
  281. package/dist/src/material/particle.js.map +0 -1
  282. package/dist/src/material/pbrmr.js +0 -97
  283. package/dist/src/material/pbrmr.js.map +0 -1
  284. package/dist/src/material/pbrsg.js +0 -97
  285. package/dist/src/material/pbrsg.js.map +0 -1
  286. package/dist/src/material/shader/helper.js +0 -1209
  287. package/dist/src/material/shader/helper.js.map +0 -1
  288. package/dist/src/material/terrain-cm.js +0 -606
  289. package/dist/src/material/terrain-cm.js.map +0 -1
  290. package/dist/src/material/terrainmaterial.js +0 -375
  291. package/dist/src/material/terrainmaterial.js.map +0 -1
  292. package/dist/src/material/unlit.js +0 -41
  293. package/dist/src/material/unlit.js.map +0 -1
  294. package/dist/src/material/water.js +0 -417
  295. package/dist/src/material/water.js.map +0 -1
  296. package/dist/src/posteffect/bloom.js +0 -361
  297. package/dist/src/posteffect/bloom.js.map +0 -1
  298. package/dist/src/posteffect/compositor.js +0 -226
  299. package/dist/src/posteffect/compositor.js.map +0 -1
  300. package/dist/src/posteffect/fxaa.js +0 -273
  301. package/dist/src/posteffect/fxaa.js.map +0 -1
  302. package/dist/src/posteffect/grayscale.js +0 -69
  303. package/dist/src/posteffect/grayscale.js.map +0 -1
  304. package/dist/src/posteffect/motionblur.js +0 -96
  305. package/dist/src/posteffect/motionblur.js.map +0 -1
  306. package/dist/src/posteffect/posteffect.js +0 -126
  307. package/dist/src/posteffect/posteffect.js.map +0 -1
  308. package/dist/src/posteffect/sao.js +0 -324
  309. package/dist/src/posteffect/sao.js.map +0 -1
  310. package/dist/src/posteffect/ssr.js +0 -489
  311. package/dist/src/posteffect/ssr.js.map +0 -1
  312. package/dist/src/posteffect/taa.js +0 -172
  313. package/dist/src/posteffect/taa.js.map +0 -1
  314. package/dist/src/posteffect/tonemap.js +0 -94
  315. package/dist/src/posteffect/tonemap.js.map +0 -1
  316. package/dist/src/render/abuffer_oit.js +0 -361
  317. package/dist/src/render/abuffer_oit.js.map +0 -1
  318. package/dist/src/render/clipmap.js +0 -851
  319. package/dist/src/render/clipmap.js.map +0 -1
  320. package/dist/src/render/cluster_light.js +0 -333
  321. package/dist/src/render/cluster_light.js.map +0 -1
  322. package/dist/src/render/cull_visitor.js +0 -187
  323. package/dist/src/render/cull_visitor.js.map +0 -1
  324. package/dist/src/render/depthpass.js +0 -68
  325. package/dist/src/render/depthpass.js.map +0 -1
  326. package/dist/src/render/drawable_mixin.js +0 -227
  327. package/dist/src/render/drawable_mixin.js.map +0 -1
  328. package/dist/src/render/envlight.js +0 -463
  329. package/dist/src/render/envlight.js.map +0 -1
  330. package/dist/src/render/fbm_wavegenerator.js +0 -251
  331. package/dist/src/render/fbm_wavegenerator.js.map +0 -1
  332. package/dist/src/render/fft_wavegenerator.js +0 -1006
  333. package/dist/src/render/fft_wavegenerator.js.map +0 -1
  334. package/dist/src/render/fullscreenquad.js +0 -38
  335. package/dist/src/render/fullscreenquad.js.map +0 -1
  336. package/dist/src/render/gerstner_wavegenerator.js +0 -314
  337. package/dist/src/render/gerstner_wavegenerator.js.map +0 -1
  338. package/dist/src/render/globalbindgroup_allocator.js +0 -60
  339. package/dist/src/render/globalbindgroup_allocator.js.map +0 -1
  340. package/dist/src/render/hzb.js +0 -273
  341. package/dist/src/render/hzb.js.map +0 -1
  342. package/dist/src/render/lightpass.js +0 -172
  343. package/dist/src/render/lightpass.js.map +0 -1
  344. package/dist/src/render/objectcolorpass.js +0 -51
  345. package/dist/src/render/objectcolorpass.js.map +0 -1
  346. package/dist/src/render/primitive.js +0 -364
  347. package/dist/src/render/primitive.js.map +0 -1
  348. package/dist/src/render/render_queue.js +0 -467
  349. package/dist/src/render/render_queue.js.map +0 -1
  350. package/dist/src/render/renderbundle_wrapper.js +0 -152
  351. package/dist/src/render/renderbundle_wrapper.js.map +0 -1
  352. package/dist/src/render/renderer.js +0 -455
  353. package/dist/src/render/renderer.js.map +0 -1
  354. package/dist/src/render/renderpass.js +0 -200
  355. package/dist/src/render/renderpass.js.map +0 -1
  356. package/dist/src/render/shadowmap_pass.js +0 -56
  357. package/dist/src/render/shadowmap_pass.js.map +0 -1
  358. package/dist/src/render/sky.js +0 -1103
  359. package/dist/src/render/sky.js.map +0 -1
  360. package/dist/src/render/weightedblended_oit.js +0 -168
  361. package/dist/src/render/weightedblended_oit.js.map +0 -1
  362. package/dist/src/scene/batchgroup.js +0 -162
  363. package/dist/src/scene/batchgroup.js.map +0 -1
  364. package/dist/src/scene/environment.js +0 -209
  365. package/dist/src/scene/environment.js.map +0 -1
  366. package/dist/src/scene/graph_node.js +0 -72
  367. package/dist/src/scene/graph_node.js.map +0 -1
  368. package/dist/src/scene/light.js +0 -416
  369. package/dist/src/scene/light.js.map +0 -1
  370. package/dist/src/scene/mesh.js +0 -341
  371. package/dist/src/scene/mesh.js.map +0 -1
  372. package/dist/src/scene/octree.js +0 -649
  373. package/dist/src/scene/octree.js.map +0 -1
  374. package/dist/src/scene/particlesys.js +0 -738
  375. package/dist/src/scene/particlesys.js.map +0 -1
  376. package/dist/src/scene/raycast_visitor.js +0 -103
  377. package/dist/src/scene/raycast_visitor.js.map +0 -1
  378. package/dist/src/scene/scene.js +0 -284
  379. package/dist/src/scene/scene.js.map +0 -1
  380. package/dist/src/scene/scene_node.js +0 -732
  381. package/dist/src/scene/scene_node.js.map +0 -1
  382. package/dist/src/scene/terrain/grass.js +0 -278
  383. package/dist/src/scene/terrain/grass.js.map +0 -1
  384. package/dist/src/scene/terrain/heightfield.js +0 -475
  385. package/dist/src/scene/terrain/heightfield.js.map +0 -1
  386. package/dist/src/scene/terrain/patch.js +0 -530
  387. package/dist/src/scene/terrain/patch.js.map +0 -1
  388. package/dist/src/scene/terrain/quadtree.js +0 -461
  389. package/dist/src/scene/terrain/quadtree.js.map +0 -1
  390. package/dist/src/scene/terrain/terrain.js +0 -246
  391. package/dist/src/scene/terrain/terrain.js.map +0 -1
  392. package/dist/src/scene/terrain-cm/grass.js +0 -594
  393. package/dist/src/scene/terrain-cm/grass.js.map +0 -1
  394. package/dist/src/scene/terrain-cm/grassmaterial.js +0 -159
  395. package/dist/src/scene/terrain-cm/grassmaterial.js.map +0 -1
  396. package/dist/src/scene/terrain-cm/terrain-cm.js +0 -538
  397. package/dist/src/scene/terrain-cm/terrain-cm.js.map +0 -1
  398. package/dist/src/scene/water.js +0 -374
  399. package/dist/src/scene/water.js.map +0 -1
  400. package/dist/src/shaders/atmosphere.js +0 -957
  401. package/dist/src/shaders/atmosphere.js.map +0 -1
  402. package/dist/src/shaders/fog.js +0 -112
  403. package/dist/src/shaders/fog.js.map +0 -1
  404. package/dist/src/shaders/misc.js +0 -266
  405. package/dist/src/shaders/misc.js.map +0 -1
  406. package/dist/src/shaders/noise.js +0 -222
  407. package/dist/src/shaders/noise.js.map +0 -1
  408. package/dist/src/shaders/pbr.js +0 -51
  409. package/dist/src/shaders/pbr.js.map +0 -1
  410. package/dist/src/shaders/shadow.js +0 -636
  411. package/dist/src/shaders/shadow.js.map +0 -1
  412. package/dist/src/shaders/ssr.js +0 -490
  413. package/dist/src/shaders/ssr.js.map +0 -1
  414. package/dist/src/shaders/temporal.js +0 -215
  415. package/dist/src/shaders/temporal.js.map +0 -1
  416. package/dist/src/shaders/water.js +0 -756
  417. package/dist/src/shaders/water.js.map +0 -1
  418. package/dist/src/shadow/esm.js +0 -237
  419. package/dist/src/shadow/esm.js.map +0 -1
  420. package/dist/src/shadow/pcf_opt.js +0 -181
  421. package/dist/src/shadow/pcf_opt.js.map +0 -1
  422. package/dist/src/shadow/pcf_pd.js +0 -189
  423. package/dist/src/shadow/pcf_pd.js.map +0 -1
  424. package/dist/src/shadow/shader.js +0 -37
  425. package/dist/src/shadow/shader.js.map +0 -1
  426. package/dist/src/shadow/shadow_impl.js +0 -15
  427. package/dist/src/shadow/shadow_impl.js.map +0 -1
  428. package/dist/src/shadow/shadowmapper.js +0 -790
  429. package/dist/src/shadow/shadowmapper.js.map +0 -1
  430. package/dist/src/shadow/ssm.js +0 -159
  431. package/dist/src/shadow/ssm.js.map +0 -1
  432. package/dist/src/shadow/vsm.js +0 -297
  433. package/dist/src/shadow/vsm.js.map +0 -1
  434. package/dist/src/shapes/box.js +0 -386
  435. package/dist/src/shapes/box.js.map +0 -1
  436. package/dist/src/shapes/cylinder.js +0 -125
  437. package/dist/src/shapes/cylinder.js.map +0 -1
  438. package/dist/src/shapes/plane.js +0 -88
  439. package/dist/src/shapes/plane.js.map +0 -1
  440. package/dist/src/shapes/shape.js +0 -87
  441. package/dist/src/shapes/shape.js.map +0 -1
  442. package/dist/src/shapes/sphere.js +0 -114
  443. package/dist/src/shapes/sphere.js.map +0 -1
  444. package/dist/src/shapes/tetrahedron.js +0 -188
  445. package/dist/src/shapes/tetrahedron.js.map +0 -1
  446. package/dist/src/shapes/torus.js +0 -111
  447. package/dist/src/shapes/torus.js.map +0 -1
  448. package/dist/src/utility/aabbtree.js +0 -400
  449. package/dist/src/utility/aabbtree.js.map +0 -1
  450. package/dist/src/utility/bounding_volume.js +0 -29
  451. package/dist/src/utility/bounding_volume.js.map +0 -1
  452. package/dist/src/utility/debug.js +0 -28
  453. package/dist/src/utility/debug.js.map +0 -1
  454. package/dist/src/utility/draco/decoder.js +0 -116
  455. package/dist/src/utility/draco/decoder.js.map +0 -1
  456. package/dist/src/utility/misc.js +0 -105
  457. package/dist/src/utility/misc.js.map +0 -1
  458. package/dist/src/utility/panorama.js +0 -163
  459. package/dist/src/utility/panorama.js.map +0 -1
  460. package/dist/src/utility/pmrem.js +0 -354
  461. package/dist/src/utility/pmrem.js.map +0 -1
  462. package/dist/src/utility/rendermipmap.js +0 -115
  463. package/dist/src/utility/rendermipmap.js.map +0 -1
  464. package/dist/src/utility/serialization/json.js +0 -402
  465. package/dist/src/utility/serialization/json.js.map +0 -1
  466. package/dist/src/utility/serialization/manager.js +0 -623
  467. package/dist/src/utility/serialization/manager.js.map +0 -1
  468. package/dist/src/utility/serialization/scene/animation.js +0 -248
  469. package/dist/src/utility/serialization/scene/animation.js.map +0 -1
  470. package/dist/src/utility/serialization/scene/batch.js +0 -59
  471. package/dist/src/utility/serialization/scene/batch.js.map +0 -1
  472. package/dist/src/utility/serialization/scene/camera.js +0 -790
  473. package/dist/src/utility/serialization/scene/camera.js.map +0 -1
  474. package/dist/src/utility/serialization/scene/common.js +0 -222
  475. package/dist/src/utility/serialization/scene/common.js.map +0 -1
  476. package/dist/src/utility/serialization/scene/light.js +0 -575
  477. package/dist/src/utility/serialization/scene/light.js.map +0 -1
  478. package/dist/src/utility/serialization/scene/material.js +0 -1111
  479. package/dist/src/utility/serialization/scene/material.js.map +0 -1
  480. package/dist/src/utility/serialization/scene/mesh.js +0 -148
  481. package/dist/src/utility/serialization/scene/mesh.js.map +0 -1
  482. package/dist/src/utility/serialization/scene/misc.js +0 -39
  483. package/dist/src/utility/serialization/scene/misc.js.map +0 -1
  484. package/dist/src/utility/serialization/scene/node.js +0 -451
  485. package/dist/src/utility/serialization/scene/node.js.map +0 -1
  486. package/dist/src/utility/serialization/scene/particle.js +0 -425
  487. package/dist/src/utility/serialization/scene/particle.js.map +0 -1
  488. package/dist/src/utility/serialization/scene/primitive.js +0 -692
  489. package/dist/src/utility/serialization/scene/primitive.js.map +0 -1
  490. package/dist/src/utility/serialization/scene/scene.js +0 -704
  491. package/dist/src/utility/serialization/scene/scene.js.map +0 -1
  492. package/dist/src/utility/serialization/scene/terrain.js +0 -488
  493. package/dist/src/utility/serialization/scene/terrain.js.map +0 -1
  494. package/dist/src/utility/serialization/scene/water.js +0 -465
  495. package/dist/src/utility/serialization/scene/water.js.map +0 -1
  496. package/dist/src/utility/shprojector.js +0 -297
  497. package/dist/src/utility/shprojector.js.map +0 -1
  498. package/dist/src/utility/textures/ggxlut.js +0 -213
  499. package/dist/src/utility/textures/ggxlut.js.map +0 -1
  500. package/dist/src/utility/textures/gradientnoise.js +0 -62
  501. package/dist/src/utility/textures/gradientnoise.js.map +0 -1
  502. package/dist/src/utility/textures/randomnoise.js +0 -41
  503. package/dist/src/utility/textures/randomnoise.js.map +0 -1
  504. package/dist/src/values.js +0 -162
  505. package/dist/src/values.js.map +0 -1
  506. package/dist/utility/blueprint/material/common.js +0 -7
  507. package/dist/utility/blueprint/material/common.js.map +0 -1
  508. package/dist/utility/serialization/blueprint/constants.js +0 -255
  509. package/dist/utility/serialization/blueprint/constants.js.map +0 -1
  510. package/dist/utility/serialization/blueprint/material/constants.js +0 -203
  511. package/dist/utility/serialization/blueprint/material/constants.js.map +0 -1
  512. package/dist/utility/serialization/blueprint/material/texture.js +0 -165
  513. package/dist/utility/serialization/blueprint/material/texture.js.map +0 -1
  514. package/dist/utility/serialization/scene/cloth_script.js +0 -834
  515. package/dist/utility/serialization/scene/cloth_script.js.map +0 -1
  516. package/dist/utility/serialization/scene/spring_script.js +0 -596
  517. package/dist/utility/serialization/scene/spring_script.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import { BaseGraphNode } from '../node.js';
2
2
 
3
- /**
4
- * Vertex output node
3
+ /**
4
+ * Vertex output node
5
+ * @public
5
6
  */ class VertexOutputNode extends BaseGraphNode {
6
7
  _index;
7
8
  constructor(index){
@@ -54,37 +55,38 @@ import { BaseGraphNode } from '../node.js';
54
55
  }
55
56
  };
56
57
  }
57
- /**
58
- * Generates a string representation of this node
59
- *
60
- * @returns 'vertex index'
58
+ /**
59
+ * Generates a string representation of this node
60
+ *
61
+ * @returns 'vertex index'
61
62
  */ toString() {
62
63
  return `Vertex Output${this._index}`;
63
64
  }
64
- /**
65
- * Validates the node state
66
- *
67
- * @returns Empty string (always valid)
68
- *
69
- * @remarks
70
- * Vertex index nodes are always valid as they have no inputs.
65
+ /**
66
+ * Validates the node state
67
+ *
68
+ * @returns Empty string (always valid)
69
+ *
70
+ * @remarks
71
+ * Vertex index nodes are always valid as they have no inputs.
71
72
  */ validate() {
72
73
  return '';
73
74
  }
74
- /**
75
- * Gets the output type for a specific output slot
76
- *
77
- * @param id - The output slot ID
78
- * @returns 'float' for individual channel outputs (id \> 1), 'vec4' for full color
75
+ /**
76
+ * Gets the output type for a specific output slot
77
+ *
78
+ * @param id - The output slot ID
79
+ * @returns 'float' for individual channel outputs (id \> 1), 'vec4' for full color
79
80
  */ getType(id) {
80
81
  return id > 1 ? 'float' : 'vec4';
81
82
  }
82
83
  }
83
- /**
84
- * Vertex index input node
84
+ /**
85
+ * Vertex index input node
86
+ * @public
85
87
  */ class VertexIndexNode extends BaseGraphNode {
86
- /**
87
- * Creates a new vertex index node
88
+ /**
89
+ * Creates a new vertex index node
88
90
  */ constructor(){
89
91
  super();
90
92
  this._outputs = [
@@ -94,10 +96,10 @@ import { BaseGraphNode } from '../node.js';
94
96
  }
95
97
  ];
96
98
  }
97
- /**
98
- * Gets the serialization descriptor for this node type
99
- *
100
- * @returns Serialization class descriptor
99
+ /**
100
+ * Gets the serialization descriptor for this node type
101
+ *
102
+ * @returns Serialization class descriptor
101
103
  */ static getSerializationCls() {
102
104
  return {
103
105
  ctor: VertexIndexNode,
@@ -107,36 +109,37 @@ import { BaseGraphNode } from '../node.js';
107
109
  }
108
110
  };
109
111
  }
110
- /**
111
- * Generates a string representation of this node
112
- *
113
- * @returns 'vertex index'
112
+ /**
113
+ * Generates a string representation of this node
114
+ *
115
+ * @returns 'vertex index'
114
116
  */ toString() {
115
117
  return 'vertex index';
116
118
  }
117
- /**
118
- * Validates the node state
119
- *
120
- * @returns Empty string (always valid)
121
- *
122
- * @remarks
123
- * Vertex index nodes are always valid as they have no inputs.
119
+ /**
120
+ * Validates the node state
121
+ *
122
+ * @returns Empty string (always valid)
123
+ *
124
+ * @remarks
125
+ * Vertex index nodes are always valid as they have no inputs.
124
126
  */ validate() {
125
127
  return '';
126
128
  }
127
- /**
128
- * Gets the output type for a specific output slot
129
- *
130
- * @returns 'float'
129
+ /**
130
+ * Gets the output type for a specific output slot
131
+ *
132
+ * @returns 'float'
131
133
  */ getType() {
132
134
  return 'float';
133
135
  }
134
136
  }
135
- /**
136
- * Instance index input node
137
+ /**
138
+ * Instance index input node
139
+ * @public
137
140
  */ class InstanceIndexNode extends BaseGraphNode {
138
- /**
139
- * Creates a new instance index node
141
+ /**
142
+ * Creates a new instance index node
140
143
  */ constructor(){
141
144
  super();
142
145
  this._outputs = [
@@ -146,10 +149,10 @@ import { BaseGraphNode } from '../node.js';
146
149
  }
147
150
  ];
148
151
  }
149
- /**
150
- * Gets the serialization descriptor for this node type
151
- *
152
- * @returns Serialization class descriptor
152
+ /**
153
+ * Gets the serialization descriptor for this node type
154
+ *
155
+ * @returns Serialization class descriptor
153
156
  */ static getSerializationCls() {
154
157
  return {
155
158
  ctor: InstanceIndexNode,
@@ -159,68 +162,68 @@ import { BaseGraphNode } from '../node.js';
159
162
  }
160
163
  };
161
164
  }
162
- /**
163
- * Generates a string representation of this node
164
- *
165
- * @returns 'instance index'
165
+ /**
166
+ * Generates a string representation of this node
167
+ *
168
+ * @returns 'instance index'
166
169
  */ toString() {
167
170
  return 'instance index';
168
171
  }
169
- /**
170
- * Validates the node state
171
- *
172
- * @returns Empty string (always valid)
173
- *
174
- * @remarks
175
- * Instance index nodes are always valid as they have no inputs.
172
+ /**
173
+ * Validates the node state
174
+ *
175
+ * @returns Empty string (always valid)
176
+ *
177
+ * @remarks
178
+ * Instance index nodes are always valid as they have no inputs.
176
179
  */ validate() {
177
180
  return '';
178
181
  }
179
- /**
180
- * Gets the output type for a specific output slot
181
- *
182
- * @returns 'float'
182
+ /**
183
+ * Gets the output type for a specific output slot
184
+ *
185
+ * @returns 'float'
183
186
  */ getType() {
184
187
  return 'float';
185
188
  }
186
189
  }
187
- /**
188
- * Vertex color input node
189
- *
190
- * @remarks
191
- * Provides access to per-vertex color data from the mesh.
192
- * Vertex colors are stored as RGBA values (vec4) and can be used for:
193
- * - Hand-painted color variations
194
- * - Ambient occlusion baking
195
- * - Blend weights for texture mixing
196
- * - Custom data encoded in color channels
197
- *
198
- * Outputs:
199
- * - Output 1: Full RGBA color (vec4)
200
- * - Output 2: Red channel (float)
201
- * - Output 3: Green channel (float)
202
- * - Output 4: Blue channel (float)
203
- * - Output 5: Alpha channel (float)
204
- *
205
- * @example
206
- * ```typescript
207
- * const vertexColor = new VertexColorNode();
208
- *
209
- * // Use full color
210
- * baseColorNode.connectInput(1, vertexColor, 1);
211
- *
212
- * // Use individual channels
213
- * roughnessNode.connectInput(1, vertexColor, 2); // Red as roughness
214
- * metallicNode.connectInput(1, vertexColor, 3); // Green as metallic
215
- * ```
216
- *
217
- * @public
190
+ /**
191
+ * Vertex color input node
192
+ *
193
+ * @remarks
194
+ * Provides access to per-vertex color data from the mesh.
195
+ * Vertex colors are stored as RGBA values (vec4) and can be used for:
196
+ * - Hand-painted color variations
197
+ * - Ambient occlusion baking
198
+ * - Blend weights for texture mixing
199
+ * - Custom data encoded in color channels
200
+ *
201
+ * Outputs:
202
+ * - Output 1: Full RGBA color (vec4)
203
+ * - Output 2: Red channel (float)
204
+ * - Output 3: Green channel (float)
205
+ * - Output 4: Blue channel (float)
206
+ * - Output 5: Alpha channel (float)
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * const vertexColor = new VertexColorNode();
211
+ *
212
+ * // Use full color
213
+ * baseColorNode.connectInput(1, vertexColor, 1);
214
+ *
215
+ * // Use individual channels
216
+ * roughnessNode.connectInput(1, vertexColor, 2); // Red as roughness
217
+ * metallicNode.connectInput(1, vertexColor, 3); // Green as metallic
218
+ * ```
219
+ *
220
+ * @public
218
221
  */ class VertexColorNode extends BaseGraphNode {
219
- /**
220
- * Creates a new vertex color node
221
- *
222
- * @remarks
223
- * Initializes with 5 output slots: full RGBA and individual R, G, B, A channels.
222
+ /**
223
+ * Creates a new vertex color node
224
+ *
225
+ * @remarks
226
+ * Initializes with 5 output slots: full RGBA and individual R, G, B, A channels.
224
227
  */ constructor(){
225
228
  super();
226
229
  this._outputs = [
@@ -250,10 +253,10 @@ import { BaseGraphNode } from '../node.js';
250
253
  }
251
254
  ];
252
255
  }
253
- /**
254
- * Gets the serialization descriptor for this node type
255
- *
256
- * @returns Serialization class descriptor
256
+ /**
257
+ * Gets the serialization descriptor for this node type
258
+ *
259
+ * @returns Serialization class descriptor
257
260
  */ static getSerializationCls() {
258
261
  return {
259
262
  ctor: VertexColorNode,
@@ -263,68 +266,68 @@ import { BaseGraphNode } from '../node.js';
263
266
  }
264
267
  };
265
268
  }
266
- /**
267
- * Generates a string representation of this node
268
- *
269
- * @returns 'vertex color'
269
+ /**
270
+ * Generates a string representation of this node
271
+ *
272
+ * @returns 'vertex color'
270
273
  */ toString() {
271
274
  return 'vertex color';
272
275
  }
273
- /**
274
- * Validates the node state
275
- *
276
- * @returns Empty string (always valid)
277
- *
278
- * @remarks
279
- * Vertex color nodes are always valid as they have no inputs.
276
+ /**
277
+ * Validates the node state
278
+ *
279
+ * @returns Empty string (always valid)
280
+ *
281
+ * @remarks
282
+ * Vertex color nodes are always valid as they have no inputs.
280
283
  */ validate() {
281
284
  return '';
282
285
  }
283
- /**
284
- * Gets the output type for a specific output slot
285
- *
286
- * @param id - The output slot ID
287
- * @returns 'float' for individual channel outputs (id \> 1), 'vec4' for full color
286
+ /**
287
+ * Gets the output type for a specific output slot
288
+ *
289
+ * @param id - The output slot ID
290
+ * @returns 'float' for individual channel outputs (id \> 1), 'vec4' for full color
288
291
  */ getType(id) {
289
292
  return id > 1 ? 'float' : 'vec4';
290
293
  }
291
294
  }
292
- /**
293
- * Vertex UV coordinate input node
294
- *
295
- * @remarks
296
- * Provides access to per-vertex texture coordinates (UV coordinates) from the mesh.
297
- * UV coordinates map 3D mesh vertices to 2D texture space, typically in the range [0, 1].
298
- *
299
- * Used for:
300
- * - Texture sampling (most common use)
301
- * - Procedural pattern generation
302
- * - Gradient effects based on position in UV space
303
- * - Decal placement
304
- *
305
- * Outputs:
306
- * - Output 1: Full UV coordinates (vec2)
307
- * - Output 2: U coordinate (horizontal, float)
308
- * - Output 3: V coordinate (vertical, float)
309
- *
310
- * @example
311
- * ```typescript
312
- * const uv = new VertexUVNode();
313
- *
314
- * // Sample texture using UV coordinates
315
- * textureSample.connectInput(1, uv, 1);
316
- *
317
- * // Use U coordinate for horizontal gradient
318
- * mixNode.connectInput(3, uv, 2);
319
- * ```
320
- *
321
- * @public
295
+ /**
296
+ * Vertex UV coordinate input node
297
+ *
298
+ * @remarks
299
+ * Provides access to per-vertex texture coordinates (UV coordinates) from the mesh.
300
+ * UV coordinates map 3D mesh vertices to 2D texture space, typically in the range [0, 1].
301
+ *
302
+ * Used for:
303
+ * - Texture sampling (most common use)
304
+ * - Procedural pattern generation
305
+ * - Gradient effects based on position in UV space
306
+ * - Decal placement
307
+ *
308
+ * Outputs:
309
+ * - Output 1: Full UV coordinates (vec2)
310
+ * - Output 2: U coordinate (horizontal, float)
311
+ * - Output 3: V coordinate (vertical, float)
312
+ *
313
+ * @example
314
+ * ```typescript
315
+ * const uv = new VertexUVNode();
316
+ *
317
+ * // Sample texture using UV coordinates
318
+ * textureSample.connectInput(1, uv, 1);
319
+ *
320
+ * // Use U coordinate for horizontal gradient
321
+ * mixNode.connectInput(3, uv, 2);
322
+ * ```
323
+ *
324
+ * @public
322
325
  */ class VertexUVNode extends BaseGraphNode {
323
- /**
324
- * Creates a new vertex UV node
325
- *
326
- * @remarks
327
- * Initializes with 3 output slots: full UV and individual U, V components.
326
+ /**
327
+ * Creates a new vertex UV node
328
+ *
329
+ * @remarks
330
+ * Initializes with 3 output slots: full UV and individual U, V components.
328
331
  */ constructor(){
329
332
  super();
330
333
  this._outputs = [
@@ -344,10 +347,10 @@ import { BaseGraphNode } from '../node.js';
344
347
  }
345
348
  ];
346
349
  }
347
- /**
348
- * Gets the serialization descriptor for this node type
349
- *
350
- * @returns Serialization class descriptor
350
+ /**
351
+ * Gets the serialization descriptor for this node type
352
+ *
353
+ * @returns Serialization class descriptor
351
354
  */ static getSerializationCls() {
352
355
  return {
353
356
  ctor: VertexUVNode,
@@ -357,74 +360,74 @@ import { BaseGraphNode } from '../node.js';
357
360
  }
358
361
  };
359
362
  }
360
- /**
361
- * Generates a string representation of this node
362
- *
363
- * @returns 'vertex UV'
363
+ /**
364
+ * Generates a string representation of this node
365
+ *
366
+ * @returns 'vertex UV'
364
367
  */ toString() {
365
368
  return 'vertex UV';
366
369
  }
367
- /**
368
- * Validates the node state
369
- *
370
- * @returns Empty string (always valid)
371
- *
372
- * @remarks
373
- * Vertex UV nodes are always valid as they have no inputs.
370
+ /**
371
+ * Validates the node state
372
+ *
373
+ * @returns Empty string (always valid)
374
+ *
375
+ * @remarks
376
+ * Vertex UV nodes are always valid as they have no inputs.
374
377
  */ validate() {
375
378
  return '';
376
379
  }
377
- /**
378
- * Gets the output type for a specific output slot
379
- *
380
- * @param id - The output slot ID
381
- * @returns 'float' for individual component outputs (id \> 1), 'vec2' for full UV
380
+ /**
381
+ * Gets the output type for a specific output slot
382
+ *
383
+ * @param id - The output slot ID
384
+ * @returns 'float' for individual component outputs (id \> 1), 'vec2' for full UV
382
385
  */ getType(id) {
383
386
  return id > 1 ? 'float' : 'vec2';
384
387
  }
385
388
  }
386
- /**
387
- * Vertex world position input node
388
- *
389
- * @remarks
390
- * Provides access to the vertex position in world space coordinates.
391
- * World position is the absolute 3D location of the vertex in the scene,
392
- * after applying all model transformations but before view/projection.
393
- *
394
- * Used for:
395
- * - Distance-based effects (fog, fade)
396
- * - World-space texturing (triplanar mapping)
397
- * - Position-based color gradients
398
- * - Vertex animation based on world location
399
- * - Custom lighting calculations
400
- *
401
- * Outputs:
402
- * - Output 1: Full position (vec3)
403
- * - Output 2: X coordinate (float)
404
- * - Output 3: Y coordinate (float)
405
- * - Output 4: Z coordinate (float)
406
- *
407
- * @example
408
- * ```typescript
409
- * const worldPos = new VertexPositionNode();
410
- *
411
- * // Calculate distance from origin
412
- * const origin = new ConstantVec3Node();
413
- * const distance = new DistanceNode();
414
- * distance.connectInput(1, worldPos, 1);
415
- * distance.connectInput(2, origin, 1);
416
- *
417
- * // Height-based color gradient
418
- * colorMix.connectInput(3, worldPos, 3); // Use Y (height)
419
- * ```
420
- *
421
- * @public
389
+ /**
390
+ * Vertex world position input node
391
+ *
392
+ * @remarks
393
+ * Provides access to the vertex position in world space coordinates.
394
+ * World position is the absolute 3D location of the vertex in the scene,
395
+ * after applying all model transformations but before view/projection.
396
+ *
397
+ * Used for:
398
+ * - Distance-based effects (fog, fade)
399
+ * - World-space texturing (triplanar mapping)
400
+ * - Position-based color gradients
401
+ * - Vertex animation based on world location
402
+ * - Custom lighting calculations
403
+ *
404
+ * Outputs:
405
+ * - Output 1: Full position (vec3)
406
+ * - Output 2: X coordinate (float)
407
+ * - Output 3: Y coordinate (float)
408
+ * - Output 4: Z coordinate (float)
409
+ *
410
+ * @example
411
+ * ```typescript
412
+ * const worldPos = new VertexPositionNode();
413
+ *
414
+ * // Calculate distance from origin
415
+ * const origin = new ConstantVec3Node();
416
+ * const distance = new DistanceNode();
417
+ * distance.connectInput(1, worldPos, 1);
418
+ * distance.connectInput(2, origin, 1);
419
+ *
420
+ * // Height-based color gradient
421
+ * colorMix.connectInput(3, worldPos, 3); // Use Y (height)
422
+ * ```
423
+ *
424
+ * @public
422
425
  */ class VertexPositionNode extends BaseGraphNode {
423
- /**
424
- * Creates a new vertex position node
425
- *
426
- * @remarks
427
- * Initializes with 4 output slots: full position and individual X, Y, Z components.
426
+ /**
427
+ * Creates a new vertex position node
428
+ *
429
+ * @remarks
430
+ * Initializes with 4 output slots: full position and individual X, Y, Z components.
428
431
  */ constructor(){
429
432
  super();
430
433
  this._outputs = [
@@ -449,17 +452,17 @@ import { BaseGraphNode } from '../node.js';
449
452
  }
450
453
  ];
451
454
  }
452
- /**
453
- * Generates a string representation of this node
454
- *
455
- * @returns 'world position'
455
+ /**
456
+ * Generates a string representation of this node
457
+ *
458
+ * @returns 'world position'
456
459
  */ toString() {
457
460
  return 'world position';
458
461
  }
459
- /**
460
- * Gets the serialization descriptor for this node type
461
- *
462
- * @returns Serialization class descriptor
462
+ /**
463
+ * Gets the serialization descriptor for this node type
464
+ *
465
+ * @returns Serialization class descriptor
463
466
  */ static getSerializationCls() {
464
467
  return {
465
468
  ctor: VertexPositionNode,
@@ -469,41 +472,41 @@ import { BaseGraphNode } from '../node.js';
469
472
  }
470
473
  };
471
474
  }
472
- /**
473
- * Validates the node state
474
- *
475
- * @returns Empty string (always valid)
476
- *
477
- * @remarks
478
- * Vertex position nodes are always valid as they have no inputs.
475
+ /**
476
+ * Validates the node state
477
+ *
478
+ * @returns Empty string (always valid)
479
+ *
480
+ * @remarks
481
+ * Vertex position nodes are always valid as they have no inputs.
479
482
  */ validate() {
480
483
  return '';
481
484
  }
482
- /**
483
- * Gets the output type for a specific output slot
484
- *
485
- * @param id - The output slot ID
486
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
485
+ /**
486
+ * Gets the output type for a specific output slot
487
+ *
488
+ * @param id - The output slot ID
489
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
487
490
  */ getType(id) {
488
491
  return id > 1 ? 'float' : 'vec3';
489
492
  }
490
493
  }
491
- /**
492
- * Pixel world position input node
493
- *
494
- * @remarks
495
- * Provides access to current pixel world-space position.
496
- *
497
- * Outputs:
498
- * - Output 1: Full position (vec3)
499
- * - Output 2: X coordinate (float)
500
- * - Output 3: Y coordinate (float)
501
- * - Output 4: Z coordinate (float)
502
- *
503
- * @public
494
+ /**
495
+ * Pixel world position input node
496
+ *
497
+ * @remarks
498
+ * Provides access to current pixel world-space position.
499
+ *
500
+ * Outputs:
501
+ * - Output 1: Full position (vec3)
502
+ * - Output 2: X coordinate (float)
503
+ * - Output 3: Y coordinate (float)
504
+ * - Output 4: Z coordinate (float)
505
+ *
506
+ * @public
504
507
  */ class PixelWorldPositionNode extends BaseGraphNode {
505
- /**
506
- * Creates a new pixel world position node
508
+ /**
509
+ * Creates a new pixel world position node
507
510
  */ constructor(){
508
511
  super();
509
512
  this._outputs = [
@@ -528,17 +531,17 @@ import { BaseGraphNode } from '../node.js';
528
531
  }
529
532
  ];
530
533
  }
531
- /**
532
- * Generates a string representation of this node
533
- *
534
- * @returns 'pixel world position'
534
+ /**
535
+ * Generates a string representation of this node
536
+ *
537
+ * @returns 'pixel world position'
535
538
  */ toString() {
536
539
  return 'pixel world position';
537
540
  }
538
- /**
539
- * Gets the serialization descriptor for this node type
540
- *
541
- * @returns Serialization class descriptor
541
+ /**
542
+ * Gets the serialization descriptor for this node type
543
+ *
544
+ * @returns Serialization class descriptor
542
545
  */ static getSerializationCls() {
543
546
  return {
544
547
  ctor: PixelWorldPositionNode,
@@ -548,64 +551,64 @@ import { BaseGraphNode } from '../node.js';
548
551
  }
549
552
  };
550
553
  }
551
- /**
552
- * Validates the node state
553
- *
554
- * @returns Empty string (always valid)
554
+ /**
555
+ * Validates the node state
556
+ *
557
+ * @returns Empty string (always valid)
555
558
  */ validate() {
556
559
  return '';
557
560
  }
558
- /**
559
- * Gets the output type for a specific output slot
560
- *
561
- * @param id - The output slot ID
562
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
561
+ /**
562
+ * Gets the output type for a specific output slot
563
+ *
564
+ * @param id - The output slot ID
565
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
563
566
  */ getType(id) {
564
567
  return id > 1 ? 'float' : 'vec3';
565
568
  }
566
569
  }
567
- /**
568
- * Vertex normal input node
569
- *
570
- * @remarks
571
- * Provides access to per-vertex normal vectors in world space.
572
- * Normals are unit vectors perpendicular to the surface, used extensively
573
- * in lighting calculations and surface orientation effects.
574
- *
575
- * Used for:
576
- * - Custom lighting calculations
577
- * - Fresnel effects (view-dependent shading)
578
- * - Rim lighting
579
- * - Normal-based masking
580
- * - Environment mapping
581
- *
582
- * Outputs:
583
- * - Output 1: Full normal vector (vec3, normalized)
584
- * - Output 2: X component (float)
585
- * - Output 3: Y component (float)
586
- * - Output 4: Z component (float)
587
- *
588
- * @example
589
- * ```typescript
590
- * const normal = new VertexNormalNode();
591
- * const viewDir = new ViewDirectionNode();
592
- *
593
- * // Calculate Fresnel effect
594
- * const dot = new DotProductNode();
595
- * dot.connectInput(1, normal, 1);
596
- * dot.connectInput(2, viewDir, 1);
597
- *
598
- * // Rim lighting using Y component
599
- * rimMask.connectInput(1, normal, 3);
600
- * ```
601
- *
602
- * @public
570
+ /**
571
+ * Vertex normal input node
572
+ *
573
+ * @remarks
574
+ * Provides access to per-vertex normal vectors in world space.
575
+ * Normals are unit vectors perpendicular to the surface, used extensively
576
+ * in lighting calculations and surface orientation effects.
577
+ *
578
+ * Used for:
579
+ * - Custom lighting calculations
580
+ * - Fresnel effects (view-dependent shading)
581
+ * - Rim lighting
582
+ * - Normal-based masking
583
+ * - Environment mapping
584
+ *
585
+ * Outputs:
586
+ * - Output 1: Full normal vector (vec3, normalized)
587
+ * - Output 2: X component (float)
588
+ * - Output 3: Y component (float)
589
+ * - Output 4: Z component (float)
590
+ *
591
+ * @example
592
+ * ```typescript
593
+ * const normal = new VertexNormalNode();
594
+ * const viewDir = new ViewDirectionNode();
595
+ *
596
+ * // Calculate Fresnel effect
597
+ * const dot = new DotProductNode();
598
+ * dot.connectInput(1, normal, 1);
599
+ * dot.connectInput(2, viewDir, 1);
600
+ *
601
+ * // Rim lighting using Y component
602
+ * rimMask.connectInput(1, normal, 3);
603
+ * ```
604
+ *
605
+ * @public
603
606
  */ class VertexNormalNode extends BaseGraphNode {
604
- /**
605
- * Creates a new vertex normal node
606
- *
607
- * @remarks
608
- * Initializes with 4 output slots: full normal and individual X, Y, Z components.
607
+ /**
608
+ * Creates a new vertex normal node
609
+ *
610
+ * @remarks
611
+ * Initializes with 4 output slots: full normal and individual X, Y, Z components.
609
612
  */ constructor(){
610
613
  super();
611
614
  this._outputs = [
@@ -630,17 +633,17 @@ import { BaseGraphNode } from '../node.js';
630
633
  }
631
634
  ];
632
635
  }
633
- /**
634
- * Generates a string representation of this node
635
- *
636
- * @returns 'vertex normal'
636
+ /**
637
+ * Generates a string representation of this node
638
+ *
639
+ * @returns 'vertex normal'
637
640
  */ toString() {
638
641
  return 'vertex normal';
639
642
  }
640
- /**
641
- * Gets the serialization descriptor for this node type
642
- *
643
- * @returns Serialization class descriptor
643
+ /**
644
+ * Gets the serialization descriptor for this node type
645
+ *
646
+ * @returns Serialization class descriptor
644
647
  */ static getSerializationCls() {
645
648
  return {
646
649
  ctor: VertexNormalNode,
@@ -650,44 +653,44 @@ import { BaseGraphNode } from '../node.js';
650
653
  }
651
654
  };
652
655
  }
653
- /**
654
- * Validates the node state
655
- *
656
- * @returns Empty string (always valid)
657
- *
658
- * @remarks
659
- * Vertex normal nodes are always valid as they have no inputs.
656
+ /**
657
+ * Validates the node state
658
+ *
659
+ * @returns Empty string (always valid)
660
+ *
661
+ * @remarks
662
+ * Vertex normal nodes are always valid as they have no inputs.
660
663
  */ validate() {
661
664
  return '';
662
665
  }
663
- /**
664
- * Gets the output type for a specific output slot
665
- *
666
- * @param id - The output slot ID
667
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full normal
666
+ /**
667
+ * Gets the output type for a specific output slot
668
+ *
669
+ * @param id - The output slot ID
670
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full normal
668
671
  */ getType(id) {
669
672
  return id > 1 ? 'float' : 'vec3';
670
673
  }
671
674
  }
672
- /**
673
- * Pixel normal input node
674
- *
675
- * @remarks
676
- * Provides access to the world-space surface normal used in fragment shading.
677
- *
678
- * Outputs:
679
- * - Output 1: Full normal vector (vec3, normalized)
680
- * - Output 2: X component (float)
681
- * - Output 3: Y component (float)
682
- * - Output 4: Z component (float)
683
- *
684
- * @public
675
+ /**
676
+ * Pixel normal input node
677
+ *
678
+ * @remarks
679
+ * Provides access to the world-space surface normal used in fragment shading.
680
+ *
681
+ * Outputs:
682
+ * - Output 1: Full normal vector (vec3, normalized)
683
+ * - Output 2: X component (float)
684
+ * - Output 3: Y component (float)
685
+ * - Output 4: Z component (float)
686
+ *
687
+ * @public
685
688
  */ class PixelNormalNode extends BaseGraphNode {
686
- /**
687
- * Creates a new pixel normal node
688
- *
689
- * @remarks
690
- * Initializes with 4 output slots: full normal and individual X, Y, Z components.
689
+ /**
690
+ * Creates a new pixel normal node
691
+ *
692
+ * @remarks
693
+ * Initializes with 4 output slots: full normal and individual X, Y, Z components.
691
694
  */ constructor(){
692
695
  super();
693
696
  this._outputs = [
@@ -712,17 +715,17 @@ import { BaseGraphNode } from '../node.js';
712
715
  }
713
716
  ];
714
717
  }
715
- /**
716
- * Generates a string representation of this node
717
- *
718
- * @returns 'pixel normal'
718
+ /**
719
+ * Generates a string representation of this node
720
+ *
721
+ * @returns 'pixel normal'
719
722
  */ toString() {
720
723
  return 'pixel normal';
721
724
  }
722
- /**
723
- * Gets the serialization descriptor for this node type
724
- *
725
- * @returns Serialization class descriptor
725
+ /**
726
+ * Gets the serialization descriptor for this node type
727
+ *
728
+ * @returns Serialization class descriptor
726
729
  */ static getSerializationCls() {
727
730
  return {
728
731
  ctor: PixelNormalNode,
@@ -732,62 +735,62 @@ import { BaseGraphNode } from '../node.js';
732
735
  }
733
736
  };
734
737
  }
735
- /**
736
- * Validates the node state
737
- *
738
- * @returns Empty string (always valid)
738
+ /**
739
+ * Validates the node state
740
+ *
741
+ * @returns Empty string (always valid)
739
742
  */ validate() {
740
743
  return '';
741
744
  }
742
- /**
743
- * Gets the output type for a specific output slot
744
- *
745
- * @param id - The output slot ID
746
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full normal
745
+ /**
746
+ * Gets the output type for a specific output slot
747
+ *
748
+ * @param id - The output slot ID
749
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full normal
747
750
  */ getType(id) {
748
751
  return id > 1 ? 'float' : 'vec3';
749
752
  }
750
753
  }
751
- /**
752
- * Vertex tangent input node
753
- *
754
- * @remarks
755
- * Provides access to per-vertex tangent vectors in world space.
756
- * Tangents are unit vectors parallel to the surface, aligned with the U texture coordinate direction.
757
- * Together with normals and binormals, they form the tangent-space basis (TBN matrix).
758
- *
759
- * Used for:
760
- * - Normal mapping (constructing TBN matrix)
761
- * - Anisotropic reflections (hair, brushed metal)
762
- * - Tangent-space calculations
763
- * - Flow map effects
764
- *
765
- * Outputs:
766
- * - Output 1: Full tangent vector (vec3, normalized)
767
- * - Output 2: X component (float)
768
- * - Output 3: Y component (float)
769
- * - Output 4: Z component (float)
770
- *
771
- * @example
772
- * ```typescript
773
- * const tangent = new VertexTangentNode();
774
- * const normal = new VertexNormalNode();
775
- * const binormal = new VertexBinormalNode();
776
- *
777
- * // Construct TBN matrix for normal mapping
778
- * const tbnMatrix = new MakeMatrixNode();
779
- * tbnMatrix.connectInput(1, tangent, 1);
780
- * tbnMatrix.connectInput(2, binormal, 1);
781
- * tbnMatrix.connectInput(3, normal, 1);
782
- * ```
783
- *
784
- * @public
754
+ /**
755
+ * Vertex tangent input node
756
+ *
757
+ * @remarks
758
+ * Provides access to per-vertex tangent vectors in world space.
759
+ * Tangents are unit vectors parallel to the surface, aligned with the U texture coordinate direction.
760
+ * Together with normals and binormals, they form the tangent-space basis (TBN matrix).
761
+ *
762
+ * Used for:
763
+ * - Normal mapping (constructing TBN matrix)
764
+ * - Anisotropic reflections (hair, brushed metal)
765
+ * - Tangent-space calculations
766
+ * - Flow map effects
767
+ *
768
+ * Outputs:
769
+ * - Output 1: Full tangent vector (vec3, normalized)
770
+ * - Output 2: X component (float)
771
+ * - Output 3: Y component (float)
772
+ * - Output 4: Z component (float)
773
+ *
774
+ * @example
775
+ * ```typescript
776
+ * const tangent = new VertexTangentNode();
777
+ * const normal = new VertexNormalNode();
778
+ * const binormal = new VertexBinormalNode();
779
+ *
780
+ * // Construct TBN matrix for normal mapping
781
+ * const tbnMatrix = new MakeMatrixNode();
782
+ * tbnMatrix.connectInput(1, tangent, 1);
783
+ * tbnMatrix.connectInput(2, binormal, 1);
784
+ * tbnMatrix.connectInput(3, normal, 1);
785
+ * ```
786
+ *
787
+ * @public
785
788
  */ class VertexTangentNode extends BaseGraphNode {
786
- /**
787
- * Creates a new vertex tangent node
788
- *
789
- * @remarks
790
- * Initializes with 4 output slots: full tangent and individual X, Y, Z components.
789
+ /**
790
+ * Creates a new vertex tangent node
791
+ *
792
+ * @remarks
793
+ * Initializes with 4 output slots: full tangent and individual X, Y, Z components.
791
794
  */ constructor(){
792
795
  super();
793
796
  this._outputs = [
@@ -812,17 +815,17 @@ import { BaseGraphNode } from '../node.js';
812
815
  }
813
816
  ];
814
817
  }
815
- /**
816
- * Generates a string representation of this node
817
- *
818
- * @returns 'vertex tangent'
818
+ /**
819
+ * Generates a string representation of this node
820
+ *
821
+ * @returns 'vertex tangent'
819
822
  */ toString() {
820
823
  return 'vertex tangent';
821
824
  }
822
- /**
823
- * Gets the serialization descriptor for this node type
824
- *
825
- * @returns Serialization class descriptor
825
+ /**
826
+ * Gets the serialization descriptor for this node type
827
+ *
828
+ * @returns Serialization class descriptor
826
829
  */ static getSerializationCls() {
827
830
  return {
828
831
  ctor: VertexTangentNode,
@@ -832,68 +835,68 @@ import { BaseGraphNode } from '../node.js';
832
835
  }
833
836
  };
834
837
  }
835
- /**
836
- * Validates the node state
837
- *
838
- * @returns Empty string (always valid)
839
- *
840
- * @remarks
841
- * Vertex tangent nodes are always valid as they have no inputs.
838
+ /**
839
+ * Validates the node state
840
+ *
841
+ * @returns Empty string (always valid)
842
+ *
843
+ * @remarks
844
+ * Vertex tangent nodes are always valid as they have no inputs.
842
845
  */ validate() {
843
846
  return '';
844
847
  }
845
- /**
846
- * Gets the output type for a specific output slot
847
- *
848
- * @param id - The output slot ID
849
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full tangent
848
+ /**
849
+ * Gets the output type for a specific output slot
850
+ *
851
+ * @param id - The output slot ID
852
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full tangent
850
853
  */ getType(id) {
851
854
  return id > 1 ? 'float' : 'vec3';
852
855
  }
853
856
  }
854
- /**
855
- * Vertex binormal (bitangent) input node
856
- *
857
- * @remarks
858
- * Provides access to per-vertex binormal (also called bitangent) vectors in world space.
859
- * Binormals are unit vectors perpendicular to both the normal and tangent,
860
- * aligned with the V texture coordinate direction.
861
- * Together with normals and tangents, they form the tangent-space basis (TBN matrix).
862
- *
863
- * The binormal is typically computed as: binormal = cross(normal, tangent) * handedness
864
- *
865
- * Used for:
866
- * - Normal mapping (constructing TBN matrix)
867
- * - Tangent-space calculations
868
- * - Surface flow effects
869
- * - Oriented texture mapping
870
- *
871
- * Outputs:
872
- * - Output 1: Full binormal vector (vec3, normalized)
873
- * - Output 2: X component (float)
874
- * - Output 3: Y component (float)
875
- * - Output 4: Z component (float)
876
- *
877
- * @example
878
- * ```typescript
879
- * const tangent = new VertexTangentNode();
880
- * const normal = new VertexNormalNode();
881
- * const binormal = new VertexBinormalNode();
882
- *
883
- * // Use for normal mapping transformation
884
- * const normalMap = new TextureSampleNode();
885
- * const tbnTransform = new TransformNode();
886
- * tbnTransform.connectInput(1, normalMap, 1);
887
- * tbnTransform.connectInput(2, tbnMatrixNode, 1);
888
- * ```
889
- *
890
- * @public
857
+ /**
858
+ * Vertex binormal (bitangent) input node
859
+ *
860
+ * @remarks
861
+ * Provides access to per-vertex binormal (also called bitangent) vectors in world space.
862
+ * Binormals are unit vectors perpendicular to both the normal and tangent,
863
+ * aligned with the V texture coordinate direction.
864
+ * Together with normals and tangents, they form the tangent-space basis (TBN matrix).
865
+ *
866
+ * The binormal is typically computed as: binormal = cross(normal, tangent) * handedness
867
+ *
868
+ * Used for:
869
+ * - Normal mapping (constructing TBN matrix)
870
+ * - Tangent-space calculations
871
+ * - Surface flow effects
872
+ * - Oriented texture mapping
873
+ *
874
+ * Outputs:
875
+ * - Output 1: Full binormal vector (vec3, normalized)
876
+ * - Output 2: X component (float)
877
+ * - Output 3: Y component (float)
878
+ * - Output 4: Z component (float)
879
+ *
880
+ * @example
881
+ * ```typescript
882
+ * const tangent = new VertexTangentNode();
883
+ * const normal = new VertexNormalNode();
884
+ * const binormal = new VertexBinormalNode();
885
+ *
886
+ * // Use for normal mapping transformation
887
+ * const normalMap = new TextureSampleNode();
888
+ * const tbnTransform = new TransformNode();
889
+ * tbnTransform.connectInput(1, normalMap, 1);
890
+ * tbnTransform.connectInput(2, tbnMatrixNode, 1);
891
+ * ```
892
+ *
893
+ * @public
891
894
  */ class VertexBinormalNode extends BaseGraphNode {
892
- /**
893
- * Creates a new vertex binormal node
894
- *
895
- * @remarks
896
- * Initializes with 4 output slots: full binormal and individual X, Y, Z components.
895
+ /**
896
+ * Creates a new vertex binormal node
897
+ *
898
+ * @remarks
899
+ * Initializes with 4 output slots: full binormal and individual X, Y, Z components.
897
900
  */ constructor(){
898
901
  super();
899
902
  this._outputs = [
@@ -918,17 +921,17 @@ import { BaseGraphNode } from '../node.js';
918
921
  }
919
922
  ];
920
923
  }
921
- /**
922
- * Generates a string representation of this node
923
- *
924
- * @returns 'vertex binormal'
924
+ /**
925
+ * Generates a string representation of this node
926
+ *
927
+ * @returns 'vertex binormal'
925
928
  */ toString() {
926
929
  return 'vertex binormal';
927
930
  }
928
- /**
929
- * Gets the serialization descriptor for this node type
930
- *
931
- * @returns Serialization class descriptor
931
+ /**
932
+ * Gets the serialization descriptor for this node type
933
+ *
934
+ * @returns Serialization class descriptor
932
935
  */ static getSerializationCls() {
933
936
  return {
934
937
  ctor: VertexBinormalNode,
@@ -938,62 +941,62 @@ import { BaseGraphNode } from '../node.js';
938
941
  }
939
942
  };
940
943
  }
941
- /**
942
- * Validates the node state
943
- *
944
- * @returns Empty string (always valid)
945
- *
946
- * @remarks
947
- * Vertex binormal nodes are always valid as they have no inputs.
944
+ /**
945
+ * Validates the node state
946
+ *
947
+ * @returns Empty string (always valid)
948
+ *
949
+ * @remarks
950
+ * Vertex binormal nodes are always valid as they have no inputs.
948
951
  */ validate() {
949
952
  return '';
950
953
  }
951
- /**
952
- * Gets the output type for a specific output slot
953
- *
954
- * @param id - The output slot ID
955
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full binormal
954
+ /**
955
+ * Gets the output type for a specific output slot
956
+ *
957
+ * @param id - The output slot ID
958
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full binormal
956
959
  */ getType(id) {
957
960
  return id > 1 ? 'float' : 'vec3';
958
961
  }
959
962
  }
960
- /**
961
- * Projection matrix input node
962
- *
963
- * @remarks
964
- * Provides the camera's projection matrix (view space to clip space transformation).
965
- * This matrix transforms coordinates from camera/view space to normalized device coordinates (NDC).
966
- *
967
- * For perspective projection: converts frustum to cube, applies perspective divide
968
- * For orthographic projection: applies parallel projection scaling
969
- *
970
- * Used for:
971
- * - Custom vertex transformations
972
- * - Screen-space effects
973
- * - Depth calculations
974
- * - Custom projection modifications
975
- *
976
- * Output:
977
- * - Output 1: 4x4 projection matrix (mat4)
978
- *
979
- * @example
980
- * ```typescript
981
- * const projMatrix = new ProjectionMatrixNode();
982
- * const viewSpacePos = new ViewSpacePositionNode();
983
- *
984
- * // Transform to clip space
985
- * const transform = new TransformNode();
986
- * transform.connectInput(1, viewSpacePos, 1);
987
- * transform.connectInput(2, projMatrix, 1);
988
- * ```
989
- *
990
- * @public
963
+ /**
964
+ * Projection matrix input node
965
+ *
966
+ * @remarks
967
+ * Provides the camera's projection matrix (view space to clip space transformation).
968
+ * This matrix transforms coordinates from camera/view space to normalized device coordinates (NDC).
969
+ *
970
+ * For perspective projection: converts frustum to cube, applies perspective divide
971
+ * For orthographic projection: applies parallel projection scaling
972
+ *
973
+ * Used for:
974
+ * - Custom vertex transformations
975
+ * - Screen-space effects
976
+ * - Depth calculations
977
+ * - Custom projection modifications
978
+ *
979
+ * Output:
980
+ * - Output 1: 4x4 projection matrix (mat4)
981
+ *
982
+ * @example
983
+ * ```typescript
984
+ * const projMatrix = new ProjectionMatrixNode();
985
+ * const viewSpacePos = new ViewSpacePositionNode();
986
+ *
987
+ * // Transform to clip space
988
+ * const transform = new TransformNode();
989
+ * transform.connectInput(1, viewSpacePos, 1);
990
+ * transform.connectInput(2, projMatrix, 1);
991
+ * ```
992
+ *
993
+ * @public
991
994
  */ class ProjectionMatrixNode extends BaseGraphNode {
992
- /**
993
- * Creates a new projection matrix node
994
- *
995
- * @remarks
996
- * Initializes with one output slot for the mat4 matrix.
995
+ /**
996
+ * Creates a new projection matrix node
997
+ *
998
+ * @remarks
999
+ * Initializes with one output slot for the mat4 matrix.
997
1000
  */ constructor(){
998
1001
  super();
999
1002
  this._outputs = [
@@ -1003,17 +1006,17 @@ import { BaseGraphNode } from '../node.js';
1003
1006
  }
1004
1007
  ];
1005
1008
  }
1006
- /**
1007
- * Generates a string representation of this node
1008
- *
1009
- * @returns 'ViewToClipMatrix'
1009
+ /**
1010
+ * Generates a string representation of this node
1011
+ *
1012
+ * @returns 'ViewToClipMatrix'
1010
1013
  */ toString() {
1011
1014
  return 'ViewToClipMatrix';
1012
1015
  }
1013
- /**
1014
- * Gets the serialization descriptor for this node type
1015
- *
1016
- * @returns Serialization class descriptor
1016
+ /**
1017
+ * Gets the serialization descriptor for this node type
1018
+ *
1019
+ * @returns Serialization class descriptor
1017
1020
  */ static getSerializationCls() {
1018
1021
  return {
1019
1022
  ctor: ProjectionMatrixNode,
@@ -1023,61 +1026,61 @@ import { BaseGraphNode } from '../node.js';
1023
1026
  }
1024
1027
  };
1025
1028
  }
1026
- /**
1027
- * Validates the node state
1028
- *
1029
- * @returns Empty string (always valid)
1030
- *
1031
- * @remarks
1032
- * Matrix nodes are always valid as they have no inputs.
1029
+ /**
1030
+ * Validates the node state
1031
+ *
1032
+ * @returns Empty string (always valid)
1033
+ *
1034
+ * @remarks
1035
+ * Matrix nodes are always valid as they have no inputs.
1033
1036
  */ validate() {
1034
1037
  return '';
1035
1038
  }
1036
- /**
1037
- * Gets the output type
1038
- *
1039
- * @returns 'mat4'
1039
+ /**
1040
+ * Gets the output type
1041
+ *
1042
+ * @returns 'mat4'
1040
1043
  */ getType() {
1041
1044
  return 'mat4';
1042
1045
  }
1043
1046
  }
1044
- /**
1045
- * View matrix input node
1046
- *
1047
- * @remarks
1048
- * Provides the camera's view matrix (world space to view space transformation).
1049
- * This matrix transforms coordinates from world space to camera/view space,
1050
- * where the camera is at the origin looking down the negative Z axis.
1051
- *
1052
- * The view matrix is the inverse of the camera's world transformation matrix.
1053
- *
1054
- * Used for:
1055
- * - Custom lighting in view space
1056
- * - View-space normal calculations
1057
- * - Billboard effects
1058
- * - Custom camera-relative transformations
1059
- *
1060
- * Output:
1061
- * - Output 1: 4x4 view matrix (mat4)
1062
- *
1063
- * @example
1064
- * ```typescript
1065
- * const viewMatrix = new ViewMatrixNode();
1066
- * const worldPos = new VertexPositionNode();
1067
- *
1068
- * // Transform to view space
1069
- * const transform = new TransformNode();
1070
- * transform.connectInput(1, worldPos, 1);
1071
- * transform.connectInput(2, viewMatrix, 1);
1072
- * ```
1073
- *
1074
- * @public
1047
+ /**
1048
+ * View matrix input node
1049
+ *
1050
+ * @remarks
1051
+ * Provides the camera's view matrix (world space to view space transformation).
1052
+ * This matrix transforms coordinates from world space to camera/view space,
1053
+ * where the camera is at the origin looking down the negative Z axis.
1054
+ *
1055
+ * The view matrix is the inverse of the camera's world transformation matrix.
1056
+ *
1057
+ * Used for:
1058
+ * - Custom lighting in view space
1059
+ * - View-space normal calculations
1060
+ * - Billboard effects
1061
+ * - Custom camera-relative transformations
1062
+ *
1063
+ * Output:
1064
+ * - Output 1: 4x4 view matrix (mat4)
1065
+ *
1066
+ * @example
1067
+ * ```typescript
1068
+ * const viewMatrix = new ViewMatrixNode();
1069
+ * const worldPos = new VertexPositionNode();
1070
+ *
1071
+ * // Transform to view space
1072
+ * const transform = new TransformNode();
1073
+ * transform.connectInput(1, worldPos, 1);
1074
+ * transform.connectInput(2, viewMatrix, 1);
1075
+ * ```
1076
+ *
1077
+ * @public
1075
1078
  */ class ViewMatrixNode extends BaseGraphNode {
1076
- /**
1077
- * Creates a new view matrix node
1078
- *
1079
- * @remarks
1080
- * Initializes with one output slot for the mat4 matrix.
1079
+ /**
1080
+ * Creates a new view matrix node
1081
+ *
1082
+ * @remarks
1083
+ * Initializes with one output slot for the mat4 matrix.
1081
1084
  */ constructor(){
1082
1085
  super();
1083
1086
  this._outputs = [
@@ -1087,17 +1090,17 @@ import { BaseGraphNode } from '../node.js';
1087
1090
  }
1088
1091
  ];
1089
1092
  }
1090
- /**
1091
- * Generates a string representation of this node
1092
- *
1093
- * @returns 'WorldToViewMatrix'
1093
+ /**
1094
+ * Generates a string representation of this node
1095
+ *
1096
+ * @returns 'WorldToViewMatrix'
1094
1097
  */ toString() {
1095
1098
  return 'WorldToViewMatrix';
1096
1099
  }
1097
- /**
1098
- * Gets the serialization descriptor for this node type
1099
- *
1100
- * @returns Serialization class descriptor
1100
+ /**
1101
+ * Gets the serialization descriptor for this node type
1102
+ *
1103
+ * @returns Serialization class descriptor
1101
1104
  */ static getSerializationCls() {
1102
1105
  return {
1103
1106
  ctor: ViewMatrixNode,
@@ -1107,61 +1110,61 @@ import { BaseGraphNode } from '../node.js';
1107
1110
  }
1108
1111
  };
1109
1112
  }
1110
- /**
1111
- * Validates the node state
1112
- *
1113
- * @returns Empty string (always valid)
1114
- *
1115
- * @remarks
1116
- * Matrix nodes are always valid as they have no inputs.
1113
+ /**
1114
+ * Validates the node state
1115
+ *
1116
+ * @returns Empty string (always valid)
1117
+ *
1118
+ * @remarks
1119
+ * Matrix nodes are always valid as they have no inputs.
1117
1120
  */ validate() {
1118
1121
  return '';
1119
1122
  }
1120
- /**
1121
- * Gets the output type
1122
- *
1123
- * @returns 'mat4'
1123
+ /**
1124
+ * Gets the output type
1125
+ *
1126
+ * @returns 'mat4'
1124
1127
  */ getType() {
1125
1128
  return 'mat4';
1126
1129
  }
1127
1130
  }
1128
- /**
1129
- * View-projection matrix input node
1130
- *
1131
- * @remarks
1132
- * Provides the combined view-projection matrix (world space to clip space transformation).
1133
- * This is the product of the view matrix and projection matrix, commonly used for
1134
- * transforming vertices from world space directly to clip space in one step.
1135
- *
1136
- * Equivalent to: projectionMatrix * viewMatrix
1137
- *
1138
- * Used for:
1139
- * - Vertex position transformation (most common use)
1140
- * - Custom vertex shaders
1141
- * - Screen-space position calculations
1142
- * - Shadow mapping
1143
- *
1144
- * Output:
1145
- * - Output 1: 4x4 view-projection matrix (mat4)
1146
- *
1147
- * @example
1148
- * ```typescript
1149
- * const viewProjMatrix = new ViewProjMatrixNode();
1150
- * const worldPos = new VertexPositionNode();
1151
- *
1152
- * // Transform directly to clip space
1153
- * const transform = new TransformNode();
1154
- * transform.connectInput(1, worldPos, 1);
1155
- * transform.connectInput(2, viewProjMatrix, 1);
1156
- * ```
1157
- *
1158
- * @public
1131
+ /**
1132
+ * View-projection matrix input node
1133
+ *
1134
+ * @remarks
1135
+ * Provides the combined view-projection matrix (world space to clip space transformation).
1136
+ * This is the product of the view matrix and projection matrix, commonly used for
1137
+ * transforming vertices from world space directly to clip space in one step.
1138
+ *
1139
+ * Equivalent to: projectionMatrix * viewMatrix
1140
+ *
1141
+ * Used for:
1142
+ * - Vertex position transformation (most common use)
1143
+ * - Custom vertex shaders
1144
+ * - Screen-space position calculations
1145
+ * - Shadow mapping
1146
+ *
1147
+ * Output:
1148
+ * - Output 1: 4x4 view-projection matrix (mat4)
1149
+ *
1150
+ * @example
1151
+ * ```typescript
1152
+ * const viewProjMatrix = new ViewProjMatrixNode();
1153
+ * const worldPos = new VertexPositionNode();
1154
+ *
1155
+ * // Transform directly to clip space
1156
+ * const transform = new TransformNode();
1157
+ * transform.connectInput(1, worldPos, 1);
1158
+ * transform.connectInput(2, viewProjMatrix, 1);
1159
+ * ```
1160
+ *
1161
+ * @public
1159
1162
  */ class ViewProjMatrixNode extends BaseGraphNode {
1160
- /**
1161
- * Creates a new view-projection matrix node
1162
- *
1163
- * @remarks
1164
- * Initializes with one output slot for the mat4 matrix.
1163
+ /**
1164
+ * Creates a new view-projection matrix node
1165
+ *
1166
+ * @remarks
1167
+ * Initializes with one output slot for the mat4 matrix.
1165
1168
  */ constructor(){
1166
1169
  super();
1167
1170
  this._outputs = [
@@ -1171,17 +1174,17 @@ import { BaseGraphNode } from '../node.js';
1171
1174
  }
1172
1175
  ];
1173
1176
  }
1174
- /**
1175
- * Generates a string representation of this node
1176
- *
1177
- * @returns 'WorldToClipMatrix'
1177
+ /**
1178
+ * Generates a string representation of this node
1179
+ *
1180
+ * @returns 'WorldToClipMatrix'
1178
1181
  */ toString() {
1179
1182
  return 'WorldToClipMatrix';
1180
1183
  }
1181
- /**
1182
- * Gets the serialization descriptor for this node type
1183
- *
1184
- * @returns Serialization class descriptor
1184
+ /**
1185
+ * Gets the serialization descriptor for this node type
1186
+ *
1187
+ * @returns Serialization class descriptor
1185
1188
  */ static getSerializationCls() {
1186
1189
  return {
1187
1190
  ctor: ViewProjMatrixNode,
@@ -1191,58 +1194,58 @@ import { BaseGraphNode } from '../node.js';
1191
1194
  }
1192
1195
  };
1193
1196
  }
1194
- /**
1195
- * Validates the node state
1196
- *
1197
- * @returns Empty string (always valid)
1198
- *
1199
- * @remarks
1200
- * Matrix nodes are always valid as they have no inputs.
1197
+ /**
1198
+ * Validates the node state
1199
+ *
1200
+ * @returns Empty string (always valid)
1201
+ *
1202
+ * @remarks
1203
+ * Matrix nodes are always valid as they have no inputs.
1201
1204
  */ validate() {
1202
1205
  return '';
1203
1206
  }
1204
- /**
1205
- * Gets the output type
1206
- *
1207
- * @returns 'mat4'
1207
+ /**
1208
+ * Gets the output type
1209
+ *
1210
+ * @returns 'mat4'
1208
1211
  */ getType() {
1209
1212
  return 'mat4';
1210
1213
  }
1211
1214
  }
1212
- /**
1213
- * Inverse projection matrix input node
1214
- *
1215
- * @remarks
1216
- * Provides the inverse of the projection matrix (clip space to view space transformation).
1217
- * This matrix transforms coordinates from normalized device coordinates (NDC) back to camera/view space.
1218
- *
1219
- * Used for:
1220
- * - Screen-space to view-space reconstruction
1221
- * - Depth buffer unprojection
1222
- * - Deferred rendering position reconstruction
1223
- * - Ray marching from screen space
1224
- *
1225
- * Output:
1226
- * - Output 1: 4x4 inverse projection matrix (mat4)
1227
- *
1228
- * @example
1229
- * ```typescript
1230
- * const invProjMatrix = new InvProjMatrixNode();
1231
- * const clipPos = new ClipSpacePositionNode();
1232
- *
1233
- * // Reconstruct view space position
1234
- * const transform = new TransformNode();
1235
- * transform.connectInput(1, clipPos, 1);
1236
- * transform.connectInput(2, invProjMatrix, 1);
1237
- * ```
1238
- *
1239
- * @public
1215
+ /**
1216
+ * Inverse projection matrix input node
1217
+ *
1218
+ * @remarks
1219
+ * Provides the inverse of the projection matrix (clip space to view space transformation).
1220
+ * This matrix transforms coordinates from normalized device coordinates (NDC) back to camera/view space.
1221
+ *
1222
+ * Used for:
1223
+ * - Screen-space to view-space reconstruction
1224
+ * - Depth buffer unprojection
1225
+ * - Deferred rendering position reconstruction
1226
+ * - Ray marching from screen space
1227
+ *
1228
+ * Output:
1229
+ * - Output 1: 4x4 inverse projection matrix (mat4)
1230
+ *
1231
+ * @example
1232
+ * ```typescript
1233
+ * const invProjMatrix = new InvProjMatrixNode();
1234
+ * const clipPos = new ClipSpacePositionNode();
1235
+ *
1236
+ * // Reconstruct view space position
1237
+ * const transform = new TransformNode();
1238
+ * transform.connectInput(1, clipPos, 1);
1239
+ * transform.connectInput(2, invProjMatrix, 1);
1240
+ * ```
1241
+ *
1242
+ * @public
1240
1243
  */ class InvProjMatrixNode extends BaseGraphNode {
1241
- /**
1242
- * Creates a new inverse projection matrix node
1243
- *
1244
- * @remarks
1245
- * Initializes with one output slot for the mat4 matrix.
1244
+ /**
1245
+ * Creates a new inverse projection matrix node
1246
+ *
1247
+ * @remarks
1248
+ * Initializes with one output slot for the mat4 matrix.
1246
1249
  */ constructor(){
1247
1250
  super();
1248
1251
  this._outputs = [
@@ -1252,17 +1255,17 @@ import { BaseGraphNode } from '../node.js';
1252
1255
  }
1253
1256
  ];
1254
1257
  }
1255
- /**
1256
- * Generates a string representation of this node
1257
- *
1258
- * @returns 'ClipToViewMatrix'
1258
+ /**
1259
+ * Generates a string representation of this node
1260
+ *
1261
+ * @returns 'ClipToViewMatrix'
1259
1262
  */ toString() {
1260
1263
  return 'ClipToViewMatrix';
1261
1264
  }
1262
- /**
1263
- * Gets the serialization descriptor for this node type
1264
- *
1265
- * @returns Serialization class descriptor
1265
+ /**
1266
+ * Gets the serialization descriptor for this node type
1267
+ *
1268
+ * @returns Serialization class descriptor
1266
1269
  */ static getSerializationCls() {
1267
1270
  return {
1268
1271
  ctor: InvProjMatrixNode,
@@ -1272,60 +1275,60 @@ import { BaseGraphNode } from '../node.js';
1272
1275
  }
1273
1276
  };
1274
1277
  }
1275
- /**
1276
- * Validates the node state
1277
- *
1278
- * @returns Empty string (always valid)
1279
- *
1280
- * @remarks
1281
- * Matrix nodes are always valid as they have no inputs.
1278
+ /**
1279
+ * Validates the node state
1280
+ *
1281
+ * @returns Empty string (always valid)
1282
+ *
1283
+ * @remarks
1284
+ * Matrix nodes are always valid as they have no inputs.
1282
1285
  */ validate() {
1283
1286
  return '';
1284
1287
  }
1285
- /**
1286
- * Gets the output type
1287
- *
1288
- * @returns 'mat4'
1288
+ /**
1289
+ * Gets the output type
1290
+ *
1291
+ * @returns 'mat4'
1289
1292
  */ getType() {
1290
1293
  return 'mat4';
1291
1294
  }
1292
1295
  }
1293
- /**
1294
- * Inverse view-projection matrix input node
1295
- *
1296
- * @remarks
1297
- * Provides the inverse of the view-projection matrix (clip space to world space transformation).
1298
- * This matrix transforms coordinates from normalized device coordinates (NDC) back to world space.
1299
- *
1300
- * Equivalent to: inverse(projectionMatrix * viewMatrix)
1301
- *
1302
- * Used for:
1303
- * - Screen-space to world-space reconstruction
1304
- * - Deferred rendering world position reconstruction
1305
- * - Picking and ray casting from screen coordinates
1306
- * - Screen-space effects needing world position
1307
- *
1308
- * Output:
1309
- * - Output 1: 4x4 inverse view-projection matrix (mat4)
1310
- *
1311
- * @example
1312
- * ```typescript
1313
- * const invViewProjMatrix = new InvViewProjMatrixNode();
1314
- * const screenPos = new ScreenPositionNode();
1315
- *
1316
- * // Reconstruct world position from screen coordinates
1317
- * const transform = new TransformNode();
1318
- * transform.connectInput(1, screenPos, 1);
1319
- * transform.connectInput(2, invViewProjMatrix, 1);
1320
- * ```
1321
- *
1322
- * @public
1296
+ /**
1297
+ * Inverse view-projection matrix input node
1298
+ *
1299
+ * @remarks
1300
+ * Provides the inverse of the view-projection matrix (clip space to world space transformation).
1301
+ * This matrix transforms coordinates from normalized device coordinates (NDC) back to world space.
1302
+ *
1303
+ * Equivalent to: inverse(projectionMatrix * viewMatrix)
1304
+ *
1305
+ * Used for:
1306
+ * - Screen-space to world-space reconstruction
1307
+ * - Deferred rendering world position reconstruction
1308
+ * - Picking and ray casting from screen coordinates
1309
+ * - Screen-space effects needing world position
1310
+ *
1311
+ * Output:
1312
+ * - Output 1: 4x4 inverse view-projection matrix (mat4)
1313
+ *
1314
+ * @example
1315
+ * ```typescript
1316
+ * const invViewProjMatrix = new InvViewProjMatrixNode();
1317
+ * const screenPos = new ScreenPositionNode();
1318
+ *
1319
+ * // Reconstruct world position from screen coordinates
1320
+ * const transform = new TransformNode();
1321
+ * transform.connectInput(1, screenPos, 1);
1322
+ * transform.connectInput(2, invViewProjMatrix, 1);
1323
+ * ```
1324
+ *
1325
+ * @public
1323
1326
  */ class InvViewProjMatrixNode extends BaseGraphNode {
1324
- /**
1325
- * Creates a new inverse view-projection matrix node
1326
- *
1327
- * @remarks
1328
- * Initializes with one output slot for the mat4 matrix.
1327
+ /**
1328
+ * Creates a new inverse view-projection matrix node
1329
+ *
1330
+ * @remarks
1331
+ * Initializes with one output slot for the mat4 matrix.
1329
1332
  */ constructor(){
1330
1333
  super();
1331
1334
  this._outputs = [
@@ -1335,17 +1338,17 @@ import { BaseGraphNode } from '../node.js';
1335
1338
  }
1336
1339
  ];
1337
1340
  }
1338
- /**
1339
- * Generates a string representation of this node
1340
- *
1341
- * @returns 'ClipToWorldMatrix'
1341
+ /**
1342
+ * Generates a string representation of this node
1343
+ *
1344
+ * @returns 'ClipToWorldMatrix'
1342
1345
  */ toString() {
1343
1346
  return 'ClipToWorldMatrix';
1344
1347
  }
1345
- /**
1346
- * Gets the serialization descriptor for this node type
1347
- *
1348
- * @returns Serialization class descriptor
1348
+ /**
1349
+ * Gets the serialization descriptor for this node type
1350
+ *
1351
+ * @returns Serialization class descriptor
1349
1352
  */ static getSerializationCls() {
1350
1353
  return {
1351
1354
  ctor: InvViewProjMatrixNode,
@@ -1355,34 +1358,34 @@ import { BaseGraphNode } from '../node.js';
1355
1358
  }
1356
1359
  };
1357
1360
  }
1358
- /**
1359
- * Validates the node state
1360
- *
1361
- * @returns Empty string (always valid)
1362
- *
1363
- * @remarks
1364
- * Matrix nodes are always valid as they have no inputs.
1361
+ /**
1362
+ * Validates the node state
1363
+ *
1364
+ * @returns Empty string (always valid)
1365
+ *
1366
+ * @remarks
1367
+ * Matrix nodes are always valid as they have no inputs.
1365
1368
  */ validate() {
1366
1369
  return '';
1367
1370
  }
1368
- /**
1369
- * Gets the output type
1370
- *
1371
- * @returns 'mat4'
1371
+ /**
1372
+ * Gets the output type
1373
+ *
1374
+ * @returns 'mat4'
1372
1375
  */ getType() {
1373
1376
  return 'mat4';
1374
1377
  }
1375
1378
  }
1376
- /**
1377
- * Billboard matrix input node
1378
- *
1379
- * @public
1379
+ /**
1380
+ * Billboard matrix input node
1381
+ *
1382
+ * @public
1380
1383
  */ class BillboardMatrixNode extends BaseGraphNode {
1381
- /**
1382
- * Creates a new billboard matrix node
1383
- *
1384
- * @remarks
1385
- * Initializes with one output slot for the mat3 matrix.
1384
+ /**
1385
+ * Creates a new billboard matrix node
1386
+ *
1387
+ * @remarks
1388
+ * Initializes with one output slot for the mat3 matrix.
1386
1389
  */ constructor(){
1387
1390
  super();
1388
1391
  this._outputs = [
@@ -1392,17 +1395,17 @@ import { BaseGraphNode } from '../node.js';
1392
1395
  }
1393
1396
  ];
1394
1397
  }
1395
- /**
1396
- * Generates a string representation of this node
1397
- *
1398
- * @returns 'BillboardMatrix'
1398
+ /**
1399
+ * Generates a string representation of this node
1400
+ *
1401
+ * @returns 'BillboardMatrix'
1399
1402
  */ toString() {
1400
1403
  return 'BillboardMatrix';
1401
1404
  }
1402
- /**
1403
- * Gets the serialization descriptor for this node type
1404
- *
1405
- * @returns Serialization class descriptor
1405
+ /**
1406
+ * Gets the serialization descriptor for this node type
1407
+ *
1408
+ * @returns Serialization class descriptor
1406
1409
  */ static getSerializationCls() {
1407
1410
  return {
1408
1411
  ctor: BillboardMatrixNode,
@@ -1412,69 +1415,69 @@ import { BaseGraphNode } from '../node.js';
1412
1415
  }
1413
1416
  };
1414
1417
  }
1415
- /**
1416
- * Validates the node state
1417
- *
1418
- * @returns Empty string (always valid)
1419
- *
1420
- * @remarks
1421
- * Matrix nodes are always valid as they have no inputs.
1418
+ /**
1419
+ * Validates the node state
1420
+ *
1421
+ * @returns Empty string (always valid)
1422
+ *
1423
+ * @remarks
1424
+ * Matrix nodes are always valid as they have no inputs.
1422
1425
  */ validate() {
1423
1426
  return '';
1424
1427
  }
1425
- /**
1426
- * Gets the output type
1427
- *
1428
- * @returns 'mat4'
1428
+ /**
1429
+ * Gets the output type
1430
+ *
1431
+ * @returns 'mat4'
1429
1432
  */ getType() {
1430
1433
  return 'mat3';
1431
1434
  }
1432
1435
  }
1433
- /**
1434
- * Elapsed time input node
1435
- *
1436
- * @remarks
1437
- * Provides the total elapsed time since the application started, in seconds.
1438
- * This value continuously increases and is useful for creating time-based animations
1439
- * and effects directly in the material shader.
1440
- *
1441
- * Used for:
1442
- * - Animated textures (scrolling, rotating)
1443
- * - Pulsating effects
1444
- * - Wave animations
1445
- * - Oscillating values (using sin/cos)
1446
- * - Time-based procedural patterns
1447
- *
1448
- * Output:
1449
- * - Output 1: Elapsed time in seconds (float)
1450
- *
1451
- * @example
1452
- * ```typescript
1453
- * const time = new ElapsedTimeNode();
1454
- * const speed = new ConstantScalarNode();
1455
- * speed.x = 0.5;
1456
- *
1457
- * // Animate UV scrolling
1458
- * const mul = new CompMulNode();
1459
- * mul.connectInput(1, time, 1);
1460
- * mul.connectInput(2, speed, 1);
1461
- *
1462
- * const add = new CompAddNode();
1463
- * add.connectInput(1, uvNode, 1);
1464
- * add.connectInput(2, mul, 1);
1465
- *
1466
- * // Pulsating effect with sine wave
1467
- * const sin = new SinNode();
1468
- * sin.connectInput(1, time, 1);
1469
- * ```
1470
- *
1471
- * @public
1436
+ /**
1437
+ * Elapsed time input node
1438
+ *
1439
+ * @remarks
1440
+ * Provides the total elapsed time since the application started, in seconds.
1441
+ * This value continuously increases and is useful for creating time-based animations
1442
+ * and effects directly in the material shader.
1443
+ *
1444
+ * Used for:
1445
+ * - Animated textures (scrolling, rotating)
1446
+ * - Pulsating effects
1447
+ * - Wave animations
1448
+ * - Oscillating values (using sin/cos)
1449
+ * - Time-based procedural patterns
1450
+ *
1451
+ * Output:
1452
+ * - Output 1: Elapsed time in seconds (float)
1453
+ *
1454
+ * @example
1455
+ * ```typescript
1456
+ * const time = new ElapsedTimeNode();
1457
+ * const speed = new ConstantScalarNode();
1458
+ * speed.x = 0.5;
1459
+ *
1460
+ * // Animate UV scrolling
1461
+ * const mul = new CompMulNode();
1462
+ * mul.connectInput(1, time, 1);
1463
+ * mul.connectInput(2, speed, 1);
1464
+ *
1465
+ * const add = new CompAddNode();
1466
+ * add.connectInput(1, uvNode, 1);
1467
+ * add.connectInput(2, mul, 1);
1468
+ *
1469
+ * // Pulsating effect with sine wave
1470
+ * const sin = new SinNode();
1471
+ * sin.connectInput(1, time, 1);
1472
+ * ```
1473
+ *
1474
+ * @public
1472
1475
  */ class ElapsedTimeNode extends BaseGraphNode {
1473
- /**
1474
- * Creates a new elapsed time node
1475
- *
1476
- * @remarks
1477
- * Initializes with one output slot for the time value.
1476
+ /**
1477
+ * Creates a new elapsed time node
1478
+ *
1479
+ * @remarks
1480
+ * Initializes with one output slot for the time value.
1478
1481
  */ constructor(){
1479
1482
  super();
1480
1483
  this._outputs = [
@@ -1484,17 +1487,17 @@ import { BaseGraphNode } from '../node.js';
1484
1487
  }
1485
1488
  ];
1486
1489
  }
1487
- /**
1488
- * Generates a string representation of this node
1489
- *
1490
- * @returns 'Elapsed time'
1490
+ /**
1491
+ * Generates a string representation of this node
1492
+ *
1493
+ * @returns 'Elapsed time'
1491
1494
  */ toString() {
1492
1495
  return 'Elapsed time';
1493
1496
  }
1494
- /**
1495
- * Gets the serialization descriptor for this node type
1496
- *
1497
- * @returns Serialization class descriptor
1497
+ /**
1498
+ * Gets the serialization descriptor for this node type
1499
+ *
1500
+ * @returns Serialization class descriptor
1498
1501
  */ static getSerializationCls() {
1499
1502
  return {
1500
1503
  ctor: ElapsedTimeNode,
@@ -1504,71 +1507,71 @@ import { BaseGraphNode } from '../node.js';
1504
1507
  }
1505
1508
  };
1506
1509
  }
1507
- /**
1508
- * Validates the node state
1509
- *
1510
- * @returns Empty string (always valid)
1511
- *
1512
- * @remarks
1513
- * Time nodes are always valid as they have no inputs.
1510
+ /**
1511
+ * Validates the node state
1512
+ *
1513
+ * @returns Empty string (always valid)
1514
+ *
1515
+ * @remarks
1516
+ * Time nodes are always valid as they have no inputs.
1514
1517
  */ validate() {
1515
1518
  return '';
1516
1519
  }
1517
- /**
1518
- * Gets the output type
1519
- *
1520
- * @returns 'float'
1520
+ /**
1521
+ * Gets the output type
1522
+ *
1523
+ * @returns 'float'
1521
1524
  */ getType() {
1522
1525
  return 'float';
1523
1526
  }
1524
1527
  }
1525
- /**
1526
- * Camera position input node
1527
- *
1528
- * @remarks
1529
- * Provides the world-space position of the camera/viewer.
1530
- * This is the location of the camera in the 3D scene coordinate system.
1531
- *
1532
- * Used for:
1533
- * - View direction calculations
1534
- * - Distance-based effects (distance fog, LOD)
1535
- * - Reflections and refractions
1536
- * - Fresnel effects
1537
- * - Environment mapping
1538
- * - Specular highlights
1539
- *
1540
- * Outputs:
1541
- * - Output 1: Full camera position (vec3)
1542
- * - Output 2: X coordinate (float)
1543
- * - Output 3: Y coordinate (float)
1544
- * - Output 4: Z coordinate (float)
1545
- *
1546
- * @example
1547
- * ```typescript
1548
- * const cameraPos = new CameraPositionNode();
1549
- * const worldPos = new VertexPositionNode();
1550
- *
1551
- * // Calculate view direction
1552
- * const viewDir = new CompSubNode();
1553
- * viewDir.connectInput(1, cameraPos, 1);
1554
- * viewDir.connectInput(2, worldPos, 1);
1555
- *
1556
- * const normalizedViewDir = new NormalizeNode();
1557
- * normalizedViewDir.connectInput(1, viewDir, 1);
1558
- *
1559
- * // Calculate distance to camera
1560
- * const distance = new DistanceNode();
1561
- * distance.connectInput(1, cameraPos, 1);
1562
- * distance.connectInput(2, worldPos, 1);
1563
- * ```
1564
- *
1565
- * @public
1528
+ /**
1529
+ * Camera position input node
1530
+ *
1531
+ * @remarks
1532
+ * Provides the world-space position of the camera/viewer.
1533
+ * This is the location of the camera in the 3D scene coordinate system.
1534
+ *
1535
+ * Used for:
1536
+ * - View direction calculations
1537
+ * - Distance-based effects (distance fog, LOD)
1538
+ * - Reflections and refractions
1539
+ * - Fresnel effects
1540
+ * - Environment mapping
1541
+ * - Specular highlights
1542
+ *
1543
+ * Outputs:
1544
+ * - Output 1: Full camera position (vec3)
1545
+ * - Output 2: X coordinate (float)
1546
+ * - Output 3: Y coordinate (float)
1547
+ * - Output 4: Z coordinate (float)
1548
+ *
1549
+ * @example
1550
+ * ```typescript
1551
+ * const cameraPos = new CameraPositionNode();
1552
+ * const worldPos = new VertexPositionNode();
1553
+ *
1554
+ * // Calculate view direction
1555
+ * const viewDir = new CompSubNode();
1556
+ * viewDir.connectInput(1, cameraPos, 1);
1557
+ * viewDir.connectInput(2, worldPos, 1);
1558
+ *
1559
+ * const normalizedViewDir = new NormalizeNode();
1560
+ * normalizedViewDir.connectInput(1, viewDir, 1);
1561
+ *
1562
+ * // Calculate distance to camera
1563
+ * const distance = new DistanceNode();
1564
+ * distance.connectInput(1, cameraPos, 1);
1565
+ * distance.connectInput(2, worldPos, 1);
1566
+ * ```
1567
+ *
1568
+ * @public
1566
1569
  */ class CameraPositionNode extends BaseGraphNode {
1567
- /**
1568
- * Creates a new camera position node
1569
- *
1570
- * @remarks
1571
- * Initializes with 4 output slots: full position and individual X, Y, Z components.
1570
+ /**
1571
+ * Creates a new camera position node
1572
+ *
1573
+ * @remarks
1574
+ * Initializes with 4 output slots: full position and individual X, Y, Z components.
1572
1575
  */ constructor(){
1573
1576
  super();
1574
1577
  this._outputs = [
@@ -1593,17 +1596,17 @@ import { BaseGraphNode } from '../node.js';
1593
1596
  }
1594
1597
  ];
1595
1598
  }
1596
- /**
1597
- * Generates a string representation of this node
1598
- *
1599
- * @returns 'camera position'
1599
+ /**
1600
+ * Generates a string representation of this node
1601
+ *
1602
+ * @returns 'camera position'
1600
1603
  */ toString() {
1601
1604
  return 'camera position';
1602
1605
  }
1603
- /**
1604
- * Gets the serialization descriptor for this node type
1605
- *
1606
- * @returns Serialization class descriptor
1606
+ /**
1607
+ * Gets the serialization descriptor for this node type
1608
+ *
1609
+ * @returns Serialization class descriptor
1607
1610
  */ static getSerializationCls() {
1608
1611
  return {
1609
1612
  ctor: CameraPositionNode,
@@ -1613,44 +1616,44 @@ import { BaseGraphNode } from '../node.js';
1613
1616
  }
1614
1617
  };
1615
1618
  }
1616
- /**
1617
- * Validates the node state
1618
- *
1619
- * @returns Empty string (always valid)
1620
- *
1621
- * @remarks
1622
- * Camera position nodes are always valid as they have no inputs.
1619
+ /**
1620
+ * Validates the node state
1621
+ *
1622
+ * @returns Empty string (always valid)
1623
+ *
1624
+ * @remarks
1625
+ * Camera position nodes are always valid as they have no inputs.
1623
1626
  */ validate() {
1624
1627
  return '';
1625
1628
  }
1626
- /**
1627
- * Gets the output type for a specific output slot
1628
- *
1629
- * @param id - The output slot ID
1630
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
1629
+ /**
1630
+ * Gets the output type for a specific output slot
1631
+ *
1632
+ * @param id - The output slot ID
1633
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
1631
1634
  */ getType(id) {
1632
1635
  return id > 1 ? 'float' : 'vec3';
1633
1636
  }
1634
1637
  }
1635
- /**
1636
- * Camera vector input node
1637
- *
1638
- * @remarks
1639
- * Provides the world-space direction from current surface point to camera.
1640
- *
1641
- * Outputs:
1642
- * - Output 1: Full vector (vec3, normalized)
1643
- * - Output 2: X component (float)
1644
- * - Output 3: Y component (float)
1645
- * - Output 4: Z component (float)
1646
- *
1647
- * @public
1638
+ /**
1639
+ * Camera vector input node
1640
+ *
1641
+ * @remarks
1642
+ * Provides the world-space direction from current surface point to camera.
1643
+ *
1644
+ * Outputs:
1645
+ * - Output 1: Full vector (vec3, normalized)
1646
+ * - Output 2: X component (float)
1647
+ * - Output 3: Y component (float)
1648
+ * - Output 4: Z component (float)
1649
+ *
1650
+ * @public
1648
1651
  */ class CameraVectorNode extends BaseGraphNode {
1649
- /**
1650
- * Creates a new camera vector node
1651
- *
1652
- * @remarks
1653
- * Initializes with 4 output slots: full vector and individual X, Y, Z components.
1652
+ /**
1653
+ * Creates a new camera vector node
1654
+ *
1655
+ * @remarks
1656
+ * Initializes with 4 output slots: full vector and individual X, Y, Z components.
1654
1657
  */ constructor(){
1655
1658
  super();
1656
1659
  this._outputs = [
@@ -1675,17 +1678,17 @@ import { BaseGraphNode } from '../node.js';
1675
1678
  }
1676
1679
  ];
1677
1680
  }
1678
- /**
1679
- * Generates a string representation of this node
1680
- *
1681
- * @returns 'camera vector'
1681
+ /**
1682
+ * Generates a string representation of this node
1683
+ *
1684
+ * @returns 'camera vector'
1682
1685
  */ toString() {
1683
1686
  return 'camera vector';
1684
1687
  }
1685
- /**
1686
- * Gets the serialization descriptor for this node type
1687
- *
1688
- * @returns Serialization class descriptor
1688
+ /**
1689
+ * Gets the serialization descriptor for this node type
1690
+ *
1691
+ * @returns Serialization class descriptor
1689
1692
  */ static getSerializationCls() {
1690
1693
  return {
1691
1694
  ctor: CameraVectorNode,
@@ -1695,63 +1698,63 @@ import { BaseGraphNode } from '../node.js';
1695
1698
  }
1696
1699
  };
1697
1700
  }
1698
- /**
1699
- * Validates the node state
1700
- *
1701
- * @returns Empty string (always valid)
1701
+ /**
1702
+ * Validates the node state
1703
+ *
1704
+ * @returns Empty string (always valid)
1702
1705
  */ validate() {
1703
1706
  return '';
1704
1707
  }
1705
- /**
1706
- * Gets the output type for a specific output slot
1707
- *
1708
- * @param id - The output slot ID
1709
- * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full vector
1708
+ /**
1709
+ * Gets the output type for a specific output slot
1710
+ *
1711
+ * @param id - The output slot ID
1712
+ * @returns 'float' for individual component outputs (id \> 1), 'vec3' for full vector
1710
1713
  */ getType(id) {
1711
1714
  return id > 1 ? 'float' : 'vec3';
1712
1715
  }
1713
1716
  }
1714
- /**
1715
- * Sky environment texture input node
1716
- *
1717
- * @remarks
1718
- * Provides access to the scene's sky/environment cubemap texture.
1719
- * This is typically used for skybox rendering, environment reflections,
1720
- * and image-based lighting (IBL).
1721
- *
1722
- * The texture is a cubemap (texCube) that can be sampled using a 3D direction vector.
1723
- *
1724
- * Used for:
1725
- * - Skybox rendering
1726
- * - Environment reflections on metallic surfaces
1727
- * - Image-based lighting (IBL)
1728
- * - Ambient lighting from environment
1729
- * - Reflections and refractions
1730
- *
1731
- * Output:
1732
- * - Output 1: Cubemap texture sampler (texCube)
1733
- *
1734
- * @example
1735
- * ```typescript
1736
- * const skyTexture = new SkyEnvTextureNode();
1737
- * const reflectionDir = new ReflectNode();
1738
- *
1739
- * // Sample environment for reflection
1740
- * const envSample = new TextureSampleCubeNode();
1741
- * envSample.connectInput(1, skyTexture, 1);
1742
- * envSample.connectInput(2, reflectionDir, 1);
1743
- *
1744
- * // Use for metallic reflections
1745
- * metalColor.connectInput(1, envSample, 1);
1746
- * ```
1747
- *
1748
- * @public
1717
+ /**
1718
+ * Sky environment texture input node
1719
+ *
1720
+ * @remarks
1721
+ * Provides access to the scene's sky/environment cubemap texture.
1722
+ * This is typically used for skybox rendering, environment reflections,
1723
+ * and image-based lighting (IBL).
1724
+ *
1725
+ * The texture is a cubemap (texCube) that can be sampled using a 3D direction vector.
1726
+ *
1727
+ * Used for:
1728
+ * - Skybox rendering
1729
+ * - Environment reflections on metallic surfaces
1730
+ * - Image-based lighting (IBL)
1731
+ * - Ambient lighting from environment
1732
+ * - Reflections and refractions
1733
+ *
1734
+ * Output:
1735
+ * - Output 1: Cubemap texture sampler (texCube)
1736
+ *
1737
+ * @example
1738
+ * ```typescript
1739
+ * const skyTexture = new SkyEnvTextureNode();
1740
+ * const reflectionDir = new ReflectNode();
1741
+ *
1742
+ * // Sample environment for reflection
1743
+ * const envSample = new TextureSampleCubeNode();
1744
+ * envSample.connectInput(1, skyTexture, 1);
1745
+ * envSample.connectInput(2, reflectionDir, 1);
1746
+ *
1747
+ * // Use for metallic reflections
1748
+ * metalColor.connectInput(1, envSample, 1);
1749
+ * ```
1750
+ *
1751
+ * @public
1749
1752
  */ class SkyEnvTextureNode extends BaseGraphNode {
1750
- /**
1751
- * Creates a new sky environment texture node
1752
- *
1753
- * @remarks
1754
- * Initializes with one output slot for the cubemap sampler.
1753
+ /**
1754
+ * Creates a new sky environment texture node
1755
+ *
1756
+ * @remarks
1757
+ * Initializes with one output slot for the cubemap sampler.
1755
1758
  */ constructor(){
1756
1759
  super();
1757
1760
  this._outputs = [
@@ -1761,17 +1764,17 @@ import { BaseGraphNode } from '../node.js';
1761
1764
  }
1762
1765
  ];
1763
1766
  }
1764
- /**
1765
- * Generates a string representation of this node
1766
- *
1767
- * @returns 'SkyEnvTexture'
1767
+ /**
1768
+ * Generates a string representation of this node
1769
+ *
1770
+ * @returns 'SkyEnvTexture'
1768
1771
  */ toString() {
1769
1772
  return 'SkyEnvTexture';
1770
1773
  }
1771
- /**
1772
- * Gets the serialization descriptor for this node type
1773
- *
1774
- * @returns Serialization class descriptor
1774
+ /**
1775
+ * Gets the serialization descriptor for this node type
1776
+ *
1777
+ * @returns Serialization class descriptor
1775
1778
  */ static getSerializationCls() {
1776
1779
  return {
1777
1780
  ctor: SkyEnvTextureNode,
@@ -1781,68 +1784,68 @@ import { BaseGraphNode } from '../node.js';
1781
1784
  }
1782
1785
  };
1783
1786
  }
1784
- /**
1785
- * Validates the node state
1786
- *
1787
- * @returns Empty string (always valid)
1788
- *
1789
- * @remarks
1790
- * Sky environment texture nodes are always valid as they have no inputs.
1787
+ /**
1788
+ * Validates the node state
1789
+ *
1790
+ * @returns Empty string (always valid)
1791
+ *
1792
+ * @remarks
1793
+ * Sky environment texture nodes are always valid as they have no inputs.
1791
1794
  */ validate() {
1792
1795
  return '';
1793
1796
  }
1794
- /**
1795
- * Gets the output type
1796
- *
1797
- * @returns 'texCube' (cubemap texture sampler)
1797
+ /**
1798
+ * Gets the output type
1799
+ *
1800
+ * @returns 'texCube' (cubemap texture sampler)
1798
1801
  */ getType() {
1799
1802
  return 'texCube';
1800
1803
  }
1801
1804
  }
1802
- /**
1803
- * Camera near/far plane input node
1804
- *
1805
- * @remarks
1806
- * Provides the camera's near and far clipping plane distances.
1807
- * These values define the camera's visible depth range:
1808
- * - Near plane: The closest distance at which objects are rendered
1809
- * - Far plane: The farthest distance at which objects are rendered
1810
- *
1811
- * Used for:
1812
- * - Depth linearization (converting from NDC depth to linear depth)
1813
- * - Fog calculations based on depth
1814
- * - Custom depth-of-field effects
1815
- * - Z-buffer precision calculations
1816
- * - Distance-based effects
1817
- *
1818
- * Outputs:
1819
- * - Output 1: Both values as vec2 (x = near, y = far)
1820
- * - Output 2: Near plane distance (float)
1821
- * - Output 3: Far plane distance (float)
1822
- *
1823
- * @example
1824
- * ```typescript
1825
- * const nearFar = new CameraNearFarNode();
1826
- * const depth = new DepthNode();
1827
- *
1828
- * // Linearize depth buffer value
1829
- * // linearDepth = (2.0 * near) / (far + near - depth * (far - near))
1830
- * const farMinusNear = new CompSubNode();
1831
- * farMinusNear.connectInput(1, nearFar, 3); // far
1832
- * farMinusNear.connectInput(2, nearFar, 2); // near
1833
- *
1834
- * // Use for distance fog
1835
- * const fogFactor = new SaturateNode();
1836
- * fogFactor.connectInput(1, linearDepthCalc, 1);
1837
- * ```
1838
- *
1839
- * @public
1805
+ /**
1806
+ * Camera near/far plane input node
1807
+ *
1808
+ * @remarks
1809
+ * Provides the camera's near and far clipping plane distances.
1810
+ * These values define the camera's visible depth range:
1811
+ * - Near plane: The closest distance at which objects are rendered
1812
+ * - Far plane: The farthest distance at which objects are rendered
1813
+ *
1814
+ * Used for:
1815
+ * - Depth linearization (converting from NDC depth to linear depth)
1816
+ * - Fog calculations based on depth
1817
+ * - Custom depth-of-field effects
1818
+ * - Z-buffer precision calculations
1819
+ * - Distance-based effects
1820
+ *
1821
+ * Outputs:
1822
+ * - Output 1: Both values as vec2 (x = near, y = far)
1823
+ * - Output 2: Near plane distance (float)
1824
+ * - Output 3: Far plane distance (float)
1825
+ *
1826
+ * @example
1827
+ * ```typescript
1828
+ * const nearFar = new CameraNearFarNode();
1829
+ * const depth = new DepthNode();
1830
+ *
1831
+ * // Linearize depth buffer value
1832
+ * // linearDepth = (2.0 * near) / (far + near - depth * (far - near))
1833
+ * const farMinusNear = new CompSubNode();
1834
+ * farMinusNear.connectInput(1, nearFar, 3); // far
1835
+ * farMinusNear.connectInput(2, nearFar, 2); // near
1836
+ *
1837
+ * // Use for distance fog
1838
+ * const fogFactor = new SaturateNode();
1839
+ * fogFactor.connectInput(1, linearDepthCalc, 1);
1840
+ * ```
1841
+ *
1842
+ * @public
1840
1843
  */ class CameraNearFarNode extends BaseGraphNode {
1841
- /**
1842
- * Creates a new camera near/far node
1843
- *
1844
- * @remarks
1845
- * Initializes with 3 output slots: combined vec2 and individual near/far values.
1844
+ /**
1845
+ * Creates a new camera near/far node
1846
+ *
1847
+ * @remarks
1848
+ * Initializes with 3 output slots: combined vec2 and individual near/far values.
1846
1849
  */ constructor(){
1847
1850
  super();
1848
1851
  this._outputs = [
@@ -1862,17 +1865,17 @@ import { BaseGraphNode } from '../node.js';
1862
1865
  }
1863
1866
  ];
1864
1867
  }
1865
- /**
1866
- * Generates a string representation of this node
1867
- *
1868
- * @returns 'camera near far'
1868
+ /**
1869
+ * Generates a string representation of this node
1870
+ *
1871
+ * @returns 'camera near far'
1869
1872
  */ toString() {
1870
1873
  return 'camera near far';
1871
1874
  }
1872
- /**
1873
- * Gets the serialization descriptor for this node type
1874
- *
1875
- * @returns Serialization class descriptor
1875
+ /**
1876
+ * Gets the serialization descriptor for this node type
1877
+ *
1878
+ * @returns Serialization class descriptor
1876
1879
  */ static getSerializationCls() {
1877
1880
  return {
1878
1881
  ctor: CameraNearFarNode,
@@ -1882,35 +1885,35 @@ import { BaseGraphNode } from '../node.js';
1882
1885
  }
1883
1886
  };
1884
1887
  }
1885
- /**
1886
- * Validates the node state
1887
- *
1888
- * @returns Empty string (always valid)
1889
- *
1890
- * @remarks
1891
- * Camera near/far nodes are always valid as they have no inputs.
1888
+ /**
1889
+ * Validates the node state
1890
+ *
1891
+ * @returns Empty string (always valid)
1892
+ *
1893
+ * @remarks
1894
+ * Camera near/far nodes are always valid as they have no inputs.
1892
1895
  */ validate() {
1893
1896
  return '';
1894
1897
  }
1895
- /**
1896
- * Gets the output type for a specific output slot
1897
- *
1898
- * @param id - The output slot ID
1899
- * @returns 'float' for individual component outputs (id \> 1), 'vec2' for combined output
1898
+ /**
1899
+ * Gets the output type for a specific output slot
1900
+ *
1901
+ * @param id - The output slot ID
1902
+ * @returns 'float' for individual component outputs (id \> 1), 'vec2' for combined output
1900
1903
  */ getType(id) {
1901
1904
  return id > 1 ? 'float' : 'vec2';
1902
1905
  }
1903
1906
  }
1904
- /**
1905
- * Vertex position resolver node
1906
- *
1907
- * @remarks
1908
- * Provides the resolved vertex position in object space (After applying skinning and morphing)
1909
- *
1910
- * @public
1907
+ /**
1908
+ * Vertex position resolver node
1909
+ *
1910
+ * @remarks
1911
+ * Provides the resolved vertex position in object space (After applying skinning and morphing)
1912
+ *
1913
+ * @public
1911
1914
  */ class ResolveVertexPositionNode extends BaseGraphNode {
1912
- /**
1913
- * Creates a new vertex position resolver node
1915
+ /**
1916
+ * Creates a new vertex position resolver node
1914
1917
  */ constructor(){
1915
1918
  super();
1916
1919
  this._outputs = [
@@ -1920,17 +1923,17 @@ import { BaseGraphNode } from '../node.js';
1920
1923
  }
1921
1924
  ];
1922
1925
  }
1923
- /**
1924
- * Generates a string representation of this node
1925
- *
1926
- * @returns 'vertex position resolved'
1926
+ /**
1927
+ * Generates a string representation of this node
1928
+ *
1929
+ * @returns 'vertex position resolved'
1927
1930
  */ toString() {
1928
1931
  return 'vertex position resolved';
1929
1932
  }
1930
- /**
1931
- * Gets the serialization descriptor for this node type
1932
- *
1933
- * @returns Serialization class descriptor
1933
+ /**
1934
+ * Gets the serialization descriptor for this node type
1935
+ *
1936
+ * @returns Serialization class descriptor
1934
1937
  */ static getSerializationCls() {
1935
1938
  return {
1936
1939
  ctor: ResolveVertexPositionNode,
@@ -1940,34 +1943,34 @@ import { BaseGraphNode } from '../node.js';
1940
1943
  }
1941
1944
  };
1942
1945
  }
1943
- /**
1944
- * Validates the node state
1945
- *
1946
- * @returns Empty string (always valid)
1947
- *
1948
- * @remarks
1949
- * Vertex position resolver nodes are always valid as they have no inputs.
1946
+ /**
1947
+ * Validates the node state
1948
+ *
1949
+ * @returns Empty string (always valid)
1950
+ *
1951
+ * @remarks
1952
+ * Vertex position resolver nodes are always valid as they have no inputs.
1950
1953
  */ validate() {
1951
1954
  return '';
1952
1955
  }
1953
- /**
1954
- * Gets the output type for a specific output slot
1955
- *
1956
- * @returns vec3
1956
+ /**
1957
+ * Gets the output type for a specific output slot
1958
+ *
1959
+ * @returns vec3
1957
1960
  */ getType() {
1958
1961
  return 'vec3';
1959
1962
  }
1960
1963
  }
1961
- /**
1962
- * Vertex normal resolver node
1963
- *
1964
- * @remarks
1965
- * Provides the resolved vertex normal in object space (After applying skinning and morphing)
1966
- *
1967
- * @public
1964
+ /**
1965
+ * Vertex normal resolver node
1966
+ *
1967
+ * @remarks
1968
+ * Provides the resolved vertex normal in object space (After applying skinning and morphing)
1969
+ *
1970
+ * @public
1968
1971
  */ class ResolveVertexNormalNode extends BaseGraphNode {
1969
- /**
1970
- * Creates a new vertex normal resolver node
1972
+ /**
1973
+ * Creates a new vertex normal resolver node
1971
1974
  */ constructor(){
1972
1975
  super();
1973
1976
  this._outputs = [
@@ -1977,17 +1980,17 @@ import { BaseGraphNode } from '../node.js';
1977
1980
  }
1978
1981
  ];
1979
1982
  }
1980
- /**
1981
- * Generates a string representation of this node
1982
- *
1983
- * @returns 'vertex normal resolved'
1983
+ /**
1984
+ * Generates a string representation of this node
1985
+ *
1986
+ * @returns 'vertex normal resolved'
1984
1987
  */ toString() {
1985
1988
  return 'vertex normal resolved';
1986
1989
  }
1987
- /**
1988
- * Gets the serialization descriptor for this node type
1989
- *
1990
- * @returns Serialization class descriptor
1990
+ /**
1991
+ * Gets the serialization descriptor for this node type
1992
+ *
1993
+ * @returns Serialization class descriptor
1991
1994
  */ static getSerializationCls() {
1992
1995
  return {
1993
1996
  ctor: ResolveVertexNormalNode,
@@ -1997,34 +2000,34 @@ import { BaseGraphNode } from '../node.js';
1997
2000
  }
1998
2001
  };
1999
2002
  }
2000
- /**
2001
- * Validates the node state
2002
- *
2003
- * @returns Empty string (always valid)
2004
- *
2005
- * @remarks
2006
- * Vertex normal resolve node are always valid as they have no inputs.
2003
+ /**
2004
+ * Validates the node state
2005
+ *
2006
+ * @returns Empty string (always valid)
2007
+ *
2008
+ * @remarks
2009
+ * Vertex normal resolve node are always valid as they have no inputs.
2007
2010
  */ validate() {
2008
2011
  return '';
2009
2012
  }
2010
- /**
2011
- * Gets the output type for a specific output slot
2012
- *
2013
- * @returns vec3
2013
+ /**
2014
+ * Gets the output type for a specific output slot
2015
+ *
2016
+ * @returns vec3
2014
2017
  */ getType() {
2015
2018
  return 'vec3';
2016
2019
  }
2017
2020
  }
2018
- /**
2019
- * Vertex tangent resolver node
2020
- *
2021
- * @remarks
2022
- * Provides the resolved vertex tangent in object space (After applying skinning and morphing)
2023
- *
2024
- * @public
2021
+ /**
2022
+ * Vertex tangent resolver node
2023
+ *
2024
+ * @remarks
2025
+ * Provides the resolved vertex tangent in object space (After applying skinning and morphing)
2026
+ *
2027
+ * @public
2025
2028
  */ class ResolveVertexTangentNode extends BaseGraphNode {
2026
- /**
2027
- * Creates a new vertex tangent resolver node
2029
+ /**
2030
+ * Creates a new vertex tangent resolver node
2028
2031
  */ constructor(){
2029
2032
  super();
2030
2033
  this._outputs = [
@@ -2034,17 +2037,17 @@ import { BaseGraphNode } from '../node.js';
2034
2037
  }
2035
2038
  ];
2036
2039
  }
2037
- /**
2038
- * Generates a string representation of this node
2039
- *
2040
- * @returns 'vertex tangent resolved'
2040
+ /**
2041
+ * Generates a string representation of this node
2042
+ *
2043
+ * @returns 'vertex tangent resolved'
2041
2044
  */ toString() {
2042
2045
  return 'vertex tangent resolved';
2043
2046
  }
2044
- /**
2045
- * Gets the serialization descriptor for this node type
2046
- *
2047
- * @returns Serialization class descriptor
2047
+ /**
2048
+ * Gets the serialization descriptor for this node type
2049
+ *
2050
+ * @returns Serialization class descriptor
2048
2051
  */ static getSerializationCls() {
2049
2052
  return {
2050
2053
  ctor: ResolveVertexTangentNode,
@@ -2054,20 +2057,20 @@ import { BaseGraphNode } from '../node.js';
2054
2057
  }
2055
2058
  };
2056
2059
  }
2057
- /**
2058
- * Validates the node state
2059
- *
2060
- * @returns Empty string (always valid)
2061
- *
2062
- * @remarks
2063
- * Vertex tangent resolve node are always valid as they have no inputs.
2060
+ /**
2061
+ * Validates the node state
2062
+ *
2063
+ * @returns Empty string (always valid)
2064
+ *
2065
+ * @remarks
2066
+ * Vertex tangent resolve node are always valid as they have no inputs.
2064
2067
  */ validate() {
2065
2068
  return '';
2066
2069
  }
2067
- /**
2068
- * Gets the output type for a specific output slot
2069
- *
2070
- * @returns vec4
2070
+ /**
2071
+ * Gets the output type for a specific output slot
2072
+ *
2073
+ * @returns vec4
2071
2074
  */ getType() {
2072
2075
  return 'vec4';
2073
2076
  }