@types/three 0.165.0 → 0.167.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 (330) hide show
  1. three/README.md +1 -1
  2. three/build/three.webgpu.d.ts +1 -0
  3. three/build/three.webgpu.min.d.ts +1 -0
  4. three/examples/jsm/Addons.d.ts +1 -1
  5. three/examples/jsm/animation/MMDPhysics.d.ts +4 -4
  6. three/examples/jsm/csm/CSM.d.ts +3 -4
  7. three/examples/jsm/csm/CSMFrustum.d.ts +1 -1
  8. three/examples/jsm/exporters/GLTFExporter.d.ts +6 -0
  9. three/examples/jsm/geometries/TeapotGeometry.d.ts +24 -0
  10. three/examples/jsm/helpers/ViewHelper.d.ts +8 -6
  11. three/examples/jsm/lights/RectAreaLightTexturesLib.d.ts +7 -0
  12. three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +4 -2
  13. three/examples/jsm/lines/LineMaterial.d.ts +2 -4
  14. three/examples/jsm/lines/webgpu/Line2.d.ts +14 -0
  15. three/examples/jsm/lines/webgpu/LineSegments2.d.ts +15 -0
  16. three/examples/jsm/loaders/DDSLoader.d.ts +8 -2
  17. three/examples/jsm/loaders/GLTFLoader.d.ts +3 -1
  18. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -2
  19. three/examples/jsm/loaders/KTXLoader.d.ts +8 -2
  20. three/examples/jsm/loaders/LUTImageLoader.d.ts +18 -0
  21. three/examples/jsm/loaders/MaterialXLoader.d.ts +1 -2
  22. three/examples/jsm/loaders/PVRLoader.d.ts +2 -2
  23. three/examples/jsm/loaders/UltraHDRLoader.d.ts +21 -0
  24. three/package.json +6 -5
  25. three/src/Three.WebGPU.d.ts +184 -0
  26. three/src/Three.d.ts +26 -91
  27. three/src/animation/AnimationClip.d.ts +12 -4
  28. three/src/animation/AnimationUtils.d.ts +32 -7
  29. three/src/animation/KeyframeTrack.d.ts +9 -1
  30. three/src/animation/PropertyBinding.d.ts +12 -12
  31. three/src/cameras/OrthographicCamera.d.ts +27 -0
  32. three/src/cameras/PerspectiveCamera.d.ts +31 -0
  33. three/src/constants.d.ts +13 -1
  34. three/src/core/BufferAttribute.d.ts +11 -6
  35. three/src/core/BufferGeometry.d.ts +26 -3
  36. three/src/core/InterleavedBufferAttribute.d.ts +3 -3
  37. three/src/core/Object3D.d.ts +51 -6
  38. three/src/extras/DataUtils.d.ts +9 -2
  39. three/src/extras/ImageUtils.d.ts +6 -7
  40. three/src/extras/ShapeUtils.d.ts +5 -8
  41. three/src/extras/TextureUtils.d.ts +42 -0
  42. three/src/extras/core/Curve.d.ts +8 -2
  43. three/src/extras/core/CurvePath.d.ts +9 -1
  44. three/src/extras/core/Path.d.ts +9 -2
  45. three/src/extras/core/Shape.d.ts +9 -1
  46. three/src/lights/Light.d.ts +19 -2
  47. three/src/lights/LightShadow.d.ts +18 -2
  48. three/src/lights/webgpu/IESSpotLight.d.ts +6 -0
  49. three/src/loaders/Cache.d.ts +13 -8
  50. three/src/materials/Material.d.ts +185 -14
  51. three/src/materials/ShaderMaterial.d.ts +49 -2
  52. three/src/math/ColorManagement.d.ts +3 -0
  53. three/src/math/Euler.d.ts +4 -2
  54. three/src/math/Matrix2.d.ts +53 -0
  55. three/src/math/Matrix3.d.ts +67 -115
  56. three/src/math/Matrix4.d.ts +48 -100
  57. three/src/math/Quaternion.d.ts +5 -3
  58. three/src/math/Vector2.d.ts +1 -1
  59. three/src/math/Vector4.d.ts +6 -0
  60. three/{examples/jsm → src}/nodes/Nodes.d.ts +37 -7
  61. three/{examples/jsm → src}/nodes/accessors/BatchNode.d.ts +1 -1
  62. three/{examples/jsm → src}/nodes/accessors/BufferAttributeNode.d.ts +5 -1
  63. three/{examples/jsm → src}/nodes/accessors/CameraNode.d.ts +3 -1
  64. three/{examples/jsm → src}/nodes/accessors/CubeTextureNode.d.ts +11 -3
  65. three/{examples/jsm → src}/nodes/accessors/InstanceNode.d.ts +1 -1
  66. three/{examples/jsm → src}/nodes/accessors/MaterialNode.d.ts +11 -2
  67. three/{examples/jsm → src}/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
  68. three/{examples/jsm → src}/nodes/accessors/ModelNode.d.ts +1 -1
  69. three/{examples/jsm → src}/nodes/accessors/NormalNode.d.ts +3 -3
  70. three/{examples/jsm → src}/nodes/accessors/Object3DNode.d.ts +1 -1
  71. three/{examples/jsm → src}/nodes/accessors/ReflectVectorNode.d.ts +3 -0
  72. three/{examples/jsm → src}/nodes/accessors/SkinningNode.d.ts +1 -1
  73. three/{examples/jsm → src}/nodes/accessors/StorageBufferNode.d.ts +7 -0
  74. three/src/nodes/accessors/StorageTextureNode.d.ts +40 -0
  75. three/{examples/jsm → src}/nodes/accessors/Texture3DNode.d.ts +3 -2
  76. three/{examples/jsm → src}/nodes/accessors/TextureNode.d.ts +9 -2
  77. three/{examples/jsm → src}/nodes/core/CacheNode.d.ts +4 -5
  78. three/{examples/jsm → src}/nodes/core/IndexNode.d.ts +3 -1
  79. three/{examples/jsm → src}/nodes/core/LightingModel.d.ts +12 -3
  80. three/src/nodes/core/MRTNode.d.ts +19 -0
  81. three/{examples/jsm → src}/nodes/core/Node.d.ts +6 -10
  82. three/{examples/jsm → src}/nodes/core/NodeBuilder.d.ts +13 -3
  83. three/{examples/jsm → src}/nodes/core/NodeCache.d.ts +13 -4
  84. three/{examples/jsm → src}/nodes/core/NodeFrame.d.ts +5 -2
  85. three/{examples/jsm → src}/nodes/core/NodeFunction.d.ts +2 -2
  86. three/{examples/jsm → src}/nodes/core/NodeUniform.d.ts +1 -1
  87. three/{examples/jsm → src}/nodes/core/NodeUtils.d.ts +6 -1
  88. three/{examples/jsm → src}/nodes/core/PropertyNode.d.ts +1 -0
  89. three/{examples/jsm → src}/nodes/core/UniformNode.d.ts +2 -0
  90. three/{examples/jsm → src}/nodes/core/VarNode.d.ts +2 -0
  91. three/{examples/jsm → src}/nodes/display/AnamorphicNode.d.ts +1 -1
  92. three/src/nodes/display/BloomNode.d.ts +35 -0
  93. three/{examples/jsm → src}/nodes/display/ColorAdjustmentNode.d.ts +0 -1
  94. three/{examples/jsm → src}/nodes/display/ColorSpaceNode.d.ts +1 -1
  95. three/src/nodes/display/DenoiseNode.d.ts +38 -0
  96. three/src/nodes/display/DepthOfFieldNode.d.ts +30 -0
  97. three/src/nodes/display/DotScreenNode.d.ts +27 -0
  98. three/src/nodes/display/FXAANode.d.ts +19 -0
  99. three/src/nodes/display/FilmNode.d.ts +25 -0
  100. three/src/nodes/display/GTAONode.d.ts +46 -0
  101. three/{examples/jsm → src}/nodes/display/GaussianBlurNode.d.ts +8 -5
  102. three/src/nodes/display/Lut3DNode.d.ts +30 -0
  103. three/{examples/jsm → src}/nodes/display/NormalMapNode.d.ts +1 -2
  104. three/src/nodes/display/PassNode.d.ts +62 -0
  105. three/src/nodes/display/PixelationPassNode.d.ts +67 -0
  106. three/src/nodes/display/RGBShiftNode.d.ts +24 -0
  107. three/src/nodes/display/RenderOutputNode.d.ts +28 -0
  108. three/src/nodes/display/SobelOperatorNode.d.ts +17 -0
  109. three/{examples/jsm → src}/nodes/display/ToneMappingNode.d.ts +1 -1
  110. three/src/nodes/display/TransitionNode.d.ts +41 -0
  111. three/{examples/jsm → src}/nodes/display/ViewportDepthNode.d.ts +4 -6
  112. three/{examples/jsm → src}/nodes/display/ViewportTextureNode.d.ts +1 -1
  113. three/src/nodes/functions/BSDF/LTC.d.ts +9 -0
  114. three/{examples/jsm → src}/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -1
  115. three/src/nodes/functions/BasicLightingModel.d.ts +7 -0
  116. three/src/nodes/functions/PhongLightingModel.d.ts +7 -0
  117. three/{examples/jsm → src}/nodes/geometry/RangeNode.d.ts +4 -1
  118. three/{examples/jsm → src}/nodes/lighting/AnalyticLightNode.d.ts +1 -1
  119. three/src/nodes/lighting/BasicEnvironmentNode.d.ts +10 -0
  120. three/src/nodes/lighting/BasicLightMapNode.d.ts +8 -0
  121. three/{examples/jsm → src}/nodes/lighting/HemisphereLightNode.d.ts +1 -1
  122. three/{examples/jsm → src}/nodes/lighting/LightingNode.d.ts +2 -0
  123. three/{examples/jsm → src}/nodes/lighting/LightsNode.d.ts +1 -1
  124. three/{examples/jsm → src}/nodes/lighting/PointLightNode.d.ts +1 -1
  125. three/src/nodes/lighting/RectAreaLightNode.d.ts +21 -0
  126. three/{examples/jsm → src}/nodes/lighting/SpotLightNode.d.ts +1 -1
  127. three/{examples/jsm → src}/nodes/loaders/NodeLoader.d.ts +3 -1
  128. three/{examples/jsm → src}/nodes/loaders/NodeMaterialLoader.d.ts +1 -1
  129. three/{examples/jsm → src}/nodes/loaders/NodeObjectLoader.d.ts +3 -1
  130. three/src/nodes/materials/Line2NodeMaterial.d.ts +53 -0
  131. three/{examples/jsm → src}/nodes/materials/LineBasicNodeMaterial.d.ts +3 -1
  132. three/{examples/jsm → src}/nodes/materials/Materials.d.ts +2 -1
  133. three/{examples/jsm → src}/nodes/materials/MeshBasicNodeMaterial.d.ts +5 -1
  134. three/{examples/jsm → src}/nodes/materials/MeshMatcapNodeMaterial.d.ts +5 -1
  135. three/{examples/jsm → src}/nodes/materials/MeshNormalNodeMaterial.d.ts +4 -1
  136. three/{examples/jsm → src}/nodes/materials/MeshPhongNodeMaterial.d.ts +8 -4
  137. three/{examples/jsm → src}/nodes/materials/MeshPhysicalNodeMaterial.d.ts +21 -20
  138. three/src/nodes/materials/MeshSSSNodeMaterial.d.ts +16 -0
  139. three/{examples/jsm → src}/nodes/materials/MeshStandardNodeMaterial.d.ts +9 -5
  140. three/{examples/jsm → src}/nodes/materials/MeshToonNodeMaterial.d.ts +5 -1
  141. three/{examples/jsm → src}/nodes/materials/NodeMaterial.d.ts +54 -49
  142. three/{examples/jsm → src}/nodes/materials/PointsNodeMaterial.d.ts +3 -1
  143. three/{examples/jsm → src}/nodes/materials/ShadowNodeMaterial.d.ts +2 -1
  144. three/{examples/jsm → src}/nodes/materials/SpriteNodeMaterial.d.ts +5 -4
  145. three/{examples/jsm → src}/nodes/materialx/lib/mx_hsv.d.ts +1 -0
  146. three/src/nodes/materialx/lib/mx_noise.d.ts +359 -0
  147. three/{examples/jsm → src}/nodes/math/MathNode.d.ts +9 -1
  148. three/{examples/jsm → src}/nodes/pmrem/PMREMNode.d.ts +1 -1
  149. three/{examples/jsm → src}/nodes/utils/DiscardNode.d.ts +1 -0
  150. three/{examples/jsm → src}/nodes/utils/MaxMipLevelNode.d.ts +3 -3
  151. three/src/nodes/utils/PackingNode.d.ts +24 -0
  152. three/src/nodes/utils/RTTNode.d.ts +45 -0
  153. three/{examples/jsm → src}/nodes/utils/ReflectorNode.d.ts +3 -1
  154. three/src/objects/BatchedMesh.d.ts +58 -54
  155. three/src/objects/InstancedMesh.d.ts +15 -2
  156. three/src/objects/LOD.d.ts +17 -1
  157. three/src/objects/Mesh.d.ts +11 -1
  158. three/src/objects/Points.d.ts +0 -3
  159. three/src/objects/Skeleton.d.ts +10 -3
  160. three/src/objects/SkinnedMesh.d.ts +15 -3
  161. three/{examples/jsm → src}/renderers/common/Animation.d.ts +0 -1
  162. three/{examples/jsm → src}/renderers/common/Attributes.d.ts +4 -2
  163. three/{examples/jsm → src}/renderers/common/Backend.d.ts +1 -1
  164. three/{examples/jsm → src}/renderers/common/Background.d.ts +2 -1
  165. three/src/renderers/common/BindGroup.d.ts +9 -0
  166. three/{examples/jsm → src}/renderers/common/Bindings.d.ts +11 -14
  167. three/{examples/jsm → src}/renderers/common/ClippingContext.d.ts +6 -1
  168. three/{examples/jsm → src}/renderers/common/Color4.d.ts +1 -1
  169. three/{examples/jsm → src}/renderers/common/CubeRenderTarget.d.ts +4 -1
  170. three/{examples/jsm → src}/renderers/common/Geometries.d.ts +6 -3
  171. three/{examples/jsm → src}/renderers/common/Info.d.ts +7 -2
  172. three/{examples/jsm → src}/renderers/common/PostProcessing.d.ts +9 -1
  173. three/{examples/jsm/objects → src/renderers/common}/QuadMesh.d.ts +4 -2
  174. three/{examples/jsm → src}/renderers/common/RenderBundle.d.ts +2 -1
  175. three/{examples/jsm → src}/renderers/common/RenderBundles.d.ts +2 -1
  176. three/{examples/jsm → src}/renderers/common/RenderContext.d.ts +4 -1
  177. three/{examples/jsm → src}/renderers/common/RenderContexts.d.ts +3 -1
  178. three/{examples/jsm → src}/renderers/common/RenderList.d.ts +5 -1
  179. three/{examples/jsm → src}/renderers/common/RenderLists.d.ts +2 -1
  180. three/{examples/jsm → src}/renderers/common/RenderObject.d.ts +19 -16
  181. three/{examples/jsm → src}/renderers/common/RenderObjects.d.ts +5 -2
  182. three/{examples/jsm → src}/renderers/common/Renderer.d.ts +41 -29
  183. three/src/renderers/common/SampledTexture.d.ts +27 -0
  184. three/src/renderers/common/Sampler.d.ts +11 -0
  185. three/{examples/jsm → src}/renderers/common/StorageBufferAttribute.d.ts +1 -1
  186. three/{examples/jsm → src}/renderers/common/StorageInstancedBufferAttribute.d.ts +2 -1
  187. three/{examples/jsm → src}/renderers/common/StorageTexture.d.ts +1 -1
  188. three/{examples/jsm → src}/renderers/common/Textures.d.ts +4 -1
  189. three/{examples/jsm → src}/renderers/common/Uniform.d.ts +9 -4
  190. three/{examples/jsm → src}/renderers/common/UniformsGroup.d.ts +4 -2
  191. three/{examples/jsm → src}/renderers/common/extras/PMREMGenerator.d.ts +2 -1
  192. three/{examples/jsm → src}/renderers/common/nodes/NodeBuilderState.d.ts +8 -4
  193. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +29 -0
  194. three/src/renderers/common/nodes/NodeSampler.d.ts +12 -0
  195. three/{examples/jsm → src}/renderers/common/nodes/NodeUniform.d.ts +10 -5
  196. three/{examples/jsm → src}/renderers/common/nodes/NodeUniformsGroup.d.ts +1 -3
  197. three/{examples/jsm → src}/renderers/common/nodes/Nodes.d.ts +22 -8
  198. three/src/renderers/shaders/ShaderLib.d.ts +3 -1
  199. three/src/renderers/shaders/UniformsLib.d.ts +3 -0
  200. three/src/renderers/shaders/UniformsUtils.d.ts +6 -3
  201. three/{examples/jsm/renderers/webgl → src/renderers/webgl-fallback}/WebGLBackend.d.ts +1 -1
  202. three/{examples/jsm → src}/renderers/webgpu/WebGPUBackend.d.ts +1 -1
  203. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +125 -0
  204. three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +6 -0
  205. three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +6 -0
  206. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +328 -0
  207. three/src/renderers/webxr/WebXRDepthSensing.d.ts +2 -0
  208. three/src/renderers/webxr/WebXRManager.d.ts +33 -23
  209. three/src/scenes/Fog.d.ts +7 -24
  210. three/src/scenes/FogExp2.d.ts +9 -3
  211. three/src/scenes/Scene.d.ts +21 -5
  212. three/src/textures/CompressedArrayTexture.d.ts +4 -4
  213. three/src/textures/CompressedTexture.d.ts +16 -8
  214. three/src/textures/Source.d.ts +15 -1
  215. three/src/textures/Texture.d.ts +40 -2
  216. three/examples/jsm/deprecated/Geometry.d.ts +0 -341
  217. three/examples/jsm/lights/IESSpotLight.d.ts +0 -5
  218. three/examples/jsm/nodes/display/PassNode.d.ts +0 -46
  219. three/examples/jsm/nodes/functions/PhongLightingModel.d.ts +0 -7
  220. three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +0 -17
  221. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +0 -129
  222. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +0 -17
  223. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +0 -37
  224. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +0 -3
  225. /three/{examples/jsm → src}/nodes/accessors/AccessorsUtils.d.ts +0 -0
  226. /three/{examples/jsm → src}/nodes/accessors/BitangentNode.d.ts +0 -0
  227. /three/{examples/jsm → src}/nodes/accessors/BufferNode.d.ts +0 -0
  228. /three/{examples/jsm → src}/nodes/accessors/ClippingNode.d.ts +0 -0
  229. /three/{examples/jsm → src}/nodes/accessors/ModelViewProjectionNode.d.ts +0 -0
  230. /three/{examples/jsm → src}/nodes/accessors/PointUVNode.d.ts +0 -0
  231. /three/{examples/jsm → src}/nodes/accessors/PositionNode.d.ts +0 -0
  232. /three/{examples/jsm → src}/nodes/accessors/ReferenceNode.d.ts +0 -0
  233. /three/{examples/jsm → src}/nodes/accessors/RendererReferenceNode.d.ts +0 -0
  234. /three/{examples/jsm → src}/nodes/accessors/TangentNode.d.ts +0 -0
  235. /three/{examples/jsm → src}/nodes/accessors/TextureBicubicNode.d.ts +0 -0
  236. /three/{examples/jsm → src}/nodes/accessors/UVNode.d.ts +0 -0
  237. /three/{examples/jsm → src}/nodes/accessors/UniformsNode.d.ts +0 -0
  238. /three/{examples/jsm → src}/nodes/accessors/UserDataNode.d.ts +0 -0
  239. /three/{examples/jsm → src}/nodes/accessors/VertexColorNode.d.ts +0 -0
  240. /three/{examples/jsm → src}/nodes/code/CodeNode.d.ts +0 -0
  241. /three/{examples/jsm → src}/nodes/code/ExpressionNode.d.ts +0 -0
  242. /three/{examples/jsm → src}/nodes/code/FunctionCallNode.d.ts +0 -0
  243. /three/{examples/jsm → src}/nodes/code/FunctionNode.d.ts +0 -0
  244. /three/{examples/jsm → src}/nodes/core/AssignNode.d.ts +0 -0
  245. /three/{examples/jsm → src}/nodes/core/AttributeNode.d.ts +0 -0
  246. /three/{examples/jsm → src}/nodes/core/BypassNode.d.ts +0 -0
  247. /three/{examples/jsm → src}/nodes/core/ConstNode.d.ts +0 -0
  248. /three/{examples/jsm → src}/nodes/core/ContextNode.d.ts +0 -0
  249. /three/{examples/jsm → src}/nodes/core/InputNode.d.ts +0 -0
  250. /three/{examples/jsm → src}/nodes/core/NodeAttribute.d.ts +0 -0
  251. /three/{examples/jsm → src}/nodes/core/NodeCode.d.ts +0 -0
  252. /three/{examples/jsm → src}/nodes/core/NodeFunctionInput.d.ts +0 -0
  253. /three/{examples/jsm → src}/nodes/core/NodeKeywords.d.ts +0 -0
  254. /three/{examples/jsm → src}/nodes/core/NodeParser.d.ts +0 -0
  255. /three/{examples/jsm → src}/nodes/core/NodeVar.d.ts +0 -0
  256. /three/{examples/jsm → src}/nodes/core/NodeVarying.d.ts +0 -0
  257. /three/{examples/jsm → src}/nodes/core/OutputStructNode.d.ts +0 -0
  258. /three/{examples/jsm → src}/nodes/core/StackNode.d.ts +0 -0
  259. /three/{examples/jsm → src}/nodes/core/StructTypeNode.d.ts +0 -0
  260. /three/{examples/jsm → src}/nodes/core/TempNode.d.ts +0 -0
  261. /three/{examples/jsm → src}/nodes/core/UniformGroup.d.ts +0 -0
  262. /three/{examples/jsm → src}/nodes/core/UniformGroupNode.d.ts +0 -0
  263. /three/{examples/jsm → src}/nodes/core/VaryingNode.d.ts +0 -0
  264. /three/{examples/jsm → src}/nodes/core/constants.d.ts +0 -0
  265. /three/{examples/jsm → src}/nodes/display/AfterImageNode.d.ts +0 -0
  266. /three/{examples/jsm → src}/nodes/display/BlendModeNode.d.ts +0 -0
  267. /three/{examples/jsm → src}/nodes/display/FrontFacingNode.d.ts +0 -0
  268. /three/{examples/jsm → src}/nodes/display/PosterizeNode.d.ts +0 -0
  269. /three/{examples/jsm → src}/nodes/display/ViewportDepthTextureNode.d.ts +0 -0
  270. /three/{examples/jsm → src}/nodes/display/ViewportNode.d.ts +0 -0
  271. /three/{examples/jsm → src}/nodes/display/ViewportSharedTextureNode.d.ts +0 -0
  272. /three/{examples/jsm → src}/nodes/fog/FogExp2Node.d.ts +0 -0
  273. /three/{examples/jsm → src}/nodes/fog/FogNode.d.ts +0 -0
  274. /three/{examples/jsm → src}/nodes/fog/FogRangeNode.d.ts +0 -0
  275. /three/{examples/jsm → src}/nodes/functions/BSDF/BRDF_GGX.d.ts +0 -0
  276. /three/{examples/jsm → src}/nodes/functions/BSDF/BRDF_Lambert.d.ts +0 -0
  277. /three/{examples/jsm → src}/nodes/functions/BSDF/BRDF_Sheen.d.ts +0 -0
  278. /three/{examples/jsm → src}/nodes/functions/BSDF/DFGApprox.d.ts +0 -0
  279. /three/{examples/jsm → src}/nodes/functions/BSDF/D_GGX.d.ts +0 -0
  280. /three/{examples/jsm → src}/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +0 -0
  281. /three/{examples/jsm → src}/nodes/functions/BSDF/F_Schlick.d.ts +0 -0
  282. /three/{examples/jsm → src}/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +0 -0
  283. /three/{examples/jsm → src}/nodes/functions/PhysicalLightingModel.d.ts +0 -0
  284. /three/{examples/jsm → src}/nodes/functions/ShadowMaskModel.d.ts +0 -0
  285. /three/{examples/jsm → src}/nodes/functions/ToonLightingModel.d.ts +0 -0
  286. /three/{examples/jsm → src}/nodes/functions/material/getGeometryRoughness.d.ts +0 -0
  287. /three/{examples/jsm → src}/nodes/functions/material/getRoughness.d.ts +0 -0
  288. /three/{examples/jsm → src}/nodes/gpgpu/ComputeNode.d.ts +0 -0
  289. /three/{examples/jsm → src}/nodes/lighting/AONode.d.ts +0 -0
  290. /three/{examples/jsm → src}/nodes/lighting/EnvironmentNode.d.ts +0 -0
  291. /three/{examples/jsm → src}/nodes/lighting/IrradianceNode.d.ts +0 -0
  292. /three/{examples/jsm → src}/nodes/lighting/LightUtils.d.ts +0 -0
  293. /three/{examples/jsm → src}/nodes/lighting/LightingContextNode.d.ts +0 -0
  294. /three/{examples/jsm → src}/nodes/materials/VolumeNodeMaterial.d.ts +0 -0
  295. /three/{examples/jsm → src}/nodes/materialx/MaterialXNodes.d.ts +0 -0
  296. /three/{examples/jsm → src}/nodes/materialx/lib/mx_transform_color.d.ts +0 -0
  297. /three/{examples/jsm → src}/nodes/math/CondNode.d.ts +0 -0
  298. /three/{examples/jsm → src}/nodes/math/HashNode.d.ts +0 -0
  299. /three/{examples/jsm → src}/nodes/math/MathUtils.d.ts +0 -0
  300. /three/{examples/jsm → src}/nodes/math/OperatorNode.d.ts +0 -0
  301. /three/{examples/jsm → src}/nodes/math/TriNoise3D.d.ts +0 -0
  302. /three/{examples/jsm → src}/nodes/procedural/CheckerNode.d.ts +0 -0
  303. /three/{examples/jsm → src}/nodes/shadernode/ShaderNode.d.ts +0 -0
  304. /three/{examples/jsm → src}/nodes/utils/ArrayElementNode.d.ts +0 -0
  305. /three/{examples/jsm → src}/nodes/utils/ConvertNode.d.ts +0 -0
  306. /three/{examples/jsm → src}/nodes/utils/EquirectUVNode.d.ts +0 -0
  307. /three/{examples/jsm → src}/nodes/utils/JoinNode.d.ts +0 -0
  308. /three/{examples/jsm → src}/nodes/utils/MatcapUVNode.d.ts +0 -0
  309. /three/{examples/jsm → src}/nodes/utils/OscNode.d.ts +0 -0
  310. /three/{examples/jsm → src}/nodes/utils/RemapNode.d.ts +0 -0
  311. /three/{examples/jsm → src}/nodes/utils/RotateNode.d.ts +0 -0
  312. /three/{examples/jsm → src}/nodes/utils/RotateUVNode.d.ts +0 -0
  313. /three/{examples/jsm → src}/nodes/utils/SplitNode.d.ts +0 -0
  314. /three/{examples/jsm → src}/nodes/utils/SpriteSheetUVNode.d.ts +0 -0
  315. /three/{examples/jsm → src}/nodes/utils/StoargeArrayElementNode.d.ts +0 -0
  316. /three/{examples/jsm → src}/nodes/utils/TimerNode.d.ts +0 -0
  317. /three/{examples/jsm → src}/nodes/utils/TriplanarTexturesNode.d.ts +0 -0
  318. /three/{examples/jsm → src}/renderers/common/Binding.d.ts +0 -0
  319. /three/{examples/jsm → src}/renderers/common/Buffer.d.ts +0 -0
  320. /three/{examples/jsm → src}/renderers/common/BufferUtils.d.ts +0 -0
  321. /three/{examples/jsm → src}/renderers/common/ChainMap.d.ts +0 -0
  322. /three/{examples/jsm → src}/renderers/common/ComputePipeline.d.ts +0 -0
  323. /three/{examples/jsm → src}/renderers/common/Constants.d.ts +0 -0
  324. /three/{examples/jsm → src}/renderers/common/DataMap.d.ts +0 -0
  325. /three/{examples/jsm → src}/renderers/common/Pipeline.d.ts +0 -0
  326. /three/{examples/jsm → src}/renderers/common/Pipelines.d.ts +0 -0
  327. /three/{examples/jsm → src}/renderers/common/ProgrammableStage.d.ts +0 -0
  328. /three/{examples/jsm → src}/renderers/common/RenderPipeline.d.ts +0 -0
  329. /three/{examples/jsm → src}/renderers/common/UniformBuffer.d.ts +0 -0
  330. /three/{examples/jsm → src}/renderers/webgpu/WebGPURenderer.d.ts +0 -0
@@ -8,13 +8,14 @@ export { bypass, default as BypassNode } from "./core/BypassNode.js";
8
8
  export { cache, default as CacheNode } from "./core/CacheNode.js";
9
9
  export { default as ConstNode } from "./core/ConstNode.js";
10
10
  export { context, default as ContextNode, label } from "./core/ContextNode.js";
11
- export { default as IndexNode, IndexNodeScope, instanceIndex, vertexIndex } from "./core/IndexNode.js";
11
+ export { default as IndexNode, drawIndex, IndexNodeScope, instanceIndex, vertexIndex } from "./core/IndexNode.js";
12
12
  export {
13
13
  default as LightingModel,
14
14
  LightingModelDirectInput,
15
15
  LightingModelIndirectInput,
16
16
  LightingModelReflectedLight,
17
17
  } from "./core/LightingModel.js";
18
+ export { default as MRTNode, mrt } from "./core/MRTNode.js";
18
19
  export { default as Node } from "./core/Node.js";
19
20
  export { default as NodeAttribute } from "./core/NodeAttribute.js";
20
21
  export { default as NodeBuilder } from "./core/NodeBuilder.js";
@@ -37,6 +38,7 @@ export {
37
38
  dashSize,
38
39
  default as PropertyNode,
39
40
  diffuseColor,
41
+ emissive,
40
42
  gapSize,
41
43
  iridescence,
42
44
  iridescenceIOR,
@@ -54,6 +56,13 @@ export {
54
56
  } from "./core/PropertyNode.js";
55
57
  export { default as StackNode } from "./core/StackNode.js";
56
58
  export { default as TempNode } from "./core/TempNode.js";
59
+ export {
60
+ default as UniformGroupNode,
61
+ frameGroup,
62
+ objectGroup,
63
+ renderGroup,
64
+ uniformGroup,
65
+ } from "./core/UniformGroupNode.js";
57
66
  export { default as UniformNode, uniform } from "./core/UniformNode.js";
58
67
  export { default as VarNode, temp } from "./core/VarNode.js";
59
68
  export { default as VaryingNode, varying } from "./core/VaryingNode.js";
@@ -115,6 +124,7 @@ export {
115
124
  pow3,
116
125
  pow4,
117
126
  radians,
127
+ rand,
118
128
  reciprocal,
119
129
  reflect,
120
130
  refract,
@@ -127,6 +137,7 @@ export {
127
137
  step,
128
138
  tan,
129
139
  transformDirection,
140
+ transpose,
130
141
  trunc,
131
142
  } from "./math/MathNode.js";
132
143
 
@@ -164,16 +175,18 @@ export { triNoise3D } from "./math/TriNoise3D.js";
164
175
  // utils
165
176
  export { default as ArrayElementNode } from "./utils/ArrayElementNode.js";
166
177
  export { default as ConvertNode } from "./utils/ConvertNode.js";
167
- export { default as DiscardNode, discard } from "./utils/DiscardNode.js";
178
+ export { default as DiscardNode, discard, Return } from "./utils/DiscardNode.js";
168
179
  export { default as EquirectUVNode, equirectUV } from "./utils/EquirectUVNode.js";
169
180
  export { default as JoinNode } from "./utils/JoinNode.js";
170
181
  export { default as MatcapUVNode, matcapUV } from "./utils/MatcapUVNode.js";
171
182
  export { default as MaxMipLevelNode, maxMipLevel } from "./utils/MaxMipLevelNode.js";
172
183
  export { default as OscNode, OscNodeMethod, oscSawtooth, oscSine, oscSquare, oscTriangle } from "./utils/OscNode.js";
184
+ export { colorToDirection, default as PackingNode, directionToColor } from "./utils/PackingNode.js";
173
185
  export { default as ReflectorNode, reflector, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
174
186
  export { default as RemapNode, remap, remapClamp } from "./utils/RemapNode.js";
175
187
  export { default as RotateNode, rotate } from "./utils/RotateNode.js";
176
188
  export { default as RotateUVNode, rotateUV } from "./utils/RotateUVNode.js";
189
+ export { default as RTTNode, rtt, RTTNodeOptions } from "./utils/RTTNode.js";
177
190
  export { default as SplitNode } from "./utils/SplitNode.js";
178
191
  export { default as SpriteSheetUVNode, spritesheetUV } from "./utils/SpriteSheetUVNode.js";
179
192
  export { default as StorageArrayElementNode } from "./utils/SpriteSheetUVNode.js";
@@ -207,6 +220,7 @@ export {
207
220
  materialAlphaTest,
208
221
  materialAnisotropy,
209
222
  materialAnisotropyVector,
223
+ materialAOMap,
210
224
  materialClearcoat,
211
225
  materialClearcoatNormal,
212
226
  materialClearcoatRoughness,
@@ -216,6 +230,7 @@ export {
216
230
  materialIridescence,
217
231
  materialIridescenceIOR,
218
232
  materialIridescenceThickness,
233
+ materialLightMap,
219
234
  materialLineDashOffset,
220
235
  materialLineDashSize,
221
236
  materialLineGapSize,
@@ -264,8 +279,9 @@ export * from "./accessors/PositionNode.js";
264
279
  export { default as ReferenceNode, reference, referenceBuffer } from "./accessors/ReferenceNode.js";
265
280
  export * from "./accessors/ReflectVectorNode.js";
266
281
  export { default as RendererReferenceNode, rendererReference } from "./accessors/RendererReferenceNode.js";
267
- export { default as SkinningNode, skinning } from "./accessors/SkinningNode.js";
282
+ export { default as SkinningNode, skinning, skinningReference } from "./accessors/SkinningNode.js";
268
283
  export { default as StorageBufferNode, storage, storageObject } from "./accessors/StorageBufferNode.js";
284
+ export { default as StorageTextureNode, storageTexture, textureStore } from "./accessors/StorageTextureNode.js";
269
285
  export * from "./accessors/TangentNode.js";
270
286
  export { default as Texture3DNode, texture3D } from "./accessors/Texture3DNode.js";
271
287
  export { default as TextureBicubicNode, textureBicubic } from "./accessors/TextureBicubicNode.js";
@@ -279,11 +295,11 @@ export { default as VertexColorNode, vertexColor } from "./accessors/VertexColor
279
295
  export { afterImage, default as AfterImageNode } from "./display/AfterImageNode.js";
280
296
  export { anamorphic, default as AnamorphicNode } from "./display/AnamorphicNode.js";
281
297
  export { BlendMode, burn, default as BlendModeNode, dodge, overlay, screen } from "./display/BlendModeNode.js";
298
+ export { bloom, default as BloomNode } from "./display/BloomNode.js";
282
299
  export {
283
300
  ColorAdjustmentMethod,
284
301
  default as ColorAdjustmentNode,
285
302
  hue,
286
- lumaCoeffs,
287
303
  luminance,
288
304
  saturation,
289
305
  threshold,
@@ -297,19 +313,31 @@ export {
297
313
  linearTosRGB,
298
314
  sRGBToLinear,
299
315
  } from "./display/ColorSpaceNode.js";
316
+ export { default as DenoiseNode, denoise } from "./display/DenoiseNode.js";
317
+ export { default as DepthOfFieldNode, dof } from "./display/DepthOfFieldNode.js";
318
+ export { default as DotScreenNode, dotScreen } from "./display/DotScreenNode.js";
319
+ export { default as FilmNode, film } from "./display/FilmNode.js";
300
320
  export { default as FrontFacingNode, faceDirection, frontFacing } from "./display/FrontFacingNode.js";
321
+ export { default as FXAANode, fxaa } from "./display/FXAANode.js";
301
322
  export { default as GaussianBlurNode, gaussianBlur } from "./display/GaussianBlurNode.js";
323
+ export { ao, default as GTAONode } from "./display/GTAONode.js";
324
+ export { default as Lut3DNode, lut3D } from "./display/Lut3DNode.js";
302
325
  export { default as NormalMapNode, normalMap } from "./display/NormalMapNode.js";
326
+ export { default as PixelationPassNode, pixelationPass } from "./display/PixelationPassNode.js";
303
327
  export { default as PosterizeNode, posterize } from "./display/PosterizeNode.js";
328
+ export { default as RenderOutputNode, renderOutput } from "./display/RenderOutputNode.js";
329
+ export { default as RGBShiftNode, rgbShift } from "./display/RGBShiftNode.js";
330
+ export { default as SobelOperatorNode, sobel } from "./display/SobelOperatorNode.js";
304
331
  export { default as ToneMappingNode, toneMapping } from "./display/ToneMappingNode.js";
332
+ export { default as TransitionNode, transition } from "./display/TransitionNode.js";
305
333
  export {
306
334
  default as ViewportDepthNode,
307
335
  depth,
308
- depthPixel,
309
- depthTexture,
336
+ linearDepth,
310
337
  orthographicDepthToViewZ,
311
338
  perspectiveDepthToViewZ,
312
339
  ViewportDepthNodeScope,
340
+ viewportLinearDepth,
313
341
  viewZToOrthographicDepth,
314
342
  viewZToPerspectiveDepth,
315
343
  } from "./display/ViewportDepthNode.js";
@@ -326,7 +354,7 @@ export {
326
354
  export { default as ViewportSharedTextureNode, viewportSharedTexture } from "./display/ViewportSharedTextureNode.js";
327
355
  export { default as ViewportTextureNode, viewportMipTexture, viewportTexture } from "./display/ViewportTextureNode.js";
328
356
 
329
- export { default as PassNode, depthPass, pass, PassNodeScope, texturePass } from "./display/PassNode.js";
357
+ export { default as PassNode, depthPass, pass, PassNodeScope, passTexture } from "./display/PassNode.js";
330
358
 
331
359
  // code
332
360
  export { code, CodeNodeInclude, default as CodeNode, glsl, js, wgsl } from "./code/CodeNode.js";
@@ -348,6 +376,7 @@ export { compute, default as ComputeNode } from "./gpgpu/ComputeNode.js";
348
376
  // lighting
349
377
  export { default as AnalyticLightNode } from "./lighting/AnalyticLightNode.js";
350
378
  export { default as AONode } from "./lighting/AONode.js";
379
+ export { default as BasicEnvironmentNode } from "./lighting/BasicEnvironmentNode.js";
351
380
  export { default as EnvironmentNode } from "./lighting/EnvironmentNode.js";
352
381
  export { default as HemisphereLightNode } from "./lighting/HemisphereLightNode.js";
353
382
  export { default as IrradianceNode } from "./lighting/IrradianceNode.js";
@@ -355,6 +384,7 @@ export { default as LightingContextNode, lightingContext } from "./lighting/Ligh
355
384
  export { default as LightingNode } from "./lighting/LightingNode.js";
356
385
  export { default as LightsNode, lights } from "./lighting/LightsNode.js";
357
386
  export { default as PointLightNode } from "./lighting/PointLightNode.js";
387
+ export { default as RectAreaLightNode, RectAreaLightTexturesLib } from "./lighting/RectAreaLightNode.js";
358
388
  export { default as SpotLightNode } from "./lighting/SpotLightNode.js";
359
389
 
360
390
  // pmrem
@@ -1,4 +1,4 @@
1
- import { BatchedMesh } from "three";
1
+ import { BatchedMesh } from "../../objects/BatchedMesh.js";
2
2
  import Node from "../core/Node.js";
3
3
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
 
@@ -1,4 +1,7 @@
1
- import { BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, TypedArray, Usage } from "three";
1
+ import { Usage } from "../../constants.js";
2
+ import { BufferAttribute, TypedArray } from "../../core/BufferAttribute.js";
3
+ import { InterleavedBuffer } from "../../core/InterleavedBuffer.js";
4
+ import { InterleavedBufferAttribute } from "../../core/InterleavedBufferAttribute.js";
2
5
  import InputNode from "../core/InputNode.js";
3
6
  import NodeBuilder from "../core/NodeBuilder.js";
4
7
  declare class BufferAttributeNode extends InputNode<TypedArray | InterleavedBuffer | BufferAttribute> {
@@ -15,6 +18,7 @@ declare class BufferAttributeNode extends InputNode<TypedArray | InterleavedBuff
15
18
  bufferStride?: number,
16
19
  bufferOffset?: number,
17
20
  );
21
+ getHash(builder: NodeBuilder): string;
18
22
  getNodeType(builder: NodeBuilder): string | null;
19
23
  setup(builder: NodeBuilder): void;
20
24
  generate(builder: NodeBuilder): string | null | undefined;
@@ -1,4 +1,6 @@
1
- import { Matrix3, Matrix4, Vector3 } from "three";
1
+ import { Matrix3 } from "../../math/Matrix3.js";
2
+ import { Matrix4 } from "../../math/Matrix4.js";
3
+ import { Vector3 } from "../../math/Vector3.js";
2
4
  import UniformNode from "../core/UniformNode.js";
3
5
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
6
 
@@ -1,22 +1,30 @@
1
- import { CubeTexture } from "three";
1
+ import { CubeTexture } from "../../textures/CubeTexture.js";
2
2
  import Node from "../core/Node.js";
3
3
  import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
  import TextureNode from "./TextureNode.js";
5
5
 
6
- export default class CubeTextureNode extends TextureNode {
6
+ declare class CubeTextureNode extends TextureNode {
7
7
  isCubeTextureNode: boolean;
8
8
  uvNode: ShaderNodeObject<Node> | null;
9
9
  levelNode: ShaderNodeObject<Node> | null;
10
10
 
11
- constructor(value: CubeTexture, uvNode?: ShaderNodeObject<Node> | null, levelNode?: ShaderNodeObject<Node> | null);
11
+ constructor(
12
+ value: CubeTexture,
13
+ uvNode?: ShaderNodeObject<Node> | null,
14
+ levelNode?: ShaderNodeObject<Node> | null,
15
+ biasNode?: ShaderNodeObject<Node> | null,
16
+ );
12
17
 
13
18
  getDefaultUV(): Node;
14
19
  }
15
20
 
21
+ export default CubeTextureNode;
22
+
16
23
  export const cubeTexture: (
17
24
  value: CubeTexture,
18
25
  uvNode?: NodeRepresentation,
19
26
  levelNode?: NodeRepresentation,
27
+ biasNode?: NodeRepresentation,
20
28
  ) => ShaderNodeObject<CubeTextureNode>;
21
29
 
22
30
  declare module "../shadernode/ShaderNode.js" {
@@ -1,4 +1,4 @@
1
- import { InstancedMesh } from "three";
1
+ import { InstancedMesh } from "../../objects/InstancedMesh.js";
2
2
  import Node from "../core/Node.js";
3
3
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import { Vector2 } from "three";
1
+ import { Vector2 } from "../../math/Vector2.js";
2
2
  import Node from "../core/Node.js";
3
3
  import UniformNode from "../core/UniformNode.js";
4
4
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
@@ -38,7 +38,10 @@ export type MaterialNodeScope =
38
38
  | typeof MaterialNode.LINE_WIDTH
39
39
  | typeof MaterialNode.LINE_DASH_OFFSET
40
40
  | typeof MaterialNode.POINT_WIDTH
41
- | typeof MaterialNode.DISPERSION;
41
+ | typeof MaterialNode.DISPERSION
42
+ | typeof MaterialNode.LIGHT_MAP
43
+ | typeof MaterialNode.AO_MAP
44
+ | typeof MaterialNode.REFRACTION_RATIO;
42
45
 
43
46
  export default class MaterialNode extends Node {
44
47
  static ALPHA_TEST: "alphaTest";
@@ -76,6 +79,9 @@ export default class MaterialNode extends Node {
76
79
  static LINE_DASH_OFFSET: "dashOffset";
77
80
  static POINT_WIDTH: "pointWidth";
78
81
  static DISPERSION: "dispersion";
82
+ static LIGHT_MAP: "light";
83
+ static AO_MAP: "ao";
84
+ static REFRACTION_RATIO: "refractionRatio";
79
85
 
80
86
  scope: MaterialNodeScope;
81
87
  constructor(scope?: MaterialNodeScope);
@@ -118,4 +124,7 @@ export const materialLineWidth: ShaderNodeObject<MaterialNode>;
118
124
  export const materialLineDashOffset: ShaderNodeObject<MaterialNode>;
119
125
  export const materialPointWidth: ShaderNodeObject<MaterialNode>;
120
126
  export const materialDispersion: ShaderNodeObject<MaterialNode>;
127
+ export const materialLightMap: ShaderNodeObject<MaterialNode>;
128
+ export const materialAOMap: ShaderNodeObject<MaterialNode>;
129
+ export const materialRefractionRatio: ShaderNodeObject<MaterialNode>;
121
130
  export const materialAnisotropyVector: ShaderNodeObject<UniformNode<Vector2>>;
@@ -1,4 +1,4 @@
1
- import { Material } from "three";
1
+ import { Material } from "../../materials/Material.js";
2
2
  import { NodeOrType, ShaderNodeObject } from "../shadernode/ShaderNode.js";
3
3
  import ReferenceNode from "./ReferenceNode.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import { Matrix4 } from "three/src/Three.js";
1
+ import { Matrix4 } from "../../math/Matrix4.js";
2
2
  import { UniformNode } from "../Nodes.js";
3
3
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
  import Object3DNode from "./Object3DNode.js";
@@ -1,12 +1,12 @@
1
1
  import AttributeNode from "../core/AttributeNode.js";
2
2
  import PropertyNode from "../core/PropertyNode.js";
3
3
  import VarNode from "../core/VarNode.js";
4
- import MathNode from "../math/MathNode.js";
5
4
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
6
5
 
7
6
  export const normalGeometry: ShaderNodeObject<AttributeNode>;
8
7
  export const normalLocal: ShaderNodeObject<VarNode>;
9
- export const normalView: ShaderNodeObject<MathNode>;
10
- export const normalWorld: ShaderNodeObject<MathNode>;
8
+ export const normalView: ShaderNodeObject<VarNode>;
9
+ export const normalWorld: ShaderNodeObject<VarNode>;
11
10
  export const transformedNormalView: ShaderNodeObject<PropertyNode>;
11
+ export const transformedNormalWorld: ShaderNodeObject<VarNode>;
12
12
  export const transformedClearcoatNormalView: ShaderNodeObject<PropertyNode>;
@@ -1,4 +1,4 @@
1
- import { Object3D } from "three";
1
+ import { Object3D } from "../../core/Object3D.js";
2
2
  import Node from "../core/Node.js";
3
3
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
 
@@ -3,4 +3,7 @@ import VarNode from "../core/VarNode.js";
3
3
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
 
5
5
  export const reflectView: ShaderNodeObject<Node>;
6
+ export const refractView: ShaderNodeObject<Node>;
7
+
6
8
  export const reflectVector: ShaderNodeObject<VarNode>;
9
+ export const refractVector: ShaderNodeObject<VarNode>;
@@ -1,4 +1,4 @@
1
- import { SkinnedMesh } from "three";
1
+ import { SkinnedMesh } from "../../objects/SkinnedMesh.js";
2
2
  import Node from "../core/Node.js";
3
3
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
4
 
@@ -1,5 +1,6 @@
1
1
  import StorageBufferAttribute from "../../renderers/common/StorageBufferAttribute.js";
2
2
  import StorageInstancedBufferAttribute from "../../renderers/common/StorageInstancedBufferAttribute.js";
3
+ import { GPUBufferBindingType } from "../../renderers/webgpu/utils/WebGPUConstants.js";
3
4
  import { NodeOrType, NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
5
  import StorageArrayElementNode from "../utils/StoargeArrayElementNode.js";
5
6
  import BufferNode from "./BufferNode.js";
@@ -8,6 +9,8 @@ export default class StorageBufferNode extends BufferNode {
8
9
  readonly isStorageBufferNode: true;
9
10
  bufferObject: boolean;
10
11
 
12
+ access: GPUBufferBindingType;
13
+
11
14
  constructor(
12
15
  value: StorageBufferAttribute | StorageInstancedBufferAttribute,
13
16
  bufferType: string,
@@ -17,6 +20,10 @@ export default class StorageBufferNode extends BufferNode {
17
20
  element(indexNode: NodeRepresentation): ShaderNodeObject<StorageArrayElementNode>;
18
21
 
19
22
  setBufferObject(value: boolean): this;
23
+
24
+ setAccess(value: GPUBufferBindingType): this;
25
+
26
+ toReadOnly(): this;
20
27
  }
21
28
 
22
29
  export const storage: (
@@ -0,0 +1,40 @@
1
+ import { GPUStorageTextureAccess } from "../../renderers/webgpu/utils/WebGPUConstants.js";
2
+ import { Texture } from "../../textures/Texture.js";
3
+ import Node from "../core/Node.js";
4
+ import NodeBuilder from "../core/NodeBuilder.js";
5
+ import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
6
+ import TextureNode from "./TextureNode.js";
7
+
8
+ export default class StorageTextureNode extends TextureNode {
9
+ storeNode: Node | null;
10
+
11
+ readonly isStorageTextureNode: true;
12
+
13
+ access: GPUStorageTextureAccess;
14
+
15
+ constructor(
16
+ value: Texture,
17
+ uvNode?: ShaderNodeObject<Node> | null,
18
+ storeNode?: Node | null,
19
+ );
20
+
21
+ setAccess(value: GPUStorageTextureAccess): this;
22
+
23
+ toReadOnly(): this;
24
+
25
+ toWriteOnly(): this;
26
+
27
+ generateStore(builder: NodeBuilder): void;
28
+ }
29
+
30
+ export const storageTexture: (
31
+ value: Texture,
32
+ uvNode?: NodeRepresentation,
33
+ storeNode?: NodeRepresentation,
34
+ ) => ShaderNodeObject<StorageTextureNode>;
35
+
36
+ export const textureStore: (
37
+ value: Texture,
38
+ uvNode?: NodeRepresentation,
39
+ storeNode?: NodeRepresentation,
40
+ ) => ShaderNodeObject<StorageTextureNode>;
@@ -1,4 +1,5 @@
1
- import { CubeTexture, Texture } from "three";
1
+ import { CubeTexture } from "../../textures/CubeTexture.js";
2
+ import { Texture } from "../../textures/Texture.js";
2
3
  import Node from "../core/Node.js";
3
4
  import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
5
  import TextureNode from "./TextureNode.js";
@@ -10,7 +11,7 @@ export default class Texture3DNode extends TextureNode {
10
11
  }
11
12
 
12
13
  export const texture3D: (
13
- value: CubeTexture,
14
+ value: Texture,
14
15
  uvNode?: NodeRepresentation,
15
16
  levelNode?: NodeRepresentation,
16
17
  ) => ShaderNodeObject<Texture3DNode>;
@@ -1,4 +1,4 @@
1
- import { Texture } from "three";
1
+ import { Texture } from "../../textures/Texture.js";
2
2
  import Node from "../core/Node.js";
3
3
  import UniformNode from "../core/UniformNode.js";
4
4
  import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
@@ -8,6 +8,7 @@ export default class TextureNode extends UniformNode<Texture> {
8
8
 
9
9
  uvNode: ShaderNodeObject<Node> | null;
10
10
  levelNode: ShaderNodeObject<Node> | null;
11
+ biasNode: ShaderNodeObject<Node> | null;
11
12
  compareNode: Node | null;
12
13
  depthNode: Node | null;
13
14
  gradNode: Node | null;
@@ -17,7 +18,12 @@ export default class TextureNode extends UniformNode<Texture> {
17
18
 
18
19
  referenceNode: Node | null;
19
20
 
20
- constructor(value: Texture, uvNode?: ShaderNodeObject<Node> | null, levelNode?: ShaderNodeObject<Node> | null);
21
+ constructor(
22
+ value: Texture,
23
+ uvNode?: ShaderNodeObject<Node> | null,
24
+ levelNode?: ShaderNodeObject<Node> | null,
25
+ biasNode?: ShaderNodeObject<Node> | null,
26
+ );
21
27
 
22
28
  getDefaultUV(): Node;
23
29
 
@@ -30,6 +36,7 @@ export const texture: (
30
36
  value: Texture,
31
37
  uvNode?: NodeRepresentation,
32
38
  levelNode?: NodeRepresentation,
39
+ biasNode?: NodeRepresentation,
33
40
  ) => ShaderNodeObject<TextureNode>;
34
41
  export const sampler: (aTexture: Texture | TextureNode) => ShaderNodeObject<Node>;
35
42
 
@@ -3,19 +3,18 @@ import Node from "./Node.js";
3
3
  import NodeCache from "./NodeCache.js";
4
4
 
5
5
  export default class CacheNode extends Node {
6
- isCacheNode: true;
7
6
  node: Node;
8
- cache: NodeCache;
7
+ parent: boolean;
9
8
 
10
- constructor(node: Node, cache?: NodeCache);
9
+ readonly isCacheNode: true;
10
+
11
+ constructor(node: Node, parent?: boolean);
11
12
  }
12
13
 
13
14
  export const cache: (node: Node, cache?: NodeCache) => ShaderNodeObject<CacheNode>;
14
- export const globalCache: (node: Node) => ShaderNodeObject<CacheNode>;
15
15
 
16
16
  declare module "../shadernode/ShaderNode.js" {
17
17
  interface NodeElements {
18
18
  cache: typeof cache;
19
- globalCache: typeof globalCache;
20
19
  }
21
20
  }
@@ -1,7 +1,7 @@
1
1
  import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
2
2
  import Node from "./Node.js";
3
3
 
4
- export type IndexNodeScope = typeof IndexNode.VERTEX | typeof IndexNode.INSTANCE;
4
+ export type IndexNodeScope = typeof IndexNode.VERTEX | typeof IndexNode.INSTANCE | typeof IndexNode.DRAW;
5
5
 
6
6
  export default class IndexNode extends Node {
7
7
  scope: IndexNodeScope;
@@ -12,7 +12,9 @@ export default class IndexNode extends Node {
12
12
 
13
13
  static VERTEX: "vertex";
14
14
  static INSTANCE: "instance";
15
+ static DRAW: "draw";
15
16
  }
16
17
 
17
18
  export const vertexIndex: ShaderNodeObject<IndexNode>;
18
19
  export const instanceIndex: ShaderNodeObject<IndexNode>;
20
+ export const drawIndex: ShaderNodeObject<IndexNode>;
@@ -13,7 +13,16 @@ export interface LightingModelDirectInput {
13
13
  lightDirection: Node;
14
14
  lightColor: Node;
15
15
  reflectedLight: LightingModelReflectedLight;
16
- shadowMask: Node;
16
+ }
17
+
18
+ export interface LightingModelDirectRectAreaInput {
19
+ lightColor: Node;
20
+ lightPosition: Node;
21
+ halfWidth: Node;
22
+ halfHeight: Node;
23
+ reflectedLight: LightingModelReflectedLight;
24
+ ltc_1: Node;
25
+ ltc_2: Node;
17
26
  }
18
27
 
19
28
  export interface LightingModelIndirectInput {
@@ -31,7 +40,7 @@ export default class LightingModel {
31
40
  start(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
32
41
  finish(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
33
42
  direct(input: LightingModelDirectInput, stack: StackNode, builder: NodeBuilder): void;
34
- indirectDiffuse(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
35
- indirectSpecular(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
43
+ directRectArea(input: LightingModelDirectRectAreaInput, stack: StackNode, builder: NodeBuilder): void;
44
+ indirect(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
36
45
  ambientOcclusion(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
37
46
  }
@@ -0,0 +1,19 @@
1
+ import { Node } from "../Nodes.js";
2
+ import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
3
+ import OutputStructNode from "./OutputStructNode.js";
4
+
5
+ declare class MRTNode extends OutputStructNode {
6
+ outputNodes: { [name: string]: Node };
7
+
8
+ readonly isMRTNode: true;
9
+
10
+ constructor(outputNodes: { [name: string]: Node });
11
+
12
+ getNode(name: string): Node;
13
+
14
+ merge(mrtNode: MRTNode): ShaderNodeObject<MRTNode>;
15
+ }
16
+
17
+ export default MRTNode;
18
+
19
+ export const mrt: (outputNodes: { [name: string]: Node }) => ShaderNodeObject<MRTNode>;
@@ -1,4 +1,4 @@
1
- import { EventDispatcher } from "three";
1
+ import { EventDispatcher } from "../../core/EventDispatcher.js";
2
2
  import { NodeUpdateType } from "./constants.js";
3
3
  import NodeBuilder from "./NodeBuilder.js";
4
4
  import NodeFrame from "./NodeFrame.js";
@@ -27,7 +27,7 @@ interface NodeJSONInputNodes {
27
27
  | string
28
28
  | undefined;
29
29
  }
30
- interface NodeJSONInputData {
30
+ export interface NodeJSONInputData {
31
31
  inputNodes?: NodeJSONInputNodes | undefined;
32
32
  meta: {
33
33
  textures: {
@@ -38,13 +38,7 @@ interface NodeJSONInputData {
38
38
  };
39
39
  };
40
40
  }
41
- interface NodeJSONInputData {
42
- uuid: string;
43
- type: string | undefined;
44
- metadata?: NodeJSONMetadata;
45
- inputNodes?: NodeJSONInputNodes | undefined;
46
- }
47
- interface NodeJSONIntermediateOutputData {
41
+ export interface NodeJSONIntermediateOutputData {
48
42
  uuid: string;
49
43
  type: string | undefined;
50
44
  meta?: NodeJSONMeta | undefined;
@@ -69,6 +63,7 @@ declare class Node extends EventDispatcher<{
69
63
  nodeType: string | null;
70
64
  updateType: NodeUpdateType;
71
65
  updateBeforeType: NodeUpdateType;
66
+ updateAfterType: NodeUpdateType;
72
67
  uuid: string;
73
68
  version: number;
74
69
  _cacheKey: string | null;
@@ -95,15 +90,16 @@ declare class Node extends EventDispatcher<{
95
90
  getHash(builder: NodeBuilder): string;
96
91
  getUpdateType(): NodeUpdateType;
97
92
  getUpdateBeforeType(): NodeUpdateType;
93
+ getUpdateAfterType(): NodeUpdateType;
98
94
  getElementType(builder: NodeBuilder): "bool" | "int" | "float" | "vec2" | "vec3" | "vec4" | "uint" | null;
99
95
  getNodeType(builder: NodeBuilder): string | null;
100
96
  getShared(builder: NodeBuilder): Node;
101
97
  setup(builder: NodeBuilder): unknown;
102
- construct(builder: NodeBuilder): unknown;
103
98
  increaseUsage(builder: NodeBuilder): number;
104
99
  analyze(builder: NodeBuilder): void;
105
100
  generate(builder: NodeBuilder, output?: string | null): string | null | undefined;
106
101
  updateBefore(frame: NodeFrame): void;
102
+ updateAfter(frame: NodeFrame): void;
107
103
  update(frame: NodeFrame): void;
108
104
  build(builder: NodeBuilder, output?: string | null): string | null;
109
105
  getSerializeChildren(): Generator<import("./NodeUtils.js").NodeChild, void, unknown>;
@@ -1,4 +1,8 @@
1
- import { BufferGeometry, Material, Object3D, Renderer } from "three";
1
+ import { BufferGeometry } from "../../core/BufferGeometry.js";
2
+ import { Object3D } from "../../core/Object3D.js";
3
+ import { Material } from "../../materials/Material.js";
4
+ import Renderer from "../../renderers/common/Renderer.js";
5
+ import { Texture } from "../../textures/Texture.js";
2
6
  import FogNode from "../fog/FogNode.js";
3
7
  import LightsNode from "../lighting/LightsNode.js";
4
8
  import { NodeShaderStage } from "./constants.js";
@@ -58,6 +62,7 @@ export default abstract class NodeBuilder {
58
62
  setHashNode(node: Node, hash: string): void;
59
63
  addNode(node: Node): void;
60
64
  get currentNode(): Node;
65
+ isFilteredTexture(texture: Texture): boolean;
61
66
  getMethod(method: string): string;
62
67
  getNodeFromHash(hash: string): Node;
63
68
 
@@ -65,10 +70,15 @@ export default abstract class NodeBuilder {
65
70
 
66
71
  setContext(context: NodeBuilderContext): void;
67
72
  getContext(): NodeBuilderContext;
73
+ setCache(cache: NodeCache): void;
74
+ getCache(): NodeCache;
75
+ getCacheFromNode(node: Node, parent?: boolean): NodeCache;
68
76
  isAvailable(name: string): boolean;
69
77
 
70
78
  abstract getInstanceIndex(): string;
71
79
 
80
+ abstract getDrawIndex(): string | null;
81
+
72
82
  abstract getFrontFacing(): string;
73
83
 
74
84
  abstract getFragCoord(): string;
@@ -83,7 +93,7 @@ export default abstract class NodeBuilder {
83
93
 
84
94
  getAttribute(name: string, type: string): NodeAttribute;
85
95
 
86
- getPropertyName(node: Node, shaderStage: NodeShaderStage): string;
96
+ getPropertyName<TValue>(node: NodeVar | NodeUniform<TValue>, shaderStage: NodeShaderStage): string;
87
97
  isVector(type: string): boolean;
88
98
 
89
99
  isMatrix(type: string): boolean;
@@ -117,7 +127,7 @@ export default abstract class NodeBuilder {
117
127
  ): FlowData;
118
128
  hasGeometryAttribute(name: string): boolean;
119
129
  abstract getAttributes(shaderStage: NodeShaderStage): string;
120
- abstract getVarys(shaderStage: NodeShaderStage): string;
130
+ abstract getVaryings(shaderStage: NodeShaderStage): string;
121
131
  getVars(shaderStage: NodeShaderStage): string;
122
132
  abstract getUniforms(stage: NodeShaderStage): string;
123
133
  getCodes(shaderStage: NodeShaderStage): string;