@types/three 0.180.0 → 0.182.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 (313) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/controls/ArcballControls.d.ts +1 -1
  3. three/examples/jsm/controls/DragControls.d.ts +1 -1
  4. three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
  5. three/examples/jsm/controls/FlyControls.d.ts +1 -1
  6. three/examples/jsm/controls/OrbitControls.d.ts +1 -1
  7. three/examples/jsm/controls/PointerLockControls.d.ts +1 -1
  8. three/examples/jsm/controls/TrackballControls.d.ts +1 -1
  9. three/examples/jsm/controls/TransformControls.d.ts +1 -1
  10. three/examples/jsm/geometries/TextGeometry.d.ts +2 -0
  11. three/examples/jsm/gpgpu/BitonicSort.d.ts +21 -0
  12. three/examples/jsm/inspector/Inspector.d.ts +10 -0
  13. three/examples/jsm/inspector/RendererInspector.d.ts +4 -0
  14. three/examples/jsm/inspector/tabs/Parameters.d.ts +95 -0
  15. three/examples/jsm/inspector/ui/Tab.d.ts +3 -0
  16. three/examples/jsm/inspector/ui/Values.d.ts +80 -0
  17. three/examples/jsm/interactive/SelectionBox.d.ts +9 -9
  18. three/examples/jsm/lighting/TiledLighting.d.ts +1 -2
  19. three/examples/jsm/loaders/FontLoader.d.ts +1 -1
  20. three/examples/jsm/loaders/KTX2Loader.d.ts +3 -0
  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 +11 -7
  25. three/examples/jsm/objects/WaterMesh.d.ts +2 -2
  26. three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
  27. three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
  28. three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
  29. three/examples/jsm/renderers/CSS2DRenderer.d.ts +15 -10
  30. three/examples/jsm/transpiler/AST.d.ts +17 -0
  31. three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
  32. three/examples/jsm/tsl/display/AfterImageNode.d.ts +4 -5
  33. three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +1 -2
  34. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -2
  35. three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -2
  36. three/examples/jsm/tsl/display/BloomNode.d.ts +2 -3
  37. three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +1 -2
  38. three/examples/jsm/tsl/display/DenoiseNode.d.ts +1 -2
  39. three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +1 -2
  40. three/examples/jsm/tsl/display/DotScreenNode.d.ts +1 -2
  41. three/examples/jsm/tsl/display/FXAANode.d.ts +1 -2
  42. three/examples/jsm/tsl/display/FilmNode.d.ts +1 -2
  43. three/examples/jsm/tsl/display/GTAONode.d.ts +11 -10
  44. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +2 -3
  45. three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -7
  46. three/examples/jsm/tsl/display/Lut3DNode.d.ts +2 -3
  47. three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -2
  48. three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -7
  49. three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +1 -2
  50. three/examples/jsm/tsl/display/PixelationPassNode.d.ts +1 -2
  51. three/examples/jsm/tsl/display/RGBShiftNode.d.ts +1 -2
  52. three/examples/jsm/tsl/display/SMAANode.d.ts +1 -2
  53. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -2
  54. three/examples/jsm/tsl/display/SSGINode.d.ts +30 -0
  55. three/examples/jsm/tsl/display/SSRNode.d.ts +12 -13
  56. three/examples/jsm/tsl/display/SSSNode.d.ts +20 -0
  57. three/examples/jsm/tsl/display/Sepia.d.ts +1 -2
  58. three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +1 -2
  59. three/examples/jsm/tsl/display/StereoPassNode.d.ts +1 -2
  60. three/examples/jsm/tsl/display/TRAANode.d.ts +6 -2
  61. three/examples/jsm/tsl/display/TransitionNode.d.ts +1 -2
  62. three/examples/jsm/tsl/display/boxBlur.d.ts +1 -2
  63. three/examples/jsm/tsl/display/hashBlur.d.ts +1 -2
  64. three/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
  65. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +3 -4
  66. three/examples/jsm/tsl/math/Bayer.d.ts +1 -2
  67. three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -3
  68. three/package.json +3 -3
  69. three/src/Three.Core.d.ts +1 -1
  70. three/src/Three.TSL.d.ts +21 -3
  71. three/src/Three.WebGPU.Nodes.d.ts +2 -0
  72. three/src/Three.WebGPU.d.ts +2 -0
  73. three/src/animation/AnimationMixer.d.ts +45 -3
  74. three/src/animation/AnimationUtils.d.ts +3 -8
  75. three/src/constants.d.ts +14 -0
  76. three/src/core/BufferGeometry.d.ts +3 -1
  77. three/src/extras/Controls.d.ts +3 -3
  78. three/src/lights/DirectionalLight.d.ts +10 -3
  79. three/src/lights/HemisphereLight.d.ts +8 -1
  80. three/src/lights/Light.d.ts +8 -12
  81. three/src/lights/LightProbe.d.ts +7 -3
  82. three/src/lights/PointLight.d.ts +12 -1
  83. three/src/lights/PointLightShadow.d.ts +1 -8
  84. three/src/lights/SpotLight.d.ts +17 -2
  85. three/src/loaders/ObjectLoader.d.ts +3 -3
  86. three/src/loaders/TextureLoader.d.ts +3 -3
  87. three/src/materials/Material.d.ts +3 -2
  88. three/src/materials/MeshLambertMaterial.d.ts +1 -1
  89. three/src/materials/MeshMatcapMaterial.d.ts +14 -0
  90. three/src/materials/MeshPhongMaterial.d.ts +1 -1
  91. three/src/materials/MeshPhysicalMaterial.d.ts +1 -1
  92. three/src/materials/MeshStandardMaterial.d.ts +7 -7
  93. three/src/materials/PointsMaterial.d.ts +1 -1
  94. three/src/materials/ShaderMaterial.d.ts +26 -11
  95. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -1
  96. three/src/materials/nodes/NodeMaterial.d.ts +9 -3
  97. three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -2
  98. three/src/math/Vector3.d.ts +2 -2
  99. three/src/nodes/Nodes.d.ts +1 -1
  100. three/src/nodes/TSL.d.ts +5 -2
  101. three/src/nodes/accessors/AccessorsUtils.d.ts +4 -5
  102. three/src/nodes/accessors/Arrays.d.ts +2 -3
  103. three/src/nodes/accessors/BatchNode.d.ts +1 -2
  104. three/src/nodes/accessors/Bitangent.d.ts +4 -5
  105. three/src/nodes/accessors/BufferAttributeNode.d.ts +17 -17
  106. three/src/nodes/accessors/BufferNode.d.ts +2 -2
  107. three/src/nodes/accessors/BuiltinNode.d.ts +1 -2
  108. three/src/nodes/accessors/Camera.d.ts +10 -11
  109. three/src/nodes/accessors/ClippingNode.d.ts +3 -6
  110. three/src/nodes/accessors/CubeTextureNode.d.ts +8 -9
  111. three/src/nodes/accessors/InstanceNode.d.ts +8 -8
  112. three/src/nodes/accessors/InstancedMeshNode.d.ts +1 -2
  113. three/src/nodes/accessors/Lights.d.ts +6 -7
  114. three/src/nodes/accessors/MaterialNode.d.ts +38 -39
  115. three/src/nodes/accessors/MaterialProperties.d.ts +3 -4
  116. three/src/nodes/accessors/MaterialReferenceNode.d.ts +2 -2
  117. three/src/nodes/accessors/ModelNode.d.ts +12 -13
  118. three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -2
  119. three/src/nodes/accessors/MorphNode.d.ts +1 -2
  120. three/src/nodes/accessors/Normal.d.ts +13 -14
  121. three/src/nodes/accessors/Object3DNode.d.ts +6 -7
  122. three/src/nodes/accessors/PointUVNode.d.ts +1 -2
  123. three/src/nodes/accessors/Position.d.ts +7 -8
  124. three/src/nodes/accessors/ReferenceBaseNode.d.ts +2 -3
  125. three/src/nodes/accessors/ReferenceNode.d.ts +2 -3
  126. three/src/nodes/accessors/ReflectVector.d.ts +4 -5
  127. three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -2
  128. three/src/nodes/accessors/SceneNode.d.ts +3 -4
  129. three/src/nodes/accessors/SkinningNode.d.ts +5 -6
  130. three/src/nodes/accessors/StorageBufferNode.d.ts +5 -5
  131. three/src/nodes/accessors/StorageTextureNode.d.ts +7 -4
  132. three/src/nodes/accessors/Tangent.d.ts +4 -6
  133. three/src/nodes/accessors/TangentUtils.d.ts +2 -3
  134. three/src/nodes/accessors/Texture3DNode.d.ts +15 -4
  135. three/src/nodes/accessors/TextureBicubic.d.ts +2 -3
  136. three/src/nodes/accessors/TextureNode.d.ts +29 -24
  137. three/src/nodes/accessors/TextureSizeNode.d.ts +1 -2
  138. three/src/nodes/accessors/UV.d.ts +1 -2
  139. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -3
  140. three/src/nodes/accessors/UserDataNode.d.ts +1 -2
  141. three/src/nodes/accessors/VelocityNode.d.ts +1 -2
  142. three/src/nodes/accessors/VertexColorNode.d.ts +1 -2
  143. three/src/nodes/code/CodeNode.d.ts +4 -5
  144. three/src/nodes/code/ExpressionNode.d.ts +1 -2
  145. three/src/nodes/code/FunctionCallNode.d.ts +6 -5
  146. three/src/nodes/code/FunctionNode.d.ts +4 -6
  147. three/src/nodes/code/ScriptableNode.d.ts +1 -2
  148. three/src/nodes/code/ScriptableValueNode.d.ts +1 -2
  149. three/src/nodes/core/ArrayNode.d.ts +6 -6
  150. three/src/nodes/core/AssignNode.d.ts +1 -8
  151. three/src/nodes/core/AttributeNode.d.ts +1 -2
  152. three/src/nodes/core/BypassNode.d.ts +5 -5
  153. three/src/nodes/core/ContextNode.d.ts +42 -14
  154. three/src/nodes/core/IndexNode.d.ts +10 -7
  155. three/src/nodes/core/InspectorNode.d.ts +16 -0
  156. three/src/nodes/core/IsolateNode.d.ts +36 -0
  157. three/src/nodes/core/MRTNode.d.ts +3 -4
  158. three/src/nodes/core/Node.d.ts +18 -2
  159. three/src/nodes/core/NodeUtils.d.ts +1 -11
  160. three/src/nodes/core/OutputStructNode.d.ts +1 -2
  161. three/src/nodes/core/ParameterNode.d.ts +1 -2
  162. three/src/nodes/core/PropertyNode.d.ts +32 -31
  163. three/src/nodes/core/StackNode.d.ts +1 -4
  164. three/src/nodes/core/StructNode.d.ts +3 -4
  165. three/src/nodes/core/SubBuildNode.d.ts +1 -2
  166. three/src/nodes/core/UniformNode.d.ts +3 -6
  167. three/src/nodes/core/VarNode.d.ts +12 -8
  168. three/src/nodes/core/VaryingNode.d.ts +12 -10
  169. three/src/nodes/display/BlendModes.d.ts +11 -12
  170. three/src/nodes/display/BumpMapNode.d.ts +1 -2
  171. three/src/nodes/display/ColorAdjustment.d.ts +7 -8
  172. three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -3
  173. three/src/nodes/display/ColorSpaceNode.d.ts +19 -9
  174. three/src/nodes/display/FrontFacingNode.d.ts +3 -4
  175. three/src/nodes/display/NormalMapNode.d.ts +4 -3
  176. three/src/nodes/display/PassNode.d.ts +28 -11
  177. three/src/nodes/display/PosterizeNode.d.ts +1 -2
  178. three/src/nodes/display/RenderOutputNode.d.ts +11 -6
  179. three/src/nodes/display/ScreenNode.d.ts +9 -10
  180. three/src/nodes/display/ToneMappingFunctions.d.ts +6 -7
  181. three/src/nodes/display/ToneMappingNode.d.ts +9 -8
  182. three/src/nodes/display/ToonOutlinePassNode.d.ts +1 -2
  183. three/src/nodes/display/ViewportDepthNode.d.ts +3 -4
  184. three/src/nodes/display/ViewportDepthTextureNode.d.ts +1 -2
  185. three/src/nodes/display/ViewportSharedTextureNode.d.ts +1 -2
  186. three/src/nodes/display/ViewportTextureNode.d.ts +2 -3
  187. three/src/nodes/fog/Fog.d.ts +5 -6
  188. three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +4 -5
  189. three/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts +14 -0
  190. three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -2
  191. three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -2
  192. three/src/nodes/functions/BSDF/DFGLUT.d.ts +12 -0
  193. three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -2
  194. three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -2
  195. three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -2
  196. three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +1 -2
  197. three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -2
  198. three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -2
  199. three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
  200. three/src/nodes/functions/ShadowMaskModel.d.ts +1 -2
  201. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +1 -2
  202. three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -2
  203. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +1 -2
  204. three/src/nodes/functions/material/getRoughness.d.ts +1 -2
  205. three/src/nodes/functions/material/getShIrradianceAt.d.ts +1 -2
  206. three/src/nodes/geometry/RangeNode.d.ts +1 -2
  207. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +10 -11
  208. three/src/nodes/gpgpu/BarrierNode.d.ts +3 -4
  209. three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +5 -6
  210. three/src/nodes/gpgpu/ComputeNode.d.ts +21 -13
  211. three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +25 -26
  212. three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +1 -2
  213. three/src/nodes/lighting/AnalyticLightNode.d.ts +3 -2
  214. three/src/nodes/lighting/LightUtils.d.ts +1 -2
  215. three/src/nodes/lighting/LightingContextNode.d.ts +1 -2
  216. three/src/nodes/lighting/LightsNode.d.ts +1 -2
  217. three/src/nodes/lighting/PointLightNode.d.ts +5 -6
  218. three/src/nodes/lighting/PointShadowNode.d.ts +12 -17
  219. three/src/nodes/lighting/ShadowBaseNode.d.ts +1 -2
  220. three/src/nodes/lighting/ShadowFilterNode.d.ts +6 -5
  221. three/src/nodes/lighting/ShadowNode.d.ts +1 -2
  222. three/src/nodes/lighting/SpotLightNode.d.ts +1 -2
  223. three/src/nodes/materialx/MaterialXNodes.d.ts +41 -42
  224. three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -3
  225. three/src/nodes/materialx/lib/mx_noise.d.ts +73 -74
  226. three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -2
  227. three/src/nodes/math/BitcastNode.d.ts +5 -6
  228. three/src/nodes/math/BitcountNode.d.ts +21 -0
  229. three/src/nodes/math/ConditionalNode.d.ts +11 -5
  230. three/src/nodes/math/Hash.d.ts +1 -2
  231. three/src/nodes/math/MathNode.d.ts +223 -77
  232. three/src/nodes/math/OperatorNode.d.ts +203 -59
  233. three/src/nodes/math/PackFloatNode.d.ts +19 -0
  234. three/src/nodes/math/TriNoise3D.d.ts +3 -4
  235. three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
  236. three/src/nodes/pmrem/PMREMNode.d.ts +1 -2
  237. three/src/nodes/pmrem/PMREMUtils.d.ts +3 -4
  238. three/src/nodes/procedural/Checker.d.ts +1 -2
  239. three/src/nodes/shapes/Shapes.d.ts +1 -2
  240. three/src/nodes/tsl/TSLBase.d.ts +2 -1
  241. three/src/nodes/tsl/TSLCore.d.ts +235 -128
  242. three/src/nodes/utils/CubeMapNode.d.ts +1 -2
  243. three/src/nodes/utils/DebugNode.d.ts +9 -5
  244. three/src/nodes/utils/Discard.d.ts +6 -6
  245. three/src/nodes/utils/EquirectUV.d.ts +1 -2
  246. three/src/nodes/utils/EventNode.d.ts +8 -3
  247. three/src/nodes/utils/FunctionOverloadingNode.d.ts +1 -2
  248. three/src/nodes/utils/LoopNode.d.ts +7 -6
  249. three/src/nodes/utils/MatcapUV.d.ts +1 -2
  250. three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -2
  251. three/src/nodes/utils/Oscillators.d.ts +4 -5
  252. three/src/nodes/utils/Packing.d.ts +3 -3
  253. three/src/nodes/utils/PostProcessingUtils.d.ts +7 -4
  254. three/src/nodes/utils/RTTNode.d.ts +2 -3
  255. three/src/nodes/utils/ReflectorNode.d.ts +2 -3
  256. three/src/nodes/utils/RemapNode.d.ts +29 -7
  257. three/src/nodes/utils/RotateNode.d.ts +1 -2
  258. three/src/nodes/utils/SampleNode.d.ts +1 -2
  259. three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -2
  260. three/src/nodes/utils/SpriteUtils.d.ts +1 -2
  261. three/src/nodes/utils/StorageArrayElementNode.d.ts +1 -2
  262. three/src/nodes/utils/Timer.d.ts +3 -4
  263. three/src/nodes/utils/TriplanarTextures.d.ts +2 -3
  264. three/src/nodes/utils/UVUtils.d.ts +5 -3
  265. three/src/nodes/utils/ViewportUtils.d.ts +1 -2
  266. three/src/objects/LOD.d.ts +1 -1
  267. three/src/objects/Skeleton.d.ts +4 -2
  268. three/src/renderers/WebGLRenderer.d.ts +22 -4
  269. three/src/renderers/common/Animation.d.ts +4 -1
  270. three/src/renderers/common/Binding.d.ts +6 -0
  271. three/src/renderers/common/Bindings.d.ts +12 -0
  272. three/src/renderers/common/Buffer.d.ts +24 -0
  273. three/src/renderers/common/CanvasTarget.d.ts +142 -0
  274. three/src/renderers/common/ChainMap.d.ts +8 -1
  275. three/src/renderers/common/Geometries.d.ts +8 -0
  276. three/src/renderers/common/InspectorBase.d.ts +105 -0
  277. three/src/renderers/common/PostProcessing.d.ts +3 -0
  278. three/src/renderers/common/QuadMesh.d.ts +3 -0
  279. three/src/renderers/common/RenderContexts.d.ts +6 -2
  280. three/src/renderers/common/RenderObject.d.ts +6 -0
  281. three/src/renderers/common/Renderer.d.ts +145 -46
  282. three/src/renderers/common/SampledTexture.d.ts +2 -0
  283. three/src/renderers/common/Sampler.d.ts +2 -0
  284. three/src/renderers/common/Textures.d.ts +20 -0
  285. three/src/renderers/common/TimestampQueryPool.d.ts +24 -1
  286. three/src/renderers/common/UniformsGroup.d.ts +1 -0
  287. three/src/renderers/common/extras/PMREMGenerator.d.ts +19 -1
  288. three/src/renderers/common/nodes/NodeLibrary.d.ts +3 -7
  289. three/src/renderers/common/nodes/Nodes.d.ts +13 -14
  290. three/src/renderers/shaders/ShaderLib.d.ts +1 -1
  291. three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
  292. three/src/renderers/webgl/WebGLPrograms.d.ts +0 -1
  293. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +5 -0
  294. three/src/scenes/Scene.d.ts +2 -2
  295. three/src/textures/CanvasTexture.d.ts +3 -3
  296. three/src/textures/CompressedArrayTexture.d.ts +6 -9
  297. three/src/textures/CompressedCubeTexture.d.ts +3 -3
  298. three/src/textures/CompressedTexture.d.ts +6 -8
  299. three/src/textures/CubeDepthTexture.d.ts +41 -0
  300. three/src/textures/CubeTexture.d.ts +4 -11
  301. three/src/textures/Data3DTexture.d.ts +5 -10
  302. three/src/textures/DataArrayTexture.d.ts +10 -10
  303. three/src/textures/DataTexture.d.ts +4 -11
  304. three/src/textures/DepthTexture.d.ts +7 -8
  305. three/src/textures/ExternalTexture.d.ts +3 -1
  306. three/src/textures/FramebufferTexture.d.ts +6 -1
  307. three/src/textures/Source.d.ts +3 -3
  308. three/src/textures/Texture.d.ts +8 -8
  309. three/src/textures/VideoFrameTexture.d.ts +1 -1
  310. three/src/textures/VideoTexture.d.ts +2 -2
  311. three/src/utils.d.ts +30 -2
  312. three/src/nodes/core/CacheNode.d.ts +0 -21
  313. three/src/nodes/functions/BSDF/DFGApprox.d.ts +0 -11
@@ -23,10 +23,13 @@ import Attributes from "./Attributes.js";
23
23
  import Backend from "./Backend.js";
24
24
  import Background from "./Background.js";
25
25
  import Bindings from "./Bindings.js";
26
+ import CanvasTarget from "./CanvasTarget.js";
26
27
  import ClippingContext from "./ClippingContext.js";
27
28
  import Color4 from "./Color4.js";
28
29
  import Geometries from "./Geometries.js";
30
+ import IndirectStorageBufferAttribute from "./IndirectStorageBufferAttribute.js";
29
31
  import Info from "./Info.js";
32
+ import InspectorBase from "./InspectorBase.js";
30
33
  import Lighting from "./Lighting.js";
31
34
  import NodeLibrary from "./nodes/NodeLibrary.js";
32
35
  import Nodes from "./nodes/Nodes.js";
@@ -61,7 +64,7 @@ export interface RendererParameters {
61
64
  antialias?: boolean | undefined;
62
65
  samples?: number | undefined;
63
66
  getFallback?: ((error: unknown) => Backend) | null | undefined;
64
- colorBufferType?: TextureDataType | undefined;
67
+ outputBufferType?: TextureDataType | undefined;
65
68
  multiview?: boolean | undefined;
66
69
  }
67
70
  /**
@@ -69,9 +72,7 @@ export interface RendererParameters {
69
72
  */
70
73
  declare class Renderer {
71
74
  readonly isRenderer: true;
72
- domElement: HTMLCanvasElement;
73
75
  backend: Backend;
74
- samples: number;
75
76
  autoClear: boolean;
76
77
  autoClearColor: boolean;
77
78
  autoClearDepth: boolean;
@@ -87,13 +88,10 @@ declare class Renderer {
87
88
  info: Info;
88
89
  library: NodeLibrary;
89
90
  lighting: Lighting;
91
+ _samples: number;
92
+ _canvasTarget: CanvasTarget;
93
+ _inspector: InspectorBase;
90
94
  _getFallback: ((error: unknown) => Backend) | null;
91
- _pixelRatio: number;
92
- _width: number;
93
- _height: number;
94
- _viewport: Vector4;
95
- _scissor: Vector4;
96
- _scissorTest: boolean;
97
95
  _attributes: Attributes | null;
98
96
  _geometries: Geometries | null;
99
97
  _nodes: Nodes | null;
@@ -158,7 +156,7 @@ declare class Renderer {
158
156
  ) => void;
159
157
  _isDeviceLost: boolean;
160
158
  onDeviceLost: (info: DeviceLostInfo) => void;
161
- _colorBufferType: TextureDataType;
159
+ _outputBufferType: TextureDataType;
162
160
  _initialized: boolean;
163
161
  _initPromise: Promise<this> | null;
164
162
  _compilationPromises: Promise<void>[] | null;
@@ -197,7 +195,7 @@ declare class Renderer {
197
195
  * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0
198
196
  * to overwrite the default.
199
197
  * @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted.
200
- * @property {number} [colorBufferType=HalfFloatType] - Defines the type of color buffers. The default `HalfFloatType` is recommend for best
198
+ * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best
201
199
  * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though.
202
200
  * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported.
203
201
  */
@@ -215,6 +213,14 @@ declare class Renderer {
215
213
  * @return {Promise<this>} A Promise that resolves when the renderer has been initialized.
216
214
  */
217
215
  init(): Promise<this>;
216
+ /**
217
+ * A reference to the canvas element the renderer is drawing to.
218
+ * This value of this property will automatically be created by
219
+ * the renderer.
220
+ *
221
+ * @type {HTMLCanvasElement|OffscreenCanvas}
222
+ */
223
+ get domElement(): HTMLCanvasElement;
218
224
  /**
219
225
  * The coordinate system of the renderer. The value of this property
220
226
  * depends on the selected backend. Either `THREE.WebGLCoordinateSystem` or
@@ -237,13 +243,14 @@ declare class Renderer {
237
243
  * @param {Object3D} scene - The scene or 3D object to precompile.
238
244
  * @param {Camera} camera - The camera that is used to render the scene.
239
245
  * @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added.
240
- * @return {Promise<Array|undefined>} A Promise that resolves when the compile has been finished.
246
+ * @return {Promise} A Promise that resolves when the compile has been finished.
241
247
  */
242
248
  compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise<void>;
243
249
  /**
244
250
  * Renders the scene in an async fashion.
245
251
  *
246
252
  * @async
253
+ * @deprecated
247
254
  * @param {Object3D} scene - The scene or 3D object to render.
248
255
  * @param {Camera} camera - The camera.
249
256
  * @return {Promise} A Promise that resolves when the render has been finished.
@@ -254,9 +261,17 @@ declare class Renderer {
254
261
  * the CPU waits for the GPU to complete its operation (e.g. a compute task).
255
262
  *
256
263
  * @async
264
+ * @deprecated
257
265
  * @return {Promise} A Promise that resolves when synchronization has been finished.
258
266
  */
259
267
  waitForGPU(): Promise<void>;
268
+ set inspector(value: InspectorBase);
269
+ /**
270
+ * The inspector instance. The inspector can be any class that extends from `InspectorBase`.
271
+ *
272
+ * @type {InspectorBase}
273
+ */
274
+ get inspector(): InspectorBase;
260
275
  /**
261
276
  * Enables or disables high precision for model-view and normal-view matrices.
262
277
  * When enabled, will use CPU 64-bit precision for higher precision instead of GPU 32-bit for higher performance.
@@ -288,9 +303,16 @@ declare class Renderer {
288
303
  */
289
304
  getMRT(): MRTNode | null;
290
305
  /**
291
- * Returns the color buffer type.
306
+ * Returns the output buffer type.
307
+ *
308
+ * @return {number} The output buffer type.
309
+ */
310
+ getOutputBufferType(): TextureDataType;
311
+ /**
312
+ * Returns the output buffer type.
292
313
  *
293
- * @return {number} The color buffer type.
314
+ * @deprecated since r182. Use `.getOutputBufferType()` instead.
315
+ * @return {number} The output buffer type.
294
316
  */
295
317
  getColorBufferType(): TextureDataType;
296
318
  /**
@@ -311,17 +333,27 @@ declare class Renderer {
311
333
  _renderBundle(bundle: Bundle, sceneRef: Scene, lightsNode: LightsNode): void;
312
334
  /**
313
335
  * Renders the scene or 3D object with the given camera. This method can only be called
314
- * if the renderer has been initialized.
336
+ * if the renderer has been initialized. When using `render()` inside an animation loop,
337
+ * it's guaranteed the renderer will be initialized. The animation loop must be defined
338
+ * with {@link Renderer#setAnimationLoop} though.
339
+ *
340
+ * For all other use cases (like when using on-demand rendering), you must call
341
+ * {@link Renderer#init} before rendering.
315
342
  *
316
343
  * The target of the method is the default framebuffer (meaning the canvas)
317
344
  * or alternatively a render target when specified via `setRenderTarget()`.
318
345
  *
319
346
  * @param {Object3D} scene - The scene or 3D object to render.
320
347
  * @param {Camera} camera - The camera to render the scene with.
321
- * @return {?Promise} A Promise that resolve when the scene has been rendered.
322
- * Only returned when the renderer has not been initialized.
323
348
  */
324
- render(scene: Object3D, camera: Camera): Promise<void> | undefined;
349
+ render(scene: Object3D, camera: Camera): void;
350
+ /**
351
+ * Returns whether the renderer has been initialized or not.
352
+ *
353
+ * @readonly
354
+ * @return {boolean} Whether the renderer has been initialized or not.
355
+ */
356
+ get initialized(): boolean;
325
357
  /**
326
358
  * Returns an internal render target which is used when computing the output tone mapping
327
359
  * and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render
@@ -330,7 +362,7 @@ declare class Renderer {
330
362
  * @private
331
363
  * @return {?RenderTarget} The render target. The method returns `null` if no output conversion should be applied.
332
364
  */
333
- _getFrameBufferTarget(): RenderTarget<Texture> | null;
365
+ _getFrameBufferTarget(): RenderTarget<Texture<unknown>> | null;
334
366
  /**
335
367
  * Renders the scene or 3D object with the given camera.
336
368
  *
@@ -373,10 +405,16 @@ declare class Renderer {
373
405
  * for best compatibility.
374
406
  *
375
407
  * @async
376
- * @param {?Function} callback - The application's animation loop.
408
+ * @param {?onAnimationCallback} callback - The application's animation loop.
377
409
  * @return {Promise} A Promise that resolves when the set has been executed.
378
410
  */
379
411
  setAnimationLoop(callback: ((time: DOMHighResTimeStamp, frame?: XRFrame) => void) | null): Promise<void>;
412
+ /**
413
+ * Returns the current animation loop callback.
414
+ *
415
+ * @return {?Function} The current animation loop callback.
416
+ */
417
+ getAnimationLoop(): ((time: DOMHighResTimeStamp, xrFrame?: XRFrame) => void) | null;
380
418
  /**
381
419
  * Can be used to transfer buffer data from a storage buffer attribute
382
420
  * from the GPU to the CPU in context of compute shaders.
@@ -464,9 +502,9 @@ declare class Renderer {
464
502
  /**
465
503
  * Defines the scissor rectangle.
466
504
  *
467
- * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit.
505
+ * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the box in logical pixel unit.
468
506
  * Instead of passing four arguments, the method also works with a single four-dimensional vector.
469
- * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit.
507
+ * @param {number} y - The vertical coordinate for the upper left corner of the box in logical pixel unit.
470
508
  * @param {number} width - The width of the scissor box in logical pixel unit.
471
509
  * @param {number} height - The height of the scissor box in logical pixel unit.
472
510
  */
@@ -494,8 +532,8 @@ declare class Renderer {
494
532
  /**
495
533
  * Defines the viewport.
496
534
  *
497
- * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit.
498
- * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit.
535
+ * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the viewport origin in logical pixel unit.
536
+ * @param {number} y - The vertical coordinate for the upper left corner of the viewport origin in logical pixel unit.
499
537
  * @param {number} width - The width of the viewport in logical pixel unit.
500
538
  * @param {number} height - The height of the viewport in logical pixel unit.
501
539
  * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only.
@@ -568,35 +606,25 @@ declare class Renderer {
568
606
  * @param {boolean} [color=true] - Whether the color buffer should be cleared or not.
569
607
  * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not.
570
608
  * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not.
571
- * @return {Promise} A Promise that resolves when the clear operation has been executed.
572
- * Only returned when the renderer has not been initialized.
573
609
  */
574
- clear(color?: boolean, depth?: boolean, stencil?: boolean): Promise<void> | undefined;
610
+ clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
575
611
  /**
576
612
  * Performs a manual clear operation of the color buffer. This method ignores `autoClear` properties.
577
- *
578
- * @return {Promise} A Promise that resolves when the clear operation has been executed.
579
- * Only returned when the renderer has not been initialized.
580
613
  */
581
- clearColor(): Promise<void> | undefined;
614
+ clearColor(): void;
582
615
  /**
583
616
  * Performs a manual clear operation of the depth buffer. This method ignores `autoClear` properties.
584
- *
585
- * @return {Promise} A Promise that resolves when the clear operation has been executed.
586
- * Only returned when the renderer has not been initialized.
587
617
  */
588
- clearDepth(): Promise<void> | undefined;
618
+ clearDepth(): void;
589
619
  /**
590
620
  * Performs a manual clear operation of the stencil buffer. This method ignores `autoClear` properties.
591
- *
592
- * @return {Promise} A Promise that resolves when the clear operation has been executed.
593
- * Only returned when the renderer has not been initialized.
594
621
  */
595
- clearStencil(): Promise<void> | undefined;
622
+ clearStencil(): void;
596
623
  /**
597
624
  * Async version of {@link Renderer#clear}.
598
625
  *
599
626
  * @async
627
+ * @deprecated
600
628
  * @param {boolean} [color=true] - Whether the color buffer should be cleared or not.
601
629
  * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not.
602
630
  * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not.
@@ -607,6 +635,7 @@ declare class Renderer {
607
635
  * Async version of {@link Renderer#clearColor}.
608
636
  *
609
637
  * @async
638
+ * @deprecated
610
639
  * @return {Promise} A Promise that resolves when the clear operation has been executed.
611
640
  */
612
641
  clearColorAsync(): Promise<void>;
@@ -614,6 +643,7 @@ declare class Renderer {
614
643
  * Async version of {@link Renderer#clearDepth}.
615
644
  *
616
645
  * @async
646
+ * @deprecated
617
647
  * @return {Promise} A Promise that resolves when the clear operation has been executed.
618
648
  */
619
649
  clearDepthAsync(): Promise<void>;
@@ -621,9 +651,32 @@ declare class Renderer {
621
651
  * Async version of {@link Renderer#clearStencil}.
622
652
  *
623
653
  * @async
654
+ * @deprecated
624
655
  * @return {Promise} A Promise that resolves when the clear operation has been executed.
625
656
  */
626
657
  clearStencilAsync(): Promise<void>;
658
+ /**
659
+ * Returns `true` if a framebuffer target is needed to perform tone mapping or color space conversion.
660
+ * If this is the case, the renderer allocates an internal render target for that purpose.
661
+ */
662
+ get needsFrameBufferTarget(): boolean;
663
+ /**
664
+ * The number of samples used for multi-sample anti-aliasing (MSAA).
665
+ *
666
+ * @type {number}
667
+ * @default 0
668
+ */
669
+ get samples(): number;
670
+ /**
671
+ * The current number of samples used for multi-sample anti-aliasing (MSAA).
672
+ *
673
+ * When rendering to a custom render target, the number of samples of that render target is used.
674
+ * If the renderer needs an internal framebuffer target for tone mapping or color space conversion,
675
+ * the number of samples is set to 0.
676
+ *
677
+ * @type {number}
678
+ */
679
+ get currentSamples(): number;
627
680
  /**
628
681
  * The current tone mapping of the renderer. When not producing screen output,
629
682
  * the tone mapping is always `NoToneMapping`.
@@ -664,7 +717,7 @@ declare class Renderer {
664
717
  *
665
718
  * @return {?RenderTarget} The render target. Returns `null` if no render target is set.
666
719
  */
667
- getRenderTarget(): RenderTarget<Texture> | null;
720
+ getRenderTarget(): RenderTarget<Texture<unknown>> | null;
668
721
  /**
669
722
  * Sets the output render target for the renderer.
670
723
  *
@@ -676,9 +729,24 @@ declare class Renderer {
676
729
  *
677
730
  * @return {?RenderTarget} The current output render target. Returns `null` if no output target is set.
678
731
  */
679
- getOutputRenderTarget(): RenderTarget<Texture> | null;
732
+ getOutputRenderTarget(): RenderTarget<Texture<unknown>> | null;
733
+ /**
734
+ * Sets the canvas target. The canvas target manages the HTML canvas
735
+ * or the offscreen canvas the renderer draws into.
736
+ *
737
+ * @param {CanvasTarget} canvasTarget - The canvas target.
738
+ */
739
+ setCanvasTarget(canvasTarget: CanvasTarget): void;
740
+ /**
741
+ * Returns the current canvas target.
742
+ *
743
+ * @return {CanvasTarget} The current canvas target.
744
+ */
745
+ getCanvasTarget(): CanvasTarget;
680
746
  /**
681
747
  * Resets the renderer to the initial state before WebXR started.
748
+ *
749
+ * @private
682
750
  */
683
751
  _resetXRState(): void;
684
752
  /**
@@ -742,29 +810,36 @@ declare class Renderer {
742
810
  * if the renderer has been initialized.
743
811
  *
744
812
  * @param {Node|Array<Node>} computeNodes - The compute node(s).
745
- * @param {?(Array<number>|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count.
813
+ * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
814
+ * - A single number representing count, or
815
+ * - An array [x, y, z] representing dispatch size, or
816
+ * - A IndirectStorageBufferAttribute for indirect dispatch size.
746
817
  * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
747
818
  */
748
819
  compute(
749
820
  computeNodes: ComputeNode | ComputeNode[],
750
- dispatchSizeOrCount?: number[] | number | null,
821
+ dispatchSize?: number[] | number | IndirectStorageBufferAttribute | null,
751
822
  ): Promise<void> | undefined;
752
823
  /**
753
824
  * Execute a single or an array of compute nodes.
754
825
  *
755
826
  * @async
756
827
  * @param {Node|Array<Node>} computeNodes - The compute node(s).
757
- * @param {?(Array<number>|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count.
828
+ * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
829
+ * - A single number representing count, or
830
+ * - An array [x, y, z] representing dispatch size, or
831
+ * - A IndirectStorageBufferAttribute for indirect dispatch size.
758
832
  * @return {Promise} A Promise that resolve when the compute has finished.
759
833
  */
760
834
  computeAsync(
761
835
  computeNodes: ComputeNode | ComputeNode[],
762
- dispatchSizeOrCount?: number[] | number | null,
836
+ dispatchSize?: number[] | number | IndirectStorageBufferAttribute | null,
763
837
  ): Promise<void>;
764
838
  /**
765
839
  * Checks if the given feature is supported by the selected backend.
766
840
  *
767
841
  * @async
842
+ * @deprecated
768
843
  * @param {string} name - The feature's name.
769
844
  * @return {Promise<boolean>} A Promise that resolves with a bool that indicates whether the feature is supported or not.
770
845
  */
@@ -777,7 +852,7 @@ declare class Renderer {
777
852
  * @param {string} name - The feature's name.
778
853
  * @return {boolean} Whether the feature is supported or not.
779
854
  */
780
- hasFeature(name: string): false | void;
855
+ hasFeature(name: string): void;
781
856
  /**
782
857
  * Returns `true` when the renderer has been initialized.
783
858
  *
@@ -789,6 +864,7 @@ declare class Renderer {
789
864
  * (which can cause noticeable lags due to decode and GPU upload overhead).
790
865
  *
791
866
  * @async
867
+ * @deprecated
792
868
  * @param {Texture} texture - The texture.
793
869
  * @return {Promise} A Promise that resolves when the texture has been initialized.
794
870
  */
@@ -853,6 +929,7 @@ declare class Renderer {
853
929
  * Analyzes the given 3D object's hierarchy and builds render lists from the
854
930
  * processed hierarchy.
855
931
  *
932
+ * @private
856
933
  * @param {Object3D} object - The 3D object to process (usually a scene).
857
934
  * @param {Camera} camera - The camera the object is rendered with.
858
935
  * @param {number} groupOrder - The group order is derived from the `renderOrder` of groups and is used to group 3D objects within groups.
@@ -909,6 +986,15 @@ declare class Renderer {
909
986
  lightsNode: LightsNode,
910
987
  passId?: string | null,
911
988
  ): void;
989
+ /**
990
+ * Retrieves shadow nodes for the given material. This is used to setup shadow passes.
991
+ * The result is cached per material and updated when the material's version changes.
992
+ *
993
+ * @private
994
+ * @param {Material} material
995
+ * @returns {Object} - The shadow nodes for the material.
996
+ */
997
+ _getShadowNodes(material: Material): any;
912
998
  /**
913
999
  * This method represents the default render object function that manages the render lifecycle
914
1000
  * of the object.
@@ -982,6 +1068,12 @@ declare class Renderer {
982
1068
  clippingContext: ClippingContext | null,
983
1069
  passId?: string,
984
1070
  ): void;
1071
+ /**
1072
+ * Callback when the canvas has been resized.
1073
+ *
1074
+ * @private
1075
+ */
1076
+ _onCanvasTargetResize(): void;
985
1077
  /**
986
1078
  * Alias for `compileAsync()`.
987
1079
  *
@@ -993,4 +1085,11 @@ declare class Renderer {
993
1085
  */
994
1086
  get compile(): (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise<void>;
995
1087
  }
1088
+ /**
1089
+ * Animation loop parameter of `renderer.setAnimationLoop()`.
1090
+ *
1091
+ * @callback onAnimationCallback
1092
+ * @param {DOMHighResTimeStamp} time - A timestamp indicating the end time of the previous frame's rendering.
1093
+ * @param {XRFrame} [frame] - A reference to the current XR frame. Only relevant when using XR rendering.
1094
+ */
996
1095
  export default Renderer;
@@ -6,6 +6,8 @@ declare class SampledTexture extends Sampler {
6
6
 
7
7
  store: boolean;
8
8
 
9
+ mipLevel: number;
10
+
9
11
  readonly isSampledTexture: true;
10
12
 
11
13
  constructor(name: string, texture: Texture | null);
@@ -6,6 +6,8 @@ declare class Sampler extends Binding {
6
6
 
7
7
  generation: number | null;
8
8
 
9
+ samplerKey: string;
10
+
9
11
  readonly isSampler: true;
10
12
 
11
13
  constructor(name: string, texture: Texture | null);
@@ -87,6 +87,19 @@ declare class Textures extends DataMap<{
87
87
  * @param {Object} [options={}] - The options.
88
88
  */
89
89
  updateTexture(texture: Texture, options?: TextureOptions): void;
90
+ /**
91
+ * Updates the sampler for the given texture. This method has no effect
92
+ * for the WebGL backend since it has no concept of samplers. Texture
93
+ * parameters are configured with the `texParameter()` command for each
94
+ * texture.
95
+ *
96
+ * In WebGPU, samplers are objects like textures and it's possible to share
97
+ * them when the texture parameters match.
98
+ *
99
+ * @param {Texture} texture - The texture to update the sampler for.
100
+ * @return {string} The current sampler key.
101
+ */
102
+ updateSampler(texture: Texture): void;
90
103
  /**
91
104
  * Computes the size of the given texture and writes the result
92
105
  * into the target vector. This vector is also returned by the
@@ -116,6 +129,13 @@ declare class Textures extends DataMap<{
116
129
  * @return {boolean} Whether mipmaps are required or not.
117
130
  */
118
131
  needsMipmaps(texture: Texture): boolean;
132
+ /**
133
+ * Frees internal resources when the given render target isn't
134
+ * required anymore.
135
+ *
136
+ * @param {RenderTarget} renderTarget - The render target to destroy.
137
+ */
138
+ _destroyRenderTarget(renderTarget: RenderTarget): void;
119
139
  /**
120
140
  * Frees internal resource when the given texture isn't
121
141
  * required anymore.
@@ -10,21 +10,44 @@ declare abstract class TimestampQueryPool {
10
10
  queryOffsets: Map<number, number>;
11
11
  isDisposed: boolean;
12
12
  lastValue: number;
13
+ frames: number[];
13
14
  pendingResolve: boolean;
15
+ timestamps: Map<string, number>;
14
16
  /**
15
17
  * Creates a new timestamp query pool.
16
18
  *
17
19
  * @param {number} [maxQueries=256] - Maximum number of queries this pool can hold.
18
20
  */
19
21
  constructor(maxQueries?: number);
22
+ /**
23
+ * Returns all timestamp frames.
24
+ *
25
+ * @return {Array<number>} The timestamp frames.
26
+ */
27
+ getTimestampFrames(): number[];
28
+ /**
29
+ * Returns the timestamp for a given render context.
30
+ *
31
+ * @param {string} uid - A unique identifier for the render context.
32
+ * @return {?number} The timestamp, or undefined if not available.
33
+ */
34
+ getTimestamp(uid: string): number;
35
+ /**
36
+ * Returns whether a timestamp is available for a given render context.
37
+ *
38
+ * @param {string} uid - A unique identifier for the render context.
39
+ * @return {boolean} True if a timestamp is available, false otherwise.
40
+ */
41
+ hasTimestamp(uid: string): boolean;
20
42
  /**
21
43
  * Allocate queries for a specific uid.
22
44
  *
23
45
  * @abstract
24
46
  * @param {string} uid - A unique identifier for the render context.
47
+ * @param {number} frameId - The current frame identifier.
25
48
  * @returns {?number}
26
49
  */
27
- abstract allocateQueriesForContext(uid: string): number | null;
50
+ abstract allocateQueriesForContext(uid: string, frameId: number): number | null;
28
51
  /**
29
52
  * Resolve all timestamps and return data (or process them).
30
53
  *
@@ -128,6 +128,7 @@ declare class UniformsGroup extends UniformBuffer {
128
128
  /**
129
129
  * Returns a typed array that matches the given data type.
130
130
  *
131
+ * @private
131
132
  * @param {string} type - The data type.
132
133
  * @return {TypedArray} The typed array.
133
134
  */
@@ -1,6 +1,7 @@
1
1
  import { RenderTarget } from "../../../core/RenderTarget.js";
2
2
  import { Vector3 } from "../../../math/Vector3.js";
3
3
  import { Scene } from "../../../scenes/Scene.js";
4
+ import { Texture } from "../../../textures/Texture.js";
4
5
  import Renderer from "../Renderer.js";
5
6
 
6
7
  export interface PMREMGeneratorOptions {
@@ -19,7 +20,9 @@ declare class PMREMGenerator {
19
20
  far?: number,
20
21
  options?: PMREMGeneratorOptions,
21
22
  ): RenderTarget;
22
-
23
+ /**
24
+ * @deprecated ".fromSceneAsync()" is deprecated. Use "await renderer.init()" instead.
25
+ */
23
26
  fromSceneAsync(
24
27
  scene: Scene,
25
28
  sigma?: number,
@@ -28,6 +31,21 @@ declare class PMREMGenerator {
28
31
  options?: PMREMGeneratorOptions,
29
32
  ): Promise<RenderTarget>;
30
33
 
34
+ fromEquirectangular(equirectangular: Texture, renderTarget?: RenderTarget | null): RenderTarget;
35
+ /**
36
+ * @deprecated ".fromEquirectangularAsync()" is deprecated. Use "await renderer.init()" instead.
37
+ */
38
+ fromEquirectangularAsync(equirectangular: Texture, renderTarget?: RenderTarget | null): Promise<RenderTarget>;
39
+
40
+ fromCubemap(cubemap: Texture, renderTarget?: RenderTarget | null): RenderTarget;
41
+ /**
42
+ * @deprecated ".fromCubemapAsync()" is deprecated. Use "await renderer.init()" instead.
43
+ */
44
+ fromCubemapAsync(cubemap: Texture, renderTarget?: RenderTarget | null): Promise<RenderTarget>;
45
+
46
+ compileCubemapShader(): Promise<void>;
47
+ compileEquirectangularShader(): Promise<void>;
48
+
31
49
  dispose(): void;
32
50
  }
33
51
 
@@ -4,7 +4,6 @@ import { Material } from "../../../materials/Material.js";
4
4
  import NodeMaterial from "../../../materials/nodes/NodeMaterial.js";
5
5
  import Node from "../../../nodes/core/Node.js";
6
6
  import AnalyticLightNode from "../../../nodes/lighting/AnalyticLightNode.js";
7
- import { ShaderNodeObject } from "../../../nodes/tsl/TSLCore.js";
8
7
  /**
9
8
  * The purpose of a node library is to assign node implementations
10
9
  * to existing library features. In `WebGPURenderer` lights, materials
@@ -22,7 +21,7 @@ declare class NodeLibrary {
22
21
  materialNodes: Map<string, {
23
22
  new(): NodeMaterial;
24
23
  }>;
25
- toneMappingNodes: Map<ToneMapping, (color: Node, exposure: Node) => ShaderNodeObject<Node>>;
24
+ toneMappingNodes: Map<ToneMapping, (color: Node, exposure: Node) => Node>;
26
25
  /**
27
26
  * Constructs a new node library.
28
27
  */
@@ -44,17 +43,14 @@ declare class NodeLibrary {
44
43
  * @param {Function} toneMappingNode - The tone mapping node function.
45
44
  * @param {number} toneMapping - The tone mapping.
46
45
  */
47
- addToneMapping(
48
- toneMappingNode: (color: Node, exposure: Node) => ShaderNodeObject<Node>,
49
- toneMapping: ToneMapping,
50
- ): void;
46
+ addToneMapping(toneMappingNode: (color: Node, exposure: Node) => Node, toneMapping: ToneMapping): void;
51
47
  /**
52
48
  * Returns a tone mapping node function for a tone mapping technique (constant).
53
49
  *
54
50
  * @param {number} toneMapping - The tone mapping.
55
51
  * @return {?Function} The tone mapping node function. Returns `null` if no node function is found.
56
52
  */
57
- getToneMappingFunction(toneMapping: ToneMapping): ((color: Node, exposure: Node) => ShaderNodeObject<Node>) | null;
53
+ getToneMappingFunction(toneMapping: ToneMapping): ((color: Node, exposure: Node) => Node) | null;
58
54
  /**
59
55
  * Returns a node material class definition for a material type.
60
56
  *