@types/three 0.167.2 → 0.169.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 (304) hide show
  1. three/README.md +2 -2
  2. three/build/three.webgpu.nodes.d.ts +1 -0
  3. three/build/three.webgpu.nodes.min.d.ts +1 -0
  4. three/examples/jsm/Addons.d.ts +1 -4
  5. three/examples/jsm/capabilities/WebGL.d.ts +11 -3
  6. three/examples/jsm/controls/ArcballControls.d.ts +111 -77
  7. three/examples/jsm/controls/DragControls.d.ts +43 -29
  8. three/examples/jsm/controls/FirstPersonControls.d.ts +82 -12
  9. three/examples/jsm/controls/FlyControls.d.ts +35 -11
  10. three/examples/jsm/controls/OrbitControls.d.ts +84 -137
  11. three/examples/jsm/controls/PointerLockControls.d.ts +68 -9
  12. three/examples/jsm/controls/TrackballControls.d.ts +110 -26
  13. three/examples/jsm/controls/TransformControls.d.ts +152 -25
  14. three/examples/jsm/effects/AnaglyphEffect.d.ts +11 -5
  15. three/examples/jsm/effects/ParallaxBarrierEffect.d.ts +7 -4
  16. three/examples/jsm/environments/RoomEnvironment.d.ts +2 -2
  17. three/examples/jsm/exporters/EXRExporter.d.ts +7 -2
  18. three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
  19. three/examples/jsm/helpers/LightProbeHelper.d.ts +5 -3
  20. three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
  21. three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
  22. three/examples/jsm/lines/Line2.d.ts +15 -1
  23. three/examples/jsm/lines/LineGeometry.d.ts +18 -1
  24. three/examples/jsm/lines/LineMaterial.d.ts +65 -12
  25. three/examples/jsm/lines/LineSegments2.d.ts +25 -2
  26. three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
  27. three/examples/jsm/loaders/DRACOLoader.d.ts +6 -0
  28. three/examples/jsm/loaders/KTX2Loader.d.ts +4 -0
  29. three/examples/jsm/modifiers/CurveModifier.d.ts +7 -3
  30. three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
  31. three/examples/jsm/objects/Lensflare.d.ts +13 -9
  32. three/examples/jsm/objects/LensflareMesh.d.ts +21 -0
  33. three/examples/jsm/objects/SkyMesh.d.ts +17 -0
  34. three/examples/jsm/objects/Water2.d.ts +2 -2
  35. three/examples/jsm/objects/Water2Mesh.d.ts +42 -0
  36. three/examples/jsm/objects/WaterMesh.d.ts +31 -0
  37. three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
  38. three/examples/jsm/postprocessing/SSAARenderPass.d.ts +11 -2
  39. three/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
  40. three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
  41. three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
  42. three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
  43. three/examples/jsm/utils/TextureUtilsGPU.d.ts +3 -0
  44. three/package.json +4 -3
  45. three/src/Three.WebGPU.Nodes.d.ts +201 -0
  46. three/src/Three.WebGPU.d.ts +7 -0
  47. three/src/Three.d.ts +1 -0
  48. three/src/audio/Audio.d.ts +4 -1
  49. three/src/core/BufferAttribute.d.ts +0 -15
  50. three/src/core/EventDispatcher.d.ts +0 -3
  51. three/src/core/InterleavedBuffer.d.ts +0 -12
  52. three/src/core/Object3D.d.ts +3 -1
  53. three/src/core/Raycaster.d.ts +2 -1
  54. three/src/extras/Controls.d.ts +54 -0
  55. three/src/loaders/MaterialLoader.d.ts +2 -0
  56. three/src/{nodes/loaders → loaders/nodes}/NodeLoader.d.ts +8 -3
  57. three/src/loaders/nodes/NodeMaterialLoader.d.ts +11 -0
  58. three/src/loaders/nodes/NodeObjectLoader.d.ts +22 -0
  59. three/src/materials/Material.d.ts +17 -13
  60. three/src/materials/nodes/InstancedPointsNodeMaterial.d.ts +33 -0
  61. three/src/{nodes/materials → materials/nodes}/Line2NodeMaterial.d.ts +2 -2
  62. three/src/{nodes/materials → materials/nodes}/LineBasicNodeMaterial.d.ts +1 -1
  63. three/src/materials/nodes/LineDashedNodeMaterial.d.ts +29 -0
  64. three/src/{nodes/materials → materials/nodes}/MeshBasicNodeMaterial.d.ts +1 -1
  65. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -0
  66. three/src/{nodes/materials → materials/nodes}/MeshMatcapNodeMaterial.d.ts +2 -2
  67. three/src/{nodes/materials → materials/nodes}/MeshNormalNodeMaterial.d.ts +1 -1
  68. three/src/{nodes/materials → materials/nodes}/MeshPhongNodeMaterial.d.ts +2 -2
  69. three/src/{nodes/materials → materials/nodes}/MeshPhysicalNodeMaterial.d.ts +5 -2
  70. three/src/{nodes/materials → materials/nodes}/MeshSSSNodeMaterial.d.ts +2 -2
  71. three/src/{nodes/materials → materials/nodes}/MeshStandardNodeMaterial.d.ts +3 -3
  72. three/src/{nodes/materials → materials/nodes}/MeshToonNodeMaterial.d.ts +2 -2
  73. three/src/materials/nodes/NodeMaterial.d.ts +89 -0
  74. three/src/{nodes/materials/Materials.d.ts → materials/nodes/NodeMaterials.d.ts} +5 -2
  75. three/src/{nodes/materials → materials/nodes}/PointsNodeMaterial.d.ts +1 -2
  76. three/src/{nodes/materials → materials/nodes}/ShadowNodeMaterial.d.ts +1 -1
  77. three/src/{nodes/materials → materials/nodes}/SpriteNodeMaterial.d.ts +2 -2
  78. three/src/{nodes/materials → materials/nodes}/VolumeNodeMaterial.d.ts +1 -1
  79. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +81 -0
  80. three/src/math/Quaternion.d.ts +4 -3
  81. three/src/math/Triangle.d.ts +24 -0
  82. three/src/nodes/Nodes.d.ts +117 -362
  83. three/src/nodes/TSL.d.ts +175 -0
  84. three/src/nodes/accessors/AccessorsUtils.d.ts +1 -1
  85. three/src/nodes/accessors/BatchNode.d.ts +1 -2
  86. three/src/nodes/accessors/{BitangentNode.d.ts → Bitangent.d.ts} +1 -1
  87. three/src/nodes/accessors/BufferAttributeNode.d.ts +5 -4
  88. three/src/nodes/accessors/BufferNode.d.ts +1 -1
  89. three/src/nodes/accessors/{CameraNode.d.ts → Camera.d.ts} +1 -1
  90. three/src/nodes/accessors/ClippingNode.d.ts +1 -1
  91. three/src/nodes/accessors/CubeTextureNode.d.ts +1 -7
  92. three/src/nodes/accessors/InstanceNode.d.ts +1 -1
  93. three/src/nodes/accessors/MaterialNode.d.ts +3 -4
  94. three/src/nodes/accessors/MaterialProperties.d.ts +4 -0
  95. three/src/nodes/accessors/MaterialReferenceNode.d.ts +3 -1
  96. three/src/nodes/accessors/ModelNode.d.ts +8 -4
  97. three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -1
  98. three/src/nodes/accessors/MorphNode.d.ts +15 -0
  99. three/src/nodes/accessors/Normal.d.ts +25 -0
  100. three/src/nodes/accessors/Object3DNode.d.ts +2 -6
  101. three/src/nodes/accessors/PointUVNode.d.ts +1 -1
  102. three/src/nodes/accessors/{PositionNode.d.ts → Position.d.ts} +2 -1
  103. three/src/nodes/accessors/ReferenceBaseNode.d.ts +27 -0
  104. three/src/nodes/accessors/ReferenceNode.d.ts +7 -5
  105. three/src/nodes/accessors/{ReflectVectorNode.d.ts → ReflectVector.d.ts} +1 -1
  106. three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
  107. three/src/nodes/accessors/SceneNode.d.ts +20 -0
  108. three/src/nodes/accessors/SkinningNode.d.ts +11 -1
  109. three/src/nodes/accessors/StorageBufferNode.d.ts +2 -2
  110. three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
  111. three/src/nodes/accessors/{TangentNode.d.ts → Tangent.d.ts} +1 -1
  112. three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
  113. three/src/nodes/accessors/TextureBicubic.d.ts +4 -0
  114. three/src/nodes/accessors/TextureNode.d.ts +26 -7
  115. three/src/nodes/accessors/TextureSizeNode.d.ts +18 -0
  116. three/src/nodes/accessors/{UVNode.d.ts → UV.d.ts} +1 -1
  117. three/src/nodes/accessors/UniformArrayNode.d.ts +30 -0
  118. three/src/nodes/accessors/UserDataNode.d.ts +1 -1
  119. three/src/nodes/accessors/VelocityNode.d.ts +16 -0
  120. three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
  121. three/src/nodes/code/CodeNode.d.ts +1 -1
  122. three/src/nodes/code/ExpressionNode.d.ts +1 -1
  123. three/src/nodes/code/FunctionCallNode.d.ts +2 -2
  124. three/src/nodes/code/FunctionNode.d.ts +5 -6
  125. three/src/nodes/code/ScriptableNode.d.ts +22 -0
  126. three/src/nodes/code/ScriptableValueNode.d.ts +10 -0
  127. three/src/nodes/core/AssignNode.d.ts +2 -2
  128. three/src/nodes/core/AttributeNode.d.ts +2 -5
  129. three/src/nodes/core/BypassNode.d.ts +2 -2
  130. three/src/nodes/core/CacheNode.d.ts +2 -2
  131. three/src/nodes/core/ContextNode.d.ts +10 -7
  132. three/src/nodes/core/IndexNode.d.ts +11 -3
  133. three/src/nodes/core/MRTNode.d.ts +7 -2
  134. three/src/nodes/core/Node.d.ts +4 -7
  135. three/src/nodes/core/NodeUtils.d.ts +5 -1
  136. three/src/nodes/core/OutputStructNode.d.ts +1 -1
  137. three/src/nodes/core/ParameterNode.d.ts +12 -0
  138. three/src/nodes/core/PropertyNode.d.ts +1 -1
  139. three/src/nodes/core/StackNode.d.ts +12 -2
  140. three/src/nodes/core/StructTypeNode.d.ts +1 -0
  141. three/src/nodes/core/UniformNode.d.ts +2 -1
  142. three/src/nodes/core/VarNode.d.ts +2 -10
  143. three/src/nodes/core/VaryingNode.d.ts +2 -2
  144. three/src/nodes/display/AfterImageNode.d.ts +1 -7
  145. three/src/nodes/display/AnaglyphPassNode.d.ts +14 -0
  146. three/src/nodes/display/AnamorphicNode.d.ts +1 -7
  147. three/src/nodes/display/BleachBypass.d.ts +4 -0
  148. three/src/nodes/display/BlendMode.d.ts +10 -0
  149. three/src/nodes/display/BloomNode.d.ts +1 -7
  150. three/src/nodes/display/BumpMapNode.d.ts +16 -0
  151. three/src/nodes/display/ColorAdjustment.d.ts +27 -0
  152. three/src/nodes/display/ColorSpaceFunctions.d.ts +6 -0
  153. three/src/nodes/display/ColorSpaceNode.d.ts +40 -21
  154. three/src/nodes/display/DenoiseNode.d.ts +3 -9
  155. three/src/nodes/display/DepthOfFieldNode.d.ts +4 -8
  156. three/src/nodes/display/DotScreenNode.d.ts +4 -8
  157. three/src/nodes/display/FXAANode.d.ts +3 -9
  158. three/src/nodes/display/FilmNode.d.ts +3 -9
  159. three/src/nodes/display/FrontFacingNode.d.ts +4 -2
  160. three/src/nodes/display/GTAONode.d.ts +3 -9
  161. three/src/nodes/display/GaussianBlurNode.d.ts +4 -8
  162. three/src/nodes/display/Lut3DNode.d.ts +3 -9
  163. three/src/nodes/display/MotionBlur.d.ts +8 -0
  164. three/src/nodes/display/NormalMapNode.d.ts +4 -8
  165. three/src/nodes/display/ParallaxBarrierPassNode.d.ts +14 -0
  166. three/src/nodes/display/PassNode.d.ts +11 -2
  167. three/src/nodes/display/PixelationPassNode.d.ts +1 -37
  168. three/src/nodes/display/PosterizeNode.d.ts +1 -7
  169. three/src/nodes/display/RGBShiftNode.d.ts +1 -7
  170. three/src/nodes/display/RenderOutputNode.d.ts +2 -2
  171. three/src/nodes/display/SSAAPassNode.d.ts +26 -0
  172. three/src/nodes/display/ScreenNode.d.ts +48 -0
  173. three/src/nodes/display/Sepia.d.ts +4 -0
  174. three/src/nodes/display/SobelOperatorNode.d.ts +4 -8
  175. three/src/nodes/display/StereoCompositePassNode.d.ts +17 -0
  176. three/src/nodes/display/StereoPassNode.d.ts +17 -0
  177. three/src/nodes/display/ToneMappingFunctions.d.ts +14 -0
  178. three/src/nodes/display/ToneMappingNode.d.ts +5 -6
  179. three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
  180. three/src/nodes/display/TransitionNode.d.ts +3 -9
  181. three/src/nodes/display/ViewportDepthNode.d.ts +6 -2
  182. three/src/nodes/display/ViewportDepthTextureNode.d.ts +4 -2
  183. three/src/nodes/display/ViewportSharedTextureNode.d.ts +4 -8
  184. three/src/nodes/display/ViewportTextureNode.d.ts +4 -9
  185. three/src/nodes/fog/FogExp2Node.d.ts +4 -8
  186. three/src/nodes/fog/FogNode.d.ts +4 -8
  187. three/src/nodes/fog/FogRangeNode.d.ts +4 -8
  188. three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
  189. three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
  190. three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -1
  191. three/src/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
  192. three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -1
  193. three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -1
  194. three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
  195. three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +10 -0
  196. three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
  197. three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -1
  198. three/src/nodes/functions/ShadowMaskModel.d.ts +1 -1
  199. three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
  200. three/src/nodes/functions/material/getRoughness.d.ts +1 -1
  201. three/src/nodes/functions/material/getShIrradianceAt.d.ts +6 -0
  202. three/src/nodes/geometry/RangeNode.d.ts +1 -1
  203. three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
  204. three/src/nodes/lighting/AmbientLightNode.d.ts +8 -0
  205. three/src/nodes/lighting/DirectionalLightNode.d.ts +8 -0
  206. three/src/nodes/lighting/IESSpotLightNode.d.ts +5 -0
  207. three/src/nodes/lighting/LightNode.d.ts +18 -0
  208. three/src/nodes/lighting/LightProbeNode.d.ts +11 -0
  209. three/src/nodes/lighting/LightUtils.d.ts +3 -3
  210. three/src/nodes/lighting/LightingContextNode.d.ts +1 -7
  211. three/src/nodes/lighting/LightsNode.d.ts +9 -13
  212. three/src/nodes/materialx/MaterialXNodes.d.ts +1 -1
  213. three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -2
  214. three/src/nodes/materialx/lib/mx_noise.d.ts +1 -1
  215. three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -1
  216. three/src/nodes/math/ConditionalNode.d.ts +39 -0
  217. three/src/nodes/math/Hash.d.ts +4 -0
  218. three/src/nodes/math/MathNode.d.ts +2 -2
  219. three/src/nodes/math/MathUtils.d.ts +0 -10
  220. three/src/nodes/math/OperatorNode.d.ts +18 -4
  221. three/src/nodes/math/TriNoise3D.d.ts +1 -1
  222. three/src/nodes/parsers/GLSLNodeFunction.d.ts +9 -0
  223. three/src/nodes/parsers/GLSLNodeParser.d.ts +8 -0
  224. three/src/nodes/pmrem/PMREMNode.d.ts +4 -2
  225. three/src/nodes/pmrem/PMREMUtils.d.ts +28 -0
  226. three/src/nodes/procedural/Checker.d.ts +4 -0
  227. three/src/nodes/tsl/TSLBase.d.ts +21 -0
  228. three/src/nodes/{shadernode/ShaderNode.d.ts → tsl/TSLCore.d.ts} +23 -23
  229. three/src/nodes/utils/CubeMapNode.d.ts +13 -0
  230. three/src/nodes/utils/Discard.d.ts +11 -0
  231. three/src/nodes/utils/EquirectUVNode.d.ts +1 -1
  232. three/src/nodes/utils/FunctionOverloadingNode.d.ts +13 -0
  233. three/src/nodes/utils/LoopNode.d.ts +22 -0
  234. three/src/nodes/utils/MatcapUVNode.d.ts +1 -1
  235. three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
  236. three/src/nodes/utils/OscNode.d.ts +1 -1
  237. three/src/nodes/utils/Packing.d.ts +5 -0
  238. three/src/nodes/utils/RTTNode.d.ts +7 -7
  239. three/src/nodes/utils/ReflectorNode.d.ts +1 -1
  240. three/src/nodes/utils/RemapNode.d.ts +2 -2
  241. three/src/nodes/utils/RotateNode.d.ts +1 -7
  242. three/src/nodes/utils/SetNode.d.ts +11 -0
  243. three/src/nodes/utils/SplitNode.d.ts +1 -1
  244. three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -1
  245. three/src/nodes/utils/SpriteUtils.d.ts +6 -0
  246. three/src/nodes/utils/{StoargeArrayElementNode.d.ts → StorageArrayElementNode.d.ts} +1 -7
  247. three/src/nodes/utils/TimerNode.d.ts +1 -1
  248. three/src/nodes/utils/TriplanarTexturesNode.d.ts +1 -7
  249. three/src/nodes/utils/UVUtils.d.ts +14 -0
  250. three/src/nodes/utils/ViewportUtils.d.ts +4 -0
  251. three/src/objects/BatchedMesh.d.ts +33 -0
  252. three/src/objects/Group.d.ts +0 -6
  253. three/src/objects/LOD.d.ts +7 -0
  254. three/src/renderers/WebGLRenderer.d.ts +2 -12
  255. three/src/renderers/common/BindGroup.d.ts +8 -1
  256. three/src/renderers/common/Bindings.d.ts +2 -2
  257. three/src/renderers/common/BundleGroup.d.ts +10 -0
  258. three/src/renderers/common/ClippingContext.d.ts +1 -0
  259. three/src/renderers/common/QuadMesh.d.ts +2 -0
  260. three/src/renderers/common/RenderBundles.d.ts +3 -3
  261. three/src/renderers/common/RenderContext.d.ts +2 -0
  262. three/src/renderers/common/RenderContexts.d.ts +6 -4
  263. three/src/renderers/common/RenderList.d.ts +2 -1
  264. three/src/renderers/common/RenderObject.d.ts +19 -1
  265. three/src/renderers/common/RenderObjects.d.ts +1 -1
  266. three/src/renderers/common/Renderer.d.ts +24 -5
  267. three/src/renderers/common/SampledTexture.d.ts +7 -1
  268. three/src/renderers/common/Textures.d.ts +1 -0
  269. three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
  270. three/src/renderers/common/nodes/NodeLibrary.d.ts +56 -0
  271. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +3 -3
  272. three/src/renderers/common/nodes/Nodes.d.ts +15 -9
  273. three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +5 -0
  274. three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
  275. three/src/renderers/webgl/WebGLPrograms.d.ts +1 -0
  276. three/src/renderers/webgl/WebGLProperties.d.ts +5 -4
  277. three/src/renderers/webgpu/WebGPUBackend.d.ts +6 -2
  278. three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
  279. three/src/renderers/webgpu/WebGPURenderer.d.ts +5 -1
  280. three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
  281. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
  282. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +2 -2
  283. three/src/renderers/webxr/WebXRManager.d.ts +0 -2
  284. three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
  285. three/examples/jsm/loaders/LogLuvLoader.d.ts +0 -19
  286. three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
  287. three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
  288. three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
  289. three/src/nodes/accessors/NormalNode.d.ts +0 -12
  290. three/src/nodes/accessors/TextureBicubicNode.d.ts +0 -18
  291. three/src/nodes/accessors/UniformsNode.d.ts +0 -23
  292. three/src/nodes/core/NodeKeywords.d.ts +0 -17
  293. three/src/nodes/display/BlendModeNode.d.ts +0 -47
  294. three/src/nodes/display/ColorAdjustmentNode.d.ts +0 -47
  295. three/src/nodes/display/ViewportNode.d.ts +0 -31
  296. three/src/nodes/loaders/NodeMaterialLoader.d.ts +0 -8
  297. three/src/nodes/loaders/NodeObjectLoader.d.ts +0 -10
  298. three/src/nodes/materials/NodeMaterial.d.ts +0 -124
  299. three/src/nodes/math/CondNode.d.ts +0 -22
  300. three/src/nodes/math/HashNode.d.ts +0 -16
  301. three/src/nodes/procedural/CheckerNode.d.ts +0 -15
  302. three/src/nodes/utils/DiscardNode.d.ts +0 -17
  303. three/src/nodes/utils/PackingNode.d.ts +0 -24
  304. three/src/nodes/utils/RotateUVNode.d.ts +0 -19
@@ -1,12 +1,29 @@
1
- import { Camera, Mesh, MOUSE, Object3D, Object3DEventMap, Quaternion, Raycaster, Vector3 } from "three";
1
+ import { Camera, Controls, Mesh, Object3D, Quaternion, Raycaster, Vector3 } from "three";
2
2
 
3
3
  type TransformControlsMode = "translate" | "rotate" | "scale";
4
4
 
5
- export interface TransformControlsEventMap extends Object3DEventMap {
5
+ export interface TransformControlsEventMap {
6
+ /**
7
+ * Fires if any type of change (object or property change) is performed. Property changes are separate events you
8
+ * can add event listeners to. The event type is "propertyname-changed".
9
+ */
6
10
  change: {};
11
+
12
+ /**
13
+ * Fires if a pointer (mouse/touch) becomes active.
14
+ */
7
15
  mouseDown: { mode: TransformControlsMode };
16
+
17
+ /**
18
+ * Fires if a pointer (mouse/touch) is no longer active.
19
+ */
8
20
  mouseUp: { mode: TransformControlsMode };
21
+
22
+ /**
23
+ * Fires if the controlled 3D object is changed.
24
+ */
9
25
  objectChange: {};
26
+
10
27
  "camera-changed": { value: unknown };
11
28
  "object-changed": { value: unknown };
12
29
  "enabled-changed": { value: unknown };
@@ -34,55 +51,164 @@ export interface TransformControlsEventMap extends Object3DEventMap {
34
51
  "eye-changed": { value: unknown };
35
52
  }
36
53
 
37
- export class TransformControls extends Object3D<TransformControlsEventMap> {
38
- constructor(object: Camera, domElement?: HTMLElement);
39
-
40
- domElement: HTMLElement;
41
-
42
- // API
43
-
54
+ /**
55
+ * This class can be used to transform objects in 3D space by adapting a similar interaction model of DCC tools like
56
+ * Blender. Unlike other controls, it is not intended to transform the scene's camera.
57
+ *
58
+ * TransformControls expects that its attached 3D object is part of the scene graph.
59
+ */
60
+ declare class TransformControls extends Controls<TransformControlsEventMap> {
61
+ /**
62
+ * The camera of the rendered scene.
63
+ */
44
64
  camera: Camera;
45
- object: Object3D | undefined;
46
- enabled: boolean;
65
+
66
+ /**
67
+ * The current transformation axis.
68
+ */
47
69
  axis: "X" | "Y" | "Z" | "E" | "XY" | "YZ" | "XZ" | "XYZ" | "XYZE" | null;
70
+
71
+ /**
72
+ * The current transformation mode. Possible values are "translate", "rotate" and "scale". Default is `translate`.
73
+ */
48
74
  mode: TransformControlsMode;
75
+
76
+ /**
77
+ * By default, 3D objects are continuously translated. If you set this property to a numeric value (world units),
78
+ * you can define in which steps the 3D object should be translated. Default is `null`.
79
+ */
49
80
  translationSnap: number | null;
81
+
82
+ /**
83
+ * By default, 3D objects are continuously rotated. If you set this property to a numeric value (radians), you can
84
+ * define in which steps the 3D object should be rotated. Default is `null`.
85
+ */
50
86
  rotationSnap: number | null;
87
+
88
+ /**
89
+ * Defines in which coordinate space transformations should be performed. Possible values are "world" and "local".
90
+ * Default is `world`.
91
+ */
51
92
  space: "world" | "local";
93
+
94
+ /**
95
+ * The size of the helper UI (axes/planes). Default is *1*.
96
+ */
52
97
  size: number;
98
+
99
+ /**
100
+ * Whether or not dragging is currently performed. Read-only property.
101
+ */
53
102
  dragging: boolean;
103
+
104
+ /**
105
+ * Whether or not the x-axis helper should be visible. Default is `true`.
106
+ */
54
107
  showX: boolean;
108
+
109
+ /**
110
+ * Whether or not the y-axis helper should be visible. Default is `true`.
111
+ */
55
112
  showY: boolean;
113
+
114
+ /**
115
+ * Whether or not the z-axis helper should be visible. Default is `true`.
116
+ */
56
117
  showZ: boolean;
57
118
 
58
- readonly isTransformControls: true;
59
- mouseButtons: {
60
- LEFT?: MOUSE | null | undefined;
61
- MIDDLE?: MOUSE | null | undefined;
62
- RIGHT?: MOUSE | null | undefined;
63
- };
119
+ /**
120
+ * Creates a new instance of TransformControls.
121
+ * @param camera The camera of the rendered scene.
122
+ * @param domElement The HTML element used for event listeners. (optional)
123
+ */
124
+ constructor(camera: Camera, domElement?: HTMLElement);
125
+
126
+ /**
127
+ * Returns the visual representation of the controls. Add the helper to your scene to visually transform the
128
+ * attached 3D object.
129
+ */
130
+ getHelper(): TransformControlsRoot;
64
131
 
65
132
  pointerHover(pointer: PointerEvent | null): void;
66
133
  pointerDown(pointer: PointerEvent | null): void;
67
134
  pointerMove(pointer: PointerEvent | null): void;
68
135
  pointerUp(pointer: PointerEvent | null): void;
69
136
 
137
+ /**
138
+ * Sets the 3D object that should be transformed and ensures the controls UI is visible.
139
+ * @param object The 3D object that should be transformed.
140
+ */
70
141
  attach(object: Object3D): this;
142
+
143
+ /**
144
+ * Removes the current 3D object from the controls and makes the helper UI invisible.
145
+ */
71
146
  detach(): this;
72
- getMode(): TransformControlsMode;
147
+
148
+ /**
149
+ * Resets the object's position, rotation and scale to when the current transform began.
150
+ */
151
+ reset(): void;
152
+
153
+ /**
154
+ * Returns the {@link Raycaster} object that is used for user interaction. This object is shared between all
155
+ * instances of TransformControls. If you set the [.layers]{@link Object3D.layers} property of the
156
+ * TransformControls, you will also want to set the [.layers]{@link Raycaster.layers} property on the
157
+ * {@link Raycaster} with a matching value, or else the TransformControls won't work as expected.
158
+ */
73
159
  getRaycaster(): Raycaster;
160
+
161
+ /**
162
+ * Returns the transformation mode.
163
+ */
164
+ getMode(): TransformControlsMode;
165
+
166
+ /**
167
+ * Sets the transformation mode.
168
+ * @param mode The transformation mode.
169
+ */
74
170
  setMode(mode: TransformControlsMode): void;
171
+
172
+ /**
173
+ * Sets the translation snap.
174
+ * @param translationSnap The translation snap.
175
+ */
75
176
  setTranslationSnap(translationSnap: number | null): void;
177
+
178
+ /**
179
+ * Sets the rotation snap.
180
+ * @param rotationSnap The rotation snap.
181
+ */
76
182
  setRotationSnap(rotationSnap: number | null): void;
183
+
184
+ /**
185
+ * Sets the scale snap.
186
+ * @param scaleSnap The scale snap.
187
+ */
77
188
  setScaleSnap(scaleSnap: number | null): void;
189
+
190
+ /**
191
+ * Sets the size of the helper UI.
192
+ * @param size The size of the helper UI.
193
+ */
78
194
  setSize(size: number): void;
195
+
196
+ /**
197
+ * Sets the coordinate space in which transformations are applied.
198
+ * @param space The coordinate space in which transformations are applied.
199
+ */
79
200
  setSpace(space: "world" | "local"): void;
80
- reset(): void;
81
- dispose(): void;
82
201
  }
83
202
 
84
- export class TransformControlsGizmo extends Object3D {
85
- type: "TransformControlsGizmo";
203
+ declare class TransformControlsRoot extends Object3D {
204
+ readonly isTransformControlsRoot: true;
205
+
206
+ controls: TransformControls;
207
+
208
+ constructor(controls: TransformControls);
209
+ }
210
+
211
+ declare class TransformControlsGizmo extends Object3D {
86
212
  isTransformControlsGizmo: true;
87
213
 
88
214
  gizmo: {
@@ -104,9 +230,8 @@ export class TransformControlsGizmo extends Object3D {
104
230
  constructor();
105
231
  }
106
232
 
107
- export class TransformControlsPlane extends Mesh {
108
- type: "TransformControlsPlane";
109
- isTransformControlsPlane: true;
233
+ declare class TransformControlsPlane extends Mesh {
234
+ readonly isTransformControlsPlane: true;
110
235
 
111
236
  constructor();
112
237
 
@@ -120,3 +245,5 @@ export class TransformControlsPlane extends Mesh {
120
245
  worldPosition: Vector3;
121
246
  worldQuaternion: Quaternion;
122
247
  }
248
+
249
+ export { TransformControls, TransformControlsGizmo, TransformControlsPlane };
@@ -1,11 +1,17 @@
1
1
  import { Camera, Matrix3, Scene, WebGLRenderer } from "three";
2
2
 
3
- export class AnaglyphEffect {
4
- constructor(renderer: WebGLRenderer, width?: number, height?: number);
3
+ declare class AnaglyphEffect {
5
4
  colorMatrixLeft: Matrix3;
5
+
6
6
  colorMatrixRight: Matrix3;
7
7
 
8
- dispose(): void;
9
- render(scene: Scene, camera: Camera): void;
10
- setSize(width: number, height: number): void;
8
+ setSize: (width: number, height: number) => void;
9
+
10
+ render: (scene: Scene, camera: Camera) => void;
11
+
12
+ dispose: () => void;
13
+
14
+ constructor(renderer: WebGLRenderer, width?: number, height?: number);
11
15
  }
16
+
17
+ export { AnaglyphEffect };
@@ -1,8 +1,11 @@
1
1
  import { Camera, Scene, WebGLRenderer } from "three";
2
2
 
3
- export class ParallaxBarrierEffect {
4
- constructor(renderer: WebGLRenderer);
3
+ declare class ParallaxBarrierEffect {
4
+ setSize: (width: number, height: number) => void;
5
+ render: (scene: Scene, camera: Camera) => void;
6
+ dispose: () => void;
5
7
 
6
- render(scene: Scene, camera: Camera): void;
7
- setSize(width: number, height: number): void;
8
+ constructor(renderer: WebGLRenderer);
8
9
  }
10
+
11
+ export { ParallaxBarrierEffect };
@@ -1,6 +1,6 @@
1
- import { Scene, WebGLRenderer } from "three";
1
+ import { Scene } from "three";
2
2
 
3
3
  export class RoomEnvironment extends Scene {
4
- constructor(renderer?: WebGLRenderer);
4
+ constructor();
5
5
  dispose(): void;
6
6
  }
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import { DataTexture, TextureDataType, WebGLRenderer, WebGLRenderTarget } from "three";
9
+ import { WebGPURenderer } from "three/webgpu";
9
10
 
10
11
  export const NO_COMPRESSION: 0;
11
12
  export const ZIPS_COMPRESSION: 2;
@@ -17,6 +18,10 @@ export interface EXRExporterParseOptions {
17
18
  }
18
19
 
19
20
  export class EXRExporter {
20
- parse(renderer: WebGLRenderer, renderTarget: WebGLRenderTarget, options?: EXRExporterParseOptions): Uint8Array;
21
- parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Uint8Array;
21
+ parse(
22
+ renderer: WebGLRenderer | WebGPURenderer,
23
+ renderTarget: WebGLRenderTarget,
24
+ options?: EXRExporterParseOptions,
25
+ ): Promise<Uint8Array>;
26
+ parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array>;
22
27
  }
@@ -1,5 +1,7 @@
1
1
  import { Data3DTexture, DataTexture, WebGLRenderer, WebGLRenderTarget } from "three";
2
+ import { WebGPURenderer } from "three/webgpu";
2
3
 
3
4
  export class KTX2Exporter {
4
- parse(arg1: Data3DTexture | DataTexture | WebGLRenderer, arg2?: WebGLRenderTarget): Uint8Array;
5
+ parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array>;
6
+ parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array>;
5
7
  }
@@ -1,10 +1,12 @@
1
1
  import { LightProbe, Mesh } from "three";
2
2
 
3
- export class LightProbeHelper extends Mesh {
4
- constructor(lightProbe: LightProbe, size: number);
5
-
3
+ declare class LightProbeHelper extends Mesh {
6
4
  lightProbe: LightProbe;
7
5
  size: number;
8
6
 
7
+ constructor(lightProbe: LightProbe, size?: number);
8
+
9
9
  dispose(): void;
10
10
  }
11
+
12
+ export { LightProbeHelper };
@@ -0,0 +1,12 @@
1
+ import { LightProbe, Mesh } from "three";
2
+
3
+ declare class LightProbeHelper extends Mesh {
4
+ lightProbe: LightProbe;
5
+ size: number;
6
+
7
+ constructor(lightProbe: LightProbe, size?: number);
8
+
9
+ dispose(): void;
10
+ }
11
+
12
+ export { LightProbeHelper };
@@ -1,6 +1,10 @@
1
1
  import { CubeTexture, LightProbe, WebGLCubeRenderTarget, WebGLRenderer } from "three";
2
+ import { WebGPURenderer } from "three/webgpu";
2
3
 
3
4
  export namespace LightProbeGenerator {
4
5
  function fromCubeTexture(cubeTexture: CubeTexture): LightProbe;
5
- function fromCubeRenderTarget(renderer: WebGLRenderer, cubeRenderTarget: WebGLCubeRenderTarget): LightProbe;
6
+ function fromCubeRenderTarget(
7
+ renderer: WebGLRenderer | WebGPURenderer,
8
+ cubeRenderTarget: WebGLCubeRenderTarget,
9
+ ): Promise<LightProbe>;
6
10
  }
@@ -2,10 +2,24 @@ import { LineGeometry } from "./LineGeometry.js";
2
2
  import { LineMaterial } from "./LineMaterial.js";
3
3
  import { LineSegments2 } from "./LineSegments2.js";
4
4
 
5
+ /**
6
+ * A polyline drawn between vertices.
7
+ *
8
+ * This adds functionality beyond {@link Line}, like arbitrary line width and changing width to be in world units. It
9
+ * extends {@link LineSegments2}, simplifying constructing segments from a chain of points.
10
+ */
5
11
  export class Line2 extends LineSegments2 {
6
12
  geometry: LineGeometry;
7
13
  material: LineMaterial;
8
14
 
9
- constructor(geometry?: LineGeometry, material?: LineMaterial);
15
+ /**
16
+ * Read-only flag to check if a given object is of type Line2.
17
+ */
10
18
  readonly isLine2: true;
19
+
20
+ /**
21
+ * @param geometry (optional) Pair(s) of vertices representing each line segment
22
+ * @param material (optional) Material for the line. Default is a {@link LineMaterial} with random color.
23
+ */
24
+ constructor(geometry?: LineGeometry, material?: LineMaterial);
11
25
  }
@@ -2,9 +2,26 @@ import { Line } from "three";
2
2
 
3
3
  import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
4
4
 
5
+ /**
6
+ * A chain of vertices, forming a polyline.
7
+ *
8
+ * This is used in {@link Line2} to describe the shape.
9
+ */
5
10
  export class LineGeometry extends LineSegmentsGeometry {
6
- constructor();
11
+ /**
12
+ * Read-only flag to check if a given object is of type LineGeometry.
13
+ */
7
14
  readonly isLineGeometry: true;
8
15
 
16
+ /**
17
+ * Creates a new geometry.
18
+ * Call [setPositions]{@link LineGeometry.setPositions} to add segments.
19
+ */
20
+ constructor();
21
+
22
+ /**
23
+ * Copy the vertex positions of a {@link Line} object into this geometry.
24
+ * Assumes the source geometry is not using indices.
25
+ */
9
26
  fromLine(line: Line): this;
10
27
  }
@@ -12,18 +12,71 @@ export interface LineMaterialParameters extends ShaderMaterialParameters {
12
12
  worldUnits?: boolean | undefined;
13
13
  }
14
14
 
15
+ /**
16
+ * A material for drawing wireframe-style geometries.
17
+ * Unlike {@link LineBasicMaterial}, it supports arbitrary line widths and allows using world units instead of screen
18
+ * space units. This material is used with {@link LineSegments2} and {@link Line2}.
19
+ *
20
+ * Lines are always rendered with round caps and round joints.
21
+ */
15
22
  export class LineMaterial extends ShaderMaterial {
16
- constructor(parameters?: LineMaterialParameters);
17
- color: Color;
18
- dashed: boolean;
19
- dashScale: number;
20
- dashSize: number;
21
- dashOffset: number;
22
- gapSize: number;
23
- opacity: number;
24
23
  readonly isLineMaterial: true;
25
- linewidth: number;
26
- resolution: Vector2;
27
- alphaToCoverage: boolean;
28
- worldUnits: boolean;
24
+
25
+ /**
26
+ * @param parameters (optional) an object with one or more properties defining the material's appearance. Any
27
+ * property of the material (including any property inherited from {@link ShaderMaterial}) can be passed in here.
28
+ *
29
+ * The exception is the property color, which can be passed in as a number or hexadecimal string and is `0xffffff`
30
+ * (white) by default. Color.set( color ) is called internally.
31
+ */
32
+ constructor(parameters?: LineMaterialParameters);
33
+
34
+ /**
35
+ * {@link Color} of the material, by default set to white (0xffffff).
36
+ */
37
+ get color(): Color;
38
+ set color(value: Color);
39
+
40
+ /**
41
+ * Whether the material's sizes (width, dash gaps) are in world units. Default is `false` (screen space units.)
42
+ */
43
+ get worldUnits(): boolean;
44
+ set worldUnits(value: boolean);
45
+
46
+ /**
47
+ * Whether the line is dashed, or solid. Default is `false`.
48
+ */
49
+ get dashed(): boolean;
50
+ set dashed(value: boolean);
51
+
52
+ /**
53
+ * The scale of the dashes and gaps. Default is `1`.
54
+ */
55
+ get dashScale(): number;
56
+ set dashScale(value: number);
57
+
58
+ /**
59
+ * The size of the dash. Default is `1`.
60
+ */
61
+ get dashSize(): number;
62
+ set dashSize(value: number);
63
+
64
+ /**
65
+ * Where in the dash cycle the dash starts. Default is `0`.
66
+ */
67
+ get dashOffset(): number;
68
+ set dashOffset(value: number);
69
+
70
+ /**
71
+ * The size of the gap. Default is `1`.
72
+ */
73
+ get gapSize(): number;
74
+ set gapSize(value: number);
75
+
76
+ /**
77
+ * The size of the viewport, in screen pixels. This must be kept updated to make screen-space rendering accurate.
78
+ * The {@link LineSegments2.onBeforeRender} callback performs the update for visible objects. Default is `[1, 1]`.
79
+ */
80
+ get resolution(): Vector2;
81
+ set resolution(value: Vector2);
29
82
  }
@@ -1,14 +1,37 @@
1
- import { Mesh } from "three";
1
+ import { Mesh, WebGLRenderer } from "three";
2
2
 
3
3
  import { LineMaterial } from "./LineMaterial.js";
4
4
  import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
5
5
 
6
+ /**
7
+ * A series of lines drawn between pairs of vertices.
8
+ *
9
+ * This adds functionality beyond {@link LineSegments}, like arbitrary line width and changing width to be in world
10
+ * units. The {@link Line2} extends this object, forming a polyline instead of individual segments.
11
+ */
6
12
  export class LineSegments2 extends Mesh {
7
13
  geometry: LineSegmentsGeometry;
8
14
  material: LineMaterial;
9
15
 
10
- constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
16
+ /**
17
+ * Read-only flag to check if a given object is of type LineSegments2.
18
+ */
11
19
  readonly isLineSegments2: true;
12
20
 
21
+ /**
22
+ * @param geometry (optional) Pair(s) of vertices representing each line segment.
23
+ * @param material (optional) Material for the line. Default is a {@link LineMaterial} with random color.
24
+ */
25
+ constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
26
+
13
27
  computeLineDistances(): this;
28
+
29
+ /**
30
+ * Called by the framework to update the material's resolution property, needed for screen-scaled widths.
31
+ *
32
+ * If your object is not visible to a camera (e.g. by [layers]{@link Object3D.layers} or
33
+ * [visible]{@link Object3D.visible}), you must call this manually whenever the viewport changes.
34
+ * @param renderer
35
+ */
36
+ onBeforeRender(renderer: WebGLRenderer): void;
14
37
  }
@@ -1,16 +1,53 @@
1
- import { EdgesGeometry, InstancedBufferGeometry, LineSegments, Matrix4, Mesh, WireframeGeometry } from "three";
1
+ import { EdgesGeometry, InstancedBufferGeometry, LineSegments, Mesh, WireframeGeometry } from "three";
2
2
 
3
+ /**
4
+ * A series of vertex pairs, forming line segments.
5
+ *
6
+ * This is used in {@link LineSegments2} to describe the shape.
7
+ */
3
8
  export class LineSegmentsGeometry extends InstancedBufferGeometry {
4
- constructor();
9
+ /**
10
+ * Read-only flag to check if a given object is of type LineSegmentsGeometry.
11
+ */
5
12
  readonly isLineSegmentsGeometry: true;
6
13
 
7
- applyMatrix4(matrix: Matrix4): this;
8
- computeBoundingBox(): void;
9
- computeBoundingSphere(): void;
14
+ /**
15
+ * Creates a new geometry. Call [setPositions]{@link LineSegmentsGeometry.setPositions} to add segments.
16
+ */
17
+ constructor();
18
+
19
+ /**
20
+ * Replace the vertex positions with a new set. The array can be an `Array` or `Float32Array`. The length must be a
21
+ * multiple of six.
22
+ * @param array
23
+ */
24
+ setPositions(array: number[] | Float32Array): this;
25
+
26
+ /**
27
+ * Replace the per-vertex colors. Every sixtuple describes a segment: `[r1, g1, b1, r2, g2, b2]`. The array can be
28
+ * an `Array` or `Float32Array`.
29
+ * @param array
30
+ */
31
+ setColors(array: number[] | Float32Array): this;
32
+
33
+ /**
34
+ * Copy the vertex positions of a wireframe geometry into this geometry.
35
+ */
36
+ fromWireframeGeometry(geometry: WireframeGeometry): this;
37
+
38
+ /**
39
+ * Copy the vertex positions of an edge geometry into this geometry.
40
+ */
10
41
  fromEdgesGeometry(geometry: EdgesGeometry): this;
11
- fromLineSegments(lineSegments: LineSegments): this;
42
+
43
+ /**
44
+ * Copy the vertex positions of a mesh object into this geometry.
45
+ */
12
46
  fromMesh(mesh: Mesh): this;
13
- fromWireframeGeometry(geometry: WireframeGeometry): this;
14
- setColors(array: number[] | Float32Array): this;
15
- setPositions(array: number[] | Float32Array): this;
47
+
48
+ /**
49
+ * Copy the vertex positions of a {@link LineSegments} object into this geometry. Assumes the source geometry is not
50
+ * using indices.
51
+ */
52
+ fromLineSegments(lineSegments: LineSegments): this;
16
53
  }
@@ -14,6 +14,12 @@ export class DRACOLoader extends Loader<BufferGeometry> {
14
14
  onError?: (err: unknown) => void,
15
15
  ): void;
16
16
 
17
+ parse(
18
+ buffer: ArrayBuffer,
19
+ onLoad?: (geometry: BufferGeometry) => void,
20
+ onError?: (err: unknown) => void,
21
+ ): void;
22
+
17
23
  preload(): DRACOLoader;
18
24
  dispose(): DRACOLoader;
19
25
  }
@@ -43,6 +43,10 @@ export class KTX2Loader extends Loader<CompressedTexture> {
43
43
  */
44
44
  detectSupport(renderer: WebGLRenderer | WebGPURenderer): this;
45
45
 
46
+ init(): Promise<void>;
47
+
48
+ parse(buffer: ArrayBuffer, onLoad?: (texture: CompressedTexture) => void, onError?: (err: unknown) => void): void;
49
+
46
50
  /**
47
51
  * Disposes the loader object, de-allocating any Web Workers created.
48
52
  */
@@ -7,7 +7,7 @@ export interface SplineUniform {
7
7
  spineOffset: IUniform;
8
8
  flow: IUniform;
9
9
  }
10
- export function initSplineTexture(size?: number): DataTexture;
10
+ export function initSplineTexture(numberOfCurves?: number): DataTexture;
11
11
 
12
12
  export function updateSplineTexture(texture: DataTexture, splineCurve: Curve<Vector3>, offset?: number): void;
13
13
 
@@ -16,22 +16,26 @@ export function getUniforms(splineTexture: DataTexture): SplineUniform;
16
16
  export function modifyShader(material: Material, uniforms: SplineUniform, numberOfCurves?: number): void;
17
17
 
18
18
  export class Flow {
19
- constructor(mesh: Mesh, numberOfCurves?: number);
20
19
  curveArray: number[];
21
20
  curveLengthArray: number[];
21
+
22
22
  object3D: Mesh;
23
23
  splineTexure: DataTexture;
24
24
  uniforms: SplineUniform;
25
+
26
+ constructor(mesh: Mesh, numberOfCurves?: number);
25
27
  updateCurve(index: number, curve: Curve<Vector3>): void;
26
28
  moveAlongCurve(amount: number): void;
27
29
  }
28
30
 
29
31
  export class InstancedFlow extends Flow {
30
- constructor(count: number, curveCount: number, geometry: BufferGeometry, material: Material);
31
32
  object3D: InstancedMesh;
33
+
32
34
  offsets: number[];
33
35
  whichCurve: number[];
34
36
 
37
+ constructor(count: number, curveCount: number, geometry: BufferGeometry, material: Material);
38
+
35
39
  moveIndividualAlongCurve(index: number, offset: number): void;
36
40
  setCurve(index: number, curveNo: number): void;
37
41
  }