@types/three 0.182.0 → 0.183.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 (312) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +0 -3
  3. three/examples/jsm/controls/OrbitControls.d.ts +39 -0
  4. three/examples/jsm/effects/AnaglyphEffect.d.ts +4 -0
  5. three/examples/jsm/environments/ColorEnvironment.d.ts +9 -0
  6. three/examples/jsm/gpgpu/BitonicSort.d.ts +5 -5
  7. three/examples/jsm/helpers/AnimationPathHelper.d.ts +38 -0
  8. three/examples/jsm/helpers/ViewHelper.d.ts +4 -1
  9. three/examples/jsm/inspector/tabs/Parameters.d.ts +3 -0
  10. three/examples/jsm/inspector/ui/Item.d.ts +5 -0
  11. three/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -1
  12. three/examples/jsm/lights/LightProbeGenerator.d.ts +11 -5
  13. three/examples/jsm/loaders/ColladaLoader.d.ts +27 -4
  14. three/examples/jsm/objects/SkyMesh.d.ts +11 -6
  15. three/examples/jsm/objects/Water2Mesh.d.ts +7 -7
  16. three/examples/jsm/objects/WaterMesh.d.ts +6 -6
  17. three/examples/jsm/postprocessing/EffectComposer.d.ts +9 -10
  18. three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +4 -9
  19. three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +30 -0
  20. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -1
  21. three/examples/jsm/tsl/display/BilateralBlurNode.d.ts +27 -0
  22. three/examples/jsm/tsl/display/BloomNode.d.ts +5 -5
  23. three/examples/jsm/tsl/display/CRT.d.ts +22 -0
  24. three/examples/jsm/tsl/display/DenoiseNode.d.ts +5 -5
  25. three/examples/jsm/tsl/display/DotScreenNode.d.ts +4 -6
  26. three/examples/jsm/tsl/display/GTAONode.d.ts +8 -8
  27. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +4 -2
  28. three/examples/jsm/tsl/display/GodraysNode.d.ts +20 -0
  29. three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -6
  30. three/examples/jsm/tsl/display/Lut3DNode.d.ts +5 -5
  31. three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -1
  32. three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -6
  33. three/examples/jsm/tsl/display/PixelationPassNode.d.ts +10 -10
  34. three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -2
  35. three/examples/jsm/tsl/display/RetroPassNode.d.ts +17 -0
  36. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -1
  37. three/examples/jsm/tsl/display/SSGINode.d.ts +11 -11
  38. three/examples/jsm/tsl/display/SSRNode.d.ts +6 -6
  39. three/examples/jsm/tsl/display/SSSNode.d.ts +5 -5
  40. three/examples/jsm/tsl/display/Shape.d.ts +3 -0
  41. three/examples/jsm/tsl/display/TransitionNode.d.ts +3 -3
  42. three/examples/jsm/tsl/display/boxBlur.d.ts +1 -1
  43. three/examples/jsm/tsl/display/depthAwareBlend.d.ts +15 -0
  44. three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
  45. three/examples/jsm/tsl/math/Bayer.d.ts +2 -0
  46. three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -2
  47. three/package.json +3 -3
  48. three/src/Three.Core.d.ts +1 -1
  49. three/src/Three.TSL.d.ts +6 -11
  50. three/src/Three.WebGPU.Nodes.d.ts +2 -0
  51. three/src/Three.WebGPU.d.ts +3 -0
  52. three/src/Three.d.ts +2 -2
  53. three/src/animation/AnimationClip.d.ts +1 -1
  54. three/src/animation/KeyframeTrack.d.ts +19 -5
  55. three/src/animation/PropertyMixer.d.ts +5 -4
  56. three/src/audio/Audio.d.ts +224 -157
  57. three/src/audio/AudioAnalyser.d.ts +32 -27
  58. three/src/audio/AudioContext.d.ts +12 -12
  59. three/src/audio/AudioListener.d.ts +44 -65
  60. three/src/audio/PositionalAudio.d.ts +69 -62
  61. three/src/cameras/ArrayCamera.d.ts +21 -24
  62. three/src/cameras/Camera.d.ts +14 -53
  63. three/src/cameras/CubeCamera.d.ts +32 -28
  64. three/src/cameras/OrthographicCamera.d.ts +70 -100
  65. three/src/cameras/PerspectiveCamera.d.ts +133 -146
  66. three/src/cameras/StereoCamera.d.ts +24 -30
  67. three/src/constants.d.ts +14 -2
  68. three/src/core/Clock.d.ts +3 -0
  69. three/src/core/Object3D.d.ts +31 -7
  70. three/src/geometries/TorusGeometry.d.ts +22 -3
  71. three/src/helpers/ArrowHelper.d.ts +34 -50
  72. three/src/helpers/AxesHelper.d.ts +22 -36
  73. three/src/helpers/Box3Helper.d.ts +14 -25
  74. three/src/helpers/BoxHelper.d.ts +28 -39
  75. three/src/helpers/CameraHelper.d.ts +31 -52
  76. three/src/helpers/DirectionalLightHelper.d.ts +32 -53
  77. three/src/helpers/GridHelper.d.ts +15 -29
  78. three/src/helpers/HemisphereLightHelper.d.ts +26 -49
  79. three/src/helpers/PlaneHelper.d.ts +21 -33
  80. three/src/helpers/PointLightHelper.d.ts +25 -50
  81. three/src/helpers/PolarGridHelper.d.ts +19 -32
  82. three/src/helpers/SkeletonHelper.d.ts +26 -50
  83. three/src/helpers/SpotLightHelper.d.ts +28 -55
  84. three/src/lights/AmbientLight.d.ts +15 -23
  85. three/src/lights/DirectionalLight.d.ts +40 -82
  86. three/src/lights/DirectionalLightShadow.d.ts +6 -61
  87. three/src/lights/HemisphereLight.d.ts +20 -47
  88. three/src/lights/Light.d.ts +18 -48
  89. three/src/lights/LightProbe.d.ts +24 -29
  90. three/src/lights/LightShadow.d.ts +107 -91
  91. three/src/lights/PointLight.d.ts +36 -77
  92. three/src/lights/PointLightShadow.d.ts +9 -6
  93. three/src/lights/RectAreaLight.d.ts +39 -59
  94. three/src/lights/SpotLight.d.ts +62 -116
  95. three/src/lights/SpotLightShadow.d.ts +17 -59
  96. three/src/lights/webgpu/IESSpotLight.d.ts +13 -1
  97. three/src/lights/webgpu/ProjectorLight.d.ts +9 -10
  98. three/src/materials/MeshLambertMaterial.d.ts +6 -0
  99. three/src/materials/MeshPhongMaterial.d.ts +6 -0
  100. three/src/materials/nodes/Line2NodeMaterial.d.ts +0 -6
  101. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +0 -4
  102. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -2
  103. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +0 -2
  104. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +0 -2
  105. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +5 -8
  106. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +0 -4
  107. three/src/materials/nodes/NodeMaterial.d.ts +9 -3
  108. three/src/materials/nodes/SpriteNodeMaterial.d.ts +0 -3
  109. three/src/materials/nodes/VolumeNodeMaterial.d.ts +0 -2
  110. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +39 -93
  111. three/src/math/Color.d.ts +1 -0
  112. three/src/math/Vector3.d.ts +2 -2
  113. three/src/math/interpolants/BezierInterpolant.d.ts +7 -0
  114. three/src/nodes/Nodes.d.ts +55 -35
  115. three/src/nodes/TSL.d.ts +2 -5
  116. three/src/nodes/accessors/Arrays.d.ts +19 -10
  117. three/src/nodes/accessors/BufferAttributeNode.d.ts +99 -33
  118. three/src/nodes/accessors/BufferNode.d.ts +21 -7
  119. three/src/nodes/accessors/Camera.d.ts +10 -10
  120. three/src/nodes/accessors/CubeTextureNode.d.ts +1 -1
  121. three/src/nodes/accessors/InstanceNode.d.ts +6 -0
  122. three/src/nodes/accessors/Lights.d.ts +9 -6
  123. three/src/nodes/accessors/MaterialNode.d.ts +1 -3
  124. three/src/nodes/accessors/MaterialProperties.d.ts +4 -4
  125. three/src/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
  126. three/src/nodes/accessors/ModelNode.d.ts +34 -17
  127. three/src/nodes/accessors/MorphNode.d.ts +1 -1
  128. three/src/nodes/accessors/Normal.d.ts +13 -15
  129. three/src/nodes/accessors/Object3DNode.d.ts +35 -16
  130. three/src/nodes/accessors/Position.d.ts +9 -7
  131. three/src/nodes/accessors/ReferenceNode.d.ts +16 -7
  132. three/src/nodes/accessors/ReflectVector.d.ts +4 -5
  133. three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
  134. three/src/nodes/accessors/SceneProperties.d.ts +5 -0
  135. three/src/nodes/accessors/SkinningNode.d.ts +5 -3
  136. three/src/nodes/accessors/StorageBufferNode.d.ts +49 -22
  137. three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
  138. three/src/nodes/accessors/Tangent.d.ts +5 -7
  139. three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
  140. three/src/nodes/accessors/TextureBicubic.d.ts +3 -2
  141. three/src/nodes/accessors/TextureNode.d.ts +19 -18
  142. three/src/nodes/accessors/UV.d.ts +1 -1
  143. three/src/nodes/accessors/UniformArrayNode.d.ts +10 -8
  144. three/src/nodes/accessors/UserDataNode.d.ts +1 -1
  145. three/src/nodes/accessors/VelocityNode.d.ts +3 -3
  146. three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
  147. three/src/nodes/code/FunctionCallNode.d.ts +0 -1
  148. three/src/nodes/code/FunctionNode.d.ts +7 -3
  149. three/src/nodes/core/ArrayNode.d.ts +2 -3
  150. three/src/nodes/core/AttributeNode.d.ts +12 -6
  151. three/src/nodes/core/BypassNode.d.ts +2 -3
  152. three/src/nodes/core/ConstNode.d.ts +10 -3
  153. three/src/nodes/core/ContextNode.d.ts +23 -28
  154. three/src/nodes/core/IndexNode.d.ts +1 -1
  155. three/src/nodes/core/InputNode.d.ts +12 -4
  156. three/src/nodes/core/InspectorNode.d.ts +2 -3
  157. three/src/nodes/core/IsolateNode.d.ts +2 -7
  158. three/src/nodes/core/MRTNode.d.ts +7 -0
  159. three/src/nodes/core/Node.d.ts +258 -39
  160. three/src/nodes/core/NodeAttribute.d.ts +30 -5
  161. three/src/nodes/core/NodeBuilder.d.ts +5 -3
  162. three/src/nodes/core/NodeCache.d.ts +24 -48
  163. three/src/nodes/core/NodeError.d.ts +9 -0
  164. three/src/nodes/core/NodeParser.d.ts +2 -0
  165. three/src/nodes/core/NodeUniform.d.ts +33 -9
  166. three/src/nodes/core/NodeVar.d.ts +33 -5
  167. three/src/nodes/core/NodeVarying.d.ts +32 -4
  168. three/src/nodes/core/ParameterNode.d.ts +11 -4
  169. three/src/nodes/core/PropertyNode.d.ts +45 -35
  170. three/src/nodes/core/StackTrace.d.ts +9 -0
  171. three/src/nodes/core/StructType.d.ts +3 -1
  172. three/src/nodes/core/StructTypeNode.d.ts +19 -5
  173. three/src/nodes/core/TempNode.d.ts +9 -3
  174. three/src/nodes/core/UniformNode.d.ts +53 -15
  175. three/src/nodes/core/VarNode.d.ts +15 -14
  176. three/src/nodes/core/VaryingNode.d.ts +14 -19
  177. three/src/nodes/core/constants.d.ts +9 -4
  178. three/src/nodes/display/BlendModes.d.ts +7 -27
  179. three/src/nodes/display/ColorAdjustment.d.ts +8 -9
  180. three/src/nodes/display/ColorSpaceNode.d.ts +2 -8
  181. three/src/nodes/display/FrontFacingNode.d.ts +1 -1
  182. three/src/nodes/display/PassNode.d.ts +9 -5
  183. three/src/nodes/display/RenderOutputNode.d.ts +3 -7
  184. three/src/nodes/display/ScreenNode.d.ts +25 -17
  185. three/src/nodes/display/ToneMappingNode.d.ts +3 -7
  186. three/src/nodes/display/ViewportDepthNode.d.ts +11 -7
  187. three/src/nodes/display/ViewportTextureNode.d.ts +2 -0
  188. three/src/nodes/fog/Fog.d.ts +5 -3
  189. three/src/nodes/geometry/RangeNode.d.ts +51 -9
  190. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +2 -0
  191. three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
  192. three/src/nodes/gpgpu/ComputeNode.d.ts +2 -7
  193. three/src/nodes/lighting/AnalyticLightNode.d.ts +1 -1
  194. three/src/nodes/lighting/HemisphereLightNode.d.ts +3 -2
  195. three/src/nodes/lighting/LightProbeNode.d.ts +1 -1
  196. three/src/nodes/lighting/LightUtils.d.ts +1 -1
  197. three/src/nodes/lighting/LightingContextNode.d.ts +1 -1
  198. three/src/nodes/lighting/SpotLightNode.d.ts +0 -6
  199. three/src/nodes/materialx/MaterialXNodes.d.ts +11 -11
  200. three/src/nodes/math/BitcountNode.d.ts +2 -0
  201. three/src/nodes/math/ConditionalNode.d.ts +43 -22
  202. three/src/nodes/math/Hash.d.ts +1 -1
  203. three/src/nodes/math/MathNode.d.ts +603 -267
  204. three/src/nodes/math/MathUtils.d.ts +9 -5
  205. three/src/nodes/math/OperatorNode.d.ts +490 -227
  206. three/src/nodes/math/TriNoise3D.d.ts +3 -3
  207. three/src/nodes/pmrem/PMREMNode.d.ts +1 -1
  208. three/src/nodes/procedural/Checker.d.ts +1 -1
  209. three/src/nodes/tsl/TSLCore.d.ts +1683 -224
  210. three/src/nodes/utils/ArrayElementNode.d.ts +9 -4
  211. three/src/nodes/utils/DebugNode.d.ts +2 -5
  212. three/src/nodes/utils/Discard.d.ts +2 -3
  213. three/src/nodes/utils/FlipNode.d.ts +11 -0
  214. three/src/nodes/utils/LoopNode.d.ts +17 -13
  215. three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
  216. three/src/nodes/utils/Oscillators.d.ts +4 -4
  217. three/src/nodes/utils/Packing.d.ts +3 -3
  218. three/src/nodes/utils/PostProcessingUtils.d.ts +5 -5
  219. three/src/nodes/utils/RemapNode.d.ts +33 -39
  220. three/src/nodes/utils/RotateNode.d.ts +17 -8
  221. three/src/nodes/utils/SplitNode.d.ts +1 -2
  222. three/src/nodes/utils/SpriteSheetUV.d.ts +7 -0
  223. three/src/nodes/utils/StorageArrayElementNode.d.ts +18 -9
  224. three/src/nodes/utils/Timer.d.ts +4 -4
  225. three/src/nodes/utils/TriplanarTextures.d.ts +2 -2
  226. three/src/nodes/utils/UVUtils.d.ts +6 -4
  227. three/src/objects/BatchedMesh.d.ts +6 -4
  228. three/src/objects/InstancedMesh.d.ts +32 -24
  229. three/src/renderers/WebGLRenderer.d.ts +4 -93
  230. three/src/renderers/common/Animation.d.ts +46 -9
  231. three/src/renderers/common/Attributes.d.ts +11 -13
  232. three/src/renderers/common/Backend.d.ts +0 -2
  233. three/src/renderers/common/Background.d.ts +17 -15
  234. three/src/renderers/common/BindGroup.d.ts +27 -13
  235. three/src/renderers/common/Binding.d.ts +15 -3
  236. three/src/renderers/common/Bindings.d.ts +41 -17
  237. three/src/renderers/common/BlendMode.d.ts +22 -0
  238. three/src/renderers/common/Buffer.d.ts +35 -11
  239. three/src/renderers/common/BufferUtils.d.ts +3 -4
  240. three/src/renderers/common/BundleGroup.d.ts +16 -6
  241. three/src/renderers/common/CanvasTarget.d.ts +76 -13
  242. three/src/renderers/common/ChainMap.d.ts +12 -9
  243. three/src/renderers/common/ClippingContext.d.ts +61 -10
  244. three/src/renderers/common/Color4.d.ts +10 -5
  245. three/src/renderers/common/ComputePipeline.d.ts +16 -2
  246. three/src/renderers/common/Constants.d.ts +5 -3
  247. three/src/renderers/common/CubeRenderTarget.d.ts +24 -7
  248. three/src/renderers/common/DataMap.d.ts +10 -18
  249. three/src/renderers/common/Geometries.d.ts +39 -20
  250. three/src/renderers/common/Info.d.ts +62 -9
  251. three/src/renderers/common/InspectorBase.d.ts +19 -7
  252. three/src/renderers/common/Lighting.d.ts +2 -6
  253. three/src/renderers/common/Pipeline.d.ts +14 -2
  254. three/src/renderers/common/Pipelines.d.ts +58 -60
  255. three/src/renderers/common/PostProcessing.d.ts +14 -17
  256. three/src/renderers/common/ProgrammableStage.d.ts +48 -8
  257. three/src/renderers/common/RenderBundle.d.ts +4 -2
  258. three/src/renderers/common/RenderBundles.d.ts +6 -3
  259. three/src/renderers/common/RenderContext.d.ts +175 -7
  260. three/src/renderers/common/RenderContexts.d.ts +20 -25
  261. three/src/renderers/common/RenderList.d.ts +77 -11
  262. three/src/renderers/common/RenderLists.d.ts +16 -4
  263. three/src/renderers/common/RenderObject.d.ts +223 -47
  264. three/src/renderers/common/{RenderPipeline.d.ts → RenderObjectPipeline.d.ts} +17 -5
  265. three/src/renderers/common/RenderObjects.d.ts +55 -22
  266. three/src/renderers/common/Renderer.d.ts +625 -207
  267. three/src/renderers/common/Textures.d.ts +24 -46
  268. three/src/renderers/common/TimestampQueryPool.d.ts +62 -8
  269. three/src/renderers/common/Uniform.d.ts +143 -58
  270. three/src/renderers/common/UniformBuffer.d.ts +7 -5
  271. three/src/renderers/common/UniformsGroup.d.ts +50 -35
  272. three/src/renderers/common/XRManager.d.ts +321 -83
  273. three/src/renderers/common/XRRenderTarget.d.ts +49 -6
  274. three/src/renderers/common/nodes/NodeBuilderState.d.ts +75 -15
  275. three/src/renderers/common/nodes/NodeLibrary.d.ts +25 -5
  276. three/src/renderers/common/nodes/{Nodes.d.ts → NodeManager.d.ts} +54 -73
  277. three/src/renderers/common/nodes/NodeUniform.d.ts +60 -70
  278. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +23 -4
  279. three/src/renderers/shaders/UniformsLib.d.ts +0 -3
  280. three/src/renderers/webgl/WebGLAttributes.d.ts +9 -7
  281. three/src/renderers/webgl/WebGLEnvironments.d.ts +8 -0
  282. three/src/renderers/webgl/WebGLExtensions.d.ts +1 -1
  283. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +9 -5
  284. three/src/renderers/webgl/WebGLLights.d.ts +19 -18
  285. three/src/renderers/webgl/WebGLObjects.d.ts +15 -2
  286. three/src/renderers/webgl/WebGLProgram.d.ts +2 -10
  287. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -2
  288. three/src/renderers/webgl/WebGLRenderLists.d.ts +1 -3
  289. three/src/renderers/webgl/WebGLShadowMap.d.ts +0 -5
  290. three/src/renderers/webgl/WebGLState.d.ts +305 -28
  291. three/src/renderers/webgl/WebGLTextures.d.ts +10 -9
  292. three/src/renderers/webgl/WebGLUniforms.d.ts +0 -7
  293. three/src/renderers/webgpu/WebGPUBackend.d.ts +0 -1
  294. three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +2 -4
  295. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +15 -4
  296. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -1
  297. three/src/scenes/Fog.d.ts +31 -37
  298. three/src/scenes/FogExp2.d.ts +26 -31
  299. three/src/scenes/Scene.d.ts +51 -65
  300. three/src/textures/CompressedArrayTexture.d.ts +1 -1
  301. three/src/textures/DataArrayTexture.d.ts +1 -1
  302. three/src/utils.d.ts +5 -0
  303. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -18
  304. three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +0 -13
  305. three/examples/jsm/shaders/GodRaysShader.d.ts +0 -44
  306. three/src/nodes/accessors/SceneNode.d.ts +0 -21
  307. three/src/nodes/code/ScriptableNode.d.ts +0 -21
  308. three/src/nodes/code/ScriptableValueNode.d.ts +0 -9
  309. three/src/nodes/display/PosterizeNode.d.ts +0 -13
  310. three/src/nodes/utils/SpriteSheetUVNode.d.ts +0 -15
  311. three/src/renderers/webgl/WebGLCubeMaps.d.ts +0 -8
  312. three/src/renderers/webgl/WebGLCubeUVMaps.d.ts +0 -9
@@ -1,111 +1,56 @@
1
1
  import { BufferAttribute } from "../../../core/BufferAttribute.js";
2
2
  import { Light } from "../../../lights/Light.js";
3
- import { Matrix4 } from "../../../math/Matrix4.js";
4
3
  import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
5
4
  import NodeFrame from "../../../nodes/core/NodeFrame.js";
6
5
  import LightsNode from "../../../nodes/lighting/LightsNode.js";
7
6
  import Renderer from "../../../renderers/common/Renderer.js";
8
7
  import RenderObject from "../../../renderers/common/RenderObject.js";
9
8
  import { Material } from "../../Material.js";
10
- declare const refreshUniforms: readonly [
11
- "alphaMap",
12
- "alphaTest",
13
- "anisotropy",
14
- "anisotropyMap",
15
- "anisotropyRotation",
16
- "aoMap",
17
- "aoMapIntensity",
18
- "attenuationColor",
19
- "attenuationDistance",
20
- "bumpMap",
21
- "clearcoat",
22
- "clearcoatMap",
23
- "clearcoatNormalMap",
24
- "clearcoatNormalScale",
25
- "clearcoatRoughness",
26
- "color",
27
- "dispersion",
28
- "displacementMap",
29
- "emissive",
30
- "emissiveIntensity",
31
- "emissiveMap",
32
- "envMap",
33
- "envMapIntensity",
34
- "gradientMap",
35
- "ior",
36
- "iridescence",
37
- "iridescenceIOR",
38
- "iridescenceMap",
39
- "iridescenceThicknessMap",
40
- "lightMap",
41
- "lightMapIntensity",
42
- "map",
43
- "matcap",
44
- "metalness",
45
- "metalnessMap",
46
- "normalMap",
47
- "normalScale",
48
- "opacity",
49
- "roughness",
50
- "roughnessMap",
51
- "sheen",
52
- "sheenColor",
53
- "sheenColorMap",
54
- "sheenRoughnessMap",
55
- "shininess",
56
- "specular",
57
- "specularColor",
58
- "specularColorMap",
59
- "specularIntensity",
60
- "specularIntensityMap",
61
- "specularMap",
62
- "thickness",
63
- "transmission",
64
- "transmissionMap",
65
- ];
66
- type RefreshUniform = (typeof refreshUniforms)[number];
67
- type MaterialData = {
68
- [K in RefreshUniform]?: unknown;
69
- };
70
- interface AttributesData {
71
- [name: string]: {
72
- version: number;
73
- };
74
- }
75
- interface RenderObjectData {
76
- material: MaterialData;
77
- geometry: {
78
- id: number;
79
- attributes: AttributesData;
80
- indexVersion: number | null;
81
- drawRange: {
82
- start: number;
83
- count: number;
84
- };
85
- };
86
- worldMatrix: Matrix4;
87
- version?: number;
88
- }
89
- interface LightData {
90
- map: number;
91
- }
9
+
92
10
  /**
93
11
  * This class is used by {@link WebGPURenderer} as management component.
94
12
  * It's primary purpose is to determine whether render objects require a
95
13
  * refresh right before they are going to be rendered or not.
96
14
  */
97
15
  declare class NodeMaterialObserver {
98
- renderObjects: WeakMap<RenderObject, RenderObjectData>;
99
- hasNode: boolean;
100
- hasAnimation: boolean;
101
- refreshUniforms: readonly RefreshUniform[];
102
- renderId: number;
103
16
  /**
104
17
  * Constructs a new node material observer.
105
18
  *
106
19
  * @param {NodeBuilder} builder - The node builder.
107
20
  */
108
21
  constructor(builder: NodeBuilder);
22
+ /**
23
+ * A node material can be used by more than one render object so the
24
+ * monitor must maintain a list of render objects.
25
+ *
26
+ * @type {WeakMap<RenderObject,Object>}
27
+ */
28
+ renderObjects: WeakMap<RenderObject, unknown>;
29
+ /**
30
+ * Whether the material uses node objects or not.
31
+ *
32
+ * @type {boolean}
33
+ */
34
+ hasNode: boolean;
35
+ /**
36
+ * Whether the node builder's 3D object is animated or not.
37
+ *
38
+ * @type {boolean}
39
+ */
40
+ hasAnimation: boolean;
41
+ /**
42
+ * A list of all possible material uniforms
43
+ *
44
+ * @type {Array<string>}
45
+ */
46
+ refreshUniforms: string[];
47
+ /**
48
+ * Holds the current render ID from the node frame.
49
+ *
50
+ * @type {number}
51
+ * @default 0
52
+ */
53
+ renderId: number;
109
54
  /**
110
55
  * Returns `true` if the given render object is verified for the first time of this observer.
111
56
  *
@@ -126,7 +71,7 @@ declare class NodeMaterialObserver {
126
71
  * @param {RenderObject} renderObject - The render object.
127
72
  * @return {Object} The monitoring data.
128
73
  */
129
- getRenderObjectData(renderObject: RenderObject): RenderObjectData;
74
+ getRenderObjectData(renderObject: RenderObject): unknown;
130
75
  /**
131
76
  * Returns an attribute data structure holding the attributes versions for
132
77
  * monitoring.
@@ -134,7 +79,7 @@ declare class NodeMaterialObserver {
134
79
  * @param {Object} attributes - The geometry attributes.
135
80
  * @return {Object} An object for monitoring the versions of attributes.
136
81
  */
137
- getAttributesData(attributes: Record<string, BufferAttribute>): AttributesData;
82
+ getAttributesData(attributes: Record<string, BufferAttribute>): unknown;
138
83
  /**
139
84
  * Returns `true` if the node builder's material uses
140
85
  * node properties.
@@ -150,7 +95,7 @@ declare class NodeMaterialObserver {
150
95
  * @param {Material} material - The material.
151
96
  * @return {Object} An object for monitoring material properties.
152
97
  */
153
- getMaterialData(material: Material): MaterialData;
98
+ getMaterialData(material: Material): unknown;
154
99
  /**
155
100
  * Returns `true` if the given render object has not changed its state.
156
101
  *
@@ -165,7 +110,7 @@ declare class NodeMaterialObserver {
165
110
  * @param {Array<Light>} materialLights - The material lights.
166
111
  * @return {Array<Object>} The lights data for the given material lights.
167
112
  */
168
- getLightsData(materialLights: Light[]): LightData[];
113
+ getLightsData(materialLights: Light[]): unknown[];
169
114
  /**
170
115
  * Returns the lights for the given lights node and render ID.
171
116
  *
@@ -173,7 +118,7 @@ declare class NodeMaterialObserver {
173
118
  * @param {number} renderId - The render ID.
174
119
  * @return {Array<Object>} The lights for the given lights node and render ID.
175
120
  */
176
- getLights(lightsNode: LightsNode, renderId: number): LightData[];
121
+ getLights(lightsNode: LightsNode, renderId: number): unknown[];
177
122
  /**
178
123
  * Checks if the given render object requires a refresh.
179
124
  *
@@ -183,4 +128,5 @@ declare class NodeMaterialObserver {
183
128
  */
184
129
  needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean;
185
130
  }
131
+
186
132
  export default NodeMaterialObserver;
three/src/math/Color.d.ts CHANGED
@@ -221,6 +221,7 @@ export class Color {
221
221
  */
222
222
  b: number;
223
223
 
224
+ // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type
224
225
  set(...args: [color: ColorRepresentation] | [r: number, g: number, b: number]): this;
225
226
 
226
227
  /**
@@ -98,7 +98,7 @@ export class Vector3 {
98
98
  */
99
99
  addVectors(a: Vector3Like, b: Vector3Like): this;
100
100
 
101
- addScaledVector(v: Vector3, s: number): this;
101
+ addScaledVector(v: Vector3Like, s: number): this;
102
102
 
103
103
  /**
104
104
  * Subtracts v from this vector.
@@ -123,7 +123,7 @@ export class Vector3 {
123
123
 
124
124
  applyEuler(euler: Euler): this;
125
125
 
126
- applyAxisAngle(axis: Vector3, angle: number): this;
126
+ applyAxisAngle(axis: Vector3Like, angle: number): this;
127
127
 
128
128
  applyMatrix3(m: Matrix3): this;
129
129
 
@@ -0,0 +1,7 @@
1
+ import { Interpolant } from "../Interpolant.js";
2
+
3
+ export class BezierInterpolant extends Interpolant {
4
+ constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any);
5
+
6
+ interpolate_(i1: number, t0: number, t: number, t1: number): any;
7
+ }
@@ -9,6 +9,8 @@ export { default as BypassNode } from "./core/BypassNode.js";
9
9
  export { default as ConstNode } from "./core/ConstNode.js";
10
10
  export { default as ContextNode } from "./core/ContextNode.js";
11
11
  export { default as IndexNode, IndexNodeScope } from "./core/IndexNode.js";
12
+ export { default as InputNode } from "./core/InputNode.js";
13
+ export { default as InspectorNode } from "./core/InspectorNode.js";
12
14
  export { default as IsolateNode } from "./core/IsolateNode.js";
13
15
  export {
14
16
  default as LightingModel,
@@ -26,8 +28,9 @@ export {
26
28
  NodeBuilderContext,
27
29
  NodeData,
28
30
  } from "./core/NodeBuilder.js";
29
- export { default as NodeCache, ShaderStageNodeData } from "./core/NodeCache.js";
31
+ export { default as NodeCache } from "./core/NodeCache.js";
30
32
  export { default as NodeCode } from "./core/NodeCode.js";
33
+ export { default as NodeError } from "./core/NodeError.js";
31
34
  export { default as NodeFrame } from "./core/NodeFrame.js";
32
35
  export { default as NodeFunctionInput } from "./core/NodeFunctionInput.js";
33
36
  export { default as NodeUniform } from "./core/NodeUniform.js";
@@ -37,6 +40,7 @@ export { default as OutputStructNode } from "./core/OutputStructNode.js";
37
40
  export { default as ParameterNode } from "./core/ParameterNode.js";
38
41
  export { default as PropertyNode } from "./core/PropertyNode.js";
39
42
  export { default as StackNode } from "./core/StackNode.js";
43
+ export { default as StackTrace } from "./core/StackTrace.js";
40
44
  export { default as StructNode } from "./core/StructNode.js";
41
45
  export { default as StructTypeNode } from "./core/StructTypeNode.js";
42
46
  export { default as SubBuildNode } from "./core/SubBuildNode.js";
@@ -49,32 +53,12 @@ export { default as VaryingNode } from "./core/VaryingNode.js";
49
53
  import * as NodeUtils from "./core/NodeUtils.js";
50
54
  export { NodeUtils };
51
55
 
52
- // utils
53
- export { default as ArrayElementNode } from "./utils/ArrayElementNode.js";
54
- export { default as ConvertNode } from "./utils/ConvertNode.js";
55
- export { default as DebugNode } from "./utils/DebugNode.js";
56
- export { default as EventNode } from "./utils/EventNode.js";
57
- export { default as FunctionOverloadingNode } from "./utils/FunctionOverloadingNode.js";
58
- export { default as JoinNode } from "./utils/JoinNode.js";
59
- export { default as LoopNode } from "./utils/LoopNode.js";
60
- export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js";
61
- export { default as MemberNode } from "./utils/MemberNode.js";
62
- export { default as ReflectorNode, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
63
- export { default as RemapNode } from "./utils/RemapNode.js";
64
- export { default as RotateNode } from "./utils/RotateNode.js";
65
- export { default as RTTNode, RTTNodeOptions } from "./utils/RTTNode.js";
66
- export { default as SetNode } from "./utils/SetNode.js";
67
- export { default as SplitNode } from "./utils/SplitNode.js";
68
- export { default as SpriteSheetUVNode } from "./utils/SpriteSheetUVNode.js";
69
- export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js";
70
-
71
- // math
72
- export { default as BitcastNode } from "./math/BitcastNode.js";
73
-
74
56
  // accessors
75
57
  export { default as BatchNode } from "./accessors/BatchNode.js";
76
58
  export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
77
59
  export { default as BufferNode } from "./accessors/BufferNode.js";
60
+ export { default as BuiltinNode } from "./accessors/BuiltinNode.js";
61
+ export { default as ClippingNode } from "./accessors/ClippingNode.js";
78
62
  export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js";
79
63
  export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js";
80
64
  export { default as InstanceNode } from "./accessors/InstanceNode.js";
@@ -84,9 +68,9 @@ export { default as ModelNode } from "./accessors/ModelNode.js";
84
68
  export { default as MorphNode } from "./accessors/MorphNode.js";
85
69
  export { default as Object3DNode } from "./accessors/Object3DNode.js";
86
70
  export { default as PointUVNode } from "./accessors/PointUVNode.js";
71
+ export { default as ReferenceBaseNode } from "./accessors/ReferenceBaseNode.js";
87
72
  export { default as ReferenceNode } from "./accessors/ReferenceNode.js";
88
73
  export { default as RendererReferenceNode } from "./accessors/RendererReferenceNode.js";
89
- export { default as SceneNode, SceneNodeScope } from "./accessors/SceneNode.js";
90
74
  export { default as SkinningNode } from "./accessors/SkinningNode.js";
91
75
  export { default as StorageBufferNode } from "./accessors/StorageBufferNode.js";
92
76
  export { default as StorageTextureNode } from "./accessors/StorageTextureNode.js";
@@ -95,42 +79,47 @@ export { default as TextureNode } from "./accessors/TextureNode.js";
95
79
  export { default as TextureSizeNode } from "./accessors/TextureSizeNode.js";
96
80
  export { default as UniformArrayNode } from "./accessors/UniformArrayNode.js";
97
81
  export { default as UserDataNode, NodeUserData } from "./accessors/UserDataNode.js";
82
+ export { default as VelocityNode } from "./accessors/VelocityNode.js";
98
83
  export { default as VertexColorNode } from "./accessors/VertexColorNode.js";
99
84
 
85
+ // code
86
+ export { CodeNodeInclude, default as CodeNode } from "./code/CodeNode.js";
87
+ export { default as ExpressionNode } from "./code/ExpressionNode.js";
88
+ export { default as FunctionCallNode } from "./code/FunctionCallNode.js";
89
+ export { default as FunctionNode } from "./code/FunctionNode.js";
90
+
100
91
  // display
101
92
  export { default as BumpMapNode } from "./display/BumpMapNode.js";
102
93
  export { default as ColorSpaceNode } from "./display/ColorSpaceNode.js";
103
94
  export { default as FrontFacingNode } from "./display/FrontFacingNode.js";
104
95
  export { default as NormalMapNode } from "./display/NormalMapNode.js";
105
96
  export { default as PassNode, PassNodeScope } from "./display/PassNode.js";
106
- export { default as PosterizeNode } from "./display/PosterizeNode.js";
107
97
  export { default as RenderOutputNode } from "./display/RenderOutputNode.js";
108
98
  export { default as ScreenNode, ScreenNodeScope } from "./display/ScreenNode.js";
109
99
  export { default as ToneMappingNode } from "./display/ToneMappingNode.js";
100
+ export { default as ToonOutlinePassNode } from "./display/ToonOutlinePassNode.js";
110
101
  export { default as ViewportDepthNode, ViewportDepthNodeScope } from "./display/ViewportDepthNode.js";
111
102
  export { default as ViewportDepthTextureNode } from "./display/ViewportDepthTextureNode.js";
112
103
  export { default as ViewportSharedTextureNode } from "./display/ViewportSharedTextureNode.js";
113
104
  export { default as ViewportTextureNode } from "./display/ViewportTextureNode.js";
114
105
 
115
- // code
116
- export { CodeNodeInclude, default as CodeNode } from "./code/CodeNode.js";
117
- export { default as ExpressionNode } from "./code/ExpressionNode.js";
118
- export { default as FunctionCallNode } from "./code/FunctionCallNode.js";
119
- export { default as FunctionNode } from "./code/FunctionNode.js";
120
- export { default as ScriptableNode } from "./code/ScriptableNode.js";
121
- export { default as ScriptableValueNode } from "./code/ScriptableValueNode.js";
122
-
123
106
  // geometry
124
107
  export { default as RangeNode } from "./geometry/RangeNode.js";
125
108
 
126
109
  // gpgpu
110
+ export { default as AtomicFunctionNode } from "./gpgpu/AtomicFunctionNode.js";
111
+ export { default as BarrierNode } from "./gpgpu/BarrierNode.js";
112
+ export { default as ComputeBuiltinNode } from "./gpgpu/ComputeBuiltinNode.js";
127
113
  export { default as ComputeNode } from "./gpgpu/ComputeNode.js";
114
+ export { default as SubgroupFunctionNode } from "./gpgpu/SubgroupFunctionNode.js";
115
+ export { default as WorkgroupInfoNode } from "./gpgpu/WorkgroupInfoNode.js";
128
116
 
129
117
  // lighting
130
118
  export { default as AmbientLightNode } from "./lighting/AmbientLightNode.js";
131
119
  export { default as AnalyticLightNode } from "./lighting/AnalyticLightNode.js";
132
120
  export { default as AONode } from "./lighting/AONode.js";
133
121
  export { default as BasicEnvironmentNode } from "./lighting/BasicEnvironmentNode.js";
122
+ export { default as BasicLightMapNode } from "./lighting/BasicLightMapNode.js";
134
123
  export { default as DirectionalLightNode } from "./lighting/DirectionalLightNode.js";
135
124
  export { default as EnvironmentNode } from "./lighting/EnvironmentNode.js";
136
125
  export { default as HemisphereLightNode } from "./lighting/HemisphereLightNode.js";
@@ -141,18 +130,49 @@ export { default as LightingNode } from "./lighting/LightingNode.js";
141
130
  export { default as LightProbeNode } from "./lighting/LightProbeNode.js";
142
131
  export { default as LightsNode } from "./lighting/LightsNode.js";
143
132
  export { default as PointLightNode } from "./lighting/PointLightNode.js";
133
+ export { default as PointShadowNode } from "./lighting/PointShadowNode.js";
144
134
  export { default as ProjectorLightNode } from "./lighting/ProjectorLightNode.js";
145
135
  export { default as RectAreaLightNode, RectAreaLightTexturesLib } from "./lighting/RectAreaLightNode.js";
146
136
  export { default as ShadowBaseNode } from "./lighting/ShadowBaseNode.js";
147
137
  export { default as ShadowNode } from "./lighting/ShadowNode.js";
148
138
  export { default as SpotLightNode } from "./lighting/SpotLightNode.js";
149
139
 
150
- // pmrem
151
- export { default as PMREMNode } from "./pmrem/PMREMNode.js";
140
+ // math
141
+ export { default as BitcastNode } from "./math/BitcastNode.js";
142
+ export { default as BitcountNode } from "./math/BitcountNode.js";
143
+ export { default as ConditionalNode } from "./math/ConditionalNode.js";
144
+ export { default as MathNode } from "./math/MathNode.js";
145
+ export { default as OperatorNode } from "./math/OperatorNode.js";
146
+ export { default as PackFloatNode } from "./math/PackFloatNode.js";
147
+ export { default as UnpackFloatNode } from "./math/UnpackFloatNode.js";
152
148
 
153
149
  // parsers
154
150
  export { default as GLSLNodeParser } from "./parsers/GLSLNodeParser.js";
155
151
 
152
+ // pmrem
153
+ export { default as PMREMNode } from "./pmrem/PMREMNode.js";
154
+
155
+ // utils
156
+ export { default as ArrayElementNode } from "./utils/ArrayElementNode.js";
157
+ export { default as ConvertNode } from "./utils/ConvertNode.js";
158
+ export { default as CubeMapNode } from "./utils/CubeMapNode.js";
159
+ export { default as DebugNode } from "./utils/DebugNode.js";
160
+ export { default as EventNode } from "./utils/EventNode.js";
161
+ export { default as FlipNode } from "./utils/FlipNode.js";
162
+ export { default as FunctionOverloadingNode } from "./utils/FunctionOverloadingNode.js";
163
+ export { default as JoinNode } from "./utils/JoinNode.js";
164
+ export { default as LoopNode } from "./utils/LoopNode.js";
165
+ export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js";
166
+ export { default as MemberNode } from "./utils/MemberNode.js";
167
+ export { default as ReflectorNode, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
168
+ export { default as RemapNode } from "./utils/RemapNode.js";
169
+ export { default as RotateNode } from "./utils/RotateNode.js";
170
+ export { default as RTTNode, RTTNodeOptions } from "./utils/RTTNode.js";
171
+ export { default as SampleNode } from "./utils/SampleNode.js";
172
+ export { default as SetNode } from "./utils/SetNode.js";
173
+ export { default as SplitNode } from "./utils/SplitNode.js";
174
+ export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js";
175
+
156
176
  // lighting models
157
177
  export { default as PhongLightingModel } from "./functions/PhongLightingModel.js";
158
178
  export { default as PhysicalLightingModel } from "./functions/PhysicalLightingModel.js";
three/src/nodes/TSL.d.ts CHANGED
@@ -42,7 +42,7 @@ export * from "./utils/RemapNode.js";
42
42
  export * from "./utils/RotateNode.js";
43
43
  export * from "./utils/RTTNode.js";
44
44
  export * from "./utils/SampleNode.js";
45
- export * from "./utils/SpriteSheetUVNode.js";
45
+ export * from "./utils/SpriteSheetUV.js";
46
46
  export * from "./utils/SpriteUtils.js";
47
47
  export * from "./utils/Timer.js";
48
48
  export * from "./utils/TriplanarTextures.js";
@@ -77,7 +77,7 @@ export * from "./accessors/Position.js";
77
77
  export * from "./accessors/ReferenceNode.js";
78
78
  export * from "./accessors/ReflectVector.js";
79
79
  export * from "./accessors/RendererReferenceNode.js";
80
- export * from "./accessors/SceneNode.js";
80
+ export * from "./accessors/SceneProperties.js";
81
81
  export * from "./accessors/SkinningNode.js";
82
82
  export * from "./accessors/StorageBufferNode.js";
83
83
  export * from "./accessors/StorageTextureNode.js";
@@ -99,7 +99,6 @@ export * from "./display/ColorAdjustment.js";
99
99
  export * from "./display/ColorSpaceNode.js";
100
100
  export * from "./display/FrontFacingNode.js";
101
101
  export * from "./display/NormalMapNode.js";
102
- export * from "./display/PosterizeNode.js";
103
102
  export * from "./display/RenderOutputNode.js";
104
103
  export * from "./display/ScreenNode.js";
105
104
  export * from "./display/ToneMappingNode.js";
@@ -119,8 +118,6 @@ export * from "./code/CodeNode.js";
119
118
  export * from "./code/ExpressionNode.js";
120
119
  export * from "./code/FunctionCallNode.js";
121
120
  export * from "./code/FunctionNode.js";
122
- export * from "./code/ScriptableNode.js";
123
- export * from "./code/ScriptableValueNode.js";
124
121
 
125
122
  // fog
126
123
  export * from "./fog/Fog.js";
@@ -1,13 +1,22 @@
1
- import { TypedArray } from "../../core/BufferAttribute.js";
2
- import { Struct } from "../core/StructNode.js";
3
1
  import StorageBufferNode from "./StorageBufferNode.js";
4
2
 
5
- export const attributeArray: (
6
- count: TypedArray | number,
7
- type?: string | Struct,
8
- ) => StorageBufferNode;
3
+ interface ArrayFunction {
4
+ (count: number | Float32Array, type?: "float"): StorageBufferNode<"float">;
5
+ (count: number | Int32Array, type: "int"): StorageBufferNode<"int">;
6
+ (count: number | Uint32Array, type: "uint"): StorageBufferNode<"uint">;
7
+ (count: number | Float32Array, type: "vec2"): StorageBufferNode<"vec2">;
8
+ (count: number | Int32Array, type: "ivec2"): StorageBufferNode<"ivec2">;
9
+ (count: number | Uint32Array, type: "uvec2"): StorageBufferNode<"uvec2">;
10
+ (count: number | Float32Array, type: "vec3"): StorageBufferNode<"vec3">;
11
+ (count: number | Int32Array, type: "ivec3"): StorageBufferNode<"ivec3">;
12
+ (count: number | Uint32Array, type: "uvec3"): StorageBufferNode<"uvec3">;
13
+ (count: number | Float32Array, type: "vec4"): StorageBufferNode<"vec4">;
14
+ (count: number | Int32Array, type: "ivec4"): StorageBufferNode<"ivec4">;
15
+ (count: number | Uint32Array, type: "uvec4"): StorageBufferNode<"uvec4">;
16
+ }
9
17
 
10
- export const instancedArray: (
11
- count: TypedArray | number,
12
- type?: string | Struct,
13
- ) => StorageBufferNode;
18
+ export const attributeArray: ArrayFunction;
19
+
20
+ export const instancedArray: ArrayFunction;
21
+
22
+ export {};