@zephyr3d/scene 0.7.0 → 0.7.1

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 (319) hide show
  1. package/dist/animation/animation.js +4 -15
  2. package/dist/animation/animation.js.map +1 -1
  3. package/dist/animation/animationset.js +22 -9
  4. package/dist/animation/animationset.js.map +1 -1
  5. package/dist/animation/animationtrack.js +1 -0
  6. package/dist/animation/animationtrack.js.map +1 -1
  7. package/dist/animation/eulerrotationtrack.js +0 -1
  8. package/dist/animation/eulerrotationtrack.js.map +1 -1
  9. package/dist/animation/morphtarget.js +7 -1
  10. package/dist/animation/morphtarget.js.map +1 -1
  11. package/dist/animation/morphtrack.js +3 -3
  12. package/dist/animation/morphtrack.js.map +1 -1
  13. package/dist/animation/proptrack.js +37 -41
  14. package/dist/animation/proptrack.js.map +1 -1
  15. package/dist/animation/rotationtrack.js +0 -1
  16. package/dist/animation/rotationtrack.js.map +1 -1
  17. package/dist/animation/scaletrack.js +0 -1
  18. package/dist/animation/scaletrack.js.map +1 -1
  19. package/dist/animation/skeleton.js +7 -14
  20. package/dist/animation/skeleton.js.map +1 -1
  21. package/dist/animation/translationtrack.js +0 -1
  22. package/dist/animation/translationtrack.js.map +1 -1
  23. package/dist/app/api.js +13 -4
  24. package/dist/app/api.js.map +1 -1
  25. package/dist/app/app.js +13 -1
  26. package/dist/app/app.js.map +1 -1
  27. package/dist/app/engine.js +33 -45
  28. package/dist/app/engine.js.map +1 -1
  29. package/dist/app/inputmgr.js.map +1 -1
  30. package/dist/app/runtimescript.js.map +1 -1
  31. package/dist/app/screen.js +318 -0
  32. package/dist/app/screen.js.map +1 -0
  33. package/dist/app/scriptingsystem.js +10 -6
  34. package/dist/app/scriptingsystem.js.map +1 -1
  35. package/dist/app/scriptregistry.js +11 -22
  36. package/dist/app/scriptregistry.js.map +1 -1
  37. package/dist/asset/assetmanager.js +79 -58
  38. package/dist/asset/assetmanager.js.map +1 -1
  39. package/dist/asset/builtin.js +5 -5
  40. package/dist/asset/builtin.js.map +1 -1
  41. package/dist/asset/loaders/dds/dds.js +6 -2
  42. package/dist/asset/loaders/dds/dds.js.map +1 -1
  43. package/dist/asset/loaders/dds/dds_loader.js +1 -1
  44. package/dist/asset/loaders/dds/dds_loader.js.map +1 -1
  45. package/dist/asset/loaders/gltf/gltf_loader.js +14 -6
  46. package/dist/asset/loaders/gltf/gltf_loader.js.map +1 -1
  47. package/dist/asset/loaders/gltf/helpers.js +6 -2
  48. package/dist/asset/loaders/gltf/helpers.js.map +1 -1
  49. package/dist/asset/loaders/hdr/hdr.js +22 -15
  50. package/dist/asset/loaders/hdr/hdr.js.map +1 -1
  51. package/dist/asset/loaders/image/tga_Loader.js +2 -1
  52. package/dist/asset/loaders/image/tga_Loader.js.map +1 -1
  53. package/dist/asset/loaders/image/webimage_loader.js.map +1 -1
  54. package/dist/asset/loaders/loader.js +2 -2
  55. package/dist/asset/loaders/loader.js.map +1 -1
  56. package/dist/asset/model.js +2 -2
  57. package/dist/asset/model.js.map +1 -1
  58. package/dist/blitter/bilateralblur.js.map +1 -1
  59. package/dist/blitter/blitter.js +9 -11
  60. package/dist/blitter/blitter.js.map +1 -1
  61. package/dist/blitter/box.js +0 -1
  62. package/dist/blitter/box.js.map +1 -1
  63. package/dist/blitter/copy.js.map +1 -1
  64. package/dist/blitter/gaussianblur.js.map +1 -1
  65. package/dist/camera/base.js +1 -3
  66. package/dist/camera/base.js.map +1 -1
  67. package/dist/camera/camera.js +121 -37
  68. package/dist/camera/camera.js.map +1 -1
  69. package/dist/camera/fps.js +19 -17
  70. package/dist/camera/fps.js.map +1 -1
  71. package/dist/camera/orbit.js +45 -43
  72. package/dist/camera/orbit.js.map +1 -1
  73. package/dist/camera/orthocamera.js +27 -21
  74. package/dist/camera/orthocamera.js.map +1 -1
  75. package/dist/camera/perspectivecamera.js +26 -17
  76. package/dist/camera/perspectivecamera.js.map +1 -1
  77. package/dist/index.d.ts +14453 -15609
  78. package/dist/index.js +17 -11
  79. package/dist/index.js.map +1 -1
  80. package/dist/material/blinn.js.map +1 -1
  81. package/dist/material/grassmaterial.js.map +1 -1
  82. package/dist/material/lambert.js.map +1 -1
  83. package/dist/material/material.js +11 -5
  84. package/dist/material/material.js.map +1 -1
  85. package/dist/material/meshmaterial.js +10 -9
  86. package/dist/material/meshmaterial.js.map +1 -1
  87. package/dist/material/mixins/albedocolor.js.map +1 -1
  88. package/dist/material/mixins/foliage.js.map +1 -1
  89. package/dist/material/mixins/lightmodel/blinnphong.js.map +1 -1
  90. package/dist/material/mixins/lightmodel/lambert.js.map +1 -1
  91. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js +7 -0
  92. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js.map +1 -1
  93. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  94. package/dist/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -1
  95. package/dist/material/mixins/lit.js +3 -3
  96. package/dist/material/mixins/lit.js.map +1 -1
  97. package/dist/material/mixins/pbr/brdf.js.map +1 -1
  98. package/dist/material/mixins/pbr/common.js.map +1 -1
  99. package/dist/material/mixins/texture.js +3 -0
  100. package/dist/material/mixins/texture.js.map +1 -1
  101. package/dist/material/mixins/vertexcolor.js.map +1 -1
  102. package/dist/material/particle.js.map +1 -1
  103. package/dist/material/pbrblueprint.js +180 -22
  104. package/dist/material/pbrblueprint.js.map +1 -1
  105. package/dist/material/pbrmr.js.map +1 -1
  106. package/dist/material/pbrsg.js.map +1 -1
  107. package/dist/material/shader/helper.js +36 -53
  108. package/dist/material/shader/helper.js.map +1 -1
  109. package/dist/material/sprite.js +301 -0
  110. package/dist/material/sprite.js.map +1 -0
  111. package/dist/material/sprite3d.js +301 -0
  112. package/dist/material/sprite3d.js.map +1 -0
  113. package/dist/material/sprite3d_std.js +116 -0
  114. package/dist/material/sprite3d_std.js.map +1 -0
  115. package/dist/material/sprite3dblueprint.js +235 -0
  116. package/dist/material/sprite3dblueprint.js.map +1 -0
  117. package/dist/material/sprite_std.js +116 -0
  118. package/dist/material/sprite_std.js.map +1 -0
  119. package/dist/material/spriteblueprint.js +235 -0
  120. package/dist/material/spriteblueprint.js.map +1 -0
  121. package/dist/material/terrain-cm.js +0 -1
  122. package/dist/material/terrain-cm.js.map +1 -1
  123. package/dist/material/unlit.js.map +1 -1
  124. package/dist/material/water.js.map +1 -1
  125. package/dist/posteffect/bloom.js.map +1 -1
  126. package/dist/posteffect/compositor.js.map +1 -1
  127. package/dist/posteffect/fxaa.js.map +1 -1
  128. package/dist/posteffect/grayscale.js.map +1 -1
  129. package/dist/posteffect/motionblur.js.map +1 -1
  130. package/dist/posteffect/posteffect.js.map +1 -1
  131. package/dist/posteffect/sao.js.map +1 -1
  132. package/dist/posteffect/ssr.js +7 -5
  133. package/dist/posteffect/ssr.js.map +1 -1
  134. package/dist/posteffect/taa.js.map +1 -1
  135. package/dist/posteffect/tonemap.js.map +1 -1
  136. package/dist/render/abuffer_oit.js +8 -6
  137. package/dist/render/abuffer_oit.js.map +1 -1
  138. package/dist/render/clipmap.js +0 -10
  139. package/dist/render/clipmap.js.map +1 -1
  140. package/dist/render/cluster_light.js +4 -4
  141. package/dist/render/cluster_light.js.map +1 -1
  142. package/dist/render/cull_visitor.js +15 -17
  143. package/dist/render/cull_visitor.js.map +1 -1
  144. package/dist/render/depthpass.js +3 -4
  145. package/dist/render/depthpass.js.map +1 -1
  146. package/dist/render/drawable.js +15 -0
  147. package/dist/render/drawable.js.map +1 -0
  148. package/dist/render/drawable_mixin.js +8 -4
  149. package/dist/render/drawable_mixin.js.map +1 -1
  150. package/dist/render/envlight.js.map +1 -1
  151. package/dist/render/fbm_wavegenerator.js +3 -1
  152. package/dist/render/fbm_wavegenerator.js.map +1 -1
  153. package/dist/render/fft_wavegenerator.js +67 -64
  154. package/dist/render/fft_wavegenerator.js.map +1 -1
  155. package/dist/render/fullscreenquad.js.map +1 -1
  156. package/dist/render/gerstner_wavegenerator.js +3 -1
  157. package/dist/render/gerstner_wavegenerator.js.map +1 -1
  158. package/dist/render/globalbindgroup_allocator.js +3 -1
  159. package/dist/render/globalbindgroup_allocator.js.map +1 -1
  160. package/dist/render/hzb.js +1 -2
  161. package/dist/render/hzb.js.map +1 -1
  162. package/dist/render/lightpass.js +13 -13
  163. package/dist/render/lightpass.js.map +1 -1
  164. package/dist/render/objectcolorpass.js +4 -7
  165. package/dist/render/objectcolorpass.js.map +1 -1
  166. package/dist/render/primitive.js +4 -5
  167. package/dist/render/primitive.js.map +1 -1
  168. package/dist/render/render_queue.js +10 -5
  169. package/dist/render/render_queue.js.map +1 -1
  170. package/dist/render/renderer.js +16 -22
  171. package/dist/render/renderer.js.map +1 -1
  172. package/dist/render/renderpass.js +27 -52
  173. package/dist/render/renderpass.js.map +1 -1
  174. package/dist/render/rendertarget.js +5 -0
  175. package/dist/render/rendertarget.js.map +1 -0
  176. package/dist/render/screenrendertarget.js +56 -0
  177. package/dist/render/screenrendertarget.js.map +1 -0
  178. package/dist/render/shadowmap_pass.js +4 -5
  179. package/dist/render/shadowmap_pass.js.map +1 -1
  180. package/dist/render/sky.js +16 -14
  181. package/dist/render/sky.js.map +1 -1
  182. package/dist/render/weightedblended_oit.js.map +1 -1
  183. package/dist/scene/basesprite.js +296 -0
  184. package/dist/scene/basesprite.js.map +1 -0
  185. package/dist/scene/batchgroup.js +4 -2
  186. package/dist/scene/batchgroup.js.map +1 -1
  187. package/dist/scene/environment.js +9 -10
  188. package/dist/scene/environment.js.map +1 -1
  189. package/dist/scene/graph_node.js.map +1 -1
  190. package/dist/scene/light.js +22 -4
  191. package/dist/scene/light.js.map +1 -1
  192. package/dist/scene/mesh.js +93 -15
  193. package/dist/scene/mesh.js.map +1 -1
  194. package/dist/scene/octree.js.map +1 -1
  195. package/dist/scene/particlesys.js +25 -22
  196. package/dist/scene/particlesys.js.map +1 -1
  197. package/dist/scene/raycast_visitor.js +0 -16
  198. package/dist/scene/raycast_visitor.js.map +1 -1
  199. package/dist/scene/scene.js +7 -4
  200. package/dist/scene/scene.js.map +1 -1
  201. package/dist/scene/scene_node.js +20 -35
  202. package/dist/scene/scene_node.js.map +1 -1
  203. package/dist/scene/sprite.js +18 -0
  204. package/dist/scene/sprite.js.map +1 -0
  205. package/dist/scene/sprite3d.js +18 -0
  206. package/dist/scene/sprite3d.js.map +1 -0
  207. package/dist/scene/terrain-cm/grass.js +5 -4
  208. package/dist/scene/terrain-cm/grass.js.map +1 -1
  209. package/dist/scene/terrain-cm/grassmaterial.js +3 -1
  210. package/dist/scene/terrain-cm/grassmaterial.js.map +1 -1
  211. package/dist/scene/terrain-cm/terrain-cm.js +65 -48
  212. package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
  213. package/dist/scene/water.js +35 -30
  214. package/dist/scene/water.js.map +1 -1
  215. package/dist/shaders/atmosphere.js +17 -29
  216. package/dist/shaders/atmosphere.js.map +1 -1
  217. package/dist/shaders/fog.js.map +1 -1
  218. package/dist/shaders/misc.js.map +1 -1
  219. package/dist/shaders/noise.js.map +1 -1
  220. package/dist/shaders/pbr.js.map +1 -1
  221. package/dist/shaders/shadow.js.map +1 -1
  222. package/dist/shaders/ssr.js.map +1 -1
  223. package/dist/shaders/temporal.js.map +1 -1
  224. package/dist/shaders/water.js.map +1 -1
  225. package/dist/shadow/esm.js +1 -1
  226. package/dist/shadow/esm.js.map +1 -1
  227. package/dist/shadow/pcf_opt.js.map +1 -1
  228. package/dist/shadow/pcf_pd.js.map +1 -1
  229. package/dist/shadow/shader.js +3 -1
  230. package/dist/shadow/shader.js.map +1 -1
  231. package/dist/shadow/shadow_impl.js.map +1 -1
  232. package/dist/shadow/shadowmapper.js +6 -18
  233. package/dist/shadow/shadowmapper.js.map +1 -1
  234. package/dist/shadow/ssm.js.map +1 -1
  235. package/dist/shadow/vsm.js.map +1 -1
  236. package/dist/shapes/box.js +9 -3
  237. package/dist/shapes/box.js.map +1 -1
  238. package/dist/shapes/cylinder.js +2 -2
  239. package/dist/shapes/cylinder.js.map +1 -1
  240. package/dist/shapes/plane.js +2 -2
  241. package/dist/shapes/plane.js.map +1 -1
  242. package/dist/shapes/shape.js +2 -1
  243. package/dist/shapes/shape.js.map +1 -1
  244. package/dist/shapes/sphere.js +2 -2
  245. package/dist/shapes/sphere.js.map +1 -1
  246. package/dist/shapes/tetrahedron.js +5 -6
  247. package/dist/shapes/tetrahedron.js.map +1 -1
  248. package/dist/shapes/torus.js +2 -2
  249. package/dist/shapes/torus.js.map +1 -1
  250. package/dist/utility/aabbtree.js +1 -1
  251. package/dist/utility/aabbtree.js.map +1 -1
  252. package/dist/utility/blueprint/common/constants.js +578 -104
  253. package/dist/utility/blueprint/common/constants.js.map +1 -1
  254. package/dist/utility/blueprint/common/math.js +471 -9
  255. package/dist/utility/blueprint/common/math.js.map +1 -1
  256. package/dist/utility/blueprint/common.js +1 -1
  257. package/dist/utility/blueprint/common.js.map +1 -1
  258. package/dist/utility/blueprint/material/func.js +9 -5
  259. package/dist/utility/blueprint/material/func.js.map +1 -1
  260. package/dist/utility/blueprint/material/inputs.js.map +1 -1
  261. package/dist/utility/blueprint/material/ir.js +288 -80
  262. package/dist/utility/blueprint/material/ir.js.map +1 -1
  263. package/dist/utility/blueprint/material/pbr.js +92 -4
  264. package/dist/utility/blueprint/material/pbr.js.map +1 -1
  265. package/dist/utility/blueprint/material/texture.js +62 -45
  266. package/dist/utility/blueprint/material/texture.js.map +1 -1
  267. package/dist/utility/blueprint/node.js +28 -1
  268. package/dist/utility/blueprint/node.js.map +1 -1
  269. package/dist/utility/bounding_volume.js.map +1 -1
  270. package/dist/utility/debug.js.map +1 -1
  271. package/dist/utility/draco/decoder.js.map +1 -1
  272. package/dist/utility/misc.js +1 -1
  273. package/dist/utility/misc.js.map +1 -1
  274. package/dist/utility/panorama.js.map +1 -1
  275. package/dist/utility/pmrem.js.map +1 -1
  276. package/dist/utility/rendermipmap.js.map +1 -1
  277. package/dist/utility/serialization/json.js +19 -15
  278. package/dist/utility/serialization/json.js.map +1 -1
  279. package/dist/utility/serialization/manager.js +89 -22
  280. package/dist/utility/serialization/manager.js.map +1 -1
  281. package/dist/utility/serialization/scene/animation.js +23 -21
  282. package/dist/utility/serialization/scene/animation.js.map +1 -1
  283. package/dist/utility/serialization/scene/batch.js +4 -3
  284. package/dist/utility/serialization/scene/batch.js.map +1 -1
  285. package/dist/utility/serialization/scene/camera.js +97 -9
  286. package/dist/utility/serialization/scene/camera.js.map +1 -1
  287. package/dist/utility/serialization/scene/common.js +102 -28
  288. package/dist/utility/serialization/scene/common.js.map +1 -1
  289. package/dist/utility/serialization/scene/light.js +14 -12
  290. package/dist/utility/serialization/scene/light.js.map +1 -1
  291. package/dist/utility/serialization/scene/material.js +154 -26
  292. package/dist/utility/serialization/scene/material.js.map +1 -1
  293. package/dist/utility/serialization/scene/mesh.js +71 -100
  294. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  295. package/dist/utility/serialization/scene/misc.js +3 -2
  296. package/dist/utility/serialization/scene/misc.js.map +1 -1
  297. package/dist/utility/serialization/scene/node.js +42 -9
  298. package/dist/utility/serialization/scene/node.js.map +1 -1
  299. package/dist/utility/serialization/scene/particle.js +7 -5
  300. package/dist/utility/serialization/scene/particle.js.map +1 -1
  301. package/dist/utility/serialization/scene/primitive.js +18 -15
  302. package/dist/utility/serialization/scene/primitive.js.map +1 -1
  303. package/dist/utility/serialization/scene/scene.js +3 -2
  304. package/dist/utility/serialization/scene/scene.js.map +1 -1
  305. package/dist/utility/serialization/scene/sprite.js +164 -0
  306. package/dist/utility/serialization/scene/sprite.js.map +1 -0
  307. package/dist/utility/serialization/scene/terrain.js +8 -6
  308. package/dist/utility/serialization/scene/terrain.js.map +1 -1
  309. package/dist/utility/serialization/scene/water.js +11 -9
  310. package/dist/utility/serialization/scene/water.js.map +1 -1
  311. package/dist/utility/serialization/types.js +6 -0
  312. package/dist/utility/serialization/types.js.map +1 -0
  313. package/dist/utility/shprojector.js.map +1 -1
  314. package/dist/utility/textures/ggxlut.js.map +1 -1
  315. package/dist/utility/textures/gradientnoise.js.map +1 -1
  316. package/dist/utility/textures/randomnoise.js.map +1 -1
  317. package/dist/values.js +14 -14
  318. package/dist/values.js.map +1 -1
  319. package/package.json +80 -80
@@ -1 +1 @@
1
- {"version":3,"file":"func.js","sources":["../../../../src/utility/blueprint/material/func.ts"],"sourcesContent":["import type { SerializableClass, ResourceManager } from '../../serialization';\r\nimport { BaseGraphNode } from '../node';\r\nimport type { MaterialBlueprintIR } from './ir';\r\n\r\n/**\r\n * Function call node for material blueprint functions\r\n *\r\n * @remarks\r\n * Represents a call to a reusable material function (sub-graph) within the material node graph.\r\n * Functions are defined in separate blueprint files and can be instantiated multiple times.\r\n *\r\n * The node automatically:\r\n * - Discovers function inputs (FunctionInputNode) and creates corresponding input slots\r\n * - Discovers function outputs (FunctionOutputNode) and creates corresponding output slots\r\n * - Validates input types match the function's parameter types\r\n *\r\n * Benefits of using material functions:\r\n * - Code reuse across multiple materials\r\n * - Encapsulation of complex logic\r\n * - Easier maintenance (update function once, affects all uses)\r\n * - Better organization of large material graphs\r\n *\r\n * @example\r\n * ```typescript\r\n * // Load and instantiate a custom noise function\r\n * const noiseIR = await manager.loadBluePrint('functions/noise.mtlfunc');\r\n * const noiseCall = new FunctionCallNode(\r\n * 'functions/noise.mtlfunc',\r\n * 'noise',\r\n * noiseIR\r\n * );\r\n *\r\n * // Connect inputs\r\n * noiseCall.connectInput(1, uvNode, 1); // UV coordinates\r\n * noiseCall.connectInput(2, scaleNode, 1); // Scale parameter\r\n *\r\n * // Use outputs\r\n * colorNode.connectInput(1, noiseCall, 1); // Noise result\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class FunctionCallNode extends BaseGraphNode {\r\n /** The file path to the function blueprint */\r\n private _name: string;\r\n /** The file path to the function blueprint */\r\n private _path: string;\r\n /** The intermediate representation (compiled graph) of the function */\r\n private _IR: MaterialBlueprintIR;\r\n /** Function input parameters with their indices, names, and types */\r\n private _args: { index: number; name: string; type: string }[];\r\n /** Function output values with their indices, names, and types */\r\n private _outs: { index: number; name: string; type: string }[];\r\n /**\r\n * Creates a new function call node\r\n *\r\n * @param path - The file path to the function blueprint\r\n * @param name - The display name of the function\r\n * @param IR - The compiled intermediate representation of the function\r\n *\r\n * @remarks\r\n * The constructor scans the function's IR to:\r\n * 1. Find all FunctionInputNode instances and create input slots\r\n * 2. Find all FunctionOutputNode instances and create output slots\r\n * 3. Extract parameter names and types for validation\r\n *\r\n * Input/output slots are created in the order they appear in the nodeMap,\r\n * using either custom names or auto-generated names like 'arg_N' or 'out_N'.\r\n */\r\n constructor(path: string, name: string, IR: MaterialBlueprintIR) {\r\n super();\r\n this._path = path;\r\n this._name = name;\r\n this._IR = IR;\r\n this._args = [];\r\n this._outs = [];\r\n this._inputs = [];\r\n this._outputs = [];\r\n for (const k of Object.keys(this._IR.DAG.nodeMap)) {\r\n const node = this._IR.DAG.nodeMap[k];\r\n if (node instanceof FunctionInputNode) {\r\n const name = node.name || `arg_${k}`;\r\n this._args.push({\r\n index: Number(k),\r\n name,\r\n type: node.type\r\n });\r\n this._inputs.push({\r\n id: this._inputs.length + 1,\r\n name,\r\n type: [node.type]\r\n });\r\n } else if (node instanceof FunctionOutputNode) {\r\n const name = node.name || `out_${k}`;\r\n this._outs.push({\r\n index: Number(k),\r\n name,\r\n type: node.type\r\n });\r\n this._outputs.push({\r\n id: this._outputs.length + 1,\r\n name,\r\n swizzle: name\r\n });\r\n }\r\n }\r\n }\r\n /**\r\n * Gets the file path to the function blueprint\r\n */\r\n get path() {\r\n return this._path;\r\n }\r\n /**\r\n * Gets the function name\r\n */\r\n get name() {\r\n return this._name;\r\n }\r\n /**\r\n * Gets the intermediate representation (IR) of the function\r\n *\r\n * @remarks\r\n * The IR contains the compiled node graph that will be inlined\r\n * or called during shader code generation.\r\n */\r\n get IR() {\r\n return this._IR;\r\n }\r\n /**\r\n * Gets the function's input parameter definitions\r\n *\r\n * @returns Array of parameter descriptors with index, name, and type\r\n */\r\n get args() {\r\n return this._args;\r\n }\r\n /**\r\n * Gets the function's output value definitions\r\n *\r\n * @returns Array of output descriptors with index, name, and type\r\n */\r\n get outs() {\r\n return this._outs;\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @param manager - The serialization manager for loading blueprints\r\n * @returns Serialization class descriptor\r\n *\r\n * @remarks\r\n * Uses a custom createFunc to asynchronously load the function blueprint\r\n * from the file system. The initialization parameter is the blueprint path.\r\n */\r\n static getSerializationCls(manager: ResourceManager): SerializableClass {\r\n return {\r\n ctor: FunctionCallNode,\r\n name: 'FunctionCallNode',\r\n async createFunc(_, init: string) {\r\n const IR = await manager.loadBluePrint(init);\r\n const funcName = manager.VFS.basename(init, manager.VFS.extname(init));\r\n return { obj: new FunctionCallNode(init, funcName, IR['func']) };\r\n },\r\n getInitParams(obj: FunctionCallNode) {\r\n return obj.path;\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 The function name\r\n */\r\n toString() {\r\n return this._name;\r\n }\r\n /**\r\n * Validates the node state and input types\r\n *\r\n * @returns Error message if invalid, empty string if valid\r\n *\r\n * @remarks\r\n * Ensures:\r\n * - All required inputs are connected\r\n * - Input types can be determined\r\n * - Input types match the function's parameter types\r\n */\r\n protected validate(): string {\r\n for (let i = 0; i < this._inputs.length; i++) {\r\n const name = this._inputs[i].name;\r\n if (!this._inputs[i].inputNode) {\r\n return `Missing argument \\`${name}\\``;\r\n }\r\n const type = this._inputs[i].inputNode.getOutputType(this._inputs[i].inputId);\r\n if (!type) {\r\n return `Cannot determine type of argument \\`${name}\\``;\r\n }\r\n if (!this._inputs[i].type.includes(type)) {\r\n return `Invalid input type ${type}`;\r\n }\r\n }\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 (1-based)\r\n * @returns The type of the output value\r\n *\r\n * @remarks\r\n * Returns the type declared by the corresponding FunctionOutputNode\r\n * in the function's blueprint.\r\n */\r\n protected getType(id: number): string {\r\n return this._outs[id - 1].type;\r\n }\r\n}\r\n\r\n/**\r\n * Function input parameter node\r\n *\r\n * @remarks\r\n * Represents an input parameter in a material function blueprint.\r\n * These nodes define the function's interface - what data must be provided\r\n * when the function is called from another material graph.\r\n *\r\n * Each FunctionInputNode:\r\n * - Has a name (parameter name)\r\n * - Has a type (float, vec2, vec3, vec4, mat2, mat3, or mat4)\r\n * - Produces one output that provides the parameter value within the function\r\n * - Has no inputs (it receives its value from the calling context)\r\n *\r\n * When a FunctionCallNode is created, it scans for all FunctionInputNodes\r\n * and creates corresponding input slots on the call node.\r\n *\r\n * @example\r\n * ```typescript\r\n * // In a function blueprint:\r\n * const uvInput = new FunctionInputNode();\r\n * uvInput.name = 'uv';\r\n * uvInput.type = 'vec2';\r\n *\r\n * const scaleInput = new FunctionInputNode();\r\n * scaleInput.name = 'scale';\r\n * scaleInput.type = 'float';\r\n *\r\n * // These will become inputs on any FunctionCallNode that uses this blueprint\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class FunctionInputNode extends BaseGraphNode {\r\n /** Static counter for auto-generating unique argument names */\r\n static argId = 1;\r\n /** The data type of this parameter */\r\n private _type: string;\r\n /**\r\n * Creates a new function input node\r\n *\r\n * @remarks\r\n * Initializes with:\r\n * - Default type: vec4\r\n * - Auto-generated name: arg_N (where N is an incrementing counter)\r\n * - One output slot to provide the parameter value within the function\r\n */\r\n constructor() {\r\n super();\r\n this._type = 'vec4';\r\n this._outputs = [{ id: 1, name: `arg_${FunctionInputNode.argId++}` }];\r\n }\r\n /**\r\n * Gets the parameter type\r\n *\r\n * @returns The data type (float, vec2, vec3, vec4, mat2, mat3, or mat4)\r\n */\r\n get type() {\r\n return this._type;\r\n }\r\n /**\r\n * Gets the parameter name\r\n *\r\n * @returns The parameter name used in function calls\r\n */\r\n get name() {\r\n return this._outputs[0].name;\r\n }\r\n set name(val: string) {\r\n if (val) {\r\n this._outputs[0].name = val;\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 * @remarks\r\n * Serializes the parameter type and name. The type has an enumeration\r\n * constraint limited to valid shader types.\r\n */\r\n static getSerializationCls(): SerializableClass {\r\n return {\r\n ctor: FunctionInputNode,\r\n name: 'FunctionInputNode',\r\n getProps() {\r\n return [\r\n {\r\n name: 'type',\r\n type: 'string',\r\n options: {\r\n enum: {\r\n labels: ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4'],\r\n values: ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4']\r\n }\r\n },\r\n get(this: FunctionInputNode, value) {\r\n value.str[0] = this._type;\r\n },\r\n set(this: FunctionInputNode, value) {\r\n this._type = value.str[0];\r\n }\r\n },\r\n {\r\n name: 'name',\r\n type: 'string',\r\n get(this: FunctionInputNode, value) {\r\n value.str[0] = this.name;\r\n },\r\n set(this: FunctionInputNode, value) {\r\n this.name = value.str[0];\r\n }\r\n }\r\n ];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'FunctionInput'\r\n */\r\n toString() {\r\n return 'FunctionInput';\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 * Function input nodes have no validation requirements as they\r\n * have no inputs and their type is explicitly set.\r\n */\r\n protected validate(): string {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns The parameter type\r\n */\r\n protected getType(): string {\r\n return this._type;\r\n }\r\n}\r\n\r\n/**\r\n * Function output value node\r\n *\r\n * @remarks\r\n * Represents an output value in a material function blueprint.\r\n * These nodes define what data the function returns to its caller.\r\n *\r\n * Each FunctionOutputNode:\r\n * - Has a name (output value name)\r\n * - Has one input that must be connected to compute the output value\r\n * - Automatically determines its type from the connected input\r\n * - Has no outputs (it provides its value to the calling context)\r\n *\r\n * When a FunctionCallNode is created, it scans for all FunctionOutputNodes\r\n * and creates corresponding output slots on the call node.\r\n *\r\n * A function can have multiple outputs to return different related values\r\n * (e.g., a noise function might return both noise value and derivative).\r\n *\r\n * @example\r\n * ```typescript\r\n * // In a function blueprint:\r\n * const resultOutput = new FunctionOutputNode();\r\n * resultOutput.name = 'result';\r\n * resultOutput.connectInput(1, computeNode, 1);\r\n *\r\n * const normalOutput = new FunctionOutputNode();\r\n * normalOutput.name = 'normal';\r\n * normalOutput.connectInput(1, normalNode, 1);\r\n *\r\n * // When called, the FunctionCallNode will have two outputs:\r\n * // - Output 1: result (type determined by computeNode)\r\n * // - Output 2: normal (type determined by normalNode)\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class FunctionOutputNode extends BaseGraphNode {\r\n /** Static counter for auto-generating unique output names */\r\n static outId = 1;\r\n /**\r\n * Creates a new function output node\r\n *\r\n * @remarks\r\n * Initializes with:\r\n * - Auto-generated name: out_N (where N is an incrementing counter)\r\n * - One input slot that accepts any standard shader type\r\n * - Type is inferred from the connected input node\r\n */\r\n constructor() {\r\n super();\r\n this._inputs = [\r\n {\r\n id: 1,\r\n name: `out_${FunctionOutputNode.outId++}`,\r\n type: ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4']\r\n }\r\n ];\r\n }\r\n /**\r\n * Gets the output value name\r\n *\r\n * @returns The output name used in function calls\r\n */\r\n get name() {\r\n return this._inputs[0].name;\r\n }\r\n set name(val: string) {\r\n if (val) {\r\n this._inputs[0].name = val;\r\n }\r\n }\r\n /**\r\n * Gets the output value type\r\n *\r\n * @returns The data type inferred from the connected input\r\n *\r\n * @remarks\r\n * This is a convenience accessor that calls getType().\r\n */\r\n get type() {\r\n return this.getType();\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 * @remarks\r\n * Only serializes the output name. The type is inferred at runtime\r\n * from the connected input node.\r\n */\r\n static getSerializationCls(): SerializableClass {\r\n return {\r\n ctor: FunctionOutputNode,\r\n name: 'FunctionOutputNode',\r\n getProps() {\r\n return [\r\n {\r\n name: 'name',\r\n type: 'string',\r\n get(this: FunctionOutputNode, value) {\r\n value.str[0] = this.name;\r\n },\r\n set(this: FunctionOutputNode, value) {\r\n this.name = value.str[0];\r\n }\r\n }\r\n ];\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'FunctionOutput'\r\n */\r\n toString() {\r\n return 'FunctionOutput';\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Error message if invalid, empty string if valid\r\n *\r\n * @remarks\r\n * Ensures:\r\n * - The input is connected (function must return a value)\r\n * - The input type can be determined\r\n */\r\n protected validate(): string {\r\n if (!this._inputs[0].inputNode) {\r\n return 'Missing result';\r\n }\r\n const type = this._inputs[0].inputNode.getOutputType(this._inputs[0].inputId);\r\n if (!type) {\r\n return 'Cannot determin result type';\r\n }\r\n return '';\r\n }\r\n /**\r\n * Gets the output type based on the connected input\r\n *\r\n * @returns The type from the connected input node, or empty string if not connected\r\n *\r\n * @remarks\r\n * The output type is dynamically determined by tracing back through\r\n * the connected input to find its source type. This allows functions\r\n * to work with multiple types without explicit type declarations.\r\n */\r\n protected getType(): string {\r\n return this._inputs[0].inputNode ? this._inputs[0].inputNode.getOutputType(this._inputs[0].inputId) : '';\r\n }\r\n}\r\n"],"names":["FunctionCallNode","BaseGraphNode","path","name","IR","_path","_name","_IR","_args","_outs","_inputs","_outputs","k","Object","keys","DAG","nodeMap","node","FunctionInputNode","push","index","Number","type","id","length","FunctionOutputNode","swizzle","args","outs","getSerializationCls","manager","ctor","createFunc","_","init","loadBluePrint","funcName","VFS","basename","extname","obj","getInitParams","getProps","toString","i","inputNode","getOutputType","inputId","includes","getType","argId","_type","val","options","enum","labels","values","get","value","str","set","outId"],"mappings":";;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsCO,MAAMA,gBAAyBC,SAAAA,aAAAA,CAAAA;mDAEpC,KAAsB;mDAEtB,K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AAA,IAAI,CAACvD,IAAI,GAAGuD,KAAMC,CAAAA,GAAG,CAAC,CAAE,CAAA;AAC1B;AACF;AACD,iBAAA;AACH;AACF,SAAA;AACF;AACA;;;;AAIC,MACDhB,QAAW,GAAA;QACT,OAAO,gBAAA;AACT;AACA;;;;;;;;;AASC,MACD,QAA6B,GAAA;QAC3B,IAAI,CAAC,IAAI,CAACjC,OAAO,CAAC,CAAE,CAAA,CAACmC,SAAS,EAAE;YAC9B,OAAO,gBAAA;AACT;AACA,QAAA,MAAMvB,OAAO,IAAI,CAACZ,OAAO,CAAC,EAAE,CAACmC,SAAS,CAACC,aAAa,CAAC,IAAI,CAACpC,OAAO,CAAC,CAAA,CAAE,CAACqC,OAAO,CAAA;AAC5E,QAAA,IAAI,CAACzB,IAAM,EAAA;YACT,OAAO,6BAAA;AACT;QACA,OAAO,EAAA;AACT;AACA;;;;;;;;;AASC,MACD,OAA4B,GAAA;QAC1B,OAAO,IAAI,CAACZ,OAAO,CAAC,CAAA,CAAE,CAACmC,SAAS,GAAG,IAAI,CAACnC,OAAO,CAAC,EAAE,CAACmC,SAAS,CAACC,aAAa,CAAC,IAAI,CAACpC,OAAO,CAAC,CAAA,CAAE,CAACqC,OAAO,CAAI,GAAA,EAAA;AACxG;AACF;;;;"}
1
+ {"version":3,"file":"func.js","sources":["../../../../src/utility/blueprint/material/func.ts"],"sourcesContent":["import { objectKeys } from '@zephyr3d/base';\r\nimport type { ResourceManager } from '../../serialization';\r\nimport { defineProps } from '../../serialization/types';\r\nimport { BaseGraphNode } from '../node';\r\nimport type { MaterialBlueprintIR } from './ir';\r\n\r\n/**\r\n * Function call node for material blueprint functions\r\n *\r\n * @remarks\r\n * Represents a call to a reusable material function (sub-graph) within the material node graph.\r\n * Functions are defined in separate blueprint files and can be instantiated multiple times.\r\n *\r\n * The node automatically:\r\n * - Discovers function inputs (FunctionInputNode) and creates corresponding input slots\r\n * - Discovers function outputs (FunctionOutputNode) and creates corresponding output slots\r\n * - Validates input types match the function's parameter types\r\n *\r\n * Benefits of using material functions:\r\n * - Code reuse across multiple materials\r\n * - Encapsulation of complex logic\r\n * - Easier maintenance (update function once, affects all uses)\r\n * - Better organization of large material graphs\r\n *\r\n * @example\r\n * ```typescript\r\n * // Load and instantiate a custom noise function\r\n * const noiseIR = await manager.loadBluePrint('functions/noise.mtlfunc');\r\n * const noiseCall = new FunctionCallNode(\r\n * 'functions/noise.mtlfunc',\r\n * 'noise',\r\n * noiseIR\r\n * );\r\n *\r\n * // Connect inputs\r\n * noiseCall.connectInput(1, uvNode, 1); // UV coordinates\r\n * noiseCall.connectInput(2, scaleNode, 1); // Scale parameter\r\n *\r\n * // Use outputs\r\n * colorNode.connectInput(1, noiseCall, 1); // Noise result\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class FunctionCallNode extends BaseGraphNode {\r\n /** The file path to the function blueprint */\r\n private _name: string;\r\n /** The file path to the function blueprint */\r\n private _path: string;\r\n /** The intermediate representation (compiled graph) of the function */\r\n private _IR: MaterialBlueprintIR;\r\n /** Function input parameters with their indices, names, and types */\r\n private _args: { index: number; name: string; type: string }[];\r\n /** Function output values with their indices, names, and types */\r\n private _outs: { index: number; name: string; type: string }[];\r\n /**\r\n * Creates a new function call node\r\n *\r\n * @param path - The file path to the function blueprint\r\n * @param name - The display name of the function\r\n * @param IR - The compiled intermediate representation of the function\r\n *\r\n * @remarks\r\n * The constructor scans the function's IR to:\r\n * 1. Find all FunctionInputNode instances and create input slots\r\n * 2. Find all FunctionOutputNode instances and create output slots\r\n * 3. Extract parameter names and types for validation\r\n *\r\n * Input/output slots are created in the order they appear in the nodeMap,\r\n * using either custom names or auto-generated names like 'arg_N' or 'out_N'.\r\n */\r\n constructor(path: string, name: string, IR: MaterialBlueprintIR) {\r\n super();\r\n this._path = path;\r\n this._name = name;\r\n this._IR = IR;\r\n this._args = [];\r\n this._outs = [];\r\n this._inputs = [];\r\n this._outputs = [];\r\n for (const k of objectKeys(this._IR.DAG.nodeMap)) {\r\n const node = this._IR.DAG.nodeMap[k];\r\n if (node instanceof FunctionInputNode) {\r\n const name = node.name || `arg_${k}`;\r\n this._args.push({\r\n index: Number(k),\r\n name,\r\n type: node.type\r\n });\r\n this._inputs.push({\r\n id: this._inputs.length + 1,\r\n name,\r\n type: [node.type]\r\n });\r\n } else if (node instanceof FunctionOutputNode) {\r\n const name = node.name || `out_${k}`;\r\n this._outs.push({\r\n index: Number(k),\r\n name,\r\n type: node.type\r\n });\r\n this._outputs.push({\r\n id: this._outputs.length + 1,\r\n name,\r\n swizzle: name\r\n });\r\n }\r\n }\r\n }\r\n /**\r\n * Gets the file path to the function blueprint\r\n */\r\n get path() {\r\n return this._path;\r\n }\r\n /**\r\n * Gets the function name\r\n */\r\n get name() {\r\n return this._name;\r\n }\r\n /**\r\n * Gets the intermediate representation (IR) of the function\r\n *\r\n * @remarks\r\n * The IR contains the compiled node graph that will be inlined\r\n * or called during shader code generation.\r\n */\r\n get IR() {\r\n return this._IR;\r\n }\r\n /**\r\n * Gets the function's input parameter definitions\r\n *\r\n * @returns Array of parameter descriptors with index, name, and type\r\n */\r\n get args() {\r\n return this._args;\r\n }\r\n /**\r\n * Gets the function's output value definitions\r\n *\r\n * @returns Array of output descriptors with index, name, and type\r\n */\r\n get outs() {\r\n return this._outs;\r\n }\r\n /**\r\n * Gets the serialization descriptor for this node type\r\n *\r\n * @param manager - The serialization manager for loading blueprints\r\n * @returns Serialization class descriptor\r\n *\r\n * @remarks\r\n * Uses a custom createFunc to asynchronously load the function blueprint\r\n * from the file system. The initialization parameter is the blueprint path.\r\n */\r\n static getSerializationCls(manager: ResourceManager) {\r\n return {\r\n ctor: FunctionCallNode,\r\n name: 'FunctionCallNode',\r\n async createFunc(_: unknown, init: string) {\r\n const IR = await manager.loadBluePrint(init);\r\n const funcName = manager.VFS.basename(init, manager.VFS.extname(init));\r\n return { obj: new FunctionCallNode(init, funcName, IR!['func']) };\r\n },\r\n getInitParams(obj: FunctionCallNode) {\r\n return obj.path;\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 The function name\r\n */\r\n toString() {\r\n return this._name;\r\n }\r\n /**\r\n * Validates the node state and input types\r\n *\r\n * @returns Error message if invalid, empty string if valid\r\n *\r\n * @remarks\r\n * Ensures:\r\n * - All required inputs are connected\r\n * - Input types can be determined\r\n * - Input types match the function's parameter types\r\n */\r\n protected validate() {\r\n for (let i = 0; i < this._inputs.length; i++) {\r\n const name = this._inputs[i].name;\r\n if (!this._inputs[i].inputNode) {\r\n return `Missing argument \\`${name}\\``;\r\n }\r\n const type = this._inputs[i].inputNode!.getOutputType(this._inputs[i].inputId!);\r\n if (!type) {\r\n return `Cannot determine type of argument \\`${name}\\``;\r\n }\r\n if (!this._inputs[i].type.includes(type)) {\r\n return `Invalid input type ${type}`;\r\n }\r\n }\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 (1-based)\r\n * @returns The type of the output value\r\n *\r\n * @remarks\r\n * Returns the type declared by the corresponding FunctionOutputNode\r\n * in the function's blueprint.\r\n */\r\n protected getType(id: number) {\r\n return this._outs[id - 1].type;\r\n }\r\n}\r\n\r\n/**\r\n * Function input parameter node\r\n *\r\n * @remarks\r\n * Represents an input parameter in a material function blueprint.\r\n * These nodes define the function's interface - what data must be provided\r\n * when the function is called from another material graph.\r\n *\r\n * Each FunctionInputNode:\r\n * - Has a name (parameter name)\r\n * - Has a type (float, vec2, vec3, vec4, mat2, mat3, or mat4)\r\n * - Produces one output that provides the parameter value within the function\r\n * - Has no inputs (it receives its value from the calling context)\r\n *\r\n * When a FunctionCallNode is created, it scans for all FunctionInputNodes\r\n * and creates corresponding input slots on the call node.\r\n *\r\n * @example\r\n * ```typescript\r\n * // In a function blueprint:\r\n * const uvInput = new FunctionInputNode();\r\n * uvInput.name = 'uv';\r\n * uvInput.type = 'vec2';\r\n *\r\n * const scaleInput = new FunctionInputNode();\r\n * scaleInput.name = 'scale';\r\n * scaleInput.type = 'float';\r\n *\r\n * // These will become inputs on any FunctionCallNode that uses this blueprint\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class FunctionInputNode extends BaseGraphNode {\r\n /** Static counter for auto-generating unique argument names */\r\n static argId = 1;\r\n /** The data type of this parameter */\r\n private _type: string;\r\n /**\r\n * Creates a new function input node\r\n *\r\n * @remarks\r\n * Initializes with:\r\n * - Default type: vec4\r\n * - Auto-generated name: arg_N (where N is an incrementing counter)\r\n * - One output slot to provide the parameter value within the function\r\n */\r\n constructor() {\r\n super();\r\n this._type = 'vec4';\r\n this._outputs = [{ id: 1, name: `arg_${FunctionInputNode.argId++}` }];\r\n }\r\n /**\r\n * Gets the parameter type\r\n *\r\n * @returns The data type (float, vec2, vec3, vec4, mat2, mat3, or mat4)\r\n */\r\n get type() {\r\n return this._type;\r\n }\r\n /**\r\n * Gets the parameter name\r\n *\r\n * @returns The parameter name used in function calls\r\n */\r\n get name() {\r\n return this._outputs[0].name;\r\n }\r\n set name(val: string) {\r\n if (val) {\r\n this._outputs[0].name = val;\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 * @remarks\r\n * Serializes the parameter type and name. The type has an enumeration\r\n * constraint limited to valid shader types.\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: FunctionInputNode,\r\n name: 'FunctionInputNode',\r\n getProps() {\r\n return defineProps([\r\n {\r\n name: 'type',\r\n type: 'string',\r\n options: {\r\n enum: {\r\n labels: ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4'],\r\n values: ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4']\r\n }\r\n },\r\n get(this: FunctionInputNode, value) {\r\n value.str[0] = this._type;\r\n },\r\n set(this: FunctionInputNode, value) {\r\n this._type = value.str[0];\r\n }\r\n },\r\n {\r\n name: 'name',\r\n type: 'string',\r\n get(this: FunctionInputNode, value) {\r\n value.str[0] = this.name;\r\n },\r\n set(this: FunctionInputNode, value) {\r\n this.name = value.str[0];\r\n this.dispatchEvent('changed');\r\n }\r\n }\r\n ]);\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'FunctionInput'\r\n */\r\n toString() {\r\n return 'FunctionInput';\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 * Function input nodes have no validation requirements as they\r\n * have no inputs and their type is explicitly set.\r\n */\r\n protected validate() {\r\n return '';\r\n }\r\n /**\r\n * Gets the output type\r\n *\r\n * @returns The parameter type\r\n */\r\n protected getType() {\r\n return this._type;\r\n }\r\n}\r\n\r\n/**\r\n * Function output value node\r\n *\r\n * @remarks\r\n * Represents an output value in a material function blueprint.\r\n * These nodes define what data the function returns to its caller.\r\n *\r\n * Each FunctionOutputNode:\r\n * - Has a name (output value name)\r\n * - Has one input that must be connected to compute the output value\r\n * - Automatically determines its type from the connected input\r\n * - Has no outputs (it provides its value to the calling context)\r\n *\r\n * When a FunctionCallNode is created, it scans for all FunctionOutputNodes\r\n * and creates corresponding output slots on the call node.\r\n *\r\n * A function can have multiple outputs to return different related values\r\n * (e.g., a noise function might return both noise value and derivative).\r\n *\r\n * @example\r\n * ```typescript\r\n * // In a function blueprint:\r\n * const resultOutput = new FunctionOutputNode();\r\n * resultOutput.name = 'result';\r\n * resultOutput.connectInput(1, computeNode, 1);\r\n *\r\n * const normalOutput = new FunctionOutputNode();\r\n * normalOutput.name = 'normal';\r\n * normalOutput.connectInput(1, normalNode, 1);\r\n *\r\n * // When called, the FunctionCallNode will have two outputs:\r\n * // - Output 1: result (type determined by computeNode)\r\n * // - Output 2: normal (type determined by normalNode)\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class FunctionOutputNode extends BaseGraphNode {\r\n /** Static counter for auto-generating unique output names */\r\n static outId = 1;\r\n /**\r\n * Creates a new function output node\r\n *\r\n * @remarks\r\n * Initializes with:\r\n * - Auto-generated name: out_N (where N is an incrementing counter)\r\n * - One input slot that accepts any standard shader type\r\n * - Type is inferred from the connected input node\r\n */\r\n constructor() {\r\n super();\r\n this._inputs = [\r\n {\r\n id: 1,\r\n name: `out_${FunctionOutputNode.outId++}`,\r\n type: ['float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4']\r\n }\r\n ];\r\n }\r\n /**\r\n * Gets the output value name\r\n *\r\n * @returns The output name used in function calls\r\n */\r\n get name() {\r\n return this._inputs[0].name;\r\n }\r\n set name(val: string) {\r\n if (val) {\r\n this._inputs[0].name = val;\r\n }\r\n }\r\n /**\r\n * Gets the output value type\r\n *\r\n * @returns The data type inferred from the connected input\r\n *\r\n * @remarks\r\n * This is a convenience accessor that calls getType().\r\n */\r\n get type() {\r\n return this.getType();\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 * @remarks\r\n * Only serializes the output name. The type is inferred at runtime\r\n * from the connected input node.\r\n */\r\n static getSerializationCls() {\r\n return {\r\n ctor: FunctionOutputNode,\r\n name: 'FunctionOutputNode',\r\n getProps() {\r\n return defineProps([\r\n {\r\n name: 'name',\r\n type: 'string',\r\n get(this: FunctionOutputNode, value) {\r\n value.str[0] = this.name;\r\n },\r\n set(this: FunctionOutputNode, value) {\r\n this.name = value.str[0];\r\n this.dispatchEvent('changed');\r\n }\r\n }\r\n ]);\r\n }\r\n };\r\n }\r\n /**\r\n * Generates a string representation of this node\r\n *\r\n * @returns 'FunctionOutput'\r\n */\r\n toString() {\r\n return 'FunctionOutput';\r\n }\r\n /**\r\n * Validates the node state\r\n *\r\n * @returns Error message if invalid, empty string if valid\r\n *\r\n * @remarks\r\n * Ensures:\r\n * - The input is connected (function must return a value)\r\n * - The input type can be determined\r\n */\r\n protected validate() {\r\n if (!this._inputs[0].inputNode) {\r\n return 'Missing result';\r\n }\r\n const type = this._inputs[0].inputNode.getOutputType(this._inputs[0].inputId!);\r\n if (!type) {\r\n return 'Cannot determin result type';\r\n }\r\n return '';\r\n }\r\n /**\r\n * Gets the output type based on the connected input\r\n *\r\n * @returns The type from the connected input node, or empty string if not connected\r\n *\r\n * @remarks\r\n * The output type is dynamically determined by tracing back through\r\n * the connected input to find its source type. This allows functions\r\n * to work with multiple types without explicit type declarations.\r\n */\r\n protected getType() {\r\n return this._inputs[0].inputNode ? this._inputs[0].inputNode.getOutputType(this._inputs[0].inputId!) : '';\r\n }\r\n}\r\n"],"names":["FunctionCallNode","BaseGraphNode","path","name","IR","_path","_name","_IR","_args","_outs","_inputs","_outputs","k","objectKeys","DAG","nodeMap","node","FunctionInputNode","push","index","Number","type","id","length","FunctionOutputNode","swizzle","args","outs","getSerializationCls","manager","ctor","createFunc","_","init","loadBluePrint","funcName","VFS","basename","extname","obj","getInitParams","getProps","toString","i","inputNode","getOutputType","inputId","includes","getType","argId","_type","val","defineProps","options","enum","labels","values","get","value","str","set","dispatchEvent","outId"],"mappings":";;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsCO,MAAMA,gBAAyBC,SAAAA,aAAAA,CAAAA;mDAEpC,KAAsB;mDAEtB,KAAsB;4EAEtB,GAAiC;0EAEjC,KAA+D;uEAE/D,KAA+D;AAC/D;;;;;;;;;;;;;;;AAeC,MACD,YAAYC,IAAY,EAAEC,IAAY,EAAEC,EAAuB,CAAE;QAC/D,KAAK,EAAA;QACL,IAAI,CAACC,KAAK,GAAGH,IAAAA;QACb,IAAI,CAACI,KAAK,GAAGH,IAAAA;QACb,IAAI,CAACI,GAAG,GAAGH,EAAAA;QACX,IAAI,CAACI,KAAK,GAAG,EAAE;QACf,IAAI,CAACC,KAAK,GAAG,EAAE;QACf,IAAI,CAACC,OAAO,GAAG,EAAE;QACjB,IAAI,CAACC,QAAQ,GAAG,EAAE;QAClB,KAAK,MAAMC,CAAKC,IAAAA,UAAAA,CAAW,IAAI,CAACN,GAAG,CAACO,GAAG,CAACC,OA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a,CAAC,IAAI,CAACnC,OAAO,CAAC,CAAA,CAAE,CAACoC,OAAO,CAAA;AAC5E,QAAA,IAAI,CAACzB,IAAM,EAAA;YACT,OAAO,6BAAA;AACT;QACA,OAAO,EAAA;AACT;AACA;;;;;;;;;AASC,MACD,OAAoB,GAAA;QAClB,OAAO,IAAI,CAACX,OAAO,CAAC,CAAA,CAAE,CAACkC,SAAS,GAAG,IAAI,CAAClC,OAAO,CAAC,EAAE,CAACkC,SAAS,CAACC,aAAa,CAAC,IAAI,CAACnC,OAAO,CAAC,CAAA,CAAE,CAACoC,OAAO,CAAK,GAAA,EAAA;AACzG;AACF;;;;"}
@@ -1 +1 @@
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 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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\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(): SerializableClass {\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(): string {\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(): string {\r\n return 'vec4';\r\n }\r\n}\r\n"],"names":["VertexColorNode","BaseGraphNode","_outputs","id","name","swizzle","getSerializationCls","ctor","getProps","toString","getType","VertexUVNode","VertexPositionNode","VertexNormalNode","VertexTangentNode","VertexBinormalNode","ProjectionMatrixNode","ViewMatrixNode","ViewProjMatrixNode","InvProjMatrixNode","InvViewProjMatrixNode","BillboardMatrixNode","ElapsedTimeNode","CameraPositionNode","SkyEnvTextureNode","CameraNearFarNode","ResolveVertexPositionNode","ResolveVertexNormalNode","ResolveVertexTangentNode"],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgCO,MAAMA,eAAwBC,SAAAA,aAAAA,CAAAA;AACnC;;;;;AAKC,MACD,WAAc,EAAA;QACZ,KAAK,EAAA;QACL,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;gB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,QAA6B,GAAA;QAC3B,OAAO,EAAA;AACT;AACA;;;;AAIC,MACD,OAA4B,GAAA;QAC1B,OAAO,MAAA;AACT;AACF;;;;"}
1
+ {"version":3,"file":"inputs.js","sources":["../../../../src/utility/blueprint/material/inputs.ts"],"sourcesContent":["import { BaseGraphNode } from '../node';\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 * 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 * 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 * 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":["VertexColorNode","BaseGraphNode","_outputs","id","name","swizzle","getSerializationCls","ctor","getProps","toString","getType","VertexUVNode","VertexPositionNode","VertexNormalNode","VertexTangentNode","VertexBinormalNode","ProjectionMatrixNode","ViewMatrixNode","ViewProjMatrixNode","InvProjMatrixNode","InvViewProjMatrixNode","BillboardMatrixNode","ElapsedTimeNode","CameraPositionNode","SkyEnvTextureNode","CameraNearFarNode","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