@types/three 0.181.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 (351) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +0 -3
  3. three/examples/jsm/controls/ArcballControls.d.ts +1 -1
  4. three/examples/jsm/controls/DragControls.d.ts +1 -1
  5. three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
  6. three/examples/jsm/controls/FlyControls.d.ts +1 -1
  7. three/examples/jsm/controls/OrbitControls.d.ts +40 -1
  8. three/examples/jsm/controls/PointerLockControls.d.ts +1 -1
  9. three/examples/jsm/controls/TrackballControls.d.ts +1 -1
  10. three/examples/jsm/controls/TransformControls.d.ts +1 -1
  11. three/examples/jsm/effects/AnaglyphEffect.d.ts +4 -0
  12. three/examples/jsm/environments/ColorEnvironment.d.ts +9 -0
  13. three/examples/jsm/gpgpu/BitonicSort.d.ts +5 -5
  14. three/examples/jsm/helpers/AnimationPathHelper.d.ts +38 -0
  15. three/examples/jsm/helpers/ViewHelper.d.ts +4 -1
  16. three/examples/jsm/inspector/tabs/Parameters.d.ts +3 -0
  17. three/examples/jsm/inspector/ui/Item.d.ts +5 -0
  18. three/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -1
  19. three/examples/jsm/lights/LightProbeGenerator.d.ts +11 -5
  20. three/examples/jsm/loaders/ColladaLoader.d.ts +27 -4
  21. three/examples/jsm/loaders/UltraHDRLoader.d.ts +7 -0
  22. three/examples/jsm/loaders/VOXLoader.d.ts +22 -5
  23. three/examples/jsm/math/Octree.d.ts +36 -14
  24. three/examples/jsm/objects/SkyMesh.d.ts +16 -6
  25. three/examples/jsm/objects/Water2Mesh.d.ts +7 -7
  26. three/examples/jsm/objects/WaterMesh.d.ts +6 -6
  27. three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
  28. three/examples/jsm/postprocessing/EffectComposer.d.ts +9 -10
  29. three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
  30. three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
  31. three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +4 -9
  32. three/examples/jsm/transpiler/AST.d.ts +17 -0
  33. three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
  34. three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +30 -0
  35. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -1
  36. three/examples/jsm/tsl/display/BilateralBlurNode.d.ts +27 -0
  37. three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -1
  38. three/examples/jsm/tsl/display/BloomNode.d.ts +5 -5
  39. three/examples/jsm/tsl/display/CRT.d.ts +22 -0
  40. three/examples/jsm/tsl/display/DenoiseNode.d.ts +5 -5
  41. three/examples/jsm/tsl/display/DotScreenNode.d.ts +4 -6
  42. three/examples/jsm/tsl/display/GTAONode.d.ts +8 -8
  43. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +4 -2
  44. three/examples/jsm/tsl/display/GodraysNode.d.ts +20 -0
  45. three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -6
  46. three/examples/jsm/tsl/display/Lut3DNode.d.ts +5 -5
  47. three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -1
  48. three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -6
  49. three/examples/jsm/tsl/display/PixelationPassNode.d.ts +10 -10
  50. three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -2
  51. three/examples/jsm/tsl/display/RetroPassNode.d.ts +17 -0
  52. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -1
  53. three/examples/jsm/tsl/display/SSGINode.d.ts +11 -11
  54. three/examples/jsm/tsl/display/SSRNode.d.ts +6 -6
  55. three/examples/jsm/tsl/display/SSSNode.d.ts +7 -5
  56. three/examples/jsm/tsl/display/Shape.d.ts +3 -0
  57. three/examples/jsm/tsl/display/TRAANode.d.ts +5 -0
  58. three/examples/jsm/tsl/display/TransitionNode.d.ts +3 -3
  59. three/examples/jsm/tsl/display/boxBlur.d.ts +1 -1
  60. three/examples/jsm/tsl/display/depthAwareBlend.d.ts +15 -0
  61. three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
  62. three/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
  63. three/examples/jsm/tsl/math/Bayer.d.ts +2 -0
  64. three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -2
  65. three/package.json +4 -4
  66. three/src/Three.Core.d.ts +1 -1
  67. three/src/Three.TSL.d.ts +20 -13
  68. three/src/Three.WebGPU.Nodes.d.ts +2 -0
  69. three/src/Three.WebGPU.d.ts +3 -0
  70. three/src/Three.d.ts +2 -2
  71. three/src/animation/AnimationClip.d.ts +1 -1
  72. three/src/animation/AnimationMixer.d.ts +42 -0
  73. three/src/animation/AnimationUtils.d.ts +3 -8
  74. three/src/animation/KeyframeTrack.d.ts +19 -5
  75. three/src/animation/PropertyMixer.d.ts +5 -4
  76. three/src/audio/Audio.d.ts +224 -157
  77. three/src/audio/AudioAnalyser.d.ts +32 -27
  78. three/src/audio/AudioContext.d.ts +12 -12
  79. three/src/audio/AudioListener.d.ts +44 -65
  80. three/src/audio/PositionalAudio.d.ts +69 -62
  81. three/src/cameras/ArrayCamera.d.ts +21 -24
  82. three/src/cameras/Camera.d.ts +14 -53
  83. three/src/cameras/CubeCamera.d.ts +32 -28
  84. three/src/cameras/OrthographicCamera.d.ts +70 -100
  85. three/src/cameras/PerspectiveCamera.d.ts +133 -146
  86. three/src/cameras/StereoCamera.d.ts +24 -30
  87. three/src/constants.d.ts +28 -2
  88. three/src/core/BufferGeometry.d.ts +3 -1
  89. three/src/core/Clock.d.ts +3 -0
  90. three/src/core/Object3D.d.ts +31 -7
  91. three/src/extras/Controls.d.ts +3 -3
  92. three/src/geometries/TorusGeometry.d.ts +22 -3
  93. three/src/helpers/ArrowHelper.d.ts +34 -50
  94. three/src/helpers/AxesHelper.d.ts +22 -36
  95. three/src/helpers/Box3Helper.d.ts +14 -25
  96. three/src/helpers/BoxHelper.d.ts +28 -39
  97. three/src/helpers/CameraHelper.d.ts +31 -52
  98. three/src/helpers/DirectionalLightHelper.d.ts +32 -53
  99. three/src/helpers/GridHelper.d.ts +15 -29
  100. three/src/helpers/HemisphereLightHelper.d.ts +26 -49
  101. three/src/helpers/PlaneHelper.d.ts +21 -33
  102. three/src/helpers/PointLightHelper.d.ts +25 -50
  103. three/src/helpers/PolarGridHelper.d.ts +19 -32
  104. three/src/helpers/SkeletonHelper.d.ts +26 -50
  105. three/src/helpers/SpotLightHelper.d.ts +28 -55
  106. three/src/lights/AmbientLight.d.ts +15 -23
  107. three/src/lights/DirectionalLight.d.ts +49 -83
  108. three/src/lights/DirectionalLightShadow.d.ts +6 -61
  109. three/src/lights/HemisphereLight.d.ts +27 -47
  110. three/src/lights/Light.d.ts +22 -56
  111. three/src/lights/LightProbe.d.ts +31 -32
  112. three/src/lights/LightShadow.d.ts +107 -91
  113. three/src/lights/PointLight.d.ts +47 -77
  114. three/src/lights/PointLightShadow.d.ts +7 -11
  115. three/src/lights/RectAreaLight.d.ts +39 -59
  116. three/src/lights/SpotLight.d.ts +78 -117
  117. three/src/lights/SpotLightShadow.d.ts +17 -59
  118. three/src/lights/webgpu/IESSpotLight.d.ts +13 -1
  119. three/src/lights/webgpu/ProjectorLight.d.ts +9 -10
  120. three/src/materials/Material.d.ts +1 -0
  121. three/src/materials/MeshLambertMaterial.d.ts +6 -0
  122. three/src/materials/MeshPhongMaterial.d.ts +6 -0
  123. three/src/materials/ShaderMaterial.d.ts +18 -3
  124. three/src/materials/nodes/Line2NodeMaterial.d.ts +0 -6
  125. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +0 -4
  126. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -2
  127. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +0 -2
  128. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +0 -2
  129. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +5 -8
  130. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +0 -4
  131. three/src/materials/nodes/NodeMaterial.d.ts +15 -2
  132. three/src/materials/nodes/SpriteNodeMaterial.d.ts +0 -3
  133. three/src/materials/nodes/VolumeNodeMaterial.d.ts +0 -2
  134. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +39 -93
  135. three/src/math/Color.d.ts +1 -0
  136. three/src/math/Vector3.d.ts +2 -2
  137. three/src/math/interpolants/BezierInterpolant.d.ts +7 -0
  138. three/src/nodes/Nodes.d.ts +55 -35
  139. three/src/nodes/TSL.d.ts +6 -6
  140. three/src/nodes/accessors/Arrays.d.ts +19 -10
  141. three/src/nodes/accessors/BufferAttributeNode.d.ts +108 -41
  142. three/src/nodes/accessors/BufferNode.d.ts +21 -7
  143. three/src/nodes/accessors/Camera.d.ts +10 -10
  144. three/src/nodes/accessors/CubeTextureNode.d.ts +1 -1
  145. three/src/nodes/accessors/InstanceNode.d.ts +13 -6
  146. three/src/nodes/accessors/Lights.d.ts +9 -6
  147. three/src/nodes/accessors/MaterialNode.d.ts +1 -3
  148. three/src/nodes/accessors/MaterialProperties.d.ts +4 -4
  149. three/src/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
  150. three/src/nodes/accessors/ModelNode.d.ts +34 -17
  151. three/src/nodes/accessors/MorphNode.d.ts +1 -1
  152. three/src/nodes/accessors/Normal.d.ts +13 -15
  153. three/src/nodes/accessors/Object3DNode.d.ts +35 -16
  154. three/src/nodes/accessors/Position.d.ts +9 -7
  155. three/src/nodes/accessors/ReferenceNode.d.ts +16 -7
  156. three/src/nodes/accessors/ReflectVector.d.ts +4 -5
  157. three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
  158. three/src/nodes/accessors/SceneProperties.d.ts +5 -0
  159. three/src/nodes/accessors/SkinningNode.d.ts +5 -3
  160. three/src/nodes/accessors/StorageBufferNode.d.ts +49 -22
  161. three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
  162. three/src/nodes/accessors/Tangent.d.ts +5 -7
  163. three/src/nodes/accessors/Texture3DNode.d.ts +13 -1
  164. three/src/nodes/accessors/TextureBicubic.d.ts +3 -2
  165. three/src/nodes/accessors/TextureNode.d.ts +19 -18
  166. three/src/nodes/accessors/UV.d.ts +1 -1
  167. three/src/nodes/accessors/UniformArrayNode.d.ts +10 -8
  168. three/src/nodes/accessors/UserDataNode.d.ts +1 -1
  169. three/src/nodes/accessors/VelocityNode.d.ts +3 -3
  170. three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
  171. three/src/nodes/code/FunctionCallNode.d.ts +0 -1
  172. three/src/nodes/code/FunctionNode.d.ts +7 -3
  173. three/src/nodes/core/ArrayNode.d.ts +2 -3
  174. three/src/nodes/core/AttributeNode.d.ts +12 -6
  175. three/src/nodes/core/BypassNode.d.ts +2 -3
  176. three/src/nodes/core/ConstNode.d.ts +10 -3
  177. three/src/nodes/core/ContextNode.d.ts +32 -21
  178. three/src/nodes/core/IndexNode.d.ts +1 -1
  179. three/src/nodes/core/InputNode.d.ts +12 -4
  180. three/src/nodes/core/InspectorNode.d.ts +2 -3
  181. three/src/nodes/core/IsolateNode.d.ts +2 -7
  182. three/src/nodes/core/MRTNode.d.ts +7 -0
  183. three/src/nodes/core/Node.d.ts +258 -39
  184. three/src/nodes/core/NodeAttribute.d.ts +30 -5
  185. three/src/nodes/core/NodeBuilder.d.ts +5 -3
  186. three/src/nodes/core/NodeCache.d.ts +24 -48
  187. three/src/nodes/core/NodeError.d.ts +9 -0
  188. three/src/nodes/core/NodeParser.d.ts +2 -0
  189. three/src/nodes/core/NodeUniform.d.ts +33 -9
  190. three/src/nodes/core/NodeUtils.d.ts +1 -1
  191. three/src/nodes/core/NodeVar.d.ts +33 -5
  192. three/src/nodes/core/NodeVarying.d.ts +32 -4
  193. three/src/nodes/core/ParameterNode.d.ts +11 -4
  194. three/src/nodes/core/PropertyNode.d.ts +45 -33
  195. three/src/nodes/core/StackTrace.d.ts +9 -0
  196. three/src/nodes/core/StructType.d.ts +3 -1
  197. three/src/nodes/core/StructTypeNode.d.ts +19 -5
  198. three/src/nodes/core/TempNode.d.ts +9 -3
  199. three/src/nodes/core/UniformNode.d.ts +53 -15
  200. three/src/nodes/core/VarNode.d.ts +15 -14
  201. three/src/nodes/core/VaryingNode.d.ts +14 -19
  202. three/src/nodes/core/constants.d.ts +9 -4
  203. three/src/nodes/display/BlendModes.d.ts +7 -27
  204. three/src/nodes/display/ColorAdjustment.d.ts +8 -9
  205. three/src/nodes/display/ColorSpaceNode.d.ts +2 -8
  206. three/src/nodes/display/FrontFacingNode.d.ts +1 -1
  207. three/src/nodes/display/NormalMapNode.d.ts +3 -1
  208. three/src/nodes/display/PassNode.d.ts +16 -4
  209. three/src/nodes/display/RenderOutputNode.d.ts +3 -7
  210. three/src/nodes/display/ScreenNode.d.ts +25 -17
  211. three/src/nodes/display/ToneMappingNode.d.ts +3 -7
  212. three/src/nodes/display/ViewportDepthNode.d.ts +11 -7
  213. three/src/nodes/display/ViewportTextureNode.d.ts +2 -0
  214. three/src/nodes/fog/Fog.d.ts +5 -3
  215. three/src/nodes/functions/BSDF/DFGLUT.d.ts +12 -0
  216. three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
  217. three/src/nodes/geometry/RangeNode.d.ts +51 -9
  218. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +2 -0
  219. three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
  220. three/src/nodes/gpgpu/ComputeNode.d.ts +2 -7
  221. three/src/nodes/lighting/AnalyticLightNode.d.ts +3 -1
  222. three/src/nodes/lighting/HemisphereLightNode.d.ts +3 -2
  223. three/src/nodes/lighting/LightProbeNode.d.ts +1 -1
  224. three/src/nodes/lighting/LightUtils.d.ts +1 -1
  225. three/src/nodes/lighting/LightingContextNode.d.ts +1 -1
  226. three/src/nodes/lighting/PointShadowNode.d.ts +11 -15
  227. three/src/nodes/lighting/ShadowFilterNode.d.ts +2 -0
  228. three/src/nodes/lighting/SpotLightNode.d.ts +0 -6
  229. three/src/nodes/materialx/MaterialXNodes.d.ts +11 -11
  230. three/src/nodes/math/BitcountNode.d.ts +23 -0
  231. three/src/nodes/math/ConditionalNode.d.ts +43 -22
  232. three/src/nodes/math/Hash.d.ts +1 -1
  233. three/src/nodes/math/MathNode.d.ts +603 -267
  234. three/src/nodes/math/MathUtils.d.ts +9 -5
  235. three/src/nodes/math/OperatorNode.d.ts +490 -227
  236. three/src/nodes/math/PackFloatNode.d.ts +19 -0
  237. three/src/nodes/math/TriNoise3D.d.ts +3 -3
  238. three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
  239. three/src/nodes/pmrem/PMREMNode.d.ts +1 -1
  240. three/src/nodes/procedural/Checker.d.ts +1 -1
  241. three/src/nodes/tsl/TSLCore.d.ts +1683 -224
  242. three/src/nodes/utils/ArrayElementNode.d.ts +9 -4
  243. three/src/nodes/utils/DebugNode.d.ts +2 -5
  244. three/src/nodes/utils/Discard.d.ts +2 -3
  245. three/src/nodes/utils/FlipNode.d.ts +11 -0
  246. three/src/nodes/utils/LoopNode.d.ts +17 -13
  247. three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
  248. three/src/nodes/utils/Oscillators.d.ts +4 -4
  249. three/src/nodes/utils/Packing.d.ts +3 -2
  250. three/src/nodes/utils/PostProcessingUtils.d.ts +6 -4
  251. three/src/nodes/utils/RemapNode.d.ts +33 -39
  252. three/src/nodes/utils/RotateNode.d.ts +17 -8
  253. three/src/nodes/utils/SplitNode.d.ts +1 -2
  254. three/src/nodes/utils/SpriteSheetUV.d.ts +7 -0
  255. three/src/nodes/utils/StorageArrayElementNode.d.ts +18 -9
  256. three/src/nodes/utils/Timer.d.ts +4 -4
  257. three/src/nodes/utils/TriplanarTextures.d.ts +2 -2
  258. three/src/nodes/utils/UVUtils.d.ts +8 -3
  259. three/src/objects/BatchedMesh.d.ts +6 -4
  260. three/src/objects/InstancedMesh.d.ts +32 -24
  261. three/src/objects/LOD.d.ts +1 -1
  262. three/src/objects/Skeleton.d.ts +4 -2
  263. three/src/renderers/WebGLRenderer.d.ts +25 -96
  264. three/src/renderers/common/Animation.d.ts +46 -9
  265. three/src/renderers/common/Attributes.d.ts +11 -13
  266. three/src/renderers/common/Backend.d.ts +0 -2
  267. three/src/renderers/common/Background.d.ts +17 -15
  268. three/src/renderers/common/BindGroup.d.ts +27 -13
  269. three/src/renderers/common/Binding.d.ts +21 -3
  270. three/src/renderers/common/Bindings.d.ts +41 -17
  271. three/src/renderers/common/BlendMode.d.ts +22 -0
  272. three/src/renderers/common/Buffer.d.ts +53 -5
  273. three/src/renderers/common/BufferUtils.d.ts +3 -4
  274. three/src/renderers/common/BundleGroup.d.ts +16 -6
  275. three/src/renderers/common/CanvasTarget.d.ts +76 -13
  276. three/src/renderers/common/ChainMap.d.ts +18 -8
  277. three/src/renderers/common/ClippingContext.d.ts +61 -10
  278. three/src/renderers/common/Color4.d.ts +10 -5
  279. three/src/renderers/common/ComputePipeline.d.ts +16 -2
  280. three/src/renderers/common/Constants.d.ts +5 -3
  281. three/src/renderers/common/CubeRenderTarget.d.ts +24 -7
  282. three/src/renderers/common/DataMap.d.ts +10 -18
  283. three/src/renderers/common/Geometries.d.ts +45 -19
  284. three/src/renderers/common/Info.d.ts +62 -9
  285. three/src/renderers/common/InspectorBase.d.ts +19 -7
  286. three/src/renderers/common/Lighting.d.ts +2 -6
  287. three/src/renderers/common/Pipeline.d.ts +14 -2
  288. three/src/renderers/common/Pipelines.d.ts +58 -60
  289. three/src/renderers/common/PostProcessing.d.ts +14 -17
  290. three/src/renderers/common/ProgrammableStage.d.ts +48 -8
  291. three/src/renderers/common/RenderBundle.d.ts +4 -2
  292. three/src/renderers/common/RenderBundles.d.ts +6 -3
  293. three/src/renderers/common/RenderContext.d.ts +175 -7
  294. three/src/renderers/common/RenderContexts.d.ts +21 -24
  295. three/src/renderers/common/RenderList.d.ts +77 -11
  296. three/src/renderers/common/RenderLists.d.ts +16 -4
  297. three/src/renderers/common/RenderObject.d.ts +229 -47
  298. three/src/renderers/common/{RenderPipeline.d.ts → RenderObjectPipeline.d.ts} +17 -5
  299. three/src/renderers/common/RenderObjects.d.ts +55 -22
  300. three/src/renderers/common/Renderer.d.ts +645 -216
  301. three/src/renderers/common/Textures.d.ts +24 -46
  302. three/src/renderers/common/TimestampQueryPool.d.ts +62 -8
  303. three/src/renderers/common/Uniform.d.ts +143 -58
  304. three/src/renderers/common/UniformBuffer.d.ts +7 -5
  305. three/src/renderers/common/UniformsGroup.d.ts +51 -35
  306. three/src/renderers/common/XRManager.d.ts +321 -83
  307. three/src/renderers/common/XRRenderTarget.d.ts +49 -6
  308. three/src/renderers/common/nodes/NodeBuilderState.d.ts +75 -15
  309. three/src/renderers/common/nodes/NodeLibrary.d.ts +25 -5
  310. three/src/renderers/common/nodes/{Nodes.d.ts → NodeManager.d.ts} +54 -73
  311. three/src/renderers/common/nodes/NodeUniform.d.ts +60 -70
  312. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +23 -4
  313. three/src/renderers/shaders/ShaderLib.d.ts +1 -1
  314. three/src/renderers/shaders/UniformsLib.d.ts +0 -3
  315. three/src/renderers/webgl/WebGLAttributes.d.ts +9 -7
  316. three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
  317. three/src/renderers/webgl/WebGLEnvironments.d.ts +8 -0
  318. three/src/renderers/webgl/WebGLExtensions.d.ts +1 -1
  319. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +9 -5
  320. three/src/renderers/webgl/WebGLLights.d.ts +19 -18
  321. three/src/renderers/webgl/WebGLObjects.d.ts +15 -2
  322. three/src/renderers/webgl/WebGLProgram.d.ts +2 -10
  323. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -3
  324. three/src/renderers/webgl/WebGLRenderLists.d.ts +1 -3
  325. three/src/renderers/webgl/WebGLShadowMap.d.ts +0 -5
  326. three/src/renderers/webgl/WebGLState.d.ts +305 -28
  327. three/src/renderers/webgl/WebGLTextures.d.ts +10 -9
  328. three/src/renderers/webgl/WebGLUniforms.d.ts +0 -7
  329. three/src/renderers/webgpu/WebGPUBackend.d.ts +0 -1
  330. three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +2 -4
  331. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +15 -4
  332. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -1
  333. three/src/scenes/Fog.d.ts +31 -37
  334. three/src/scenes/FogExp2.d.ts +26 -31
  335. three/src/scenes/Scene.d.ts +51 -65
  336. three/src/textures/CompressedArrayTexture.d.ts +1 -1
  337. three/src/textures/CubeDepthTexture.d.ts +41 -0
  338. three/src/textures/CubeTexture.d.ts +4 -4
  339. three/src/textures/DataArrayTexture.d.ts +1 -1
  340. three/src/utils.d.ts +18 -1
  341. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -18
  342. three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +0 -13
  343. three/examples/jsm/shaders/GodRaysShader.d.ts +0 -44
  344. three/src/nodes/accessors/SceneNode.d.ts +0 -21
  345. three/src/nodes/code/ScriptableNode.d.ts +0 -21
  346. three/src/nodes/code/ScriptableValueNode.d.ts +0 -9
  347. three/src/nodes/display/PosterizeNode.d.ts +0 -13
  348. three/src/nodes/functions/BSDF/DFGApprox.d.ts +0 -10
  349. three/src/nodes/utils/SpriteSheetUVNode.d.ts +0 -15
  350. three/src/renderers/webgl/WebGLCubeMaps.d.ts +0 -8
  351. three/src/renderers/webgl/WebGLCubeUVMaps.d.ts +0 -9
@@ -1,4 +1,6 @@
1
+ import { TypedArray } from "../../core/BufferAttribute.js";
1
2
  import Binding from "./Binding.js";
3
+
2
4
  /**
3
5
  * Represents a buffer binding type.
4
6
  *
@@ -7,16 +9,61 @@ import Binding from "./Binding.js";
7
9
  * @augments Binding
8
10
  */
9
11
  declare class Buffer extends Binding {
10
- readonly isBuffer: true;
11
- bytesPerElement: number;
12
- _buffer: Float32Array | null;
13
12
  /**
14
13
  * Constructs a new buffer.
15
14
  *
16
15
  * @param {string} name - The buffer's name.
17
16
  * @param {TypedArray} [buffer=null] - The buffer.
18
17
  */
19
- constructor(name?: string, buffer?: Float32Array | null);
18
+ constructor(name: string, buffer?: TypedArray);
19
+ /**
20
+ * This flag can be used for type testing.
21
+ *
22
+ * @type {boolean}
23
+ * @readonly
24
+ * @default true
25
+ */
26
+ readonly isBuffer: boolean;
27
+ /**
28
+ * The bytes per element.
29
+ *
30
+ * @type {number}
31
+ */
32
+ bytesPerElement: number;
33
+ /**
34
+ * A reference to the internal buffer.
35
+ *
36
+ * @private
37
+ * @type {TypedArray}
38
+ */
39
+ private _buffer;
40
+ /**
41
+ * An array of update ranges.
42
+ *
43
+ * @private
44
+ * @type {Array<{start: number, count: number}>}
45
+ */
46
+ private _updateRanges;
47
+ /**
48
+ * The array of update ranges.
49
+ *
50
+ * @type {Array<{start: number, count: number}>}
51
+ */
52
+ get updateRanges(): Array<{
53
+ start: number;
54
+ count: number;
55
+ }>;
56
+ /**
57
+ * Adds an update range.
58
+ *
59
+ * @param {number} start - The start index.
60
+ * @param {number} count - The number of elements.
61
+ */
62
+ addUpdateRange(start: number, count: number): void;
63
+ /**
64
+ * Clears all update ranges.
65
+ */
66
+ clearUpdateRanges(): void;
20
67
  /**
21
68
  * The buffer's byte length.
22
69
  *
@@ -30,7 +77,7 @@ declare class Buffer extends Binding {
30
77
  * @type {Float32Array}
31
78
  * @readonly
32
79
  */
33
- get buffer(): Float32Array | null;
80
+ get buffer(): TypedArray;
34
81
  /**
35
82
  * Updates the binding.
36
83
  *
@@ -39,4 +86,5 @@ declare class Buffer extends Binding {
39
86
  */
40
87
  update(): boolean;
41
88
  }
89
+
42
90
  export default Buffer;
@@ -6,7 +6,7 @@
6
6
  * @param {number} floatLength - The buffer length.
7
7
  * @return {number} The padded length.
8
8
  */
9
- declare function getFloatLength(floatLength: number): number;
9
+ export function getFloatLength(floatLength: number): number;
10
10
  /**
11
11
  * Given the count of vectors and their vector length, this function computes
12
12
  * a total length in bytes with buffer alignment according to STD140 layout.
@@ -16,7 +16,7 @@ declare function getFloatLength(floatLength: number): number;
16
16
  * @param {number} [vectorLength=4] - The vector length.
17
17
  * @return {number} The padded length.
18
18
  */
19
- declare function getVectorLength(count: number, vectorLength?: number): number;
19
+ export function getVectorLength(count: number, vectorLength?: number): number;
20
20
  /**
21
21
  * This function is called with a vector length and ensure the computed length
22
22
  * matches a predefined stride (in this case `4`).
@@ -25,5 +25,4 @@ declare function getVectorLength(count: number, vectorLength?: number): number;
25
25
  * @param {number} vectorLength - The vector length.
26
26
  * @return {number} The padded length.
27
27
  */
28
- declare function getStrideLength(vectorLength: number): number;
29
- export { getFloatLength, getStrideLength, getVectorLength };
28
+ export function getStrideLength(vectorLength: number): number;
@@ -1,4 +1,5 @@
1
1
  import { Group } from "../../objects/Group.js";
2
+
2
3
  /**
3
4
  * A specialized group which enables applications access to the
4
5
  * Render Bundle API of WebGPU. The group with all its descendant nodes
@@ -12,14 +13,22 @@ import { Group } from "../../objects/Group.js";
12
13
  * @augments Group
13
14
  */
14
15
  declare class BundleGroup extends Group {
15
- readonly isBundleGroup: true;
16
- readonly type: string;
17
- static: boolean;
18
- version: number;
19
16
  /**
20
- * Constructs a new bundle group.
17
+ * This flag can be used for type testing.
18
+ *
19
+ * @type {boolean}
20
+ * @readonly
21
+ * @default true
22
+ */
23
+ readonly isBundleGroup: boolean;
24
+ /**
25
+ * The bundle group's version.
26
+ *
27
+ * @type {number}
28
+ * @readonly
29
+ * @default 0
21
30
  */
22
- constructor();
31
+ readonly version: number;
23
32
  /**
24
33
  * Set this property to `true` when the bundle group has changed.
25
34
  *
@@ -29,4 +38,5 @@ declare class BundleGroup extends Group {
29
38
  */
30
39
  set needsUpdate(value: boolean);
31
40
  }
41
+
32
42
  export default BundleGroup;
@@ -3,31 +3,87 @@ import { Vector2 } from "../../math/Vector2.js";
3
3
  import { Vector4 } from "../../math/Vector4.js";
4
4
  import { DepthTexture } from "../../textures/DepthTexture.js";
5
5
  import { FramebufferTexture } from "../../textures/FramebufferTexture.js";
6
+
6
7
  export interface CanvasTargetEventMap {
7
8
  resize: {};
8
9
  dispose: {};
9
10
  }
11
+
10
12
  /**
11
13
  * CanvasTarget is a class that represents the final output destination of the renderer.
12
14
  *
13
15
  * @augments EventDispatcher
14
16
  */
15
17
  declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
16
- domElement: HTMLCanvasElement;
17
- _pixelRatio: number;
18
- _width: number;
19
- _height: number;
20
- _viewport: Vector4;
21
- _scissor: Vector4;
22
- _scissorTest: boolean;
23
- colorTexture: FramebufferTexture;
24
- depthTexture: DepthTexture;
25
18
  /**
26
19
  * Constructs a new CanvasTarget.
27
20
  *
28
21
  * @param {HTMLCanvasElement|OffscreenCanvas} domElement - The canvas element to render to.
29
22
  */
30
- constructor(domElement: HTMLCanvasElement);
23
+ constructor(domElement: HTMLCanvasElement | OffscreenCanvas);
24
+ /**
25
+ * A reference to the canvas element the renderer is drawing to.
26
+ * This value of this property will automatically be created by
27
+ * the renderer.
28
+ *
29
+ * @type {HTMLCanvasElement|OffscreenCanvas}
30
+ */
31
+ domElement: HTMLCanvasElement | OffscreenCanvas;
32
+ /**
33
+ * The renderer's pixel ratio.
34
+ *
35
+ * @private
36
+ * @type {number}
37
+ * @default 1
38
+ */
39
+ private _pixelRatio;
40
+ /**
41
+ * The width of the renderer's default framebuffer in logical pixel unit.
42
+ *
43
+ * @private
44
+ * @type {number}
45
+ */
46
+ private _width;
47
+ /**
48
+ * The height of the renderer's default framebuffer in logical pixel unit.
49
+ *
50
+ * @private
51
+ * @type {number}
52
+ */
53
+ private _height;
54
+ /**
55
+ * The viewport of the renderer in logical pixel unit.
56
+ *
57
+ * @private
58
+ * @type {Vector4}
59
+ */
60
+ private _viewport;
61
+ /**
62
+ * The scissor rectangle of the renderer in logical pixel unit.
63
+ *
64
+ * @private
65
+ * @type {Vector4}
66
+ */
67
+ private _scissor;
68
+ /**
69
+ * Whether the scissor test should be enabled or not.
70
+ *
71
+ * @private
72
+ * @type {boolean}
73
+ */
74
+ private _scissorTest;
75
+ /**
76
+ * The color texture of the default framebuffer.
77
+ *
78
+ * @type {FramebufferTexture}
79
+ */
80
+ colorTexture: FramebufferTexture;
81
+ /**
82
+ * The depth texture of the default framebuffer.
83
+ *
84
+ * @type {DepthTexture}
85
+ */
86
+ depthTexture: DepthTexture;
31
87
  /**
32
88
  * Returns the pixel ratio.
33
89
  *
@@ -83,6 +139,10 @@ declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
83
139
  * @return {Vector4} The scissor rectangle.
84
140
  */
85
141
  getScissor(target: Vector4): Vector4;
142
+ /**
143
+ * Defines the scissor rectangle.
144
+ */
145
+ setScissor(x: Vector4): void;
86
146
  /**
87
147
  * Defines the scissor rectangle.
88
148
  *
@@ -92,7 +152,6 @@ declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
92
152
  * @param {number} width - The width of the scissor box in logical pixel unit.
93
153
  * @param {number} height - The height of the scissor box in logical pixel unit.
94
154
  */
95
- setScissor(x: Vector4): void;
96
155
  setScissor(x: number, y: number, width: number, height: number): void;
97
156
  /**
98
157
  * Returns the scissor test value.
@@ -113,6 +172,10 @@ declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
113
172
  * @return {Vector4} The viewport definition.
114
173
  */
115
174
  getViewport(target: Vector4): Vector4;
175
+ /**
176
+ * Defines the viewport.
177
+ */
178
+ setViewport(x: Vector4): void;
116
179
  /**
117
180
  * Defines the viewport.
118
181
  *
@@ -123,14 +186,13 @@ declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
123
186
  * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only.
124
187
  * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only.
125
188
  */
126
- setViewport(x: Vector4): void;
127
189
  setViewport(x: number, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void;
128
190
  /**
129
191
  * Dispatches the resize event.
130
192
  *
131
193
  * @private
132
194
  */
133
- _dispatchResize(): void;
195
+ private _dispatchResize;
134
196
  /**
135
197
  * Frees the GPU-related resources allocated by this instance. Call this
136
198
  * method whenever this instance is no longer used in your app.
@@ -139,4 +201,5 @@ declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
139
201
  */
140
202
  dispose(): void;
141
203
  }
204
+
142
205
  export default CanvasTarget;
@@ -1,4 +1,3 @@
1
- type RecursiveWeakMap<K extends readonly object[], V> = WeakMap<K[number], V | RecursiveWeakMap<K, V>>;
2
1
  /**
3
2
  * Data structure for the renderer. It allows defining values
4
3
  * with chained, hierarchical keys. Keys are meant to be
@@ -7,19 +6,29 @@ type RecursiveWeakMap<K extends readonly object[], V> = WeakMap<K[number], V | R
7
6
  *
8
7
  * @private
9
8
  */
10
- declare class ChainMap<K extends readonly object[], V> {
11
- weakMap: RecursiveWeakMap<K, V>;
9
+ declare class ChainMap {
12
10
  /**
13
- * Constructs a new Chain Map.
11
+ * A map of Weak Maps by their key length.
12
+ *
13
+ * @type {Object<number, WeakMap>}
14
+ */
15
+ weakMaps: {
16
+ [x: number]: WeakMap<object, unknown>;
17
+ };
18
+ /**
19
+ * Returns the Weak Map for the given keys.
20
+ *
21
+ * @param {Array<Object>} keys - List of keys.
22
+ * @return {WeakMap} The weak map.
14
23
  */
15
- constructor();
24
+ _getWeakMap(keys: object[]): WeakMap<object, unknown>;
16
25
  /**
17
26
  * Returns the value for the given array of keys.
18
27
  *
19
28
  * @param {Array<Object>} keys - List of keys.
20
29
  * @return {any} The value. Returns `undefined` if no value was found.
21
30
  */
22
- get(keys: K): V | undefined;
31
+ get(keys: object[]): unknown;
23
32
  /**
24
33
  * Sets the value for the given keys.
25
34
  *
@@ -27,13 +36,14 @@ declare class ChainMap<K extends readonly object[], V> {
27
36
  * @param {any} value - The value to set.
28
37
  * @return {ChainMap} A reference to this Chain Map.
29
38
  */
30
- set(keys: K, value: V): this;
39
+ set(keys: object[], value: unknown): ChainMap;
31
40
  /**
32
41
  * Deletes a value for the given keys.
33
42
  *
34
43
  * @param {Array<Object>} keys - The keys.
35
44
  * @return {boolean} Returns `true` if the value has been removed successfully and `false` if the value has not be found.
36
45
  */
37
- delete(keys: K): boolean;
46
+ delete(keys: object[]): boolean;
38
47
  }
48
+
39
49
  export default ChainMap;
@@ -5,6 +5,7 @@ import { Plane } from "../../math/Plane.js";
5
5
  import { Vector4 } from "../../math/Vector4.js";
6
6
  import { ClippingGroup } from "../../objects/ClippingGroup.js";
7
7
  import { Scene } from "../../scenes/Scene.js";
8
+
8
9
  /**
9
10
  * Represents the state that is used to perform clipping via clipping planes.
10
11
  * There is a default clipping context for each render context. When the
@@ -14,22 +15,71 @@ import { Scene } from "../../scenes/Scene.js";
14
15
  * @private
15
16
  */
16
17
  declare class ClippingContext {
17
- version: number;
18
+ /**
19
+ * Constructs a new clipping context.
20
+ *
21
+ * @param {?ClippingContext} [parentContext=null] - A reference to the parent clipping context.
22
+ */
23
+ constructor(parentContext?: ClippingContext | null);
24
+ /**
25
+ * The clipping context's version.
26
+ *
27
+ * @type {number}
28
+ * @readonly
29
+ */
30
+ readonly version: number;
31
+ /**
32
+ * Whether the intersection of the clipping planes is used to clip objects, rather than their union.
33
+ *
34
+ * @type {?boolean}
35
+ * @default null
36
+ */
18
37
  clipIntersection: boolean | null;
38
+ /**
39
+ * The clipping context's cache key.
40
+ *
41
+ * @type {string}
42
+ */
19
43
  cacheKey: string;
20
- intersectionPlanes?: Plane[];
21
- unionPlanes?: Plane[];
44
+ /**
45
+ * Whether the shadow pass is active or not.
46
+ *
47
+ * @type {boolean}
48
+ * @default false
49
+ */
50
+ shadowPass: boolean;
51
+ /**
52
+ * The view normal matrix.
53
+ *
54
+ * @type {Matrix3}
55
+ */
22
56
  viewNormalMatrix: Matrix3;
57
+ /**
58
+ * Internal cache for maintaining clipping contexts.
59
+ *
60
+ * @type {WeakMap<ClippingGroup,ClippingContext>}
61
+ */
23
62
  clippingGroupContexts: WeakMap<ClippingGroup, ClippingContext>;
24
- shadowPass: boolean;
25
- viewMatrix?: Matrix4;
26
- parentVersion: number | null;
27
63
  /**
28
- * Constructs a new clipping context.
64
+ * The intersection planes.
29
65
  *
30
- * @param {?ClippingContext} [parentContext=null] - A reference to the parent clipping context.
66
+ * @type {Array<Vector4>}
31
67
  */
32
- constructor(parentContext?: ClippingContext | null);
68
+ intersectionPlanes: Vector4[];
69
+ /**
70
+ * The intersection planes.
71
+ *
72
+ * @type {Array<Vector4>}
73
+ */
74
+ unionPlanes: Vector4[];
75
+ /**
76
+ * The version of the clipping context's parent context.
77
+ *
78
+ * @type {?number}
79
+ * @readonly
80
+ */
81
+ readonly parentVersion: number | null;
82
+ viewMatrix?: Matrix4;
33
83
  /**
34
84
  * Projects the given source clipping planes and writes the result into the
35
85
  * destination array.
@@ -38,7 +88,7 @@ declare class ClippingContext {
38
88
  * @param {Array<Vector4>} destination - The destination.
39
89
  * @param {number} offset - The offset.
40
90
  */
41
- projectPlanes(source: readonly Plane[], destination: readonly Vector4[], offset: number): void;
91
+ projectPlanes(source: Plane[], destination: Vector4[], offset: number): void;
42
92
  /**
43
93
  * Updates the root clipping context of a scene.
44
94
  *
@@ -68,4 +118,5 @@ declare class ClippingContext {
68
118
  */
69
119
  get unionClippingCount(): number;
70
120
  }
121
+
71
122
  export default ClippingContext;
@@ -1,4 +1,5 @@
1
1
  import { Color, ColorRepresentation } from "../../math/Color.js";
2
+
2
3
  /**
3
4
  * A four-component version of {@link Color} which is internally
4
5
  * used by the renderer to represents clear color with alpha as
@@ -8,19 +9,22 @@ import { Color, ColorRepresentation } from "../../math/Color.js";
8
9
  * @augments Color
9
10
  */
10
11
  declare class Color4 extends Color {
11
- a: number;
12
12
  /**
13
13
  * Constructs a new four-component color.
14
- * You can also pass a single THREE.Color, hex or
14
+ * You can pass a single THREE.Color, hex or
15
15
  * string argument to this constructor.
16
+ */
17
+ constructor(color?: ColorRepresentation);
18
+ /**
19
+ * Constructs a new four-component color.
16
20
  *
17
- * @param {number|string} [r=1] - The red value.
21
+ * @param {number} [r=1] - The red value.
18
22
  * @param {number} [g=1] - The green value.
19
23
  * @param {number} [b=1] - The blue value.
20
24
  * @param {number} [a=1] - The alpha value.
21
25
  */
22
- constructor(color?: ColorRepresentation);
23
26
  constructor(r: number, g: number, b: number, a?: number);
27
+ a: number;
24
28
  /**
25
29
  * Overwrites the default to honor alpha.
26
30
  * You can also pass a single THREE.Color, hex or
@@ -39,7 +43,7 @@ declare class Color4 extends Color {
39
43
  * @param {Color4} color - The color to copy.
40
44
  * @return {Color4} A reference to this object.
41
45
  */
42
- copy(color: Color): this;
46
+ copy(color: Color4): this;
43
47
  /**
44
48
  * Overwrites the default to honor alpha.
45
49
  *
@@ -47,4 +51,5 @@ declare class Color4 extends Color {
47
51
  */
48
52
  clone(): this;
49
53
  }
54
+
50
55
  export default Color4;
@@ -1,5 +1,6 @@
1
1
  import Pipeline from "./Pipeline.js";
2
2
  import ProgrammableStage from "./ProgrammableStage.js";
3
+
3
4
  /**
4
5
  * Class for representing compute pipelines.
5
6
  *
@@ -7,8 +8,6 @@ import ProgrammableStage from "./ProgrammableStage.js";
7
8
  * @augments Pipeline
8
9
  */
9
10
  declare class ComputePipeline extends Pipeline {
10
- computeProgram: ProgrammableStage;
11
- readonly isComputePipeline: true;
12
11
  /**
13
12
  * Constructs a new render pipeline.
14
13
  *
@@ -16,5 +15,20 @@ declare class ComputePipeline extends Pipeline {
16
15
  * @param {ProgrammableStage} computeProgram - The pipeline's compute shader.
17
16
  */
18
17
  constructor(cacheKey: string, computeProgram: ProgrammableStage);
18
+ /**
19
+ * The pipeline's compute shader.
20
+ *
21
+ * @type {ProgrammableStage}
22
+ */
23
+ computeProgram: ProgrammableStage;
24
+ /**
25
+ * This flag can be used for type testing.
26
+ *
27
+ * @type {boolean}
28
+ * @readonly
29
+ * @default true
30
+ */
31
+ readonly isComputePipeline: boolean;
19
32
  }
33
+
20
34
  export default ComputePipeline;
@@ -5,6 +5,8 @@ export declare const AttributeType: {
5
5
  readonly INDIRECT: 4;
6
6
  };
7
7
  export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
8
- export declare const GPU_CHUNK_BYTES = 16;
9
- export declare const BlendColorFactor = 211;
10
- export declare const OneMinusBlendColorFactor = 212;
8
+
9
+ export const GPU_CHUNK_BYTES: 16;
10
+
11
+ export const BlendColorFactor: 211;
12
+ export const OneMinusBlendColorFactor: 212;
@@ -1,15 +1,14 @@
1
- import { RenderTargetOptions } from "../../core/RenderTarget.js";
2
- import { WebGLCubeRenderTarget } from "../../renderers/WebGLCubeRenderTarget.js";
1
+ import { RenderTarget, RenderTargetOptions } from "../../core/RenderTarget.js";
3
2
  import { Texture } from "../../textures/Texture.js";
4
- import { WebGLRenderer } from "../WebGLRenderer.js";
3
+ import Renderer from "./Renderer.js";
4
+
5
5
  /**
6
6
  * This class represents a cube render target. It is a special version
7
7
  * of `WebGLCubeRenderTarget` which is compatible with `WebGPURenderer`.
8
8
  *
9
- * @augments WebGLCubeRenderTarget
9
+ * @augments RenderTarget
10
10
  */
11
- declare class CubeRenderTarget extends WebGLCubeRenderTarget {
12
- readonly isCubeRenderTarget: true;
11
+ declare class CubeRenderTarget extends RenderTarget {
13
12
  /**
14
13
  * Constructs a new cube render target.
15
14
  *
@@ -17,6 +16,14 @@ declare class CubeRenderTarget extends WebGLCubeRenderTarget {
17
16
  * @param {RenderTarget~Options} [options] - The configuration object.
18
17
  */
19
18
  constructor(size?: number, options?: RenderTargetOptions);
19
+ /**
20
+ * This flag can be used for type testing.
21
+ *
22
+ * @type {boolean}
23
+ * @readonly
24
+ * @default true
25
+ */
26
+ readonly isCubeRenderTarget: boolean;
20
27
  /**
21
28
  * Converts the given equirectangular texture to a cube map.
22
29
  *
@@ -24,6 +31,16 @@ declare class CubeRenderTarget extends WebGLCubeRenderTarget {
24
31
  * @param {Texture} texture - The equirectangular texture.
25
32
  * @return {CubeRenderTarget} A reference to this cube render target.
26
33
  */
27
- fromEquirectangularTexture(renderer: WebGLRenderer, texture: Texture): this;
34
+ fromEquirectangularTexture(renderer: Renderer, texture: Texture): this;
35
+ /**
36
+ * Clears this cube render target.
37
+ *
38
+ * @param {Renderer} renderer - The renderer.
39
+ * @param {boolean} [color=true] - Whether the color buffer should be cleared or not.
40
+ * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not.
41
+ * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not.
42
+ */
43
+ clear(renderer: Renderer, color?: boolean, depth?: boolean, stencil?: boolean): void;
28
44
  }
45
+
29
46
  export default CubeRenderTarget;
@@ -4,47 +4,39 @@
4
4
  *
5
5
  * @private
6
6
  */
7
- declare class DataMap<
8
- M extends {
9
- [key: string]: {
10
- key: object;
11
- value: unknown;
12
- };
13
- },
14
- > {
15
- data: WeakMap<M[keyof M]["key"], M[keyof M]["value"]>;
7
+ declare class DataMap {
16
8
  /**
17
- * Constructs a new data map.
9
+ * `DataMap` internally uses a weak map
10
+ * to manage its data.
11
+ *
12
+ * @type {WeakMap<Object, Object>}
18
13
  */
19
- constructor();
14
+ data: WeakMap<object, unknown>;
20
15
  /**
21
16
  * Returns the dictionary for the given object.
22
17
  *
23
18
  * @param {Object} object - The object.
24
19
  * @return {Object} The dictionary.
25
20
  */
26
- get<K extends M[keyof M]["key"]>(object: K): Extract<M[keyof M], {
27
- key: K;
28
- }>["value"];
21
+ get(object: object): unknown;
29
22
  /**
30
23
  * Deletes the dictionary for the given object.
31
24
  *
32
25
  * @param {Object} object - The object.
33
26
  * @return {?Object} The deleted dictionary.
34
27
  */
35
- delete<K extends M[keyof M]["key"]>(object: K): Extract<M[keyof M], {
36
- key: K;
37
- }>["value"];
28
+ delete(object: object): unknown | null;
38
29
  /**
39
30
  * Returns `true` if the given object has a dictionary defined.
40
31
  *
41
32
  * @param {Object} object - The object to test.
42
33
  * @return {boolean} Whether a dictionary is defined or not.
43
34
  */
44
- has(object: M[keyof M]["key"]): boolean;
35
+ has(object: object): boolean;
45
36
  /**
46
37
  * Frees internal resources.
47
38
  */
48
39
  dispose(): void;
49
40
  }
41
+
50
42
  export default DataMap;