@zephyr3d/scene 0.7.0 → 0.8.0

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 (368) hide show
  1. package/dist/animation/animation.js +4 -33
  2. package/dist/animation/animation.js.map +1 -1
  3. package/dist/animation/animationset.js +24 -11
  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/ik/ccd_solver.js +372 -0
  10. package/dist/animation/ik/ccd_solver.js.map +1 -0
  11. package/dist/animation/ik/fabrik_solver.js +399 -0
  12. package/dist/animation/ik/fabrik_solver.js.map +1 -0
  13. package/dist/animation/ik/ik_angle_constraint.js +181 -0
  14. package/dist/animation/ik/ik_angle_constraint.js.map +1 -0
  15. package/dist/animation/ik/ik_chain.js +163 -0
  16. package/dist/animation/ik/ik_chain.js.map +1 -0
  17. package/dist/animation/ik/ik_chain_builder.js +68 -0
  18. package/dist/animation/ik/ik_chain_builder.js.map +1 -0
  19. package/dist/animation/ik/ik_constraint.js +25 -0
  20. package/dist/animation/ik/ik_constraint.js.map +1 -0
  21. package/dist/animation/ik/ik_pole_constraint.js +123 -0
  22. package/dist/animation/ik/ik_pole_constraint.js.map +1 -0
  23. package/dist/animation/ik/ik_solver.js +48 -0
  24. package/dist/animation/ik/ik_solver.js.map +1 -0
  25. package/dist/animation/ik/ik_track.js +96 -0
  26. package/dist/animation/ik/ik_track.js.map +1 -0
  27. package/dist/animation/ik/ik_utils.js +270 -0
  28. package/dist/animation/ik/ik_utils.js.map +1 -0
  29. package/dist/animation/ik/two_bone_ik_solver.js +332 -0
  30. package/dist/animation/ik/two_bone_ik_solver.js.map +1 -0
  31. package/dist/animation/ik_modifier.js +61 -0
  32. package/dist/animation/ik_modifier.js.map +1 -0
  33. package/dist/animation/ik_postprocessor.js +71 -0
  34. package/dist/animation/ik_postprocessor.js.map +1 -0
  35. package/dist/animation/manual_transform_processor.js +156 -0
  36. package/dist/animation/manual_transform_processor.js.map +1 -0
  37. package/dist/animation/morphtarget.js +7 -1
  38. package/dist/animation/morphtarget.js.map +1 -1
  39. package/dist/animation/morphtrack.js +3 -3
  40. package/dist/animation/morphtrack.js.map +1 -1
  41. package/dist/animation/proptrack.js +37 -41
  42. package/dist/animation/proptrack.js.map +1 -1
  43. package/dist/animation/rotationtrack.js +0 -1
  44. package/dist/animation/rotationtrack.js.map +1 -1
  45. package/dist/animation/scaletrack.js +0 -1
  46. package/dist/animation/scaletrack.js.map +1 -1
  47. package/dist/animation/skeleton.js +57 -60
  48. package/dist/animation/skeleton.js.map +1 -1
  49. package/dist/animation/skeleton_modifier.js +38 -0
  50. package/dist/animation/skeleton_modifier.js.map +1 -0
  51. package/dist/animation/skeleton_postprocessor.js +50 -0
  52. package/dist/animation/skeleton_postprocessor.js.map +1 -0
  53. package/dist/animation/spring/multi_chain_spring_system.js +503 -0
  54. package/dist/animation/spring/multi_chain_spring_system.js.map +1 -0
  55. package/dist/animation/spring/spring_chain.js +103 -0
  56. package/dist/animation/spring/spring_chain.js.map +1 -0
  57. package/dist/animation/spring/spring_collider.js +247 -0
  58. package/dist/animation/spring/spring_collider.js.map +1 -0
  59. package/dist/animation/spring/spring_constraint.js +21 -0
  60. package/dist/animation/spring/spring_constraint.js.map +1 -0
  61. package/dist/animation/spring/spring_particle.js +20 -0
  62. package/dist/animation/spring/spring_particle.js.map +1 -0
  63. package/dist/animation/spring/spring_system.js +526 -0
  64. package/dist/animation/spring/spring_system.js.map +1 -0
  65. package/dist/animation/spring_modifier.js +45 -0
  66. package/dist/animation/spring_modifier.js.map +1 -0
  67. package/dist/animation/spring_postprocessor.js +54 -0
  68. package/dist/animation/spring_postprocessor.js.map +1 -0
  69. package/dist/animation/translationtrack.js +0 -1
  70. package/dist/animation/translationtrack.js.map +1 -1
  71. package/dist/app/api.js +13 -4
  72. package/dist/app/api.js.map +1 -1
  73. package/dist/app/app.js +13 -1
  74. package/dist/app/app.js.map +1 -1
  75. package/dist/app/engine.js +33 -45
  76. package/dist/app/engine.js.map +1 -1
  77. package/dist/app/inputmgr.js.map +1 -1
  78. package/dist/app/runtimescript.js.map +1 -1
  79. package/dist/app/screen.js +318 -0
  80. package/dist/app/screen.js.map +1 -0
  81. package/dist/app/scriptingsystem.js +10 -6
  82. package/dist/app/scriptingsystem.js.map +1 -1
  83. package/dist/app/scriptregistry.js +11 -22
  84. package/dist/app/scriptregistry.js.map +1 -1
  85. package/dist/asset/assetmanager.js +79 -58
  86. package/dist/asset/assetmanager.js.map +1 -1
  87. package/dist/asset/builtin.js +5 -5
  88. package/dist/asset/builtin.js.map +1 -1
  89. package/dist/asset/loaders/dds/dds.js +6 -2
  90. package/dist/asset/loaders/dds/dds.js.map +1 -1
  91. package/dist/asset/loaders/dds/dds_loader.js +1 -1
  92. package/dist/asset/loaders/dds/dds_loader.js.map +1 -1
  93. package/dist/asset/loaders/gltf/gltf_loader.js +14 -6
  94. package/dist/asset/loaders/gltf/gltf_loader.js.map +1 -1
  95. package/dist/asset/loaders/gltf/helpers.js +6 -2
  96. package/dist/asset/loaders/gltf/helpers.js.map +1 -1
  97. package/dist/asset/loaders/hdr/hdr.js +22 -15
  98. package/dist/asset/loaders/hdr/hdr.js.map +1 -1
  99. package/dist/asset/loaders/image/tga_Loader.js +2 -1
  100. package/dist/asset/loaders/image/tga_Loader.js.map +1 -1
  101. package/dist/asset/loaders/image/webimage_loader.js.map +1 -1
  102. package/dist/asset/loaders/loader.js +2 -2
  103. package/dist/asset/loaders/loader.js.map +1 -1
  104. package/dist/asset/model.js +9 -5
  105. package/dist/asset/model.js.map +1 -1
  106. package/dist/blitter/bilateralblur.js.map +1 -1
  107. package/dist/blitter/blitter.js +9 -11
  108. package/dist/blitter/blitter.js.map +1 -1
  109. package/dist/blitter/box.js +0 -1
  110. package/dist/blitter/box.js.map +1 -1
  111. package/dist/blitter/copy.js.map +1 -1
  112. package/dist/blitter/gaussianblur.js.map +1 -1
  113. package/dist/camera/base.js +1 -3
  114. package/dist/camera/base.js.map +1 -1
  115. package/dist/camera/camera.js +121 -37
  116. package/dist/camera/camera.js.map +1 -1
  117. package/dist/camera/fps.js +19 -17
  118. package/dist/camera/fps.js.map +1 -1
  119. package/dist/camera/orbit.js +45 -43
  120. package/dist/camera/orbit.js.map +1 -1
  121. package/dist/camera/orthocamera.js +27 -21
  122. package/dist/camera/orthocamera.js.map +1 -1
  123. package/dist/camera/perspectivecamera.js +28 -19
  124. package/dist/camera/perspectivecamera.js.map +1 -1
  125. package/dist/index.d.ts +15802 -15577
  126. package/dist/index.js +33 -11
  127. package/dist/index.js.map +1 -1
  128. package/dist/material/blinn.js.map +1 -1
  129. package/dist/material/grassmaterial.js.map +1 -1
  130. package/dist/material/lambert.js.map +1 -1
  131. package/dist/material/material.js +11 -5
  132. package/dist/material/material.js.map +1 -1
  133. package/dist/material/meshmaterial.js +10 -9
  134. package/dist/material/meshmaterial.js.map +1 -1
  135. package/dist/material/mixins/albedocolor.js.map +1 -1
  136. package/dist/material/mixins/foliage.js.map +1 -1
  137. package/dist/material/mixins/lightmodel/blinnphong.js +66 -4
  138. package/dist/material/mixins/lightmodel/blinnphong.js.map +1 -1
  139. package/dist/material/mixins/lightmodel/lambert.js.map +1 -1
  140. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js +7 -0
  141. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js.map +1 -1
  142. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  143. package/dist/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -1
  144. package/dist/material/mixins/lit.js +3 -3
  145. package/dist/material/mixins/lit.js.map +1 -1
  146. package/dist/material/mixins/pbr/brdf.js.map +1 -1
  147. package/dist/material/mixins/pbr/common.js.map +1 -1
  148. package/dist/material/mixins/texture.js +3 -0
  149. package/dist/material/mixins/texture.js.map +1 -1
  150. package/dist/material/mixins/vertexcolor.js.map +1 -1
  151. package/dist/material/particle.js.map +1 -1
  152. package/dist/material/pbrblueprint.js +180 -22
  153. package/dist/material/pbrblueprint.js.map +1 -1
  154. package/dist/material/pbrmr.js.map +1 -1
  155. package/dist/material/pbrsg.js.map +1 -1
  156. package/dist/material/shader/helper.js +41 -56
  157. package/dist/material/shader/helper.js.map +1 -1
  158. package/dist/material/sprite.js +301 -0
  159. package/dist/material/sprite.js.map +1 -0
  160. package/dist/material/sprite3d.js +301 -0
  161. package/dist/material/sprite3d.js.map +1 -0
  162. package/dist/material/sprite3d_std.js +116 -0
  163. package/dist/material/sprite3d_std.js.map +1 -0
  164. package/dist/material/sprite3dblueprint.js +235 -0
  165. package/dist/material/sprite3dblueprint.js.map +1 -0
  166. package/dist/material/sprite_std.js +116 -0
  167. package/dist/material/sprite_std.js.map +1 -0
  168. package/dist/material/spriteblueprint.js +235 -0
  169. package/dist/material/spriteblueprint.js.map +1 -0
  170. package/dist/material/terrain-cm.js +0 -1
  171. package/dist/material/terrain-cm.js.map +1 -1
  172. package/dist/material/unlit.js.map +1 -1
  173. package/dist/material/water.js.map +1 -1
  174. package/dist/posteffect/bloom.js.map +1 -1
  175. package/dist/posteffect/compositor.js.map +1 -1
  176. package/dist/posteffect/fxaa.js.map +1 -1
  177. package/dist/posteffect/grayscale.js.map +1 -1
  178. package/dist/posteffect/motionblur.js.map +1 -1
  179. package/dist/posteffect/posteffect.js.map +1 -1
  180. package/dist/posteffect/sao.js.map +1 -1
  181. package/dist/posteffect/ssr.js +7 -5
  182. package/dist/posteffect/ssr.js.map +1 -1
  183. package/dist/posteffect/taa.js.map +1 -1
  184. package/dist/posteffect/tonemap.js.map +1 -1
  185. package/dist/render/abuffer_oit.js +8 -6
  186. package/dist/render/abuffer_oit.js.map +1 -1
  187. package/dist/render/clipmap.js +0 -10
  188. package/dist/render/clipmap.js.map +1 -1
  189. package/dist/render/cluster_light.js +4 -4
  190. package/dist/render/cluster_light.js.map +1 -1
  191. package/dist/render/cull_visitor.js +15 -17
  192. package/dist/render/cull_visitor.js.map +1 -1
  193. package/dist/render/depthpass.js +3 -4
  194. package/dist/render/depthpass.js.map +1 -1
  195. package/dist/render/drawable.js +15 -0
  196. package/dist/render/drawable.js.map +1 -0
  197. package/dist/render/drawable_mixin.js +8 -4
  198. package/dist/render/drawable_mixin.js.map +1 -1
  199. package/dist/render/envlight.js.map +1 -1
  200. package/dist/render/fbm_wavegenerator.js +3 -1
  201. package/dist/render/fbm_wavegenerator.js.map +1 -1
  202. package/dist/render/fft_wavegenerator.js +67 -64
  203. package/dist/render/fft_wavegenerator.js.map +1 -1
  204. package/dist/render/fullscreenquad.js.map +1 -1
  205. package/dist/render/gerstner_wavegenerator.js +3 -1
  206. package/dist/render/gerstner_wavegenerator.js.map +1 -1
  207. package/dist/render/globalbindgroup_allocator.js +3 -1
  208. package/dist/render/globalbindgroup_allocator.js.map +1 -1
  209. package/dist/render/hzb.js +1 -2
  210. package/dist/render/hzb.js.map +1 -1
  211. package/dist/render/lightpass.js +13 -13
  212. package/dist/render/lightpass.js.map +1 -1
  213. package/dist/render/objectcolorpass.js +4 -7
  214. package/dist/render/objectcolorpass.js.map +1 -1
  215. package/dist/render/primitive.js +4 -5
  216. package/dist/render/primitive.js.map +1 -1
  217. package/dist/render/render_queue.js +10 -5
  218. package/dist/render/render_queue.js.map +1 -1
  219. package/dist/render/renderer.js +16 -22
  220. package/dist/render/renderer.js.map +1 -1
  221. package/dist/render/renderpass.js +27 -52
  222. package/dist/render/renderpass.js.map +1 -1
  223. package/dist/render/rendertarget.js +5 -0
  224. package/dist/render/rendertarget.js.map +1 -0
  225. package/dist/render/screenrendertarget.js +56 -0
  226. package/dist/render/screenrendertarget.js.map +1 -0
  227. package/dist/render/shadowmap_pass.js +4 -5
  228. package/dist/render/shadowmap_pass.js.map +1 -1
  229. package/dist/render/sky.js +16 -14
  230. package/dist/render/sky.js.map +1 -1
  231. package/dist/render/weightedblended_oit.js.map +1 -1
  232. package/dist/scene/basesprite.js +296 -0
  233. package/dist/scene/basesprite.js.map +1 -0
  234. package/dist/scene/batchgroup.js +4 -2
  235. package/dist/scene/batchgroup.js.map +1 -1
  236. package/dist/scene/environment.js +9 -10
  237. package/dist/scene/environment.js.map +1 -1
  238. package/dist/scene/graph_node.js.map +1 -1
  239. package/dist/scene/light.js +22 -4
  240. package/dist/scene/light.js.map +1 -1
  241. package/dist/scene/mesh.js +96 -26
  242. package/dist/scene/mesh.js.map +1 -1
  243. package/dist/scene/octree.js.map +1 -1
  244. package/dist/scene/particlesys.js +25 -22
  245. package/dist/scene/particlesys.js.map +1 -1
  246. package/dist/scene/raycast_visitor.js +0 -16
  247. package/dist/scene/raycast_visitor.js.map +1 -1
  248. package/dist/scene/scene.js +7 -4
  249. package/dist/scene/scene.js.map +1 -1
  250. package/dist/scene/scene_node.js +20 -35
  251. package/dist/scene/scene_node.js.map +1 -1
  252. package/dist/scene/sprite.js +18 -0
  253. package/dist/scene/sprite.js.map +1 -0
  254. package/dist/scene/sprite3d.js +18 -0
  255. package/dist/scene/sprite3d.js.map +1 -0
  256. package/dist/scene/terrain-cm/grass.js +5 -4
  257. package/dist/scene/terrain-cm/grass.js.map +1 -1
  258. package/dist/scene/terrain-cm/grassmaterial.js +3 -1
  259. package/dist/scene/terrain-cm/grassmaterial.js.map +1 -1
  260. package/dist/scene/terrain-cm/terrain-cm.js +65 -48
  261. package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
  262. package/dist/scene/water.js +35 -30
  263. package/dist/scene/water.js.map +1 -1
  264. package/dist/shaders/atmosphere.js +17 -29
  265. package/dist/shaders/atmosphere.js.map +1 -1
  266. package/dist/shaders/fog.js.map +1 -1
  267. package/dist/shaders/misc.js.map +1 -1
  268. package/dist/shaders/noise.js.map +1 -1
  269. package/dist/shaders/pbr.js.map +1 -1
  270. package/dist/shaders/shadow.js.map +1 -1
  271. package/dist/shaders/ssr.js.map +1 -1
  272. package/dist/shaders/temporal.js.map +1 -1
  273. package/dist/shaders/water.js.map +1 -1
  274. package/dist/shadow/esm.js +1 -1
  275. package/dist/shadow/esm.js.map +1 -1
  276. package/dist/shadow/pcf_opt.js.map +1 -1
  277. package/dist/shadow/pcf_pd.js.map +1 -1
  278. package/dist/shadow/shader.js +3 -1
  279. package/dist/shadow/shader.js.map +1 -1
  280. package/dist/shadow/shadow_impl.js.map +1 -1
  281. package/dist/shadow/shadowmapper.js +6 -18
  282. package/dist/shadow/shadowmapper.js.map +1 -1
  283. package/dist/shadow/ssm.js.map +1 -1
  284. package/dist/shadow/vsm.js.map +1 -1
  285. package/dist/shapes/box.js +9 -3
  286. package/dist/shapes/box.js.map +1 -1
  287. package/dist/shapes/cylinder.js +2 -2
  288. package/dist/shapes/cylinder.js.map +1 -1
  289. package/dist/shapes/plane.js +2 -2
  290. package/dist/shapes/plane.js.map +1 -1
  291. package/dist/shapes/shape.js +2 -1
  292. package/dist/shapes/shape.js.map +1 -1
  293. package/dist/shapes/sphere.js +2 -2
  294. package/dist/shapes/sphere.js.map +1 -1
  295. package/dist/shapes/tetrahedron.js +5 -6
  296. package/dist/shapes/tetrahedron.js.map +1 -1
  297. package/dist/shapes/torus.js +2 -2
  298. package/dist/shapes/torus.js.map +1 -1
  299. package/dist/utility/aabbtree.js +1 -1
  300. package/dist/utility/aabbtree.js.map +1 -1
  301. package/dist/utility/blueprint/common/constants.js +578 -104
  302. package/dist/utility/blueprint/common/constants.js.map +1 -1
  303. package/dist/utility/blueprint/common/math.js +471 -9
  304. package/dist/utility/blueprint/common/math.js.map +1 -1
  305. package/dist/utility/blueprint/common.js +1 -1
  306. package/dist/utility/blueprint/common.js.map +1 -1
  307. package/dist/utility/blueprint/material/func.js +9 -5
  308. package/dist/utility/blueprint/material/func.js.map +1 -1
  309. package/dist/utility/blueprint/material/inputs.js.map +1 -1
  310. package/dist/utility/blueprint/material/ir.js +288 -80
  311. package/dist/utility/blueprint/material/ir.js.map +1 -1
  312. package/dist/utility/blueprint/material/pbr.js +92 -4
  313. package/dist/utility/blueprint/material/pbr.js.map +1 -1
  314. package/dist/utility/blueprint/material/texture.js +62 -45
  315. package/dist/utility/blueprint/material/texture.js.map +1 -1
  316. package/dist/utility/blueprint/node.js +28 -1
  317. package/dist/utility/blueprint/node.js.map +1 -1
  318. package/dist/utility/bounding_volume.js.map +1 -1
  319. package/dist/utility/debug.js.map +1 -1
  320. package/dist/utility/draco/decoder.js.map +1 -1
  321. package/dist/utility/misc.js +1 -1
  322. package/dist/utility/misc.js.map +1 -1
  323. package/dist/utility/panorama.js.map +1 -1
  324. package/dist/utility/pmrem.js.map +1 -1
  325. package/dist/utility/rendermipmap.js.map +1 -1
  326. package/dist/utility/serialization/json.js +19 -15
  327. package/dist/utility/serialization/json.js.map +1 -1
  328. package/dist/utility/serialization/manager.js +89 -22
  329. package/dist/utility/serialization/manager.js.map +1 -1
  330. package/dist/utility/serialization/scene/animation.js +44 -41
  331. package/dist/utility/serialization/scene/animation.js.map +1 -1
  332. package/dist/utility/serialization/scene/batch.js +4 -3
  333. package/dist/utility/serialization/scene/batch.js.map +1 -1
  334. package/dist/utility/serialization/scene/camera.js +97 -9
  335. package/dist/utility/serialization/scene/camera.js.map +1 -1
  336. package/dist/utility/serialization/scene/common.js +102 -28
  337. package/dist/utility/serialization/scene/common.js.map +1 -1
  338. package/dist/utility/serialization/scene/light.js +14 -12
  339. package/dist/utility/serialization/scene/light.js.map +1 -1
  340. package/dist/utility/serialization/scene/material.js +216 -26
  341. package/dist/utility/serialization/scene/material.js.map +1 -1
  342. package/dist/utility/serialization/scene/mesh.js +71 -100
  343. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  344. package/dist/utility/serialization/scene/misc.js +3 -2
  345. package/dist/utility/serialization/scene/misc.js.map +1 -1
  346. package/dist/utility/serialization/scene/node.js +42 -9
  347. package/dist/utility/serialization/scene/node.js.map +1 -1
  348. package/dist/utility/serialization/scene/particle.js +7 -5
  349. package/dist/utility/serialization/scene/particle.js.map +1 -1
  350. package/dist/utility/serialization/scene/primitive.js +18 -15
  351. package/dist/utility/serialization/scene/primitive.js.map +1 -1
  352. package/dist/utility/serialization/scene/scene.js +3 -2
  353. package/dist/utility/serialization/scene/scene.js.map +1 -1
  354. package/dist/utility/serialization/scene/sprite.js +164 -0
  355. package/dist/utility/serialization/scene/sprite.js.map +1 -0
  356. package/dist/utility/serialization/scene/terrain.js +8 -6
  357. package/dist/utility/serialization/scene/terrain.js.map +1 -1
  358. package/dist/utility/serialization/scene/water.js +11 -9
  359. package/dist/utility/serialization/scene/water.js.map +1 -1
  360. package/dist/utility/serialization/types.js +6 -0
  361. package/dist/utility/serialization/types.js.map +1 -0
  362. package/dist/utility/shprojector.js.map +1 -1
  363. package/dist/utility/textures/ggxlut.js.map +1 -1
  364. package/dist/utility/textures/gradientnoise.js.map +1 -1
  365. package/dist/utility/textures/randomnoise.js.map +1 -1
  366. package/dist/values.js +14 -14
  367. package/dist/values.js.map +1 -1
  368. package/package.json +80 -80
@@ -1,30 +1,10 @@
1
+ import { defineProps } from '../../serialization/types.js';
1
2
  import { getParamName } from '../common.js';
2
3
  import { BaseGraphNode } from '../node.js';
3
4
 
4
5
  /**
5
6
  * Constant scalar (float) value node
6
7
  *
7
- * @remarks
8
- * Represents a single floating-point constant in the material graph.
9
- * Can be either a literal constant or exposed as a uniform parameter.
10
- *
11
- * When set as uniform:
12
- * - Generates a shader uniform variable
13
- * - Can be modified at runtime without recompiling the shader
14
- * - Useful for material parameters like roughness, metallic, etc.
15
- *
16
- * When set as literal:
17
- * - Value is baked into the shader code
18
- * - More efficient but requires shader recompilation to change
19
- *
20
- * @example
21
- * ```typescript
22
- * const roughness = new ConstantScalarNode();
23
- * roughness.x = 0.5;
24
- * roughness.isUniform = true;
25
- * roughness.paramName = 'u_roughness';
26
- * ```
27
- *
28
8
  * @public
29
9
  */ class ConstantScalarNode extends BaseGraphNode {
30
10
  /** The scalar float value */ _value;
@@ -70,7 +50,7 @@ import { BaseGraphNode } from '../node.js';
70
50
  ctor: ConstantScalarNode,
71
51
  name: 'ConstantScalarNode',
72
52
  getProps () {
73
- return [
53
+ return defineProps([
74
54
  {
75
55
  name: 'isUniform',
76
56
  type: 'bool',
@@ -85,10 +65,14 @@ import { BaseGraphNode } from '../node.js';
85
65
  name: 'paramName',
86
66
  type: 'string',
87
67
  get (value) {
88
- value.str[0] = this.paramName;
68
+ value.str[0] = this.paramName ? this.paramName.slice(2) : '';
89
69
  },
90
70
  set (value) {
91
- this.paramName = value.str[0];
71
+ if (!/^[A-Za-z0-9_]+$/.test(value.str[0])) {
72
+ console.log(`Invalid parameter name: ${value.str[0]}`);
73
+ } else {
74
+ this.paramName = `u_${value.str[0]}`;
75
+ }
92
76
  }
93
77
  },
94
78
  {
@@ -101,7 +85,7 @@ import { BaseGraphNode } from '../node.js';
101
85
  this.x = value.num[0];
102
86
  }
103
87
  }
104
- ];
88
+ ]);
105
89
  }
106
90
  };
107
91
  }
@@ -124,7 +108,7 @@ import { BaseGraphNode } from '../node.js';
124
108
  return this._paramName;
125
109
  }
126
110
  set paramName(val) {
127
- if (val !== this.paramName) {
111
+ if (this._paramName !== val) {
128
112
  this._paramName = val;
129
113
  this.dispatchEvent('changed');
130
114
  }
@@ -159,25 +143,95 @@ import { BaseGraphNode } from '../node.js';
159
143
  }
160
144
  }
161
145
  /**
162
- * Constant 2D vector (vec2) value node
163
- *
164
- * @remarks
165
- * Represents a 2-component vector constant (e.g., UV coordinates, 2D positions).
166
- * Provides multiple output slots:
167
- * - Output 1: The full vec2 value
168
- * - Output 2: The x component (swizzle)
169
- * - Output 3: The y component (swizzle)
146
+ * Constant scalar (bool) value node
170
147
  *
171
- * Can be exposed as a uniform parameter for runtime modification.
172
- *
173
- * @example
174
- * ```typescript
175
- * const offset = new ConstantVec2Node();
176
- * offset.x = 0.5;
177
- * offset.y = 0.5;
178
- * offset.isUniform = true;
179
- * offset.paramName = 'u_uvOffset';
180
- * ```
148
+ * @public
149
+ */ class ConstantBooleanNode extends BaseGraphNode {
150
+ /** The scalar boolean value */ _value;
151
+ /**
152
+ * Creates a new constant boolean node
153
+ *
154
+ * @remarks
155
+ * Initializes with a value of false and a single unnamed output slot.
156
+ */ constructor(){
157
+ super();
158
+ this._value = false;
159
+ this._outputs = [
160
+ {
161
+ id: 1,
162
+ name: ''
163
+ }
164
+ ];
165
+ }
166
+ /**
167
+ * Generates a string representation of this node
168
+ *
169
+ * @returns The parameter name if uniform, otherwise the rounded numeric value
170
+ *
171
+ * @remarks
172
+ * Values are rounded to 3 decimal places for display purposes.
173
+ */ toString() {
174
+ return String(this._value);
175
+ }
176
+ /**
177
+ * Gets the serialization descriptor for this node type
178
+ *
179
+ * @returns Serialization class descriptor with property definitions
180
+ *
181
+ * @remarks
182
+ * Used by the serialization system to save/load node graphs.
183
+ * Defines how to serialize the isUniform flag, parameter name, and value.
184
+ */ static getSerializationCls() {
185
+ return {
186
+ ctor: ConstantBooleanNode,
187
+ name: 'ConstantBooleanNode',
188
+ getProps () {
189
+ return defineProps([
190
+ {
191
+ name: 'x',
192
+ type: 'bool',
193
+ get (value) {
194
+ value.bool[0] = this.x;
195
+ },
196
+ set (value) {
197
+ this.x = value.bool[0];
198
+ }
199
+ }
200
+ ]);
201
+ }
202
+ };
203
+ }
204
+ /**
205
+ * Gets the scalar value
206
+ */ get x() {
207
+ return this._value;
208
+ }
209
+ set x(val) {
210
+ if (!!val !== this._value) {
211
+ this._value = !!val;
212
+ this.dispatchEvent('changed');
213
+ }
214
+ }
215
+ /**
216
+ * Validates the node state
217
+ *
218
+ * @returns Empty string (always valid)
219
+ *
220
+ * @remarks
221
+ * Constant nodes have no validation requirements.
222
+ */ validate() {
223
+ return '';
224
+ }
225
+ /**
226
+ * Gets the output type for this node
227
+ *
228
+ * @returns 'bool' for scalar output
229
+ */ getType() {
230
+ return 'bool';
231
+ }
232
+ }
233
+ /**
234
+ * Constant 2D vector (vec2) value node
181
235
  *
182
236
  * @public
183
237
  */ class ConstantVec2Node extends BaseGraphNode {
@@ -244,7 +298,7 @@ import { BaseGraphNode } from '../node.js';
244
298
  return this._paramName;
245
299
  }
246
300
  set paramName(val) {
247
- if (val !== this._paramName) {
301
+ if (this._paramName !== val) {
248
302
  this._paramName = val;
249
303
  this.dispatchEvent('changed');
250
304
  }
@@ -283,7 +337,7 @@ import { BaseGraphNode } from '../node.js';
283
337
  ctor: ConstantVec2Node,
284
338
  name: 'ConstantVec2Node',
285
339
  getProps () {
286
- return [
340
+ return defineProps([
287
341
  {
288
342
  name: 'isUniform',
289
343
  type: 'bool',
@@ -298,10 +352,14 @@ import { BaseGraphNode } from '../node.js';
298
352
  name: 'paramName',
299
353
  type: 'string',
300
354
  get (value) {
301
- value.str[0] = this.paramName;
355
+ value.str[0] = this.paramName ? this.paramName.slice(2) : '';
302
356
  },
303
357
  set (value) {
304
- this.paramName = value.str[0];
358
+ if (!/^[A-Za-z0-9_]+$/.test(value.str[0])) {
359
+ console.log(`Invalid parameter name: ${value.str[0]}`);
360
+ } else {
361
+ this.paramName = `u_${value.str[0]}`;
362
+ }
305
363
  }
306
364
  },
307
365
  {
@@ -324,7 +382,7 @@ import { BaseGraphNode } from '../node.js';
324
382
  this.y = value.num[0];
325
383
  }
326
384
  }
327
- ];
385
+ ]);
328
386
  }
329
387
  };
330
388
  }
@@ -348,28 +406,130 @@ import { BaseGraphNode } from '../node.js';
348
406
  }
349
407
  }
350
408
  /**
351
- * Constant 3D vector (vec3) value node
352
- *
353
- * @remarks
354
- * Represents a 3-component vector constant (e.g., RGB colors, 3D positions, normals).
355
- * Provides multiple output slots:
356
- * - Output 1: The full vec3 value
357
- * - Output 2: The x component (swizzle)
358
- * - Output 3: The y component (swizzle)
359
- * - Output 4: The z component (swizzle)
409
+ * Constant 2D boolean vector (bvec2) value node
360
410
  *
361
- * Includes special 'rgb' serialization property for color picker integration.
362
- * Can be exposed as a uniform parameter for runtime modification.
363
- *
364
- * @example
365
- * ```typescript
366
- * const color = new ConstantVec3Node();
367
- * color.x = 1.0; // Red
368
- * color.y = 0.0; // Green
369
- * color.z = 0.0; // Blue
370
- * color.isUniform = true;
371
- * color.paramName = 'u_baseColor';
372
- * ```
411
+ * @public
412
+ */ class ConstantBVec2Node extends BaseGraphNode {
413
+ /** The 2D vector value [x, y] */ _value;
414
+ /**
415
+ * Creates a new constant bvec2 node
416
+ *
417
+ * @remarks
418
+ * Initializes with [false, false] and creates output slots for the full vector
419
+ * and individual components.
420
+ */ constructor(){
421
+ super();
422
+ this._value = [
423
+ false,
424
+ false
425
+ ];
426
+ this._outputs = [
427
+ {
428
+ id: 1,
429
+ name: ''
430
+ },
431
+ {
432
+ id: 2,
433
+ name: 'x',
434
+ swizzle: 'x'
435
+ },
436
+ {
437
+ id: 3,
438
+ name: 'y',
439
+ swizzle: 'y'
440
+ }
441
+ ];
442
+ }
443
+ /**
444
+ * Generates a string representation of this node
445
+ *
446
+ * @returns The parameter name if uniform, otherwise comma-separated values
447
+ *
448
+ * @remarks
449
+ * Values are rounded to 3 decimal places for display purposes.
450
+ */ toString() {
451
+ return `${String(this._value[0])},${String(this._value[1])}`;
452
+ }
453
+ /**
454
+ * Gets the x component of the vector
455
+ */ get x() {
456
+ return this._value[0];
457
+ }
458
+ set x(val) {
459
+ if (!!val !== this._value[0]) {
460
+ this._value[0] = !!val;
461
+ this.dispatchEvent('changed');
462
+ }
463
+ }
464
+ /**
465
+ * Gets the y component of the vector
466
+ */ get y() {
467
+ return this._value[1];
468
+ }
469
+ set y(val) {
470
+ if (!!val !== this._value[1]) {
471
+ this._value[1] = !!val;
472
+ this.dispatchEvent('changed');
473
+ }
474
+ }
475
+ /**
476
+ * Gets the serialization descriptor for this node type
477
+ *
478
+ * @returns Serialization class descriptor with property definitions
479
+ *
480
+ * @remarks
481
+ * Used by the serialization system to save/load node graphs.
482
+ */ static getSerializationCls() {
483
+ return {
484
+ ctor: ConstantBVec2Node,
485
+ name: 'ConstantBVec2Node',
486
+ getProps () {
487
+ return defineProps([
488
+ {
489
+ name: 'x',
490
+ type: 'bool',
491
+ get (value) {
492
+ value.bool[0] = this.x;
493
+ },
494
+ set (value) {
495
+ this.x = value.bool[0];
496
+ }
497
+ },
498
+ {
499
+ name: 'y',
500
+ type: 'bool',
501
+ get (value) {
502
+ value.bool[0] = this.y;
503
+ },
504
+ set (value) {
505
+ this.y = value.bool[0];
506
+ }
507
+ }
508
+ ]);
509
+ }
510
+ };
511
+ }
512
+ /**
513
+ * Validates the node state
514
+ *
515
+ * @returns Empty string (always valid)
516
+ *
517
+ * @remarks
518
+ * Constant nodes have no validation requirements.
519
+ */ validate() {
520
+ return '';
521
+ }
522
+ /**
523
+ * Gets the output type for a specific output slot
524
+ *
525
+ * @param id - The output slot ID
526
+ * @returns 'bool' for component outputs (id \> 1), 'bvec2' for the full vector
527
+ */ getType(id) {
528
+ return id > 1 ? 'bool' : 'bvec2';
529
+ }
530
+ }
531
+ /**
532
+ * Constant 3D vector (vec3) value node
373
533
  *
374
534
  * @public
375
535
  */ class ConstantVec3Node extends BaseGraphNode {
@@ -442,7 +602,7 @@ import { BaseGraphNode } from '../node.js';
442
602
  return this._paramName;
443
603
  }
444
604
  set paramName(val) {
445
- if (val !== this._paramName) {
605
+ if (this._paramName !== val) {
446
606
  this._paramName = val;
447
607
  this.dispatchEvent('changed');
448
608
  }
@@ -493,7 +653,7 @@ import { BaseGraphNode } from '../node.js';
493
653
  ctor: ConstantVec3Node,
494
654
  name: 'ConstantVec3Node',
495
655
  getProps () {
496
- return [
656
+ return defineProps([
497
657
  {
498
658
  name: 'isUniform',
499
659
  type: 'bool',
@@ -508,10 +668,14 @@ import { BaseGraphNode } from '../node.js';
508
668
  name: 'paramName',
509
669
  type: 'string',
510
670
  get (value) {
511
- value.str[0] = this.paramName;
671
+ value.str[0] = this.paramName ? this.paramName.slice(2) : '';
512
672
  },
513
673
  set (value) {
514
- this.paramName = value.str[0];
674
+ if (!/^[A-Za-z0-9_]+$/.test(value.str[0])) {
675
+ console.log(`Invalid parameter name: ${value.str[0]}`);
676
+ } else {
677
+ this.paramName = `u_${value.str[0]}`;
678
+ }
515
679
  }
516
680
  },
517
681
  {
@@ -558,7 +722,7 @@ import { BaseGraphNode } from '../node.js';
558
722
  this.z = value.num[2];
559
723
  }
560
724
  }
561
- ];
725
+ ]);
562
726
  }
563
727
  };
564
728
  }
@@ -582,30 +746,158 @@ import { BaseGraphNode } from '../node.js';
582
746
  }
583
747
  }
584
748
  /**
585
- * Constant 4D vector (vec4) value node
586
- *
587
- * @remarks
588
- * Represents a 4-component vector constant (e.g., RGBA colors with alpha, 4D positions).
589
- * Provides multiple output slots:
590
- * - Output 1: The full vec4 value
591
- * - Output 2: The x component (swizzle)
592
- * - Output 3: The y component (swizzle)
593
- * - Output 4: The z component (swizzle)
594
- * - Output 5: The w component (swizzle)
749
+ * Constant 3D boolean vector (bvec3) value node
595
750
  *
596
- * Includes special 'rgba' serialization property for color picker integration with alpha.
597
- * Can be exposed as a uniform parameter for runtime modification.
598
- *
599
- * @example
600
- * ```typescript
601
- * const color = new ConstantVec4Node();
602
- * color.x = 1.0; // Red
603
- * color.y = 0.5; // Green
604
- * color.z = 0.0; // Blue
605
- * color.w = 0.8; // Alpha
606
- * color.isUniform = true;
607
- * color.paramName = 'u_tintColor';
608
- * ```
751
+ * @public
752
+ */ class ConstantBVec3Node extends BaseGraphNode {
753
+ /** The 3D vector value [x, y, z] */ _value;
754
+ /**
755
+ * Creates a new constant bvec3 node
756
+ *
757
+ * @remarks
758
+ * Initializes with [false, false, false] and creates output slots for the full vector
759
+ * and individual components.
760
+ */ constructor(){
761
+ super();
762
+ this._value = [
763
+ false,
764
+ false,
765
+ false
766
+ ];
767
+ this._outputs = [
768
+ {
769
+ id: 1,
770
+ name: ''
771
+ },
772
+ {
773
+ id: 2,
774
+ name: 'x',
775
+ swizzle: 'x'
776
+ },
777
+ {
778
+ id: 3,
779
+ name: 'y',
780
+ swizzle: 'y'
781
+ },
782
+ {
783
+ id: 4,
784
+ name: 'z',
785
+ swizzle: 'z'
786
+ }
787
+ ];
788
+ }
789
+ /**
790
+ * Generates a string representation of this node
791
+ *
792
+ * @returns The parameter name if uniform, otherwise comma-separated values
793
+ *
794
+ * @remarks
795
+ * Values are rounded to 3 decimal places for display purposes.
796
+ */ toString() {
797
+ return `${String(this._value[0])},${String(this._value[1])},${String(this._value[2])}`;
798
+ }
799
+ /**
800
+ * Gets the x component of the vector
801
+ */ get x() {
802
+ return this._value[0];
803
+ }
804
+ set x(val) {
805
+ if (!!val !== this._value[0]) {
806
+ this._value[0] = !!val;
807
+ this.dispatchEvent('changed');
808
+ }
809
+ }
810
+ /**
811
+ * Gets the y component of the vector
812
+ */ get y() {
813
+ return this._value[1];
814
+ }
815
+ set y(val) {
816
+ if (!!val !== this._value[1]) {
817
+ this._value[1] = !!val;
818
+ this.dispatchEvent('changed');
819
+ }
820
+ }
821
+ /**
822
+ * Gets the z component of the vector
823
+ */ get z() {
824
+ return this._value[2];
825
+ }
826
+ set z(val) {
827
+ if (!!val !== this._value[2]) {
828
+ this._value[2] = !!val;
829
+ this.dispatchEvent('changed');
830
+ }
831
+ }
832
+ /**
833
+ * Gets the serialization descriptor for this node type
834
+ *
835
+ * @returns Serialization class descriptor with property definitions
836
+ *
837
+ * @remarks
838
+ * Used by the serialization system to save/load node graphs.
839
+ * Includes an 'rgb' property for color picker integration.
840
+ */ static getSerializationCls() {
841
+ return {
842
+ ctor: ConstantBVec3Node,
843
+ name: 'ConstantBVec3Node',
844
+ getProps () {
845
+ return defineProps([
846
+ {
847
+ name: 'x',
848
+ type: 'bool',
849
+ get (value) {
850
+ value.bool[0] = this.x;
851
+ },
852
+ set (value) {
853
+ this.x = value.bool[0];
854
+ }
855
+ },
856
+ {
857
+ name: 'y',
858
+ type: 'bool',
859
+ get (value) {
860
+ value.bool[0] = this.y;
861
+ },
862
+ set (value) {
863
+ this.y = value.bool[0];
864
+ }
865
+ },
866
+ {
867
+ name: 'z',
868
+ type: 'bool',
869
+ get (value) {
870
+ value.bool[0] = this.z;
871
+ },
872
+ set (value) {
873
+ this.z = value.bool[0];
874
+ }
875
+ }
876
+ ]);
877
+ }
878
+ };
879
+ }
880
+ /**
881
+ * Validates the node state
882
+ *
883
+ * @returns Empty string (always valid)
884
+ *
885
+ * @remarks
886
+ * Constant nodes have no validation requirements.
887
+ */ validate() {
888
+ return '';
889
+ }
890
+ /**
891
+ * Gets the output type for a specific output slot
892
+ *
893
+ * @param id - The output slot ID
894
+ * @returns 'bool' for component outputs (id \> 1), 'bvec3' for the full vector
895
+ */ getType(id) {
896
+ return id > 1 ? 'bool' : 'bvec3';
897
+ }
898
+ }
899
+ /**
900
+ * Constant 4D vector (vec4) value node
609
901
  *
610
902
  * @public
611
903
  */ class ConstantVec4Node extends BaseGraphNode {
@@ -684,7 +976,7 @@ import { BaseGraphNode } from '../node.js';
684
976
  return this._paramName;
685
977
  }
686
978
  set paramName(val) {
687
- if (val !== this._paramName) {
979
+ if (this._paramName !== val) {
688
980
  this._paramName = val;
689
981
  this.dispatchEvent('changed');
690
982
  }
@@ -746,7 +1038,7 @@ import { BaseGraphNode } from '../node.js';
746
1038
  ctor: ConstantVec4Node,
747
1039
  name: 'ConstantVec4Node',
748
1040
  getProps () {
749
- return [
1041
+ return defineProps([
750
1042
  {
751
1043
  name: 'isUniform',
752
1044
  type: 'bool',
@@ -761,10 +1053,14 @@ import { BaseGraphNode } from '../node.js';
761
1053
  name: 'paramName',
762
1054
  type: 'string',
763
1055
  get (value) {
764
- value.str[0] = this.paramName;
1056
+ value.str[0] = this.paramName ? this.paramName.slice(2) : '';
765
1057
  },
766
1058
  set (value) {
767
- this.paramName = value.str[0];
1059
+ if (!/^[A-Za-z0-9_]+$/.test(value.str[0])) {
1060
+ console.log(`Invalid parameter name: ${value.str[0]}`);
1061
+ } else {
1062
+ this.paramName = `u_${value.str[0]}`;
1063
+ }
768
1064
  }
769
1065
  },
770
1066
  {
@@ -823,7 +1119,7 @@ import { BaseGraphNode } from '../node.js';
823
1119
  this.w = value.num[3];
824
1120
  }
825
1121
  }
826
- ];
1122
+ ]);
827
1123
  }
828
1124
  };
829
1125
  }
@@ -846,6 +1142,184 @@ import { BaseGraphNode } from '../node.js';
846
1142
  return id > 1 ? 'float' : 'vec4';
847
1143
  }
848
1144
  }
1145
+ /**
1146
+ * Constant 4D boolean vector (bvec4) value node
1147
+ *
1148
+ * @public
1149
+ */ class ConstantBVec4Node extends BaseGraphNode {
1150
+ /** The 4D vector value [x, y, z, w] */ _value;
1151
+ /**
1152
+ * Creates a new constant vec4 node
1153
+ *
1154
+ * @remarks
1155
+ * Initializes with [false, false, false, false] and creates output slots for the full vector
1156
+ * and individual components.
1157
+ */ constructor(){
1158
+ super();
1159
+ this._value = [
1160
+ false,
1161
+ false,
1162
+ false,
1163
+ false
1164
+ ];
1165
+ this._outputs = [
1166
+ {
1167
+ id: 1,
1168
+ name: ''
1169
+ },
1170
+ {
1171
+ id: 2,
1172
+ name: 'x',
1173
+ swizzle: 'x'
1174
+ },
1175
+ {
1176
+ id: 3,
1177
+ name: 'y',
1178
+ swizzle: 'y'
1179
+ },
1180
+ {
1181
+ id: 4,
1182
+ name: 'z',
1183
+ swizzle: 'z'
1184
+ },
1185
+ {
1186
+ id: 5,
1187
+ name: 'w',
1188
+ swizzle: 'w'
1189
+ }
1190
+ ];
1191
+ }
1192
+ /**
1193
+ * Generates a string representation of this node
1194
+ *
1195
+ * @returns The parameter name if uniform, otherwise comma-separated values
1196
+ *
1197
+ * @remarks
1198
+ * Values are rounded to 3 decimal places for display purposes.
1199
+ */ toString() {
1200
+ return `${String(this._value[0])},${String(this._value[1])},${String(this._value[2])},${String(this._value[3])}`;
1201
+ }
1202
+ /**
1203
+ * Gets the x component of the vector
1204
+ */ get x() {
1205
+ return this._value[0];
1206
+ }
1207
+ set x(val) {
1208
+ if (!!val !== this._value[0]) {
1209
+ this._value[0] = !!val;
1210
+ this.dispatchEvent('changed');
1211
+ }
1212
+ }
1213
+ /**
1214
+ * Gets the y component of the vector
1215
+ */ get y() {
1216
+ return this._value[1];
1217
+ }
1218
+ set y(val) {
1219
+ if (!!val !== this._value[1]) {
1220
+ this._value[1] = !!val;
1221
+ this.dispatchEvent('changed');
1222
+ }
1223
+ }
1224
+ /**
1225
+ * Gets the z component of the vector
1226
+ */ get z() {
1227
+ return this._value[2];
1228
+ }
1229
+ set z(val) {
1230
+ if (!!val !== this._value[2]) {
1231
+ this._value[2] = !!val;
1232
+ this.dispatchEvent('changed');
1233
+ }
1234
+ }
1235
+ /**
1236
+ * Gets the w component of the vector
1237
+ */ get w() {
1238
+ return this._value[3];
1239
+ }
1240
+ set w(val) {
1241
+ if (!!val !== this._value[3]) {
1242
+ this._value[3] = !!val;
1243
+ this.dispatchEvent('changed');
1244
+ }
1245
+ }
1246
+ /**
1247
+ * Gets the serialization descriptor for this node type
1248
+ *
1249
+ * @returns Serialization class descriptor with property definitions
1250
+ *
1251
+ * @remarks
1252
+ * Used by the serialization system to save/load node graphs.
1253
+ * Includes an 'rgba' property for color picker integration with alpha channel.
1254
+ */ static getSerializationCls() {
1255
+ return {
1256
+ ctor: ConstantBVec4Node,
1257
+ name: 'ConstantBVec4Node',
1258
+ getProps () {
1259
+ return defineProps([
1260
+ {
1261
+ name: 'x',
1262
+ type: 'bool',
1263
+ get (value) {
1264
+ value.bool[0] = this.x;
1265
+ },
1266
+ set (value) {
1267
+ this.x = value.bool[0];
1268
+ }
1269
+ },
1270
+ {
1271
+ name: 'y',
1272
+ type: 'bool',
1273
+ get (value) {
1274
+ value.bool[0] = this.y;
1275
+ },
1276
+ set (value) {
1277
+ this.y = value.bool[0];
1278
+ }
1279
+ },
1280
+ {
1281
+ name: 'z',
1282
+ type: 'bool',
1283
+ get (value) {
1284
+ value.bool[0] = this.z;
1285
+ },
1286
+ set (value) {
1287
+ this.z = value.bool[0];
1288
+ }
1289
+ },
1290
+ {
1291
+ name: 'w',
1292
+ type: 'bool',
1293
+ get (value) {
1294
+ value.bool[0] = this.w;
1295
+ },
1296
+ set (value) {
1297
+ this.w = value.bool[0];
1298
+ }
1299
+ }
1300
+ ]);
1301
+ }
1302
+ };
1303
+ }
1304
+ /**
1305
+ * Validates the node state
1306
+ *
1307
+ * @returns Empty string (always valid)
1308
+ *
1309
+ * @remarks
1310
+ * Constant nodes have no validation requirements.
1311
+ */ validate() {
1312
+ return '';
1313
+ }
1314
+ /**
1315
+ * Gets the output type for a specific output slot
1316
+ *
1317
+ * @param id - The output slot ID
1318
+ * @returns 'bool' for component outputs (id \> 1), 'bvec4' for the full vector
1319
+ */ getType(id) {
1320
+ return id > 1 ? 'bool' : 'bvec4';
1321
+ }
1322
+ }
849
1323
 
850
- export { ConstantScalarNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node };
1324
+ export { ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node };
851
1325
  //# sourceMappingURL=constants.js.map