@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 +1 @@
1
- {"version":3,"file":"inputs.js","sources":["../../../../src/utility/blueprint/material/inputs.ts"],"sourcesContent":["import type { SerializableClass } from '../../serialization';\nimport { BaseGraphNode } from '../node';\n\n/**\n * Vertex output node\n */\nexport class VertexOutputNode extends BaseGraphNode {\n private _index: number;\n constructor(index: number) {\n super();\n this._index = index;\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' },\n { id: 5, name: 'w', swizzle: 'w' }\n ];\n }\n get index() {\n return this._index;\n }\n static getSerializationCls(): SerializableClass {\n return {\n ctor: VertexOutputNode,\n name: 'VertexOutputNode',\n createFunc(ctx: unknown, init: number) {\n return { obj: new VertexOutputNode(init) };\n },\n getInitParams(obj: VertexOutputNode) {\n return obj._index;\n },\n getProps() {\n return [];\n }\n };\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex index'\n */\n toString() {\n return `Vertex Output${this._index}`;\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex index nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual channel outputs (id \\> 1), 'vec4' for full color\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec4';\n }\n}\n\n/**\n * Vertex index input node\n */\nexport class VertexIndexNode extends BaseGraphNode {\n /**\n * Creates a new vertex index node\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexIndexNode,\n name: 'VertexIndexNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex index'\n */\n toString() {\n return 'vertex index';\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex index nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @returns 'float'\n */\n protected getType() {\n return 'float';\n }\n}\n\n/**\n * Instance index input node\n */\nexport class InstanceIndexNode extends BaseGraphNode {\n /**\n * Creates a new instance index node\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: InstanceIndexNode,\n name: 'InstanceIndexNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'instance index'\n */\n toString() {\n return 'instance index';\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Instance index nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @returns 'float'\n */\n protected getType() {\n return 'float';\n }\n}\n\n/**\n * Vertex color input node\n *\n * @remarks\n * Provides access to per-vertex color data from the mesh.\n * Vertex colors are stored as RGBA values (vec4) and can be used for:\n * - Hand-painted color variations\n * - Ambient occlusion baking\n * - Blend weights for texture mixing\n * - Custom data encoded in color channels\n *\n * Outputs:\n * - Output 1: Full RGBA color (vec4)\n * - Output 2: Red channel (float)\n * - Output 3: Green channel (float)\n * - Output 4: Blue channel (float)\n * - Output 5: Alpha channel (float)\n *\n * @example\n * ```typescript\n * const vertexColor = new VertexColorNode();\n *\n * // Use full color\n * baseColorNode.connectInput(1, vertexColor, 1);\n *\n * // Use individual channels\n * roughnessNode.connectInput(1, vertexColor, 2); // Red as roughness\n * metallicNode.connectInput(1, vertexColor, 3); // Green as metallic\n * ```\n *\n * @public\n */\nexport class VertexColorNode extends BaseGraphNode {\n /**\n * Creates a new vertex color node\n *\n * @remarks\n * Initializes with 5 output slots: full RGBA and individual R, G, B, A channels.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'r', swizzle: 'x' },\n { id: 3, name: 'g', swizzle: 'y' },\n { id: 4, name: 'b', swizzle: 'z' },\n { id: 5, name: 'a', swizzle: 'w' }\n ];\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexColorNode,\n name: 'VertexColorNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex color'\n */\n toString() {\n return 'vertex color';\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex color nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual channel outputs (id \\> 1), 'vec4' for full color\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec4';\n }\n}\n\n/**\n * Vertex UV coordinate input node\n *\n * @remarks\n * Provides access to per-vertex texture coordinates (UV coordinates) from the mesh.\n * UV coordinates map 3D mesh vertices to 2D texture space, typically in the range [0, 1].\n *\n * Used for:\n * - Texture sampling (most common use)\n * - Procedural pattern generation\n * - Gradient effects based on position in UV space\n * - Decal placement\n *\n * Outputs:\n * - Output 1: Full UV coordinates (vec2)\n * - Output 2: U coordinate (horizontal, float)\n * - Output 3: V coordinate (vertical, float)\n *\n * @example\n * ```typescript\n * const uv = new VertexUVNode();\n *\n * // Sample texture using UV coordinates\n * textureSample.connectInput(1, uv, 1);\n *\n * // Use U coordinate for horizontal gradient\n * mixNode.connectInput(3, uv, 2);\n * ```\n *\n * @public\n */\nexport class VertexUVNode extends BaseGraphNode {\n /**\n * Creates a new vertex UV node\n *\n * @remarks\n * Initializes with 3 output slots: full UV and individual U, V components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' }\n ];\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexUVNode,\n name: 'VertexUVNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex UV'\n */\n toString() {\n return 'vertex UV';\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex UV nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec2' for full UV\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec2';\n }\n}\n\n/**\n * Vertex world position input node\n *\n * @remarks\n * Provides access to the vertex position in world space coordinates.\n * World position is the absolute 3D location of the vertex in the scene,\n * after applying all model transformations but before view/projection.\n *\n * Used for:\n * - Distance-based effects (fog, fade)\n * - World-space texturing (triplanar mapping)\n * - Position-based color gradients\n * - Vertex animation based on world location\n * - Custom lighting calculations\n *\n * Outputs:\n * - Output 1: Full position (vec3)\n * - Output 2: X coordinate (float)\n * - Output 3: Y coordinate (float)\n * - Output 4: Z coordinate (float)\n *\n * @example\n * ```typescript\n * const worldPos = new VertexPositionNode();\n *\n * // Calculate distance from origin\n * const origin = new ConstantVec3Node();\n * const distance = new DistanceNode();\n * distance.connectInput(1, worldPos, 1);\n * distance.connectInput(2, origin, 1);\n *\n * // Height-based color gradient\n * colorMix.connectInput(3, worldPos, 3); // Use Y (height)\n * ```\n *\n * @public\n */\nexport class VertexPositionNode extends BaseGraphNode {\n /**\n * Creates a new vertex position node\n *\n * @remarks\n * Initializes with 4 output slots: full position and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'world position'\n */\n toString() {\n return 'world position';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexPositionNode,\n name: 'VertexPositionNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex position nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full position\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Pixel world position input node\n *\n * @remarks\n * Provides access to current pixel world-space position.\n *\n * Outputs:\n * - Output 1: Full position (vec3)\n * - Output 2: X coordinate (float)\n * - Output 3: Y coordinate (float)\n * - Output 4: Z coordinate (float)\n *\n * @public\n */\nexport class PixelWorldPositionNode extends BaseGraphNode {\n /**\n * Creates a new pixel world position node\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'pixel world position'\n */\n toString() {\n return 'pixel world position';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: PixelWorldPositionNode,\n name: 'PixelWorldPositionNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full position\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Vertex normal input node\n *\n * @remarks\n * Provides access to per-vertex normal vectors in world space.\n * Normals are unit vectors perpendicular to the surface, used extensively\n * in lighting calculations and surface orientation effects.\n *\n * Used for:\n * - Custom lighting calculations\n * - Fresnel effects (view-dependent shading)\n * - Rim lighting\n * - Normal-based masking\n * - Environment mapping\n *\n * Outputs:\n * - Output 1: Full normal vector (vec3, normalized)\n * - Output 2: X component (float)\n * - Output 3: Y component (float)\n * - Output 4: Z component (float)\n *\n * @example\n * ```typescript\n * const normal = new VertexNormalNode();\n * const viewDir = new ViewDirectionNode();\n *\n * // Calculate Fresnel effect\n * const dot = new DotProductNode();\n * dot.connectInput(1, normal, 1);\n * dot.connectInput(2, viewDir, 1);\n *\n * // Rim lighting using Y component\n * rimMask.connectInput(1, normal, 3);\n * ```\n *\n * @public\n */\nexport class VertexNormalNode extends BaseGraphNode {\n /**\n * Creates a new vertex normal node\n *\n * @remarks\n * Initializes with 4 output slots: full normal and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex normal'\n */\n toString() {\n return 'vertex normal';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexNormalNode,\n name: 'VertexNormalNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex normal nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full normal\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Pixel normal input node\n *\n * @remarks\n * Provides access to the world-space surface normal used in fragment shading.\n *\n * Outputs:\n * - Output 1: Full normal vector (vec3, normalized)\n * - Output 2: X component (float)\n * - Output 3: Y component (float)\n * - Output 4: Z component (float)\n *\n * @public\n */\nexport class PixelNormalNode extends BaseGraphNode {\n /**\n * Creates a new pixel normal node\n *\n * @remarks\n * Initializes with 4 output slots: full normal and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'pixel normal'\n */\n toString() {\n return 'pixel normal';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: PixelNormalNode,\n name: 'PixelNormalNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full normal\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Vertex tangent input node\n *\n * @remarks\n * Provides access to per-vertex tangent vectors in world space.\n * Tangents are unit vectors parallel to the surface, aligned with the U texture coordinate direction.\n * Together with normals and binormals, they form the tangent-space basis (TBN matrix).\n *\n * Used for:\n * - Normal mapping (constructing TBN matrix)\n * - Anisotropic reflections (hair, brushed metal)\n * - Tangent-space calculations\n * - Flow map effects\n *\n * Outputs:\n * - Output 1: Full tangent vector (vec3, normalized)\n * - Output 2: X component (float)\n * - Output 3: Y component (float)\n * - Output 4: Z component (float)\n *\n * @example\n * ```typescript\n * const tangent = new VertexTangentNode();\n * const normal = new VertexNormalNode();\n * const binormal = new VertexBinormalNode();\n *\n * // Construct TBN matrix for normal mapping\n * const tbnMatrix = new MakeMatrixNode();\n * tbnMatrix.connectInput(1, tangent, 1);\n * tbnMatrix.connectInput(2, binormal, 1);\n * tbnMatrix.connectInput(3, normal, 1);\n * ```\n *\n * @public\n */\nexport class VertexTangentNode extends BaseGraphNode {\n /**\n * Creates a new vertex tangent node\n *\n * @remarks\n * Initializes with 4 output slots: full tangent and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex tangent'\n */\n toString() {\n return 'vertex tangent';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexTangentNode,\n name: 'VertexTangentNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex tangent nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full tangent\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Vertex binormal (bitangent) input node\n *\n * @remarks\n * Provides access to per-vertex binormal (also called bitangent) vectors in world space.\n * Binormals are unit vectors perpendicular to both the normal and tangent,\n * aligned with the V texture coordinate direction.\n * Together with normals and tangents, they form the tangent-space basis (TBN matrix).\n *\n * The binormal is typically computed as: binormal = cross(normal, tangent) * handedness\n *\n * Used for:\n * - Normal mapping (constructing TBN matrix)\n * - Tangent-space calculations\n * - Surface flow effects\n * - Oriented texture mapping\n *\n * Outputs:\n * - Output 1: Full binormal vector (vec3, normalized)\n * - Output 2: X component (float)\n * - Output 3: Y component (float)\n * - Output 4: Z component (float)\n *\n * @example\n * ```typescript\n * const tangent = new VertexTangentNode();\n * const normal = new VertexNormalNode();\n * const binormal = new VertexBinormalNode();\n *\n * // Use for normal mapping transformation\n * const normalMap = new TextureSampleNode();\n * const tbnTransform = new TransformNode();\n * tbnTransform.connectInput(1, normalMap, 1);\n * tbnTransform.connectInput(2, tbnMatrixNode, 1);\n * ```\n *\n * @public\n */\nexport class VertexBinormalNode extends BaseGraphNode {\n /**\n * Creates a new vertex binormal node\n *\n * @remarks\n * Initializes with 4 output slots: full binormal and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex binormal'\n */\n toString() {\n return 'vertex binormal';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: VertexBinormalNode,\n name: 'VertexBinormalNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex binormal nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full binormal\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Projection matrix input node\n *\n * @remarks\n * Provides the camera's projection matrix (view space to clip space transformation).\n * This matrix transforms coordinates from camera/view space to normalized device coordinates (NDC).\n *\n * For perspective projection: converts frustum to cube, applies perspective divide\n * For orthographic projection: applies parallel projection scaling\n *\n * Used for:\n * - Custom vertex transformations\n * - Screen-space effects\n * - Depth calculations\n * - Custom projection modifications\n *\n * Output:\n * - Output 1: 4x4 projection matrix (mat4)\n *\n * @example\n * ```typescript\n * const projMatrix = new ProjectionMatrixNode();\n * const viewSpacePos = new ViewSpacePositionNode();\n *\n * // Transform to clip space\n * const transform = new TransformNode();\n * transform.connectInput(1, viewSpacePos, 1);\n * transform.connectInput(2, projMatrix, 1);\n * ```\n *\n * @public\n */\nexport class ProjectionMatrixNode extends BaseGraphNode {\n /**\n * Creates a new projection matrix node\n *\n * @remarks\n * Initializes with one output slot for the mat4 matrix.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'ViewToClipMatrix'\n */\n toString() {\n return 'ViewToClipMatrix';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ProjectionMatrixNode,\n name: 'ProjectionMatrixNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Matrix nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'mat4'\n */\n protected getType() {\n return 'mat4';\n }\n}\n\n/**\n * View matrix input node\n *\n * @remarks\n * Provides the camera's view matrix (world space to view space transformation).\n * This matrix transforms coordinates from world space to camera/view space,\n * where the camera is at the origin looking down the negative Z axis.\n *\n * The view matrix is the inverse of the camera's world transformation matrix.\n *\n * Used for:\n * - Custom lighting in view space\n * - View-space normal calculations\n * - Billboard effects\n * - Custom camera-relative transformations\n *\n * Output:\n * - Output 1: 4x4 view matrix (mat4)\n *\n * @example\n * ```typescript\n * const viewMatrix = new ViewMatrixNode();\n * const worldPos = new VertexPositionNode();\n *\n * // Transform to view space\n * const transform = new TransformNode();\n * transform.connectInput(1, worldPos, 1);\n * transform.connectInput(2, viewMatrix, 1);\n * ```\n *\n * @public\n */\nexport class ViewMatrixNode extends BaseGraphNode {\n /**\n * Creates a new view matrix node\n *\n * @remarks\n * Initializes with one output slot for the mat4 matrix.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'WorldToViewMatrix'\n */\n toString() {\n return 'WorldToViewMatrix';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ViewMatrixNode,\n name: 'ViewMatrixNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Matrix nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'mat4'\n */\n protected getType() {\n return 'mat4';\n }\n}\n\n/**\n * View-projection matrix input node\n *\n * @remarks\n * Provides the combined view-projection matrix (world space to clip space transformation).\n * This is the product of the view matrix and projection matrix, commonly used for\n * transforming vertices from world space directly to clip space in one step.\n *\n * Equivalent to: projectionMatrix * viewMatrix\n *\n * Used for:\n * - Vertex position transformation (most common use)\n * - Custom vertex shaders\n * - Screen-space position calculations\n * - Shadow mapping\n *\n * Output:\n * - Output 1: 4x4 view-projection matrix (mat4)\n *\n * @example\n * ```typescript\n * const viewProjMatrix = new ViewProjMatrixNode();\n * const worldPos = new VertexPositionNode();\n *\n * // Transform directly to clip space\n * const transform = new TransformNode();\n * transform.connectInput(1, worldPos, 1);\n * transform.connectInput(2, viewProjMatrix, 1);\n * ```\n *\n * @public\n */\nexport class ViewProjMatrixNode extends BaseGraphNode {\n /**\n * Creates a new view-projection matrix node\n *\n * @remarks\n * Initializes with one output slot for the mat4 matrix.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'WorldToClipMatrix'\n */\n toString() {\n return 'WorldToClipMatrix';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ViewProjMatrixNode,\n name: 'ViewProjMatrixNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Matrix nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'mat4'\n */\n protected getType() {\n return 'mat4';\n }\n}\n\n/**\n * Inverse projection matrix input node\n *\n * @remarks\n * Provides the inverse of the projection matrix (clip space to view space transformation).\n * This matrix transforms coordinates from normalized device coordinates (NDC) back to camera/view space.\n *\n * Used for:\n * - Screen-space to view-space reconstruction\n * - Depth buffer unprojection\n * - Deferred rendering position reconstruction\n * - Ray marching from screen space\n *\n * Output:\n * - Output 1: 4x4 inverse projection matrix (mat4)\n *\n * @example\n * ```typescript\n * const invProjMatrix = new InvProjMatrixNode();\n * const clipPos = new ClipSpacePositionNode();\n *\n * // Reconstruct view space position\n * const transform = new TransformNode();\n * transform.connectInput(1, clipPos, 1);\n * transform.connectInput(2, invProjMatrix, 1);\n * ```\n *\n * @public\n */\nexport class InvProjMatrixNode extends BaseGraphNode {\n /**\n * Creates a new inverse projection matrix node\n *\n * @remarks\n * Initializes with one output slot for the mat4 matrix.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'ClipToViewMatrix'\n */\n toString() {\n return 'ClipToViewMatrix';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: InvProjMatrixNode,\n name: 'InvProjMatrixNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Matrix nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'mat4'\n */\n protected getType() {\n return 'mat4';\n }\n}\n\n/**\n * Inverse view-projection matrix input node\n *\n * @remarks\n * Provides the inverse of the view-projection matrix (clip space to world space transformation).\n * This matrix transforms coordinates from normalized device coordinates (NDC) back to world space.\n *\n * Equivalent to: inverse(projectionMatrix * viewMatrix)\n *\n * Used for:\n * - Screen-space to world-space reconstruction\n * - Deferred rendering world position reconstruction\n * - Picking and ray casting from screen coordinates\n * - Screen-space effects needing world position\n *\n * Output:\n * - Output 1: 4x4 inverse view-projection matrix (mat4)\n *\n * @example\n * ```typescript\n * const invViewProjMatrix = new InvViewProjMatrixNode();\n * const screenPos = new ScreenPositionNode();\n *\n * // Reconstruct world position from screen coordinates\n * const transform = new TransformNode();\n * transform.connectInput(1, screenPos, 1);\n * transform.connectInput(2, invViewProjMatrix, 1);\n * ```\n *\n * @public\n */\nexport class InvViewProjMatrixNode extends BaseGraphNode {\n /**\n * Creates a new inverse view-projection matrix node\n *\n * @remarks\n * Initializes with one output slot for the mat4 matrix.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'ClipToWorldMatrix'\n */\n toString() {\n return 'ClipToWorldMatrix';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: InvViewProjMatrixNode,\n name: 'InvViewProjMatrixNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Matrix nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'mat4'\n */\n protected getType() {\n return 'mat4';\n }\n}\n\n/**\n * Billboard matrix input node\n *\n * @public\n */\nexport class BillboardMatrixNode extends BaseGraphNode {\n /**\n * Creates a new billboard matrix node\n *\n * @remarks\n * Initializes with one output slot for the mat3 matrix.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'BillboardMatrix'\n */\n toString() {\n return 'BillboardMatrix';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: BillboardMatrixNode,\n name: 'BillboardMatrixNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Matrix nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'mat4'\n */\n protected getType() {\n return 'mat3';\n }\n}\n\n/**\n * Elapsed time input node\n *\n * @remarks\n * Provides the total elapsed time since the application started, in seconds.\n * This value continuously increases and is useful for creating time-based animations\n * and effects directly in the material shader.\n *\n * Used for:\n * - Animated textures (scrolling, rotating)\n * - Pulsating effects\n * - Wave animations\n * - Oscillating values (using sin/cos)\n * - Time-based procedural patterns\n *\n * Output:\n * - Output 1: Elapsed time in seconds (float)\n *\n * @example\n * ```typescript\n * const time = new ElapsedTimeNode();\n * const speed = new ConstantScalarNode();\n * speed.x = 0.5;\n *\n * // Animate UV scrolling\n * const mul = new CompMulNode();\n * mul.connectInput(1, time, 1);\n * mul.connectInput(2, speed, 1);\n *\n * const add = new CompAddNode();\n * add.connectInput(1, uvNode, 1);\n * add.connectInput(2, mul, 1);\n *\n * // Pulsating effect with sine wave\n * const sin = new SinNode();\n * sin.connectInput(1, time, 1);\n * ```\n *\n * @public\n */\nexport class ElapsedTimeNode extends BaseGraphNode {\n /**\n * Creates a new elapsed time node\n *\n * @remarks\n * Initializes with one output slot for the time value.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'Elapsed time'\n */\n toString() {\n return 'Elapsed time';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ElapsedTimeNode,\n name: 'ElapsedTimeNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Time nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'float'\n */\n protected getType() {\n return 'float';\n }\n}\n\n/**\n * Camera position input node\n *\n * @remarks\n * Provides the world-space position of the camera/viewer.\n * This is the location of the camera in the 3D scene coordinate system.\n *\n * Used for:\n * - View direction calculations\n * - Distance-based effects (distance fog, LOD)\n * - Reflections and refractions\n * - Fresnel effects\n * - Environment mapping\n * - Specular highlights\n *\n * Outputs:\n * - Output 1: Full camera position (vec3)\n * - Output 2: X coordinate (float)\n * - Output 3: Y coordinate (float)\n * - Output 4: Z coordinate (float)\n *\n * @example\n * ```typescript\n * const cameraPos = new CameraPositionNode();\n * const worldPos = new VertexPositionNode();\n *\n * // Calculate view direction\n * const viewDir = new CompSubNode();\n * viewDir.connectInput(1, cameraPos, 1);\n * viewDir.connectInput(2, worldPos, 1);\n *\n * const normalizedViewDir = new NormalizeNode();\n * normalizedViewDir.connectInput(1, viewDir, 1);\n *\n * // Calculate distance to camera\n * const distance = new DistanceNode();\n * distance.connectInput(1, cameraPos, 1);\n * distance.connectInput(2, worldPos, 1);\n * ```\n *\n * @public\n */\nexport class CameraPositionNode extends BaseGraphNode {\n /**\n * Creates a new camera position node\n *\n * @remarks\n * Initializes with 4 output slots: full position and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'camera position'\n */\n toString() {\n return 'camera position';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: CameraPositionNode,\n name: 'CameraPositionNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Camera position nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full position\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Camera vector input node\n *\n * @remarks\n * Provides the world-space direction from current surface point to camera.\n *\n * Outputs:\n * - Output 1: Full vector (vec3, normalized)\n * - Output 2: X component (float)\n * - Output 3: Y component (float)\n * - Output 4: Z component (float)\n *\n * @public\n */\nexport class CameraVectorNode extends BaseGraphNode {\n /**\n * Creates a new camera vector node\n *\n * @remarks\n * Initializes with 4 output slots: full vector and individual X, Y, Z components.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'x', swizzle: 'x' },\n { id: 3, name: 'y', swizzle: 'y' },\n { id: 4, name: 'z', swizzle: 'z' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'camera vector'\n */\n toString() {\n return 'camera vector';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: CameraVectorNode,\n name: 'CameraVectorNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full vector\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec3';\n }\n}\n\n/**\n * Sky environment texture input node\n *\n * @remarks\n * Provides access to the scene's sky/environment cubemap texture.\n * This is typically used for skybox rendering, environment reflections,\n * and image-based lighting (IBL).\n *\n * The texture is a cubemap (texCube) that can be sampled using a 3D direction vector.\n *\n * Used for:\n * - Skybox rendering\n * - Environment reflections on metallic surfaces\n * - Image-based lighting (IBL)\n * - Ambient lighting from environment\n * - Reflections and refractions\n *\n * Output:\n * - Output 1: Cubemap texture sampler (texCube)\n *\n * @example\n * ```typescript\n * const skyTexture = new SkyEnvTextureNode();\n * const reflectionDir = new ReflectNode();\n *\n * // Sample environment for reflection\n * const envSample = new TextureSampleCubeNode();\n * envSample.connectInput(1, skyTexture, 1);\n * envSample.connectInput(2, reflectionDir, 1);\n *\n * // Use for metallic reflections\n * metalColor.connectInput(1, envSample, 1);\n * ```\n *\n * @public\n */\nexport class SkyEnvTextureNode extends BaseGraphNode {\n /**\n * Creates a new sky environment texture node\n *\n * @remarks\n * Initializes with one output slot for the cubemap sampler.\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'SkyEnvTexture'\n */\n toString() {\n return 'SkyEnvTexture';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: SkyEnvTextureNode,\n name: 'SkyEnvTextureNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Sky environment texture nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type\n *\n * @returns 'texCube' (cubemap texture sampler)\n */\n protected getType() {\n return 'texCube';\n }\n}\n\n/**\n * Camera near/far plane input node\n *\n * @remarks\n * Provides the camera's near and far clipping plane distances.\n * These values define the camera's visible depth range:\n * - Near plane: The closest distance at which objects are rendered\n * - Far plane: The farthest distance at which objects are rendered\n *\n * Used for:\n * - Depth linearization (converting from NDC depth to linear depth)\n * - Fog calculations based on depth\n * - Custom depth-of-field effects\n * - Z-buffer precision calculations\n * - Distance-based effects\n *\n * Outputs:\n * - Output 1: Both values as vec2 (x = near, y = far)\n * - Output 2: Near plane distance (float)\n * - Output 3: Far plane distance (float)\n *\n * @example\n * ```typescript\n * const nearFar = new CameraNearFarNode();\n * const depth = new DepthNode();\n *\n * // Linearize depth buffer value\n * // linearDepth = (2.0 * near) / (far + near - depth * (far - near))\n * const farMinusNear = new CompSubNode();\n * farMinusNear.connectInput(1, nearFar, 3); // far\n * farMinusNear.connectInput(2, nearFar, 2); // near\n *\n * // Use for distance fog\n * const fogFactor = new SaturateNode();\n * fogFactor.connectInput(1, linearDepthCalc, 1);\n * ```\n *\n * @public\n */\nexport class CameraNearFarNode extends BaseGraphNode {\n /**\n * Creates a new camera near/far node\n *\n * @remarks\n * Initializes with 3 output slots: combined vec2 and individual near/far values.\n */\n constructor() {\n super();\n this._outputs = [\n { id: 1, name: '' },\n { id: 2, name: 'near', swizzle: 'x' },\n { id: 3, name: 'far', swizzle: 'y' }\n ];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'camera near far'\n */\n toString() {\n return 'camera near far';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: CameraNearFarNode,\n name: 'CameraNearFarNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Camera near/far nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @param id - The output slot ID\n * @returns 'float' for individual component outputs (id \\> 1), 'vec2' for combined output\n */\n protected getType(id: number) {\n return id > 1 ? 'float' : 'vec2';\n }\n}\n\n/**\n * Vertex position resolver node\n *\n * @remarks\n * Provides the resolved vertex position in object space (After applying skinning and morphing)\n *\n * @public\n */\nexport class ResolveVertexPositionNode extends BaseGraphNode {\n /**\n * Creates a new vertex position resolver node\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex position resolved'\n */\n toString() {\n return 'vertex position resolved';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ResolveVertexPositionNode,\n name: 'ResolveVertexPositionNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex position resolver nodes are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @returns vec3\n */\n protected getType() {\n return 'vec3';\n }\n}\n\n/**\n * Vertex normal resolver node\n *\n * @remarks\n * Provides the resolved vertex normal in object space (After applying skinning and morphing)\n *\n * @public\n */\nexport class ResolveVertexNormalNode extends BaseGraphNode {\n /**\n * Creates a new vertex normal resolver node\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex normal resolved'\n */\n toString() {\n return 'vertex normal resolved';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ResolveVertexNormalNode,\n name: 'ResolveVertexNormalNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex normal resolve node are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @returns vec3\n */\n protected getType() {\n return 'vec3';\n }\n}\n\n/**\n * Vertex tangent resolver node\n *\n * @remarks\n * Provides the resolved vertex tangent in object space (After applying skinning and morphing)\n *\n * @public\n */\nexport class ResolveVertexTangentNode extends BaseGraphNode {\n /**\n * Creates a new vertex tangent resolver node\n */\n constructor() {\n super();\n this._outputs = [{ id: 1, name: '' }];\n }\n /**\n * Generates a string representation of this node\n *\n * @returns 'vertex tangent resolved'\n */\n toString() {\n return 'vertex tangent resolved';\n }\n /**\n * Gets the serialization descriptor for this node type\n *\n * @returns Serialization class descriptor\n */\n static getSerializationCls() {\n return {\n ctor: ResolveVertexTangentNode,\n name: 'ResolveVertexTangentNode',\n getProps() {\n return [];\n }\n };\n }\n /**\n * Validates the node state\n *\n * @returns Empty string (always valid)\n *\n * @remarks\n * Vertex tangent resolve node are always valid as they have no inputs.\n */\n protected validate() {\n return '';\n }\n /**\n * Gets the output type for a specific output slot\n *\n * @returns vec4\n */\n protected getType() {\n return 'vec4';\n }\n}\n"],"names":["VertexOutputNode","BaseGraphNode","_index","index","_outputs","id","name","swizzle","getSerializationCls","ctor","createFunc","ctx","init","obj","getInitParams","getProps","toString","getType","VertexIndexNode","InstanceIndexNode","VertexColorNode","VertexUVNode","VertexPositionNode","PixelWorldPositionNode","VertexNormalNode","PixelNormalNode","VertexTangentNode","VertexBinormalNode","ProjectionMatrixNode","ViewMatrixNode","ViewProjMatrixNode","InvProjMatrixNode","InvViewProjMatrixNode","BillboardMatrixNode","ElapsedTimeNode","CameraPositionNode","CameraVectorNode","SkyEnvTextureNode","CameraNearFarNode","ResolveVertexPositionNode","ResolveVertexNormalNode","ResolveVertexTangentNode"],"mappings":";;AAGA;;IAGO,MAAMA,gBAAyBC,SAAAA,aAAAA,CAAAA;IAC5BC,MAAe;AACvB,IAAA,WAAA,CAAYC,KAAa,CAAE;QACzB,KAAK,EAAA;QACL,IAAI,CAACD,MAAM,GAAGC,KAAAA;QACd,IAAI,CAACC,QAAQ,GAAG;AACd,YAAA;gBAAEC,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA;AAAG,aAAA;AAClB,YAAA;gBAAED,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI,aAAA;AACjC,YAAA;gBAAEF,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI,aAAA;AACjC,YAAA;gBAAEF,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI,aAAA;AACjC,YAAA;gBAAEF,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI;AAClC,SAAA;AACH;AACA,IAAA,IAAIJ,KAAQ,GAAA;QACV,OAAO,IAAI,CAACD,MAAM;AACpB;AACA,IAAA,OAAOM,mBAAyC,GAAA;QAC9C,OAAO;YACLC,IAAMT,EAAAA,gBAAAA;YACNM,IAAM,EAAA,kBAAA;YACNI,UAAWC,CAAAA,C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OAAOR,mBAAsB,GAAA;QAC3B,OAAO;YACLC,IAAMgC,EAAAA,wBAAAA;YACNnC,IAAM,EAAA,0BAAA;AACNS,YAAAA,QAAAA,CAAAA,GAAAA;AACE,gBAAA,OAAO,EAAE;AACX;AACF,SAAA;AACF;AACA;;;;;;;AAOC,MACD,QAAqB,GAAA;QACnB,OAAO,EAAA;AACT;AACA;;;;AAIC,MACD,OAAoB,GAAA;QAClB,OAAO,MAAA;AACT;AACF;;;;"}
1
+ {"version":3,"file":"inputs.js","sources":["../../../../src/utility/blueprint/material/inputs.ts"],"sourcesContent":["import type { SerializableClass } from '../../serialization';\r\nimport { BaseGraphNode } from '../node';\r\n\r\n/**\r\n * Vertex output node\r\n * @public\r\n */\r\nexport class VertexOutputNode extends BaseGraphNode {\r\n private _index: number;\r\n constructor(index: number) {\r\n super();\r\n this._index = index;\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' },\r\n { id: 5, name: 'w', swizzle: 'w' }\r\n ];\r\n }\r\n get index() {\r\n return this._index;\r\n }\r\n static getSerializationCls(): SerializableClass {\r\n return {\r\n ctor: VertexOutputNode,\r\n name: 'VertexOutputNode',\r\n createFunc(ctx: unknown, init: number) {\r\n return { obj: new VertexOutputNode(init) };\r\n },\r\n getInitParams(obj: VertexOutputNode) {\r\n return obj._index;\r\n },\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex index'\r\n */\r\n toString() {\r\n return `Vertex Output${this._index}`;\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex index nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual channel outputs (id \\> 1), 'vec4' for full color\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec4';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex index input node\r\n * @public\r\n */\r\nexport class VertexIndexNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex index node\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexIndexNode,\r\n name: 'VertexIndexNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex index'\r\n */\r\n toString() {\r\n return 'vertex index';\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex index nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @returns 'float'\r\n */\r\n protected getType() {\r\n return 'float';\r\n }\r\n}\r\n\r\n/**\r\n * Instance index input node\r\n * @public\r\n */\r\nexport class InstanceIndexNode extends BaseGraphNode {\r\n /**\r\n * Creates a new instance index node\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: InstanceIndexNode,\r\n name: 'InstanceIndexNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'instance index'\r\n */\r\n toString() {\r\n return 'instance index';\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Instance index nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @returns 'float'\r\n */\r\n protected getType() {\r\n return 'float';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex color input node\r\n *\r\n * @remarks\r\n * Provides access to per-vertex color data from the mesh.\r\n * Vertex colors are stored as RGBA values (vec4) and can be used for:\r\n * - Hand-painted color variations\r\n * - Ambient occlusion baking\r\n * - Blend weights for texture mixing\r\n * - Custom data encoded in color channels\r\n *\r\n * Outputs:\r\n * - Output 1: Full RGBA color (vec4)\r\n * - Output 2: Red channel (float)\r\n * - Output 3: Green channel (float)\r\n * - Output 4: Blue channel (float)\r\n * - Output 5: Alpha channel (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const vertexColor = new VertexColorNode();\r\n *\r\n * // Use full color\r\n * baseColorNode.connectInput(1, vertexColor, 1);\r\n *\r\n * // Use individual channels\r\n * roughnessNode.connectInput(1, vertexColor, 2); // Red as roughness\r\n * metallicNode.connectInput(1, vertexColor, 3); // Green as metallic\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class VertexColorNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex color node\r\n *\r\n * @remarks\r\n * Initializes with 5 output slots: full RGBA and individual R, G, B, A channels.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'r', swizzle: 'x' },\r\n { id: 3, name: 'g', swizzle: 'y' },\r\n { id: 4, name: 'b', swizzle: 'z' },\r\n { id: 5, name: 'a', swizzle: 'w' }\r\n ];\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexColorNode,\r\n name: 'VertexColorNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex color'\r\n */\r\n toString() {\r\n return 'vertex color';\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex color nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual channel outputs (id \\> 1), 'vec4' for full color\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec4';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex UV coordinate input node\r\n *\r\n * @remarks\r\n * Provides access to per-vertex texture coordinates (UV coordinates) from the mesh.\r\n * UV coordinates map 3D mesh vertices to 2D texture space, typically in the range [0, 1].\r\n *\r\n * Used for:\r\n * - Texture sampling (most common use)\r\n * - Procedural pattern generation\r\n * - Gradient effects based on position in UV space\r\n * - Decal placement\r\n *\r\n * Outputs:\r\n * - Output 1: Full UV coordinates (vec2)\r\n * - Output 2: U coordinate (horizontal, float)\r\n * - Output 3: V coordinate (vertical, float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const uv = new VertexUVNode();\r\n *\r\n * // Sample texture using UV coordinates\r\n * textureSample.connectInput(1, uv, 1);\r\n *\r\n * // Use U coordinate for horizontal gradient\r\n * mixNode.connectInput(3, uv, 2);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class VertexUVNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex UV node\r\n *\r\n * @remarks\r\n * Initializes with 3 output slots: full UV and individual U, V components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' }\r\n ];\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexUVNode,\r\n name: 'VertexUVNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex UV'\r\n */\r\n toString() {\r\n return 'vertex UV';\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex UV nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec2' for full UV\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec2';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex world position input node\r\n *\r\n * @remarks\r\n * Provides access to the vertex position in world space coordinates.\r\n * World position is the absolute 3D location of the vertex in the scene,\r\n * after applying all model transformations but before view/projection.\r\n *\r\n * Used for:\r\n * - Distance-based effects (fog, fade)\r\n * - World-space texturing (triplanar mapping)\r\n * - Position-based color gradients\r\n * - Vertex animation based on world location\r\n * - Custom lighting calculations\r\n *\r\n * Outputs:\r\n * - Output 1: Full position (vec3)\r\n * - Output 2: X coordinate (float)\r\n * - Output 3: Y coordinate (float)\r\n * - Output 4: Z coordinate (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const worldPos = new VertexPositionNode();\r\n *\r\n * // Calculate distance from origin\r\n * const origin = new ConstantVec3Node();\r\n * const distance = new DistanceNode();\r\n * distance.connectInput(1, worldPos, 1);\r\n * distance.connectInput(2, origin, 1);\r\n *\r\n * // Height-based color gradient\r\n * colorMix.connectInput(3, worldPos, 3); // Use Y (height)\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class VertexPositionNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex position node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full position and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'world position'\r\n */\r\n toString() {\r\n return 'world position';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexPositionNode,\r\n name: 'VertexPositionNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex position nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full position\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Pixel world position input node\r\n *\r\n * @remarks\r\n * Provides access to current pixel world-space position.\r\n *\r\n * Outputs:\r\n * - Output 1: Full position (vec3)\r\n * - Output 2: X coordinate (float)\r\n * - Output 3: Y coordinate (float)\r\n * - Output 4: Z coordinate (float)\r\n *\r\n * @public\r\n */\r\nexport class PixelWorldPositionNode extends BaseGraphNode {\r\n /**\r\n * Creates a new pixel world position node\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'pixel world position'\r\n */\r\n toString() {\r\n return 'pixel world position';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: PixelWorldPositionNode,\r\n name: 'PixelWorldPositionNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full position\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex normal input node\r\n *\r\n * @remarks\r\n * Provides access to per-vertex normal vectors in world space.\r\n * Normals are unit vectors perpendicular to the surface, used extensively\r\n * in lighting calculations and surface orientation effects.\r\n *\r\n * Used for:\r\n * - Custom lighting calculations\r\n * - Fresnel effects (view-dependent shading)\r\n * - Rim lighting\r\n * - Normal-based masking\r\n * - Environment mapping\r\n *\r\n * Outputs:\r\n * - Output 1: Full normal vector (vec3, normalized)\r\n * - Output 2: X component (float)\r\n * - Output 3: Y component (float)\r\n * - Output 4: Z component (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const normal = new VertexNormalNode();\r\n * const viewDir = new ViewDirectionNode();\r\n *\r\n * // Calculate Fresnel effect\r\n * const dot = new DotProductNode();\r\n * dot.connectInput(1, normal, 1);\r\n * dot.connectInput(2, viewDir, 1);\r\n *\r\n * // Rim lighting using Y component\r\n * rimMask.connectInput(1, normal, 3);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class VertexNormalNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex normal node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full normal and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex normal'\r\n */\r\n toString() {\r\n return 'vertex normal';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexNormalNode,\r\n name: 'VertexNormalNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex normal nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full normal\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Pixel normal input node\r\n *\r\n * @remarks\r\n * Provides access to the world-space surface normal used in fragment shading.\r\n *\r\n * Outputs:\r\n * - Output 1: Full normal vector (vec3, normalized)\r\n * - Output 2: X component (float)\r\n * - Output 3: Y component (float)\r\n * - Output 4: Z component (float)\r\n *\r\n * @public\r\n */\r\nexport class PixelNormalNode extends BaseGraphNode {\r\n /**\r\n * Creates a new pixel normal node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full normal and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'pixel normal'\r\n */\r\n toString() {\r\n return 'pixel normal';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: PixelNormalNode,\r\n name: 'PixelNormalNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full normal\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex tangent input node\r\n *\r\n * @remarks\r\n * Provides access to per-vertex tangent vectors in world space.\r\n * Tangents are unit vectors parallel to the surface, aligned with the U texture coordinate direction.\r\n * Together with normals and binormals, they form the tangent-space basis (TBN matrix).\r\n *\r\n * Used for:\r\n * - Normal mapping (constructing TBN matrix)\r\n * - Anisotropic reflections (hair, brushed metal)\r\n * - Tangent-space calculations\r\n * - Flow map effects\r\n *\r\n * Outputs:\r\n * - Output 1: Full tangent vector (vec3, normalized)\r\n * - Output 2: X component (float)\r\n * - Output 3: Y component (float)\r\n * - Output 4: Z component (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const tangent = new VertexTangentNode();\r\n * const normal = new VertexNormalNode();\r\n * const binormal = new VertexBinormalNode();\r\n *\r\n * // Construct TBN matrix for normal mapping\r\n * const tbnMatrix = new MakeMatrixNode();\r\n * tbnMatrix.connectInput(1, tangent, 1);\r\n * tbnMatrix.connectInput(2, binormal, 1);\r\n * tbnMatrix.connectInput(3, normal, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class VertexTangentNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex tangent node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full tangent and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex tangent'\r\n */\r\n toString() {\r\n return 'vertex tangent';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexTangentNode,\r\n name: 'VertexTangentNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex tangent nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full tangent\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex binormal (bitangent) input node\r\n *\r\n * @remarks\r\n * Provides access to per-vertex binormal (also called bitangent) vectors in world space.\r\n * Binormals are unit vectors perpendicular to both the normal and tangent,\r\n * aligned with the V texture coordinate direction.\r\n * Together with normals and tangents, they form the tangent-space basis (TBN matrix).\r\n *\r\n * The binormal is typically computed as: binormal = cross(normal, tangent) * handedness\r\n *\r\n * Used for:\r\n * - Normal mapping (constructing TBN matrix)\r\n * - Tangent-space calculations\r\n * - Surface flow effects\r\n * - Oriented texture mapping\r\n *\r\n * Outputs:\r\n * - Output 1: Full binormal vector (vec3, normalized)\r\n * - Output 2: X component (float)\r\n * - Output 3: Y component (float)\r\n * - Output 4: Z component (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const tangent = new VertexTangentNode();\r\n * const normal = new VertexNormalNode();\r\n * const binormal = new VertexBinormalNode();\r\n *\r\n * // Use for normal mapping transformation\r\n * const normalMap = new TextureSampleNode();\r\n * const tbnTransform = new TransformNode();\r\n * tbnTransform.connectInput(1, normalMap, 1);\r\n * tbnTransform.connectInput(2, tbnMatrixNode, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class VertexBinormalNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex binormal node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full binormal and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex binormal'\r\n */\r\n toString() {\r\n return 'vertex binormal';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: VertexBinormalNode,\r\n name: 'VertexBinormalNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex binormal nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full binormal\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Projection matrix input node\r\n *\r\n * @remarks\r\n * Provides the camera's projection matrix (view space to clip space transformation).\r\n * This matrix transforms coordinates from camera/view space to normalized device coordinates (NDC).\r\n *\r\n * For perspective projection: converts frustum to cube, applies perspective divide\r\n * For orthographic projection: applies parallel projection scaling\r\n *\r\n * Used for:\r\n * - Custom vertex transformations\r\n * - Screen-space effects\r\n * - Depth calculations\r\n * - Custom projection modifications\r\n *\r\n * Output:\r\n * - Output 1: 4x4 projection matrix (mat4)\r\n *\r\n * @example\r\n * ```typescript\r\n * const projMatrix = new ProjectionMatrixNode();\r\n * const viewSpacePos = new ViewSpacePositionNode();\r\n *\r\n * // Transform to clip space\r\n * const transform = new TransformNode();\r\n * transform.connectInput(1, viewSpacePos, 1);\r\n * transform.connectInput(2, projMatrix, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ProjectionMatrixNode extends BaseGraphNode {\r\n /**\r\n * Creates a new projection matrix node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the mat4 matrix.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'ViewToClipMatrix'\r\n */\r\n toString() {\r\n return 'ViewToClipMatrix';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ProjectionMatrixNode,\r\n name: 'ProjectionMatrixNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Matrix nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'mat4'\r\n */\r\n protected getType() {\r\n return 'mat4';\r\n }\r\n}\r\n\r\n/**\r\n * View matrix input node\r\n *\r\n * @remarks\r\n * Provides the camera's view matrix (world space to view space transformation).\r\n * This matrix transforms coordinates from world space to camera/view space,\r\n * where the camera is at the origin looking down the negative Z axis.\r\n *\r\n * The view matrix is the inverse of the camera's world transformation matrix.\r\n *\r\n * Used for:\r\n * - Custom lighting in view space\r\n * - View-space normal calculations\r\n * - Billboard effects\r\n * - Custom camera-relative transformations\r\n *\r\n * Output:\r\n * - Output 1: 4x4 view matrix (mat4)\r\n *\r\n * @example\r\n * ```typescript\r\n * const viewMatrix = new ViewMatrixNode();\r\n * const worldPos = new VertexPositionNode();\r\n *\r\n * // Transform to view space\r\n * const transform = new TransformNode();\r\n * transform.connectInput(1, worldPos, 1);\r\n * transform.connectInput(2, viewMatrix, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ViewMatrixNode extends BaseGraphNode {\r\n /**\r\n * Creates a new view matrix node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the mat4 matrix.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'WorldToViewMatrix'\r\n */\r\n toString() {\r\n return 'WorldToViewMatrix';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ViewMatrixNode,\r\n name: 'ViewMatrixNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Matrix nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'mat4'\r\n */\r\n protected getType() {\r\n return 'mat4';\r\n }\r\n}\r\n\r\n/**\r\n * View-projection matrix input node\r\n *\r\n * @remarks\r\n * Provides the combined view-projection matrix (world space to clip space transformation).\r\n * This is the product of the view matrix and projection matrix, commonly used for\r\n * transforming vertices from world space directly to clip space in one step.\r\n *\r\n * Equivalent to: projectionMatrix * viewMatrix\r\n *\r\n * Used for:\r\n * - Vertex position transformation (most common use)\r\n * - Custom vertex shaders\r\n * - Screen-space position calculations\r\n * - Shadow mapping\r\n *\r\n * Output:\r\n * - Output 1: 4x4 view-projection matrix (mat4)\r\n *\r\n * @example\r\n * ```typescript\r\n * const viewProjMatrix = new ViewProjMatrixNode();\r\n * const worldPos = new VertexPositionNode();\r\n *\r\n * // Transform directly to clip space\r\n * const transform = new TransformNode();\r\n * transform.connectInput(1, worldPos, 1);\r\n * transform.connectInput(2, viewProjMatrix, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ViewProjMatrixNode extends BaseGraphNode {\r\n /**\r\n * Creates a new view-projection matrix node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the mat4 matrix.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'WorldToClipMatrix'\r\n */\r\n toString() {\r\n return 'WorldToClipMatrix';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ViewProjMatrixNode,\r\n name: 'ViewProjMatrixNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Matrix nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'mat4'\r\n */\r\n protected getType() {\r\n return 'mat4';\r\n }\r\n}\r\n\r\n/**\r\n * Inverse projection matrix input node\r\n *\r\n * @remarks\r\n * Provides the inverse of the projection matrix (clip space to view space transformation).\r\n * This matrix transforms coordinates from normalized device coordinates (NDC) back to camera/view space.\r\n *\r\n * Used for:\r\n * - Screen-space to view-space reconstruction\r\n * - Depth buffer unprojection\r\n * - Deferred rendering position reconstruction\r\n * - Ray marching from screen space\r\n *\r\n * Output:\r\n * - Output 1: 4x4 inverse projection matrix (mat4)\r\n *\r\n * @example\r\n * ```typescript\r\n * const invProjMatrix = new InvProjMatrixNode();\r\n * const clipPos = new ClipSpacePositionNode();\r\n *\r\n * // Reconstruct view space position\r\n * const transform = new TransformNode();\r\n * transform.connectInput(1, clipPos, 1);\r\n * transform.connectInput(2, invProjMatrix, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class InvProjMatrixNode extends BaseGraphNode {\r\n /**\r\n * Creates a new inverse projection matrix node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the mat4 matrix.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'ClipToViewMatrix'\r\n */\r\n toString() {\r\n return 'ClipToViewMatrix';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: InvProjMatrixNode,\r\n name: 'InvProjMatrixNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Matrix nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'mat4'\r\n */\r\n protected getType() {\r\n return 'mat4';\r\n }\r\n}\r\n\r\n/**\r\n * Inverse view-projection matrix input node\r\n *\r\n * @remarks\r\n * Provides the inverse of the view-projection matrix (clip space to world space transformation).\r\n * This matrix transforms coordinates from normalized device coordinates (NDC) back to world space.\r\n *\r\n * Equivalent to: inverse(projectionMatrix * viewMatrix)\r\n *\r\n * Used for:\r\n * - Screen-space to world-space reconstruction\r\n * - Deferred rendering world position reconstruction\r\n * - Picking and ray casting from screen coordinates\r\n * - Screen-space effects needing world position\r\n *\r\n * Output:\r\n * - Output 1: 4x4 inverse view-projection matrix (mat4)\r\n *\r\n * @example\r\n * ```typescript\r\n * const invViewProjMatrix = new InvViewProjMatrixNode();\r\n * const screenPos = new ScreenPositionNode();\r\n *\r\n * // Reconstruct world position from screen coordinates\r\n * const transform = new TransformNode();\r\n * transform.connectInput(1, screenPos, 1);\r\n * transform.connectInput(2, invViewProjMatrix, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class InvViewProjMatrixNode extends BaseGraphNode {\r\n /**\r\n * Creates a new inverse view-projection matrix node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the mat4 matrix.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'ClipToWorldMatrix'\r\n */\r\n toString() {\r\n return 'ClipToWorldMatrix';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: InvViewProjMatrixNode,\r\n name: 'InvViewProjMatrixNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Matrix nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'mat4'\r\n */\r\n protected getType() {\r\n return 'mat4';\r\n }\r\n}\r\n\r\n/**\r\n * Billboard matrix input node\r\n *\r\n * @public\r\n */\r\nexport class BillboardMatrixNode extends BaseGraphNode {\r\n /**\r\n * Creates a new billboard matrix node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the mat3 matrix.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'BillboardMatrix'\r\n */\r\n toString() {\r\n return 'BillboardMatrix';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: BillboardMatrixNode,\r\n name: 'BillboardMatrixNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Matrix nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'mat4'\r\n */\r\n protected getType() {\r\n return 'mat3';\r\n }\r\n}\r\n\r\n/**\r\n * Elapsed time input node\r\n *\r\n * @remarks\r\n * Provides the total elapsed time since the application started, in seconds.\r\n * This value continuously increases and is useful for creating time-based animations\r\n * and effects directly in the material shader.\r\n *\r\n * Used for:\r\n * - Animated textures (scrolling, rotating)\r\n * - Pulsating effects\r\n * - Wave animations\r\n * - Oscillating values (using sin/cos)\r\n * - Time-based procedural patterns\r\n *\r\n * Output:\r\n * - Output 1: Elapsed time in seconds (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const time = new ElapsedTimeNode();\r\n * const speed = new ConstantScalarNode();\r\n * speed.x = 0.5;\r\n *\r\n * // Animate UV scrolling\r\n * const mul = new CompMulNode();\r\n * mul.connectInput(1, time, 1);\r\n * mul.connectInput(2, speed, 1);\r\n *\r\n * const add = new CompAddNode();\r\n * add.connectInput(1, uvNode, 1);\r\n * add.connectInput(2, mul, 1);\r\n *\r\n * // Pulsating effect with sine wave\r\n * const sin = new SinNode();\r\n * sin.connectInput(1, time, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ElapsedTimeNode extends BaseGraphNode {\r\n /**\r\n * Creates a new elapsed time node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the time value.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'Elapsed time'\r\n */\r\n toString() {\r\n return 'Elapsed time';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ElapsedTimeNode,\r\n name: 'ElapsedTimeNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Time nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'float'\r\n */\r\n protected getType() {\r\n return 'float';\r\n }\r\n}\r\n\r\n/**\r\n * Camera position input node\r\n *\r\n * @remarks\r\n * Provides the world-space position of the camera/viewer.\r\n * This is the location of the camera in the 3D scene coordinate system.\r\n *\r\n * Used for:\r\n * - View direction calculations\r\n * - Distance-based effects (distance fog, LOD)\r\n * - Reflections and refractions\r\n * - Fresnel effects\r\n * - Environment mapping\r\n * - Specular highlights\r\n *\r\n * Outputs:\r\n * - Output 1: Full camera position (vec3)\r\n * - Output 2: X coordinate (float)\r\n * - Output 3: Y coordinate (float)\r\n * - Output 4: Z coordinate (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const cameraPos = new CameraPositionNode();\r\n * const worldPos = new VertexPositionNode();\r\n *\r\n * // Calculate view direction\r\n * const viewDir = new CompSubNode();\r\n * viewDir.connectInput(1, cameraPos, 1);\r\n * viewDir.connectInput(2, worldPos, 1);\r\n *\r\n * const normalizedViewDir = new NormalizeNode();\r\n * normalizedViewDir.connectInput(1, viewDir, 1);\r\n *\r\n * // Calculate distance to camera\r\n * const distance = new DistanceNode();\r\n * distance.connectInput(1, cameraPos, 1);\r\n * distance.connectInput(2, worldPos, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class CameraPositionNode extends BaseGraphNode {\r\n /**\r\n * Creates a new camera position node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full position and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'camera position'\r\n */\r\n toString() {\r\n return 'camera position';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: CameraPositionNode,\r\n name: 'CameraPositionNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Camera position nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full position\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Camera vector input node\r\n *\r\n * @remarks\r\n * Provides the world-space direction from current surface point to camera.\r\n *\r\n * Outputs:\r\n * - Output 1: Full vector (vec3, normalized)\r\n * - Output 2: X component (float)\r\n * - Output 3: Y component (float)\r\n * - Output 4: Z component (float)\r\n *\r\n * @public\r\n */\r\nexport class CameraVectorNode extends BaseGraphNode {\r\n /**\r\n * Creates a new camera vector node\r\n *\r\n * @remarks\r\n * Initializes with 4 output slots: full vector and individual X, Y, Z components.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'x', swizzle: 'x' },\r\n { id: 3, name: 'y', swizzle: 'y' },\r\n { id: 4, name: 'z', swizzle: 'z' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'camera vector'\r\n */\r\n toString() {\r\n return 'camera vector';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: CameraVectorNode,\r\n name: 'CameraVectorNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec3' for full vector\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Sky environment texture input node\r\n *\r\n * @remarks\r\n * Provides access to the scene's sky/environment cubemap texture.\r\n * This is typically used for skybox rendering, environment reflections,\r\n * and image-based lighting (IBL).\r\n *\r\n * The texture is a cubemap (texCube) that can be sampled using a 3D direction vector.\r\n *\r\n * Used for:\r\n * - Skybox rendering\r\n * - Environment reflections on metallic surfaces\r\n * - Image-based lighting (IBL)\r\n * - Ambient lighting from environment\r\n * - Reflections and refractions\r\n *\r\n * Output:\r\n * - Output 1: Cubemap texture sampler (texCube)\r\n *\r\n * @example\r\n * ```typescript\r\n * const skyTexture = new SkyEnvTextureNode();\r\n * const reflectionDir = new ReflectNode();\r\n *\r\n * // Sample environment for reflection\r\n * const envSample = new TextureSampleCubeNode();\r\n * envSample.connectInput(1, skyTexture, 1);\r\n * envSample.connectInput(2, reflectionDir, 1);\r\n *\r\n * // Use for metallic reflections\r\n * metalColor.connectInput(1, envSample, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class SkyEnvTextureNode extends BaseGraphNode {\r\n /**\r\n * Creates a new sky environment texture node\r\n *\r\n * @remarks\r\n * Initializes with one output slot for the cubemap sampler.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'SkyEnvTexture'\r\n */\r\n toString() {\r\n return 'SkyEnvTexture';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: SkyEnvTextureNode,\r\n name: 'SkyEnvTextureNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Sky environment texture nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns 'texCube' (cubemap texture sampler)\r\n */\r\n protected getType() {\r\n return 'texCube';\r\n }\r\n}\r\n\r\n/**\r\n * Camera near/far plane input node\r\n *\r\n * @remarks\r\n * Provides the camera's near and far clipping plane distances.\r\n * These values define the camera's visible depth range:\r\n * - Near plane: The closest distance at which objects are rendered\r\n * - Far plane: The farthest distance at which objects are rendered\r\n *\r\n * Used for:\r\n * - Depth linearization (converting from NDC depth to linear depth)\r\n * - Fog calculations based on depth\r\n * - Custom depth-of-field effects\r\n * - Z-buffer precision calculations\r\n * - Distance-based effects\r\n *\r\n * Outputs:\r\n * - Output 1: Both values as vec2 (x = near, y = far)\r\n * - Output 2: Near plane distance (float)\r\n * - Output 3: Far plane distance (float)\r\n *\r\n * @example\r\n * ```typescript\r\n * const nearFar = new CameraNearFarNode();\r\n * const depth = new DepthNode();\r\n *\r\n * // Linearize depth buffer value\r\n * // linearDepth = (2.0 * near) / (far + near - depth * (far - near))\r\n * const farMinusNear = new CompSubNode();\r\n * farMinusNear.connectInput(1, nearFar, 3); // far\r\n * farMinusNear.connectInput(2, nearFar, 2); // near\r\n *\r\n * // Use for distance fog\r\n * const fogFactor = new SaturateNode();\r\n * fogFactor.connectInput(1, linearDepthCalc, 1);\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class CameraNearFarNode extends BaseGraphNode {\r\n /**\r\n * Creates a new camera near/far node\r\n *\r\n * @remarks\r\n * Initializes with 3 output slots: combined vec2 and individual near/far values.\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [\r\n { id: 1, name: '' },\r\n { id: 2, name: 'near', swizzle: 'x' },\r\n { id: 3, name: 'far', swizzle: 'y' }\r\n ];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'camera near far'\r\n */\r\n toString() {\r\n return 'camera near far';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: CameraNearFarNode,\r\n name: 'CameraNearFarNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Camera near/far nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @param id - The output slot ID\r\n * @returns 'float' for individual component outputs (id \\> 1), 'vec2' for combined output\r\n */\r\n protected getType(id: number) {\r\n return id > 1 ? 'float' : 'vec2';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex position resolver node\r\n *\r\n * @remarks\r\n * Provides the resolved vertex position in object space (After applying skinning and morphing)\r\n *\r\n * @public\r\n */\r\nexport class ResolveVertexPositionNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex position resolver node\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex position resolved'\r\n */\r\n toString() {\r\n return 'vertex position resolved';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ResolveVertexPositionNode,\r\n name: 'ResolveVertexPositionNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex position resolver nodes are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @returns vec3\r\n */\r\n protected getType() {\r\n return 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex normal resolver node\r\n *\r\n * @remarks\r\n * Provides the resolved vertex normal in object space (After applying skinning and morphing)\r\n *\r\n * @public\r\n */\r\nexport class ResolveVertexNormalNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex normal resolver node\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex normal resolved'\r\n */\r\n toString() {\r\n return 'vertex normal resolved';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ResolveVertexNormalNode,\r\n name: 'ResolveVertexNormalNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex normal resolve node are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @returns vec3\r\n */\r\n protected getType() {\r\n return 'vec3';\r\n }\r\n}\r\n\r\n/**\r\n * Vertex tangent resolver node\r\n *\r\n * @remarks\r\n * Provides the resolved vertex tangent in object space (After applying skinning and morphing)\r\n *\r\n * @public\r\n */\r\nexport class ResolveVertexTangentNode extends BaseGraphNode {\r\n /**\r\n * Creates a new vertex tangent resolver node\r\n */\r\n constructor() {\r\n super();\r\n this._outputs = [{ id: 1, name: '' }];\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'vertex tangent resolved'\r\n */\r\n toString() {\r\n return 'vertex tangent resolved';\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @returns Serialization class descriptor\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: ResolveVertexTangentNode,\r\n name: 'ResolveVertexTangentNode',\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Empty string (always valid)\r\n *\r\n * @remarks\r\n * Vertex tangent resolve node are always valid as they have no inputs.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type for a specific output slot\r\n *\r\n * @returns vec4\r\n */\r\n protected getType() {\r\n return 'vec4';\r\n }\r\n}\r\n"],"names":["VertexOutputNode","BaseGraphNode","_index","index","_outputs","id","name","swizzle","getSerializationCls","ctor","createFunc","ctx","init","obj","getInitParams","getProps","toString","getType","VertexIndexNode","InstanceIndexNode","VertexColorNode","VertexUVNode","VertexPositionNode","PixelWorldPositionNode","VertexNormalNode","PixelNormalNode","VertexTangentNode","VertexBinormalNode","ProjectionMatrixNode","ViewMatrixNode","ViewProjMatrixNode","InvProjMatrixNode","InvViewProjMatrixNode","BillboardMatrixNode","ElapsedTimeNode","CameraPositionNode","CameraVectorNode","SkyEnvTextureNode","CameraNearFarNode","ResolveVertexPositionNode","ResolveVertexNormalNode","ResolveVertexTangentNode"],"mappings":";;AAGA;;;IAIO,MAAMA,gBAAyBC,SAAAA,aAAAA,CAAAA;IAC5BC,MAAe;AACvB,IAAA,WAAA,CAAYC,KAAa,CAAE;QACzB,KAAK,EAAA;QACL,IAAI,CAACD,MAAM,GAAGC,KAAAA;QACd,IAAI,CAACC,QAAQ,GAAG;AACd,YAAA;gBAAEC,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA;AAAG,aAAA;AAClB,YAAA;gBAAED,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI,aAAA;AACjC,YAAA;gBAAEF,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI,aAAA;AACjC,YAAA;gBAAEF,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI,aAAA;AACjC,YAAA;gBAAEF,EAAI,EAAA,CAAA;gBAAGC,IAAM,EAAA,GAAA;gBAAKC,OAAS,EAAA;AAAI;AAClC,SAAA;AACH;AACA,IAAA,IAAIJ,KAAQ,GAAA;QACV,OAAO,IAAI,CAACD,MAAM;AACpB;AACA,IAAA,OAAOM,mBAAyC,GAAA;QAC9C,OAA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AACvC;AACA;;;;AAIC,MACDU,QAAW,GAAA;QACT,OAAO,yBAAA;AACT;AACA;;;;AAIC,MACD,OAAOR,mBAAsB,GAAA;QAC3B,OAAO;YACLC,IAAMgC,EAAAA,wBAAAA;YACNnC,IAAM,EAAA,0BAAA;AACNS,YAAAA,QAAAA,CAAAA,GAAAA;AACE,gBAAA,OAAO,EAAE;AACX;AACF,SAAA;AACF;AACA;;;;;;;AAOC,MACD,QAAqB,GAAA;QACnB,OAAO,EAAA;AACT;AACA;;;;AAIC,MACD,OAAoB,GAAA;QAClB,OAAO,MAAA;AACT;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"bounding_volume.js","sources":["../../src/utility/bounding_volume.ts"],"sourcesContent":["import type { Vector3, Matrix4x4, Plane } from '@zephyr3d/base';\r\nimport { Frustum, AABB, ClipState } from '@zephyr3d/base';\r\n\r\n/**\r\n * Base interface for any kind of bounding volumes\r\n * @public\r\n */\r\nexport interface BoundingVolume {\r\n /**\r\n * Creates a new bounding volume by copying from this bounding volume\r\n */\r\n clone(): BoundingVolume;\r\n /**\r\n * Creates a new bounding volume by tranforming this bounding volume by a matrix\r\n * @param matrix - The transform matrix\r\n * @returns The created bounding volume\r\n */\r\n transform(matrix: Matrix4x4): BoundingVolume;\r\n /**\r\n * Check if this bounding volume is behind a plane\r\n * @param plane - The plane to check\r\n * @returns true if the bounding volume behinds the plane, false otherwise\r\n */\r\n behindPlane(plane: Plane): boolean;\r\n /**\r\n * Check if this bounding volume is outside a frustum\r\n * @param frustum - The frustum to check\r\n * @returns true if the bounding volume outsides the frustum, false otherwise\r\n */\r\n outsideFrustum(frustum: Frustum | Matrix4x4): boolean;\r\n /**\r\n * Gets the minimum AABB that contains the bounding volume\r\n * @returns The mimimum AABB that contains the bounding volume\r\n */\r\n toAABB(): AABB;\r\n}\r\n\r\n/**\r\n * The bounding box class\r\n * @public\r\n */\r\nexport class BoundingBox extends AABB implements BoundingVolume {\r\n /**\r\n * Creates an empty bounding box\r\n */\r\n constructor();\r\n /**\r\n * Creates a bounding box from an AABB\r\n * @param box - The AABB\r\n */\r\n constructor(box: AABB);\r\n /**\r\n * Creates a bounding box from the min point and the max point\r\n * @param minPoint - Min point of the box\r\n * @param maxPoint - Max point of the box\r\n */\r\n constructor(minPoint: Vector3, maxPoint: Vector3);\r\n constructor(arg0?: Vector3 | AABB, arg1?: Vector3) {\r\n super(arg0 as any, arg1!);\r\n }\r\n /** {@inheritDoc BoundingVolume.behindPlane} */\r\n behindPlane(plane: Plane): boolean {\r\n return this.toAABB().behindPlane(plane);\r\n }\r\n /** {@inheritDoc BoundingVolume.clone} */\r\n clone() {\r\n return new BoundingBox(this);\r\n }\r\n /** {@inheritDoc BoundingVolume.transform} */\r\n transform(matrix: Matrix4x4) {\r\n return new BoundingBox(AABB.transform(this, matrix));\r\n }\r\n /** {@inheritDoc BoundingVolume.outsideFrustum} */\r\n outsideFrustum(frustum: Frustum | Matrix4x4) {\r\n return (\r\n (frustum instanceof Frustum ? this.getClipStateWithFrustum(frustum) : this.getClipState(frustum)) ===\r\n ClipState.NOT_CLIPPED\r\n );\r\n }\r\n /** {@inheritDoc BoundingVolume.toAABB} */\r\n toAABB() {\r\n return this;\r\n }\r\n}\r\n"],"names":["BoundingBox","AABB","arg0","arg1","behindPlane","plane","toAABB","clone","transform","matrix","outsideFrustum","frustum","Frustum","getClipStateWithFrustum","getClipState","ClipState","NOT_CLIPPED"],"mappings":";;AAqCA;;;IAIO,MAAMA,WAAoBC,SAAAA,IAAAA,CAAAA;IAgB/B,WAAYC,CAAAA,IAAqB,EAAEC,IAAc,CAAE;AACjD,QAAA,KAAK,CAACD,IAAaC,EAAAA,IAAAA,CAAAA;AACrB;oDAEAC,WAAYC,CAAAA,KAAY,EAAW;AACjC,QAAA,OAAO,IAAI,CAACC,MAAM,EAAA,CAAGF,WAAW,CAACC,KAAAA,CAAAA;AACnC;AACA,8CACAE,KAAQ,GAAA;QACN,OAAO,IAAIP,YAAY,IAAI,CAAA;AAC7B;kDAEAQ,SAAUC,CAAAA,MAAiB,EAAE;AAC3B,QAAA,OAAO,IAAIT,WAAYC,CAAAA,IAAAA,CAAKO,SAAS,CAAC,IAAI,EAAEC,MAAAA,CAAAA,CAAAA;AAC9C;uDAEAC,cAAeC,CAAAA,OAA4B,EAAE;AAC3C,QAAA,OACE,CAACA,OAAAA,YAAmBC,OAAU,GAAA,IAAI,CAACC,uBAAuB,CAACF,OAAW,CAAA,GAAA,IAAI,CAACG,YAAY,CAACH,OAAO,CAAA,MAC/FI,UAAUC,WAAW;AAEzB;AACA,+CACAV,MAAS,GAAA;AACP,QAAA,OAAO,IAAI;AACb;AACF;;;;"}
1
+ {"version":3,"file":"bounding_volume.js","sources":["../../src/utility/bounding_volume.ts"],"sourcesContent":["import type { Vector3, Matrix4x4, Plane } from '@zephyr3d/base';\r\nimport { Frustum, AABB, ClipState } from '@zephyr3d/base';\r\n\r\n/**\r\n * Base interface for any kind of bounding volumes\r\n * @public\r\n */\r\nexport interface BoundingVolume {\r\n /**\r\n * Creates a new bounding volume by copying from this bounding volume\r\n */\r\n clone(): BoundingVolume;\r\n /**\r\n * Creates a new bounding volume by tranforming this bounding volume by a matrix\r\n * @param matrix - The transform matrix\r\n * @returns The created bounding volume\r\n */\r\n transform(matrix: Matrix4x4): BoundingVolume;\r\n /**\r\n * Check if this bounding volume is behind a plane\r\n * @param plane - The plane to check\r\n * @returns true if the bounding volume behinds the plane, false otherwise\r\n */\r\n behindPlane(plane: Plane): boolean;\r\n /**\r\n * Check if this bounding volume is outside a frustum\r\n * @param frustum - The frustum to check\r\n * @returns true if the bounding volume outsides the frustum, false otherwise\r\n */\r\n outsideFrustum(frustum: Frustum | Matrix4x4): boolean;\r\n /**\r\n * Gets the minimum AABB that contains the bounding volume\r\n * @returns The mimimum AABB that contains the bounding volume\r\n */\r\n toAABB(): AABB;\r\n}\r\n\r\n/**\r\n * The bounding box class\r\n * @public\r\n */\r\nexport class BoundingBox extends AABB implements BoundingVolume {\r\n /**\r\n * Creates an empty bounding box\r\n */\r\n constructor();\r\n /**\r\n * Creates a bounding box from an AABB\r\n * @param box - The AABB\r\n */\r\n constructor(box: AABB);\r\n /**\r\n * Creates a bounding box from the min point and the max point\r\n * @param minPoint - Min point of the box\r\n * @param maxPoint - Max point of the box\r\n */\r\n constructor(minPoint: Vector3, maxPoint: Vector3);\r\n constructor(arg0?: Vector3 | AABB, arg1?: Vector3) {\r\n super(arg0 as any, arg1!);\r\n }\r\n /** {@inheritDoc BoundingVolume.behindPlane} */\r\n behindPlane(plane: Plane): boolean {\r\n return this.toAABB().behindPlane(plane);\r\n }\r\n /** {@inheritDoc BoundingVolume.clone} */\r\n clone() {\r\n return new BoundingBox(this) as this;\r\n }\r\n /** {@inheritDoc BoundingVolume.transform} */\r\n transform(matrix: Matrix4x4) {\r\n return new BoundingBox(AABB.transform(this, matrix));\r\n }\r\n /** {@inheritDoc BoundingVolume.outsideFrustum} */\r\n outsideFrustum(frustum: Frustum | Matrix4x4) {\r\n return (\r\n (frustum instanceof Frustum ? this.getClipStateWithFrustum(frustum) : this.getClipState(frustum)) ===\r\n ClipState.NOT_CLIPPED\r\n );\r\n }\r\n /** {@inheritDoc BoundingVolume.toAABB} */\r\n toAABB() {\r\n return this;\r\n }\r\n}\r\n"],"names":["BoundingBox","AABB","arg0","arg1","behindPlane","plane","toAABB","clone","transform","matrix","outsideFrustum","frustum","Frustum","getClipStateWithFrustum","getClipState","ClipState","NOT_CLIPPED"],"mappings":";;AAqCA;;;IAIO,MAAMA,WAAoBC,SAAAA,IAAAA,CAAAA;IAgB/B,WAAYC,CAAAA,IAAqB,EAAEC,IAAc,CAAE;AACjD,QAAA,KAAK,CAACD,IAAaC,EAAAA,IAAAA,CAAAA;AACrB;oDAEAC,WAAYC,CAAAA,KAAY,EAAW;AACjC,QAAA,OAAO,IAAI,CAACC,MAAM,EAAA,CAAGF,WAAW,CAACC,KAAAA,CAAAA;AACnC;AACA,8CACAE,KAAQ,GAAA;QACN,OAAO,IAAIP,YAAY,IAAI,CAAA;AAC7B;kDAEAQ,SAAUC,CAAAA,MAAiB,EAAE;AAC3B,QAAA,OAAO,IAAIT,WAAYC,CAAAA,IAAAA,CAAKO,SAAS,CAAC,IAAI,EAAEC,MAAAA,CAAAA,CAAAA;AAC9C;uDAEAC,cAAeC,CAAAA,OAA4B,EAAE;AAC3C,QAAA,OACE,CAACA,OAAAA,YAAmBC,OAAU,GAAA,IAAI,CAACC,uBAAuB,CAACF,OAAW,CAAA,GAAA,IAAI,CAACG,YAAY,CAACH,OAAO,CAAA,MAC/FI,UAAUC,WAAW;AAEzB;AACA,+CACAV,MAAS,GAAA;AACP,QAAA,OAAO,IAAI;AACb;AACF;;;;"}
@@ -101,7 +101,7 @@ function createPMREMProgram(type, numSamples) {
101
101
  });
102
102
  },
103
103
  fragment (pb) {
104
- if (type === 'ggx') {
104
+ if (type === 'ggx' || type === 'charlie') {
105
105
  this.alphaG = pb.float().uniform(0);
106
106
  }
107
107
  this.vFilteringInfo = pb.vec3().uniform(0);
@@ -206,7 +206,7 @@ function createPMREMProgram(type, numSamples) {
206
206
  this.$return(this.result);
207
207
  });
208
208
  }
209
- if (type === 'ggx') {
209
+ if (type === 'ggx' || type === 'charlie') {
210
210
  pb.func('hemisphereImportanceSampleDggx', [
211
211
  pb.vec2('u'),
212
212
  pb.float('a')
@@ -217,6 +217,15 @@ function createPMREMProgram(type, numSamples) {
217
217
  this.$l.sinTheta = pb.sqrt(pb.sub(1, this.cosTheta2));
218
218
  this.$return(pb.vec3(pb.mul(pb.cos(this.phi), this.sinTheta), pb.mul(pb.sin(this.phi), this.sinTheta), this.cosTheta));
219
219
  });
220
+ pb.func('hemisphereImportanceSampleCharlie', [
221
+ pb.vec2('u'),
222
+ pb.float('a')
223
+ ], function() {
224
+ this.$l.phi = pb.mul(this.u.x, 2 * Math.PI);
225
+ this.$l.sinTheta = pb.pow(this.u.y, pb.div(this.a, pb.add(pb.mul(2, this.a), 1)));
226
+ this.$l.cosTheta = pb.sqrt(pb.sub(1, pb.mul(this.sinTheta, this.sinTheta)));
227
+ this.$return(pb.vec3(pb.mul(pb.cos(this.phi), this.sinTheta), pb.mul(pb.sin(this.phi), this.sinTheta), this.cosTheta));
228
+ });
220
229
  pb.func('normalDistributionFunction_TrowbridgeReitzGGX', [
221
230
  pb.float('NoH'),
222
231
  pb.float('alphaG')
@@ -225,6 +234,15 @@ function createPMREMProgram(type, numSamples) {
225
234
  this.$l.d = pb.add(pb.mul(this.NoH, this.NoH, pb.sub(this.a2, 1)), 1);
226
235
  this.$return(pb.div(this.a2, pb.mul(this.d, this.d, Math.PI)));
227
236
  });
237
+ pb.func('normalDistributionFunction_Charlie', [
238
+ pb.float('NoH'),
239
+ pb.float('roughness')
240
+ ], function() {
241
+ this.$l.invR = pb.div(1, pb.max(this.roughness, 0.000001));
242
+ this.$l.cos2h = pb.mul(this.NoH, this.NoH);
243
+ this.$l.sin2h = pb.max(pb.sub(1, this.cos2h), 0.0078125);
244
+ this.$return(pb.div(pb.mul(pb.add(this.invR, 2), pb.pow(this.sin2h, pb.mul(this.invR, 0.5))), 2 * Math.PI));
245
+ });
228
246
  pb.func('radiance', [
229
247
  pb.float('alphaG'),
230
248
  pb.vec3('direction'),
@@ -251,14 +269,22 @@ function createPMREMProgram(type, numSamples) {
251
269
  this.$l.weight = pb.float(0);
252
270
  this.$for(pb.int('i'), 0, numSamples, function() {
253
271
  this.$l.Xi = this.hammersley2d(this.i, numSamples);
254
- this.$l.H = this.hemisphereImportanceSampleDggx(this.Xi, this.alphaG);
272
+ if (type === 'ggx') {
273
+ this.$l.H = this.hemisphereImportanceSampleDggx(this.Xi, this.alphaG);
274
+ } else {
275
+ this.$l.H = this.hemisphereImportanceSampleCharlie(this.Xi, this.alphaG);
276
+ }
255
277
  this.$l.NoV = pb.float(1);
256
278
  this.$l.NoH = this.H.z;
257
279
  this.$l.NoH2 = pb.mul(this.H.z, this.H.z);
258
280
  this.$l.NoL = pb.sub(pb.mul(this.NoH2, 2), 1);
259
281
  this.$l.L = pb.normalize(pb.vec3(pb.mul(this.NoH, this.H.x, 2), pb.mul(this.NoH, this.H.y, 2), this.NoL));
260
282
  this.$if(pb.greaterThan(this.NoL, 0), function() {
261
- this.$l.pdf_inversed = pb.div(4, this.normalDistributionFunction_TrowbridgeReitzGGX(this.NoH, this.alphaG));
283
+ if (type === 'ggx') {
284
+ this.$l.pdf_inversed = pb.div(4, this.normalDistributionFunction_TrowbridgeReitzGGX(this.NoH, this.alphaG));
285
+ } else {
286
+ this.$l.pdf_inversed = pb.div(4, this.normalDistributionFunction_Charlie(this.NoH, this.alphaG));
287
+ }
262
288
  this.$l.omegaS = pb.mul(this.pdf_inversed, this.NUM_SAMPLES_FLOAT_INVERSED);
263
289
  this.$l.l = pb.add(pb.sub(this.log4(this.omegaS), this.log4(this.omegaP)), this.log4(this.K));
264
290
  this.$l.mipLevel = pb.clamp(this.l, 0, this.maxLevel);
@@ -273,7 +299,7 @@ function createPMREMProgram(type, numSamples) {
273
299
  });
274
300
  }
275
301
  pb.main(function() {
276
- if (type === 'ggx') {
302
+ if (type === 'ggx' || type === 'charlie') {
277
303
  this.$l.color = this.radiance(this.alphaG, this.$inputs.direction, this.vFilteringInfo);
278
304
  }
279
305
  if (type === 'lambertian') {
@@ -293,7 +319,7 @@ function doPrefilterCubemap(type, roughness, miplevel, srcTexture, sampler, dstF
293
319
  bindgroup.setValue('vFilteringInfo', filteringInfo);
294
320
  bindgroup.setValue('hdrScale', 1);
295
321
  bindgroup.setTexture('inputTexture', srcTexture);
296
- if (type === 'ggx') {
322
+ if (type === 'ggx' || type === 'charlie') {
297
323
  bindgroup.setValue('alphaG', roughness);
298
324
  }
299
325
  device.setProgram(program);
@@ -339,10 +365,10 @@ function doPrefilterCubemap(type, roughness, miplevel, srcTexture, sampler, dstF
339
365
  const attachMiplevel = fb.getColorAttachmentMipLevel(0);
340
366
  const generateMipmap = fb.getColorAttachmentGenerateMipmaps(0);
341
367
  const destTex = fb.getColorAttachments()[0];
342
- const mips = type === 'ggx' ? destTex.mipLevelCount : 1;
368
+ const mips = type === 'ggx' || type === 'charlie' ? destTex.mipLevelCount : 1;
343
369
  for(let i = 0; i < mips; i++){
344
370
  const alpha = i === 0 ? 0 : Math.pow(2, i) / width;
345
- doPrefilterCubemap(type, alpha, i, srcTex, fetchSampler(type === 'ggx' ? 'clamp_nearest_nomip' : 'clamp_linear'), fb, filteringInfo, numSamples ?? 64);
371
+ doPrefilterCubemap(type, alpha, i, srcTex, fetchSampler(type === 'ggx' || type === 'charlie' ? 'clamp_nearest_nomip' : 'clamp_linear'), fb, filteringInfo, numSamples ?? 64);
346
372
  }
347
373
  device.popDeviceStates();
348
374
  device.setRenderStates(rs);