@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
three/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 03 Sep 2025 18:38:35 GMT
11
+ * Last updated: Wed, 10 Dec 2025 22:36:27 GMT
12
12
  * Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
13
13
 
14
14
  # Credits
@@ -130,7 +130,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
130
130
  * @param domElement The HTML element used for event listeners. (optional)
131
131
  * @param scene The scene rendered by the camera. If not given, gizmos cannot be shown. (optional)
132
132
  */
133
- constructor(camera: Camera, domElement?: HTMLElement | null, scene?: Scene | null);
133
+ constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null, scene?: Scene | null);
134
134
 
135
135
  /**
136
136
  * Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of
@@ -75,7 +75,7 @@ declare class DragControls extends Controls<DragControlsEventMap> {
75
75
  * @param camera The camera of the rendered scene.
76
76
  * @param domElement The HTML element used for event listeners. (optional)
77
77
  */
78
- constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
78
+ constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | SVGElement | null);
79
79
  }
80
80
 
81
81
  export { DragControls };
@@ -76,7 +76,7 @@ declare class FirstPersonControls extends Controls<{}> {
76
76
  * @param object The camera to be controlled.
77
77
  * @param domElement The HTML element used for event listeners. (optional)
78
78
  */
79
- constructor(object: Camera, domElement?: HTMLElement);
79
+ constructor(object: Camera, domElement?: HTMLElement | SVGElement);
80
80
 
81
81
  /**
82
82
  * Should be called if the application window is resized.
@@ -38,7 +38,7 @@ declare class FlyControls extends Controls<FlyControlsEventMap> {
38
38
  * @param object The camera to be controlled.
39
39
  * @param domElement The HTML element used for event listeners. (optional)
40
40
  */
41
- constructor(object: Camera, domElement?: HTMLElement | null);
41
+ constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
42
42
  }
43
43
 
44
44
  export { FlyControls };
@@ -206,7 +206,7 @@ declare class OrbitControls extends Controls<OrbitControlsEventMap> {
206
206
  * is the scene itself.
207
207
  * @param domElement The HTML element used for event listeners. (optional)
208
208
  */
209
- constructor(object: Camera, domElement?: HTMLElement | null);
209
+ constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
210
210
 
211
211
  /**
212
212
  * Get the current vertical rotation, in radians.
@@ -47,7 +47,7 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
47
47
  * @param camera The camera of the rendered scene.
48
48
  * @param domElement The HTML element used for event listeners.
49
49
  */
50
- constructor(camera: Camera, domElement?: HTMLElement | null);
50
+ constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
51
51
 
52
52
  /**
53
53
  * Returns the look direction of the camera.
@@ -124,7 +124,7 @@ declare class TrackballControls extends Controls<TrackballControlsEventMap> {
124
124
  * @param camera The camera of the rendered scene.
125
125
  * @param domElement The HTML element used for event listeners. (optional)
126
126
  */
127
- constructor(camera: Camera, domElement?: HTMLElement | null);
127
+ constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
128
128
 
129
129
  /**
130
130
  * Should be called if the application window is resized.
@@ -163,7 +163,7 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
163
163
  * @param camera The camera of the rendered scene.
164
164
  * @param domElement The HTML element used for event listeners. (optional)
165
165
  */
166
- constructor(camera: Camera, domElement?: HTMLElement);
166
+ constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
167
167
 
168
168
  /**
169
169
  * Returns the visual representation of the controls. Add the helper to your scene to visually transform the
@@ -59,6 +59,8 @@ export interface TextGeometryParameters extends ExtrudeGeometryOptions {
59
59
  * @defaultValue `3`
60
60
  */
61
61
  bevelSegments?: number | undefined;
62
+
63
+ direction?: "ltr" | "rtl" | "tb" | undefined;
62
64
  }
63
65
 
64
66
  /**
@@ -0,0 +1,21 @@
1
+ import { Node, Renderer, StorageBufferNode } from "three/webgpu";
2
+
3
+ export const getBitonicFlipIndices: (index: Node, blockHeight: Node) => Node;
4
+
5
+ export const getBitonicDisperseIndices: (index: Node, swapSpan: Node) => Node;
6
+
7
+ export interface BitonicSortOptions {
8
+ workgroupSize?: number | undefined;
9
+ }
10
+
11
+ export class BitonicSort {
12
+ infoStorage: StorageBufferNode;
13
+
14
+ swapOpCount: number;
15
+ stepCount: number;
16
+
17
+ constructor(renderer: Renderer, dataBuffer: StorageBufferNode, options?: BitonicSortOptions);
18
+
19
+ computeStep(renderer: Renderer): Promise<void>;
20
+ compute(renderer: Renderer): Promise<void>;
21
+ }
@@ -0,0 +1,10 @@
1
+ import { RendererInspector } from "./RendererInspector.js";
2
+ import { ParametersGroup } from "./tabs/Parameters.js";
3
+
4
+ declare class Inspector extends RendererInspector {
5
+ createParameters(name: string): ParametersGroup;
6
+
7
+ get domElement(): HTMLDivElement;
8
+ }
9
+
10
+ export { Inspector };
@@ -0,0 +1,4 @@
1
+ import { InspectorBase } from "three/webgpu";
2
+
3
+ export class RendererInspector extends InspectorBase {
4
+ }
@@ -0,0 +1,95 @@
1
+ import { Tab } from "../ui/Tab.js";
2
+ import { ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider } from "../ui/Values.js";
3
+
4
+ type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
5
+
6
+ interface ValueSelectWithParameters<T = Record<string, unknown>, K extends keyof T = keyof T>
7
+ extends ValueSelect<T, K>
8
+ {
9
+ name: (name: string) => this;
10
+ listen: () => this;
11
+ }
12
+
13
+ interface ValueNumberWithParameters<
14
+ T = Record<string, unknown>,
15
+ K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
16
+ > extends ValueNumber<T, K> {
17
+ name: (name: string) => this;
18
+ listen: () => this;
19
+ }
20
+
21
+ interface ValueSliderWithParameters<
22
+ T = Record<string, unknown>,
23
+ K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
24
+ > extends ValueSlider<T, K> {
25
+ name: (name: string) => this;
26
+ listen: () => this;
27
+ }
28
+
29
+ interface ValueCheckboxWithParameters<
30
+ T = Record<string, unknown>,
31
+ K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
32
+ > extends ValueCheckbox<T, K> {
33
+ name: (name: string) => this;
34
+ listen: () => this;
35
+ }
36
+
37
+ interface ValueButtonWithParameters<
38
+ T = Record<string, unknown>,
39
+ K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
40
+ > extends ValueButton<T, K> {
41
+ name: (name: string) => this;
42
+ }
43
+
44
+ interface ValueColorWithParameters<
45
+ T = Record<string, unknown>,
46
+ K extends keyof T = keyof T,
47
+ > extends ValueColor<T, K> {
48
+ name: (name: string) => this;
49
+ listen: () => this;
50
+ }
51
+
52
+ declare class ParametersGroup {
53
+ name: string;
54
+
55
+ constructor(parameters: never, name: string);
56
+
57
+ add<T, K extends keyof T>(
58
+ object: T,
59
+ property: K,
60
+ options: ReadonlyArray<T[K]> | Record<string, T[K]>,
61
+ ): ValueSelectWithParameters<T, K>;
62
+ add<T, K extends KeyToValueOfType<T, number>>(
63
+ object: T,
64
+ property: K,
65
+ min: number,
66
+ max: number,
67
+ step?: number,
68
+ ): ValueSliderWithParameters<T, K>;
69
+ add<T, K extends KeyToValueOfType<T, number>>(
70
+ object: T,
71
+ property: K,
72
+ min?: number,
73
+ ): ValueNumberWithParameters<T, K>;
74
+ add<T, K extends KeyToValueOfType<T, boolean>>(
75
+ object: T,
76
+ property: K,
77
+ options?: never,
78
+ ): ValueCheckboxWithParameters<T, K>;
79
+ add<T, K extends KeyToValueOfType<T, (this: T) => void>>(
80
+ object: T,
81
+ property: K,
82
+ options?: never,
83
+ ): ValueButtonWithParameters<T, K>;
84
+
85
+ addFolder(name: string): ParametersGroup;
86
+
87
+ addColor<T, K extends keyof T>(object: T, property: K, rgbScale?: number): ValueColorWithParameters<T, K>;
88
+ }
89
+
90
+ declare class Parameters extends Tab {
91
+ createGroup(name: string): ParametersGroup;
92
+ }
93
+
94
+ export { Parameters };
95
+ export type { ParametersGroup };
@@ -0,0 +1,3 @@
1
+ export class Tab {
2
+ constructor(title: string);
3
+ }
@@ -0,0 +1,80 @@
1
+ import { ColorRepresentation, EventDispatcher } from "three";
2
+
3
+ type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
4
+
5
+ declare class Value<T = Record<string, unknown>, K extends keyof T = keyof T> extends EventDispatcher {
6
+ onChange(callback: (value: T[K]) => void): this;
7
+ }
8
+
9
+ export interface ValueNumberParams {
10
+ value?: number;
11
+ step?: number;
12
+ min?: number;
13
+ max?: number;
14
+ }
15
+
16
+ declare class ValueNumber<
17
+ T = Record<string, unknown>,
18
+ K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
19
+ > extends Value<T, K> {
20
+ constructor(params: ValueNumberParams);
21
+ }
22
+
23
+ export interface ValueCheckboxParams {
24
+ value?: boolean;
25
+ }
26
+
27
+ declare class ValueCheckbox<
28
+ T = Record<string, unknown>,
29
+ K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
30
+ > extends Value<T, K> {
31
+ constructor(params: ValueCheckboxParams);
32
+ }
33
+
34
+ export interface ValueSliderParams {
35
+ value?: number;
36
+ min?: number;
37
+ max?: number;
38
+ step?: number;
39
+ }
40
+
41
+ declare class ValueSlider<
42
+ T = Record<string, unknown>,
43
+ K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
44
+ > extends Value<T, K> {
45
+ constructor(params: ValueSliderParams);
46
+
47
+ setValue(val: number): this;
48
+ step(value: number): this;
49
+ }
50
+
51
+ export interface ValueSelectParams<T, K extends keyof T> {
52
+ options?: ReadonlyArray<T[K]> | Record<string, T[K]>;
53
+ value?: number;
54
+ }
55
+
56
+ declare class ValueSelect<T = Record<string, unknown>, K extends keyof T = keyof T> extends Value<T, K> {
57
+ constructor(params: ValueSelectParams<T, K>);
58
+ }
59
+
60
+ export interface ValueColorParams {
61
+ value?: ColorRepresentation;
62
+ }
63
+
64
+ declare class ValueColor<T = Record<string, unknown>, K extends keyof T = keyof T> extends Value<T, K> {
65
+ constructor(params: ValueColorParams);
66
+ }
67
+
68
+ export interface ValueButtonParams {
69
+ text?: string;
70
+ value?: () => void;
71
+ }
72
+
73
+ declare class ValueButton<
74
+ T = Record<string, unknown>,
75
+ K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
76
+ > extends Value<T, K> {
77
+ constructor(params: ValueColorParams);
78
+ }
79
+
80
+ export { Value, ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider };
@@ -1,16 +1,16 @@
1
- import { Camera, Frustum, Mesh, Object3D, Scene, Vector3 } from "three";
1
+ import { Camera, Object3D, Scene, Vector3 } from "three";
2
2
 
3
- export class SelectionBox {
4
- constructor(camera: Camera, scene: Scene, deep?: number);
3
+ declare class SelectionBox {
5
4
  camera: Camera;
6
- collection: Mesh[];
7
- deep: number;
8
- endPoint: Vector3;
9
5
  scene: Scene;
10
6
  startPoint: Vector3;
7
+ endPoint: Vector3;
8
+ collection: Object3D[];
11
9
  instances: Record<string, number[]>;
10
+ batches: Record<string, number[]>;
11
+ deep: number;
12
+
13
+ constructor(camera: Camera, scene: Scene, deep?: number);
12
14
 
13
- select(startPoint?: Vector3, endPoint?: Vector3): Mesh[];
14
- updateFrustum(startPoint: Vector3, endPoint: Vector3): void;
15
- searchChildInFrustum(frustum: Frustum, object: Object3D): void;
15
+ select(startPoint?: Vector3, endPoint?: Vector3): Object3D[];
16
16
  }
@@ -1,4 +1,3 @@
1
- import { ShaderNodeObject } from "three/tsl";
2
1
  import { Lighting } from "three/webgpu";
3
2
  import { Light } from "../../../src/lights/Light.js";
4
3
  import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
@@ -6,5 +5,5 @@ import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
6
5
  export class TiledLighting extends Lighting {
7
6
  constructor();
8
7
 
9
- createNode(lights?: Light[]): ShaderNodeObject<TiledLightsNode>;
8
+ createNode(lights?: Light[]): TiledLightsNode;
10
9
  }
@@ -37,5 +37,5 @@ export class Font {
37
37
 
38
38
  constructor(data: FontData);
39
39
 
40
- generateShapes(text: string, size?: number): Shape[];
40
+ generateShapes(text: string, size?: number, direction?: "ltr" | "rtl" | "tb"): Shape[];
41
41
  }
@@ -35,6 +35,9 @@ export class KTX2Loader extends Loader<CompressedTexture> {
35
35
  */
36
36
  setWorkerLimit(limit: number): this;
37
37
 
38
+ /**
39
+ * "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.
40
+ */
38
41
  detectSupportAsync(renderer: Renderer): Promise<this>;
39
42
 
40
43
  /**
@@ -16,6 +16,13 @@ declare class UltraHDRLoader extends Loader<DataTexture> {
16
16
  setDataType(value: TextureDataType): this;
17
17
 
18
18
  parse(buffer: ArrayBuffer, onLoad: (texData: UltraHDRLoaderTextureData) => void): void;
19
+
20
+ load(
21
+ url: string,
22
+ onLoad: (data: DataTexture) => void,
23
+ onProgress?: (event: ProgressEvent) => void,
24
+ onError?: (err: unknown) => void,
25
+ ): DataTexture;
19
26
  }
20
27
 
21
28
  export { UltraHDRLoader };
@@ -1,4 +1,4 @@
1
- import { Data3DTexture, Loader, LoadingManager, Mesh } from "three";
1
+ import { BufferGeometry, Data3DTexture, Loader, LoadingManager, Mesh, MeshStandardMaterial, Object3D } from "three";
2
2
 
3
3
  export interface Chunk {
4
4
  palette: number[];
@@ -6,16 +6,33 @@ export interface Chunk {
6
6
  data: Uint8Array;
7
7
  }
8
8
 
9
- export class VOXLoader extends Loader<Chunk[]> {
9
+ export interface VOXLoaderResult {
10
+ chunks: Chunk[];
11
+ scene: Object3D;
12
+ }
13
+
14
+ declare class VOXLoader extends Loader<VOXLoaderResult> {
10
15
  constructor(manager?: LoadingManager);
11
16
 
12
- parse(data: ArrayBuffer): object[];
17
+ parse(data: ArrayBuffer): VOXLoaderResult;
13
18
  }
14
19
 
15
- export class VOXMesh extends Mesh {
20
+ declare function buildMesh(chunk: Chunk): Mesh<BufferGeometry, MeshStandardMaterial>;
21
+
22
+ declare function buildData3DTexture(chunk: Chunk): Data3DTexture;
23
+
24
+ /**
25
+ * @deprecated Use buildMesh() instead.
26
+ */
27
+ declare class VOXMesh extends Mesh {
16
28
  constructor(chunk: Chunk);
17
29
  }
18
30
 
19
- export class VOXData3DTexture extends Data3DTexture {
31
+ /**
32
+ * @deprecated Use buildData3DTexture() instead.
33
+ */
34
+ declare class VOXData3DTexture extends Data3DTexture {
20
35
  constructor(chunk: Chunk);
21
36
  }
37
+
38
+ export { buildData3DTexture, buildMesh, VOXData3DTexture, VOXLoader, VOXMesh };
@@ -1,32 +1,54 @@
1
- import { Box3, Layers, Object3D, Ray, Sphere, Triangle } from "three";
1
+ import { Box3, Layers, Object3D, Ray, Sphere, Triangle, Vector3 } from "three";
2
2
 
3
3
  import { Capsule } from "./Capsule.js";
4
4
 
5
- export class Octree {
6
- box: Box3 | null | undefined;
5
+ interface OctreeTriangleIntersection {
6
+ normal: Vector3;
7
+ point: Vector3;
8
+ depth: number;
9
+ }
10
+
11
+ interface OctreeIntersection {
12
+ normal: Vector3;
13
+ depth: number;
14
+ }
15
+
16
+ interface OctreeRayIntersection {
17
+ distance: number;
18
+ triangle: Triangle;
19
+ position: Vector3;
20
+ }
21
+
22
+ declare class Octree {
23
+ box: Box3 | undefined;
7
24
  bounds: Box3;
8
25
 
9
- subTrees: Octree[];
10
- triangles: Triangle[];
11
26
  layers: Layers;
12
-
13
27
  trianglesPerLeaf: number;
14
28
  maxLevel: number;
15
29
 
16
- constructor(box?: Box3 | null);
30
+ subTrees: Octree[];
31
+ triangles: Triangle[];
32
+
33
+ constructor(box?: Box3);
17
34
 
18
35
  addTriangle(triangle: Triangle): this;
19
36
  calcBox(): this;
20
37
  split(level: number): this;
21
38
  build(): this;
22
39
  getRayTriangles(ray: Ray, triangles: Triangle[]): Triangle[];
23
- triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle): any;
24
- triangleSphereIntersect(sphere: Sphere, triangle: Triangle): any;
25
- getSphereTriangles(sphere: Sphere, triangles: Triangle[]): Triangle[];
26
- getCapsuleTriangles(capsule: Capsule, triangles: Triangle[]): Triangle[];
27
- sphereIntersect(sphere: Sphere): any;
28
- capsuleIntersect(capsule: Capsule): any;
29
- rayIntersect(ray: Ray): any;
40
+ triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle): OctreeTriangleIntersection | false;
41
+ triangleBoxIntersect(box: Box3, triangle: Triangle): OctreeTriangleIntersection | false;
42
+ triangleSphereIntersect(sphere: Sphere, triangle: Triangle): OctreeTriangleIntersection | false;
43
+ getSphereTriangles(sphere: Sphere, triangles: Triangle[]): void;
44
+ getBoxTriangles(box: Box3, triangles: Triangle[]): void;
45
+ getCapsuleTriangles(capsule: Capsule, triangles: Triangle[]): void;
46
+ boxIntersect(box: Box3): OctreeIntersection | false;
47
+ sphereIntersect(sphere: Sphere): OctreeIntersection | false;
48
+ capsuleIntersect(capsule: Capsule): OctreeIntersection | false;
49
+ rayIntersect(ray: Ray): OctreeRayIntersection | false;
30
50
  fromGraphNode(group: Object3D): this;
31
51
  clear(): this;
32
52
  }
53
+
54
+ export { Octree };
@@ -1,16 +1,20 @@
1
- import { ShaderNodeObject } from "three/tsl";
2
1
  import { BoxGeometry, Mesh, NodeMaterial, UniformNode, Vector3 } from "three/webgpu";
3
2
 
4
3
  declare class SkyMesh extends Mesh<BoxGeometry, NodeMaterial> {
5
- turbidity: ShaderNodeObject<UniformNode<number>>;
6
- rayleigh: ShaderNodeObject<UniformNode<number>>;
7
- mieCoefficient: ShaderNodeObject<UniformNode<number>>;
8
- mieDirectionalG: ShaderNodeObject<UniformNode<number>>;
9
- sunPosition: ShaderNodeObject<UniformNode<Vector3>>;
10
- upUniform: ShaderNodeObject<UniformNode<Vector3>>;
4
+ turbidity: UniformNode<number>;
5
+ rayleigh: UniformNode<number>;
6
+ mieCoefficient: UniformNode<number>;
7
+ mieDirectionalG: UniformNode<number>;
8
+ sunPosition: UniformNode<Vector3>;
9
+ upUniform: UniformNode<Vector3>;
11
10
 
11
+ /**
12
+ * @deprecated
13
+ */
12
14
  readonly isSky: true;
13
15
 
16
+ readonly isSkyMesh: true;
17
+
14
18
  constructor();
15
19
  }
16
20
 
@@ -11,7 +11,7 @@ import {
11
11
  } from "three/webgpu";
12
12
 
13
13
  export interface WaterMeshOptions {
14
- resolution?: number | undefined;
14
+ resolutionScale?: number | undefined;
15
15
  waterNormals: Texture;
16
16
  alpha?: number | undefined;
17
17
  size?: number | undefined;
@@ -24,7 +24,7 @@ export interface WaterMeshOptions {
24
24
  declare class WaterMesh extends Mesh<BufferGeometry, NodeMaterial> {
25
25
  readonly isWater: true;
26
26
 
27
- resolution: number;
27
+ resolutionScale: number;
28
28
 
29
29
  waterNormals: TextureNode;
30
30
  alpha: UniformNode<number>;
@@ -2,7 +2,7 @@ import { Mesh, Object3D, Vector3 } from "three";
2
2
 
3
3
  export interface AmmoPhysicsObject {
4
4
  addScene: (scene: Object3D) => void;
5
- addMesh: (mesh: Mesh, mass?: number) => void;
5
+ addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
6
6
  setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void;
7
7
  }
8
8
 
@@ -1,10 +1,14 @@
1
- import { ShaderMaterial } from "three";
1
+ import { IUniform, RawShaderMaterial } from "three";
2
2
 
3
- import { FullScreenQuad, Pass } from "./Pass.js";
3
+ import { Pass } from "./Pass.js";
4
+
5
+ declare class OutputPass extends Pass {
6
+ readonly isOutputPass: true;
7
+
8
+ uniforms: Record<string, IUniform>;
9
+ material: RawShaderMaterial;
4
10
 
5
- export class OutputPass extends Pass {
6
11
  constructor();
7
- uniforms: object;
8
- material: ShaderMaterial;
9
- fsQuad: FullScreenQuad;
10
12
  }
13
+
14
+ export { OutputPass };
@@ -2,15 +2,7 @@ import { Camera, Color, Material, Scene } from "three";
2
2
 
3
3
  import { Pass } from "./Pass.js";
4
4
 
5
- export class RenderPass extends Pass {
6
- constructor(
7
- scene: Scene,
8
- camera: Camera,
9
- overrideMaterial?: Material | null,
10
- clearColor?: Color | null,
11
- clearAlpha?: number | null,
12
- );
13
-
5
+ declare class RenderPass extends Pass {
14
6
  scene: Scene;
15
7
  camera: Camera;
16
8
 
@@ -18,6 +10,19 @@ export class RenderPass extends Pass {
18
10
 
19
11
  clearColor: Color | null;
20
12
  clearAlpha: number | null;
21
-
13
+ clear: boolean;
22
14
  clearDepth: boolean;
15
+ needsSwap: boolean;
16
+
17
+ readonly isRenderPass: true;
18
+
19
+ constructor(
20
+ scene: Scene,
21
+ camera: Camera,
22
+ overrideMaterial?: Material | null,
23
+ clearColor?: Color | null,
24
+ clearAlpha?: number | null,
25
+ );
23
26
  }
27
+
28
+ export { RenderPass };
@@ -1,23 +1,28 @@
1
1
  import { Camera, Object3D, Scene, Vector2 } from "three";
2
2
 
3
- export class CSS2DObject extends Object3D {
4
- constructor(element: HTMLElement);
3
+ declare class CSS2DObject extends Object3D {
5
4
  element: HTMLElement;
6
5
  center: Vector2;
7
6
 
7
+ constructor(element: HTMLElement);
8
+
8
9
  onBeforeRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
9
10
  onAfterRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
10
11
  }
11
12
 
12
- export type CSS2DParameters = {
13
- element?: HTMLElement;
14
- };
13
+ export interface CSS2DParameters {
14
+ element?: HTMLElement | undefined;
15
+ }
16
+
17
+ declare class CSS2DRenderer {
18
+ domElement: HTMLElement;
19
+ sortObjects: boolean;
15
20
 
16
- export class CSS2DRenderer {
17
21
  constructor(parameters?: CSS2DParameters);
18
- domElement: HTMLElement;
19
22
 
20
- getSize(): { width: number; height: number };
21
- setSize(width: number, height: number): void;
22
- render(scene: Scene, camera: Camera): void;
23
+ getSize: () => { width: number; height: number };
24
+ render: (scene: Scene, camera: Camera) => void;
25
+ setSize: (width: number, height: number) => void;
23
26
  }
27
+
28
+ export { CSS2DObject, CSS2DRenderer };