@types/three 0.171.0 → 0.173.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 (152) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +0 -5
  3. three/examples/jsm/controls/ArcballControls.d.ts +1 -1
  4. three/examples/jsm/controls/OrbitControls.d.ts +5 -0
  5. three/examples/jsm/csm/CSMShadowNode.d.ts +2 -3
  6. three/examples/jsm/geometries/TextGeometry.d.ts +0 -8
  7. three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
  8. three/examples/jsm/interactive/InteractiveGroup.d.ts +9 -1
  9. three/examples/jsm/lines/LineSegments2.d.ts +3 -1
  10. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +3 -0
  11. three/examples/jsm/modifiers/CurveModifier.d.ts +1 -1
  12. three/examples/jsm/modifiers/CurveModifierGPU.d.ts +1 -1
  13. three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
  14. three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +1 -1
  15. three/examples/jsm/utils/ShadowMapViewer.d.ts +2 -2
  16. three/examples/jsm/webxr/XRButton.d.ts +4 -2
  17. three/package.json +2 -2
  18. three/src/Three.Core.d.ts +4 -1
  19. three/src/Three.TSL.d.ts +18 -5
  20. three/src/Three.WebGPU.Nodes.d.ts +2 -2
  21. three/src/Three.WebGPU.d.ts +2 -2
  22. three/src/animation/AnimationClip.d.ts +1 -1
  23. three/src/cameras/ArrayCamera.d.ts +7 -6
  24. three/src/cameras/Camera.d.ts +7 -7
  25. three/src/cameras/CubeCamera.d.ts +19 -2
  26. three/src/constants.d.ts +6 -0
  27. three/src/core/BufferAttribute.d.ts +5 -0
  28. three/src/core/RenderTarget.d.ts +3 -5
  29. three/src/core/RenderTarget3D.d.ts +9 -0
  30. three/src/core/RenderTargetArray.d.ts +9 -0
  31. three/src/materials/Material.d.ts +3 -1
  32. three/src/materials/MeshDepthMaterial.d.ts +0 -5
  33. three/src/materials/MeshDistanceMaterial.d.ts +0 -5
  34. three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
  35. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +6 -6
  36. three/src/materials/nodes/NodeMaterial.d.ts +3 -0
  37. three/src/materials/nodes/NodeMaterials.d.ts +0 -4
  38. three/src/materials/nodes/PointsNodeMaterial.d.ts +7 -14
  39. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +57 -0
  40. three/src/math/Matrix4.d.ts +2 -1
  41. three/src/nodes/Nodes.d.ts +6 -7
  42. three/src/nodes/TSL.d.ts +6 -3
  43. three/src/nodes/accessors/Arrays.d.ts +10 -2
  44. three/src/nodes/accessors/BufferAttributeNode.d.ts +117 -0
  45. three/src/nodes/accessors/BufferNode.d.ts +4 -4
  46. three/src/nodes/accessors/Camera.d.ts +1 -0
  47. three/src/nodes/accessors/MaterialNode.d.ts +6 -6
  48. three/src/nodes/accessors/ModelNode.d.ts +10 -2
  49. three/src/nodes/accessors/ModelViewProjectionNode.d.ts +2 -6
  50. three/src/nodes/accessors/StorageBufferNode.d.ts +12 -4
  51. three/src/nodes/accessors/TextureNode.d.ts +5 -0
  52. three/src/nodes/accessors/UniformArrayNode.d.ts +3 -2
  53. three/src/nodes/core/ArrayNode.d.ts +26 -0
  54. three/src/nodes/core/Node.d.ts +245 -0
  55. three/src/nodes/core/NodeAttribute.d.ts +13 -0
  56. three/src/nodes/core/NodeBuilder.d.ts +1 -2
  57. three/src/nodes/core/NodeCache.d.ts +23 -1
  58. three/src/nodes/core/NodeParser.d.ts +11 -0
  59. three/src/nodes/core/NodeUniform.d.ts +28 -0
  60. three/src/nodes/core/NodeVar.d.ts +18 -2
  61. three/src/nodes/core/NodeVarying.d.ts +14 -0
  62. three/src/nodes/core/StructNode.d.ts +21 -0
  63. three/src/nodes/core/StructType.d.ts +8 -0
  64. three/src/nodes/core/StructTypeNode.d.ts +41 -4
  65. three/src/nodes/core/UniformNode.d.ts +44 -0
  66. three/src/nodes/core/VarNode.d.ts +8 -1
  67. three/src/nodes/core/VaryingNode.d.ts +12 -0
  68. three/src/nodes/core/constants.d.ts +35 -0
  69. three/src/nodes/display/PassNode.d.ts +1 -1
  70. three/src/nodes/fog/Fog.d.ts +26 -0
  71. three/src/nodes/geometry/RangeNode.d.ts +6 -11
  72. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +5 -0
  73. three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +1 -0
  74. three/src/nodes/gpgpu/ComputeNode.d.ts +6 -1
  75. three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +2 -0
  76. three/src/nodes/lighting/ShadowBaseNode.d.ts +15 -0
  77. three/src/nodes/lighting/ShadowNode.d.ts +2 -1
  78. three/src/nodes/math/MathNode.d.ts +15 -4
  79. three/src/nodes/math/OperatorNode.d.ts +2 -0
  80. three/src/nodes/shapes/Shapes.d.ts +4 -0
  81. three/src/nodes/tsl/TSLBase.d.ts +1 -0
  82. three/src/nodes/tsl/TSLCore.d.ts +62 -17
  83. three/src/nodes/utils/EquirectUVNode.d.ts +2 -2
  84. three/src/nodes/utils/LoopNode.d.ts +23 -2
  85. three/src/nodes/utils/MemberNode.d.ts +11 -0
  86. three/src/objects/BatchedMesh.d.ts +1 -0
  87. three/src/objects/ClippingGroup.d.ts +1 -1
  88. three/src/objects/InstancedMesh.d.ts +4 -3
  89. three/src/renderers/WebGLRenderer.d.ts +10 -10
  90. three/src/renderers/common/Animation.d.ts +43 -1
  91. three/src/renderers/common/Attributes.d.ts +31 -0
  92. three/src/renderers/common/Backend.d.ts +11 -0
  93. three/src/renderers/common/Background.d.ts +22 -0
  94. three/src/renderers/common/BindGroup.d.ts +15 -0
  95. three/src/renderers/common/Binding.d.ts +24 -0
  96. three/src/renderers/common/Bindings.d.ts +54 -0
  97. three/src/renderers/common/Buffer.d.ts +31 -0
  98. three/src/renderers/common/BufferUtils.d.ts +26 -0
  99. three/src/renderers/common/BundleGroup.d.ts +22 -0
  100. three/src/renderers/common/ChainMap.d.ts +33 -3
  101. three/src/renderers/common/ClippingContext.d.ts +45 -0
  102. three/src/renderers/common/Color4.d.ts +40 -0
  103. three/src/renderers/common/ComputePipeline.d.ts +12 -0
  104. three/src/renderers/common/CubeRenderTarget.d.ts +13 -0
  105. three/src/renderers/common/DataMap.d.ts +30 -0
  106. three/src/renderers/common/Geometries.d.ts +52 -0
  107. three/src/renderers/common/Info.d.ts +21 -5
  108. three/src/renderers/common/Pipeline.d.ts +11 -0
  109. three/src/renderers/common/Pipelines.d.ts +104 -0
  110. three/src/renderers/common/PostProcessing.d.ts +1 -1
  111. three/src/renderers/common/ProgrammableStage.d.ts +19 -1
  112. three/src/renderers/common/RenderBundle.d.ts +15 -4
  113. three/src/renderers/common/RenderBundles.d.ts +20 -2
  114. three/src/renderers/common/RenderContext.d.ts +27 -3
  115. three/src/renderers/common/RenderContexts.d.ts +37 -6
  116. three/src/renderers/common/RenderList.d.ts +85 -0
  117. three/src/renderers/common/RenderLists.d.ts +21 -0
  118. three/src/renderers/common/RenderObject.d.ts +163 -4
  119. three/src/renderers/common/RenderObjects.d.ts +53 -0
  120. three/src/renderers/common/RenderPipeline.d.ts +13 -0
  121. three/src/renderers/common/Renderer.d.ts +604 -10
  122. three/src/renderers/common/{PostProcessingUtils.d.ts → RendererUtils.d.ts} +16 -4
  123. three/src/renderers/common/StorageBufferAttribute.d.ts +1 -1
  124. three/src/renderers/common/Textures.d.ts +66 -0
  125. three/src/renderers/common/TimestampQueryPool.d.ts +31 -0
  126. three/src/renderers/common/Uniform.d.ts +133 -1
  127. three/src/renderers/common/UniformBuffer.d.ts +12 -0
  128. three/src/renderers/common/UniformsGroup.d.ts +103 -0
  129. three/src/renderers/common/XRManager.d.ts +196 -0
  130. three/src/renderers/common/XRRenderTarget.d.ts +23 -0
  131. three/src/renderers/common/nodes/NodeBuilderState.d.ts +32 -2
  132. three/src/renderers/common/nodes/NodeLibrary.d.ts +71 -0
  133. three/src/renderers/common/nodes/NodeUniform.d.ts +185 -0
  134. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +14 -2
  135. three/src/renderers/common/nodes/Nodes.d.ts +192 -17
  136. three/src/renderers/webgpu/WebGPUBackend.d.ts +2 -1
  137. three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +10 -0
  138. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +11 -0
  139. three/src/textures/DataTexture.d.ts +2 -2
  140. three/src/textures/Texture.d.ts +5 -5
  141. three/src/textures/VideoFrameTexture.d.ts +27 -0
  142. three/examples/jsm/animation/MMDAnimationHelper.d.ts +0 -99
  143. three/examples/jsm/animation/MMDPhysics.d.ts +0 -128
  144. three/examples/jsm/exporters/MMDExporter.d.ts +0 -11
  145. three/examples/jsm/loaders/MMDLoader.d.ts +0 -60
  146. three/examples/jsm/shaders/MMDToonShader.d.ts +0 -15
  147. three/src/Three.Legacy.d.ts +0 -20
  148. three/src/materials/nodes/InstancedPointsNodeMaterial.d.ts +0 -33
  149. three/src/nodes/core/UniformGroup.d.ts +0 -7
  150. three/src/nodes/fog/FogExp2Node.d.ts +0 -14
  151. three/src/nodes/fog/FogNode.d.ts +0 -20
  152. three/src/nodes/fog/FogRangeNode.d.ts +0 -19
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: Sun, 15 Dec 2024 01:30:13 GMT
11
+ * Last updated: Fri, 31 Jan 2025 19:32:17 GMT
12
12
  * Dependencies: [@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
@@ -1,7 +1,5 @@
1
1
  export * from "./animation/AnimationClipCreator.js";
2
2
  export * from "./animation/CCDIKSolver.js";
3
- export * from "./animation/MMDAnimationHelper.js";
4
- export * from "./animation/MMDPhysics.js";
5
3
 
6
4
  export { default as WebGL } from "./capabilities/WebGL.js";
7
5
 
@@ -40,7 +38,6 @@ export * from "./exporters/DRACOExporter.js";
40
38
  export * from "./exporters/EXRExporter.js";
41
39
  export * from "./exporters/GLTFExporter.js";
42
40
  export * from "./exporters/KTX2Exporter.js";
43
- export * from "./exporters/MMDExporter.js";
44
41
  export * from "./exporters/OBJExporter.js";
45
42
  export * from "./exporters/PLYExporter.js";
46
43
  export * from "./exporters/STLExporter.js";
@@ -104,7 +101,6 @@ export * from "./loaders/LUTCubeLoader.js";
104
101
  export * from "./loaders/LWOLoader.js";
105
102
  export * from "./loaders/MD2Loader.js";
106
103
  export * from "./loaders/MDDLoader.js";
107
- export * from "./loaders/MMDLoader.js";
108
104
  export * from "./loaders/MTLLoader.js";
109
105
  export * from "./loaders/NRRDLoader.js";
110
106
  export * from "./loaders/OBJLoader.js";
@@ -241,7 +237,6 @@ export * from "./shaders/KaleidoShader.js";
241
237
  export * from "./shaders/LuminosityHighPassShader.js";
242
238
  export * from "./shaders/LuminosityShader.js";
243
239
  export * from "./shaders/MirrorShader.js";
244
- export * from "./shaders/MMDToonShader.js";
245
240
  export * from "./shaders/NormalMapShader.js";
246
241
  export * from "./shaders/OutputShader.js";
247
242
  export * from "./shaders/RGBShiftShader.js";
@@ -168,7 +168,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
168
168
  setGizmosVisible(value: boolean): void;
169
169
 
170
170
  /**
171
- * Update the `radiusFactor` value, redraw the gizmo and send a `changeEvent` to visualise the changes.
171
+ * Update the `radiusFactor` value, redraw the gizmo and send a `changeEvent` to visualize the changes.
172
172
  */
173
173
  setTbRadius(value: number): void;
174
174
 
@@ -121,6 +121,11 @@ declare class OrbitControls extends Controls<OrbitControlsEventMap> {
121
121
  */
122
122
  rotateSpeed: number;
123
123
 
124
+ /**
125
+ * How fast to rotate the camera when the keyboard is used. Default is 1.
126
+ */
127
+ keyRotateSpeed: number;
128
+
124
129
  /**
125
130
  * Enable or disable camera panning. Default is true.
126
131
  */
@@ -1,4 +1,4 @@
1
- import { Camera, DirectionalLightShadow, Light, Node, Object3D } from "three/webgpu";
1
+ import { Camera, DirectionalLightShadow, Light, Object3D, ShadowBaseNode } from "three/webgpu";
2
2
  import { CSMFrustum } from "./CSMFrustum.js";
3
3
 
4
4
  export type CSMShadowNodeMode = "uniform" | "logarithmic" | "practical" | "custom";
@@ -20,8 +20,7 @@ declare class LwLight extends Object3D {
20
20
  constructor();
21
21
  }
22
22
 
23
- declare class CSMShadowNode extends Node {
24
- light: Light;
23
+ declare class CSMShadowNode extends ShadowBaseNode {
25
24
  camera: Camera | null;
26
25
  cascades: number;
27
26
  maxFar: number;
@@ -12,14 +12,6 @@ export interface TextGeometryParameters extends ExtrudeGeometryOptions {
12
12
  */
13
13
  size?: number | undefined;
14
14
 
15
- /**
16
- * Thickness to extrude text.
17
- * Expects a `Float`.
18
- * @defaultValue `50`
19
- * @deprecated THREE.TextGeometry: .height is now deprecated. Please use .depth instead
20
- */
21
- height?: number | undefined;
22
-
23
15
  /**
24
16
  * Thickness to extrude text.
25
17
  * Expects a `Float`.
@@ -1,6 +1,8 @@
1
1
  import { LineSegments, Object3D } from "three";
2
2
 
3
3
  export class VertexNormalsHelper extends LineSegments {
4
+ readonly isVertexNormalsHelper: true;
5
+
4
6
  constructor(object: Object3D, size?: number, hex?: number);
5
7
 
6
8
  object: Object3D;
@@ -1,4 +1,4 @@
1
- import { Camera, Group, Object3D, Object3DEventMap, Vector2, WebGLRenderer, XRTargetRaySpace } from "three";
1
+ import { Camera, Group, Object3D, Object3DEventMap, Raycaster, Vector2, WebGLRenderer, XRTargetRaySpace } from "three";
2
2
 
3
3
  export interface InteractiveObject3DEventMap extends Object3DEventMap {
4
4
  hoveron: { data: Vector2 };
@@ -14,7 +14,15 @@ export interface InteractiveObject3DEventMap extends Object3DEventMap {
14
14
  export class InteractiveObject3D extends Object3D<InteractiveObject3DEventMap> {}
15
15
 
16
16
  export class InteractiveGroup extends Group {
17
+ raycaster: Raycaster;
18
+
17
19
  listenToPointerEvents(renderer: WebGLRenderer, camera: Camera): void;
18
20
 
21
+ disconnectionPointerEvents(): void;
22
+
19
23
  listenToXRControllerEvents(controller: XRTargetRaySpace): void;
24
+
25
+ disconnectXrControllerEvents(): void;
26
+
27
+ disconnect(): void;
20
28
  }
@@ -1,4 +1,4 @@
1
- import { Mesh, WebGLRenderer } from "three";
1
+ import { Mesh, Vector2, WebGLRenderer } from "three";
2
2
 
3
3
  import { LineMaterial } from "./LineMaterial.js";
4
4
  import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
@@ -18,6 +18,8 @@ export class LineSegments2 extends Mesh {
18
18
  */
19
19
  readonly isLineSegments2: true;
20
20
 
21
+ resolution: Vector2;
22
+
21
23
  /**
22
24
  * @param geometry (optional) Pair(s) of vertices representing each line segment.
23
25
  * @param material (optional) Material for the line. Default is a {@link LineMaterial} with random color.
@@ -6,6 +6,9 @@
6
6
 
7
7
  import { ShaderMaterial, ShaderMaterialParameters } from "three";
8
8
 
9
+ /**
10
+ * @deprecated Use THREE.MeshLambertMaterial instead.
11
+ */
9
12
  export class MeshGouraudMaterial extends ShaderMaterial {
10
13
  isMeshGouraudMaterial: true;
11
14
 
@@ -20,7 +20,7 @@ export class Flow {
20
20
  curveLengthArray: number[];
21
21
 
22
22
  object3D: Mesh;
23
- splineTexure: DataTexture;
23
+ splineTexture: DataTexture;
24
24
  uniforms: SplineUniform;
25
25
 
26
26
  constructor(mesh: Mesh, numberOfCurves?: number);
@@ -21,7 +21,7 @@ export class Flow {
21
21
  curveLengthArray: number[];
22
22
 
23
23
  object3D: Mesh;
24
- splineTexure: DataTexture;
24
+ splineTexture: DataTexture;
25
25
  uniforms: SplineUniform;
26
26
 
27
27
  constructor(mesh: Mesh, numberOfCurves?: number);
@@ -59,6 +59,6 @@ export class OutlinePass extends Pass {
59
59
  updateTextureMatrix(): void;
60
60
  getPrepareMaskMaterial(): ShaderMaterial;
61
61
  getEdgeDetectionMaterial(): ShaderMaterial;
62
- getSeperableBlurMaterial(): ShaderMaterial;
62
+ getSeparableBlurMaterial(): ShaderMaterial;
63
63
  getOverlayMaterial(): ShaderMaterial;
64
64
  }
@@ -26,6 +26,6 @@ export class UnrealBloomPass extends Pass {
26
26
  fsQuad: FullScreenQuad;
27
27
 
28
28
  dispose(): void;
29
- getSeperableBlurMaterial(): ShaderMaterial;
29
+ getSeparableBlurMaterial(): ShaderMaterial;
30
30
  getCompositeMaterial(): ShaderMaterial;
31
31
  }
@@ -1,4 +1,4 @@
1
- import { Light, Renderer } from "three";
1
+ import { Light, WebGLRenderer } from "three";
2
2
 
3
3
  export interface Size {
4
4
  width: number;
@@ -16,7 +16,7 @@ declare class ShadowMapViewer {
16
16
  enabled: boolean;
17
17
  size: Size;
18
18
  position: Position;
19
- render: (renderer: Renderer) => void;
19
+ render: (renderer: WebGLRenderer) => void;
20
20
  updateForWindowResize: () => void;
21
21
  update: () => void;
22
22
 
@@ -1,5 +1,7 @@
1
- import { WebGLRenderer } from "three";
1
+ export interface XRButtonRenderer {
2
+ xr: { setSession(session: XRSession): Promise<void> };
3
+ }
2
4
 
3
5
  export class XRButton {
4
- static createButton(renderer: WebGLRenderer, sessionInit?: XRSessionInit): HTMLElement;
6
+ static createButton(renderer: XRButtonRenderer, sessionInit?: XRSessionInit): HTMLElement;
5
7
  }
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.171.0",
3
+ "version": "0.173.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -48,6 +48,6 @@
48
48
  "meshoptimizer": "~0.18.1"
49
49
  },
50
50
  "peerDependencies": {},
51
- "typesPublisherContentHash": "96378b7c9c51d7d450e3a352e0282faee14373ce68b57df6a1afc567d6dd16f9",
51
+ "typesPublisherContentHash": "87d1eae9912dd0ad6de0abf1b48f1f1492997e994d634cca6cfd07481576ed8f",
52
52
  "typeScriptVersion": "5.0"
53
53
  }
three/src/Three.Core.d.ts CHANGED
@@ -38,6 +38,8 @@ export * from "./core/Layers.js";
38
38
  export * from "./core/Object3D.js";
39
39
  export * from "./core/Raycaster.js";
40
40
  export * from "./core/RenderTarget.js";
41
+ export * from "./core/RenderTarget3D.js";
42
+ export * from "./core/RenderTargetArray.js";
41
43
  export * from "./core/Uniform.js";
42
44
  export * from "./core/UniformsGroup.js";
43
45
  export * from "./extras/Controls.js";
@@ -138,6 +140,7 @@ export * from "./renderers/WebGL3DRenderTarget.js";
138
140
  export * from "./renderers/WebGLArrayRenderTarget.js";
139
141
  export * from "./renderers/WebGLCubeRenderTarget.js";
140
142
  export * from "./renderers/WebGLRenderTarget.js";
143
+ export * from "./renderers/webxr/WebXRController.js";
141
144
  export * from "./scenes/Fog.js";
142
145
  export * from "./scenes/FogExp2.js";
143
146
  export * from "./scenes/Scene.js";
@@ -153,6 +156,6 @@ export * from "./textures/DepthTexture.js";
153
156
  export * from "./textures/FramebufferTexture.js";
154
157
  export * from "./textures/Source.js";
155
158
  export * from "./textures/Texture.js";
159
+ export * from "./textures/VideoFrameTexture.js";
156
160
  export * from "./textures/VideoTexture.js";
157
- export * from "./Three.Legacy.js";
158
161
  export { createCanvasElement } from "./utils.js";
three/src/Three.TSL.d.ts CHANGED
@@ -33,7 +33,6 @@ export const abs: typeof TSL.abs;
33
33
  export const acesFilmicToneMapping: typeof TSL.acesFilmicToneMapping;
34
34
  export const acos: typeof TSL.acos;
35
35
  export const add: typeof TSL.add;
36
- export const addMethodChaining: typeof TSL.addMethodChaining;
37
36
  export const addNodeElement: typeof TSL.addNodeElement;
38
37
  export const agxToneMapping: typeof TSL.agxToneMapping;
39
38
  export const all: typeof TSL.all;
@@ -44,6 +43,7 @@ export const anisotropyB: typeof TSL.anisotropyB;
44
43
  export const anisotropyT: typeof TSL.anisotropyT;
45
44
  export const any: typeof TSL.any;
46
45
  export const append: typeof TSL.append;
46
+ export const array: typeof TSL.array;
47
47
  export const arrayBuffer: typeof TSL.arrayBuffer;
48
48
  export const asin: typeof TSL.asin;
49
49
  export const assign: typeof TSL.assign;
@@ -58,6 +58,7 @@ export const atomicOr: typeof TSL.atomicOr;
58
58
  export const atomicStore: typeof TSL.atomicStore;
59
59
  export const atomicSub: typeof TSL.atomicSub;
60
60
  export const atomicXor: typeof TSL.atomicXor;
61
+ export const atomicLoad: typeof TSL.atomicLoad;
61
62
  export const attenuationColor: typeof TSL.attenuationColor;
62
63
  export const attenuationDistance: typeof TSL.attenuationDistance;
63
64
  export const attribute: typeof TSL.attribute;
@@ -94,6 +95,7 @@ export const bypass: typeof TSL.bypass;
94
95
  export const cache: typeof TSL.cache;
95
96
  export const call: typeof TSL.call;
96
97
  export const cameraFar: typeof TSL.cameraFar;
98
+ export const cameraIndex: typeof TSL.cameraIndex;
97
99
  export const cameraNear: typeof TSL.cameraNear;
98
100
  export const cameraNormalMatrix: typeof TSL.cameraNormalMatrix;
99
101
  export const cameraPosition: typeof TSL.cameraPosition;
@@ -115,6 +117,7 @@ export const colorSpaceToWorking: typeof TSL.colorSpaceToWorking;
115
117
  export const colorToDirection: typeof TSL.colorToDirection;
116
118
  export const compute: typeof TSL.compute;
117
119
  export const cond: typeof TSL.cond;
120
+ export const Const: typeof TSL.Const;
118
121
  export const context: typeof TSL.context;
119
122
  export const convert: typeof TSL.convert;
120
123
  export const convertColorSpace: typeof TSL.convertColorSpace;
@@ -131,6 +134,7 @@ export const defined: typeof TSL.defined;
131
134
  export const degrees: typeof TSL.degrees;
132
135
  export const deltaTime: typeof TSL.deltaTime;
133
136
  export const densityFog: typeof TSL.densityFog;
137
+ export const densityFogFactor: typeof TSL.densityFogFactor;
134
138
  export const depth: typeof TSL.depth;
135
139
  export const depthPass: typeof TSL.depthPass;
136
140
  export const difference: typeof TSL.difference;
@@ -154,6 +158,7 @@ export const exp2: typeof TSL.exp2;
154
158
  export const expression: typeof TSL.expression;
155
159
  export const faceDirection: typeof TSL.faceDirection;
156
160
  export const faceForward: typeof TSL.faceForward;
161
+ export const faceforward: typeof TSL.faceforward;
157
162
  export const float: typeof TSL.float;
158
163
  export const floor: typeof TSL.floor;
159
164
  export const fog: typeof TSL.fog;
@@ -182,8 +187,8 @@ export const grayscale: typeof TSL.grayscale;
182
187
  export const greaterThan: typeof TSL.greaterThan;
183
188
  export const greaterThanEqual: typeof TSL.greaterThanEqual;
184
189
  export const hash: typeof TSL.hash;
185
- export const highPrecisionModelNormalViewMatrix: typeof TSL.highPrecisionModelNormalViewMatrix;
186
- export const highPrecisionModelViewMatrix: typeof TSL.highPrecisionModelViewMatrix;
190
+ export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
191
+ export const highPrecisionModelViewMatrix: typeof TSL.highpModelViewMatrix;
187
192
  export const hue: typeof TSL.hue;
188
193
  export const instance: typeof TSL.instance;
189
194
  export const instanceIndex: typeof TSL.instanceIndex;
@@ -193,6 +198,7 @@ export const instancedDynamicBufferAttribute: typeof TSL.instancedDynamicBufferA
193
198
  export const instancedMesh: typeof TSL.instancedMesh;
194
199
  export const int: typeof TSL.int;
195
200
  export const inverseSqrt: typeof TSL.inverseSqrt;
201
+ export const inversesqrt: typeof TSL.inversesqrt;
196
202
  export const invocationLocalIndex: typeof TSL.invocationLocalIndex;
197
203
  export const invocationSubgroupIndex: typeof TSL.invocationSubgroupIndex;
198
204
  export const ior: typeof TSL.ior;
@@ -217,16 +223,18 @@ export const lights: typeof TSL.lights;
217
223
  export const linearDepth: typeof TSL.linearDepth;
218
224
  export const linearToneMapping: typeof TSL.linearToneMapping;
219
225
  export const localId: typeof TSL.localId;
226
+ export const globalId: typeof TSL.globalId;
220
227
  export const log: typeof TSL.log;
221
228
  export const log2: typeof TSL.log2;
222
229
  export const logarithmicDepthToViewZ: typeof TSL.logarithmicDepthToViewZ;
223
230
  export const loop: typeof TSL.loop;
224
231
  export const luminance: typeof TSL.luminance;
232
+ export const mediumpModelViewMatrix: typeof TSL.mediumpModelViewMatrix;
225
233
  export const mat2: typeof TSL.mat2;
226
234
  export const mat3: typeof TSL.mat3;
227
235
  export const mat4: typeof TSL.mat4;
228
236
  export const matcapUV: typeof TSL.matcapUV;
229
- export const materialAOMap: typeof TSL.materialAOMap;
237
+ export const materialAO: typeof TSL.materialAO;
230
238
  export const materialAlphaTest: typeof TSL.materialAlphaTest;
231
239
  export const materialAnisotropy: typeof TSL.materialAnisotropy;
232
240
  export const materialAnisotropyVector: typeof TSL.materialAnisotropyVector;
@@ -251,7 +259,7 @@ export const materialLineWidth: typeof TSL.materialLineWidth;
251
259
  export const materialMetalness: typeof TSL.materialMetalness;
252
260
  export const materialNormal: typeof TSL.materialNormal;
253
261
  export const materialOpacity: typeof TSL.materialOpacity;
254
- export const materialPointWidth: typeof TSL.materialPointWidth;
262
+ export const materialPointSize: typeof TSL.materialPointSize;
255
263
  export const materialReference: typeof TSL.materialReference;
256
264
  export const materialReflectivity: typeof TSL.materialReflectivity;
257
265
  export const materialRefractionRatio: typeof TSL.materialRefractionRatio;
@@ -370,6 +378,7 @@ export const radians: typeof TSL.radians;
370
378
  export const rand: typeof TSL.rand;
371
379
  export const range: typeof TSL.range;
372
380
  export const rangeFog: typeof TSL.rangeFog;
381
+ export const rangeFogFactor: typeof TSL.rangeFogFactor;
373
382
  export const reciprocal: typeof TSL.reciprocal;
374
383
  export const reference: typeof TSL.reference;
375
384
  export const referenceBuffer: typeof TSL.referenceBuffer;
@@ -407,7 +416,9 @@ export const select: typeof TSL.select;
407
416
  export const setCurrentStack: typeof TSL.setCurrentStack;
408
417
  export const shaderStages: typeof TSL.shaderStages;
409
418
  export const shadow: typeof TSL.shadow;
419
+ export const shadowPositionWorld: typeof TSL.shadowPositionWorld;
410
420
  export const sharedUniformGroup: typeof TSL.sharedUniformGroup;
421
+ export const shapeCircle: typeof TSL.shapeCircle;
411
422
  export const sheen: typeof TSL.sheen;
412
423
  export const sheenRoughness: typeof TSL.sheenRoughness;
413
424
  export const shiftLeft: typeof TSL.shiftLeft;
@@ -433,6 +444,7 @@ export const storageBarrier: typeof TSL.storageBarrier;
433
444
  export const storageObject: typeof TSL.storageObject;
434
445
  export const storageTexture: typeof TSL.storageTexture;
435
446
  export const string: typeof TSL.string;
447
+ export const struct: typeof TSL.struct;
436
448
  export const sub: typeof TSL.sub;
437
449
  export const subgroupIndex: typeof TSL.subgroupIndex;
438
450
  export const subgroupSize: typeof TSL.subgroupSize;
@@ -491,6 +503,7 @@ export const uv: typeof TSL.uv;
491
503
  export const uvec2: typeof TSL.uvec2;
492
504
  export const uvec3: typeof TSL.uvec3;
493
505
  export const uvec4: typeof TSL.uvec4;
506
+ export const Var: typeof TSL.Var;
494
507
  export const varying: typeof TSL.varying;
495
508
  export const varyingProperty: typeof TSL.varyingProperty;
496
509
  export const vec2: typeof TSL.vec2;
@@ -8,8 +8,8 @@ export { default as PostProcessing } from "./renderers/common/PostProcessing.js"
8
8
  export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
9
9
  export type { default as Renderer } from "./renderers/common/Renderer.js";
10
10
  export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nodes.js";
11
- import * as PostProcessingUtils from "./renderers/common/PostProcessingUtils.js";
12
- export { PostProcessingUtils };
11
+ import * as RendererUtils from "./renderers/common/RendererUtils.js";
12
+ export { RendererUtils };
13
13
  export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
14
14
  export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
15
15
  export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
@@ -8,8 +8,8 @@ export { default as PostProcessing } from "./renderers/common/PostProcessing.js"
8
8
  export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
9
9
  export type { default as Renderer } from "./renderers/common/Renderer.js";
10
10
  export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.js";
11
- import * as PostProcessingUtils from "./renderers/common/PostProcessingUtils.js";
12
- export { PostProcessingUtils };
11
+ import * as RendererUtils from "./renderers/common/RendererUtils.js";
12
+ export { RendererUtils };
13
13
  export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
14
14
  export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
15
15
  export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
@@ -41,7 +41,7 @@ export class AnimationClip {
41
41
  validate(): boolean;
42
42
  optimize(): AnimationClip;
43
43
  clone(): this;
44
- toJSON(clip: AnimationClip): any;
44
+ toJSON(): AnimationClipJSON;
45
45
 
46
46
  static CreateFromMorphTargetSequence(
47
47
  name: string,
@@ -11,12 +11,6 @@ import { PerspectiveCamera } from "./PerspectiveCamera.js";
11
11
  * @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/ArrayCamera.js | Source}
12
12
  */
13
13
  export class ArrayCamera extends PerspectiveCamera {
14
- /**
15
- * An array of cameras.
16
- * @param array. Default `[]`.
17
- */
18
- constructor(cameras?: PerspectiveCamera[]);
19
-
20
14
  /**
21
15
  * Read-only flag to check if a given object is of type {@link ArrayCamera}.
22
16
  * @remarks This is a _constant_ value
@@ -29,4 +23,11 @@ export class ArrayCamera extends PerspectiveCamera {
29
23
  * @defaultValue `[]`
30
24
  */
31
25
  cameras: PerspectiveCamera[];
26
+
27
+ index: number;
28
+
29
+ /**
30
+ * An array of cameras.
31
+ */
32
+ constructor(cameras?: PerspectiveCamera[]);
32
33
  }
@@ -16,8 +16,8 @@ export class Camera extends Object3D {
16
16
  /**
17
17
  * @remarks
18
18
  * Note that this class is not intended to be called directly; you probably want a
19
- * {@link THREE.PerspectiveCamera | PerspectiveCamera} or
20
- * {@link THREE.OrthographicCamera | OrthographicCamera} instead.
19
+ * {@link PerspectiveCamera | PerspectiveCamera} or
20
+ * {@link OrthographicCamera | OrthographicCamera} instead.
21
21
  */
22
22
  constructor();
23
23
 
@@ -36,7 +36,7 @@ export class Camera extends Object3D {
36
36
 
37
37
  /**
38
38
  * @override
39
- * The {@link THREE.Layers | layers} that the {@link Camera} is a member of.
39
+ * The {@link Layers | layers} that the {@link Camera} is a member of.
40
40
  * @remarks Objects must share at least one layer with the {@link Camera} to be n when the camera's viewpoint is rendered.
41
41
  * @defaultValue `new THREE.Layers()`
42
42
  */
@@ -45,19 +45,19 @@ export class Camera extends Object3D {
45
45
  /**
46
46
  * This is the inverse of matrixWorld.
47
47
  * @remarks MatrixWorld contains the Matrix which has the world transform of the {@link Camera} .
48
- * @defaultValue {@link THREE.Matrix4 | `new THREE.Matrix4()`}
48
+ * @defaultValue {@link Matrix4 | `new THREE.Matrix4()`}
49
49
  */
50
50
  matrixWorldInverse: Matrix4;
51
51
 
52
52
  /**
53
53
  * This is the matrix which contains the projection.
54
- * @defaultValue {@link THREE.Matrix4 | `new THREE.Matrix4()`}
54
+ * @defaultValue {@link Matrix4 | `new THREE.Matrix4()`}
55
55
  */
56
56
  projectionMatrix: Matrix4;
57
57
 
58
58
  /**
59
59
  * This is the inverse of projectionMatrix.
60
- * @defaultValue {@link THREE.Matrix4 | `new THREE.Matrix4()`}
60
+ * @defaultValue {@link Matrix4 | `new THREE.Matrix4()`}
61
61
  */
62
62
  projectionMatrixInverse: Matrix4;
63
63
 
@@ -66,7 +66,7 @@ export class Camera extends Object3D {
66
66
  viewport?: Vector4;
67
67
 
68
68
  /**
69
- * Returns a {@link THREE.Vector3 | Vector3} representing the world space direction in which the {@link Camera} is looking.
69
+ * Returns a {@link Vector3 | Vector3} representing the world space direction in which the {@link Camera} is looking.
70
70
  * @remarks Note: A {@link Camera} looks down its local, negative z-axis.
71
71
  * @param target The result will be copied into this Vector3.
72
72
  */
@@ -1,7 +1,24 @@
1
1
  import { CoordinateSystem } from "../constants.js";
2
2
  import { Object3D } from "../core/Object3D.js";
3
+ import { RenderTarget } from "../core/RenderTarget.js";
3
4
  import { WebGLCubeRenderTarget } from "../renderers/WebGLCubeRenderTarget.js";
4
- import { WebGLRenderer } from "../renderers/WebGLRenderer.js";
5
+ import { Camera } from "./Camera.js";
6
+
7
+ export interface CubeCameraRenderer {
8
+ coordinateSystem: CoordinateSystem;
9
+ getRenderTarget(): RenderTarget | null;
10
+ getActiveCubeFace(): number;
11
+ getActiveMipmapLevel(): number;
12
+ xr: {
13
+ enabled: boolean;
14
+ };
15
+ setRenderTarget(
16
+ renderTarget: WebGLCubeRenderTarget | null,
17
+ activeCubeFace?: number,
18
+ activeMipmapLevel?: number,
19
+ ): void;
20
+ render(scene: Object3D, camera: Camera): void;
21
+ }
5
22
 
6
23
  /**
7
24
  * Creates **6** {@link THREE.PerspectiveCamera | cameras} that render to a {@link THREE.WebGLCubeRenderTarget | WebGLCubeRenderTarget}.
@@ -64,5 +81,5 @@ export class CubeCamera extends Object3D {
64
81
  * @param renderer The current WebGL renderer
65
82
  * @param scene The current scene
66
83
  */
67
- update(renderer: WebGLRenderer, scene: Object3D): void;
84
+ update(renderer: CubeCameraRenderer, scene: Object3D): void;
68
85
  }
three/src/constants.d.ts CHANGED
@@ -791,6 +791,12 @@ export const WebGLCoordinateSystem: 2000;
791
791
  export const WebGPUCoordinateSystem: 2001;
792
792
  export type CoordinateSystem = typeof WebGLCoordinateSystem | typeof WebGPUCoordinateSystem;
793
793
 
794
+ export const TimestampQuery: {
795
+ COMPUTE: "compute";
796
+ RENDER: "render";
797
+ };
798
+ export type TimestampQuery = "compute" | "render";
799
+
794
800
  ///////////////////////////////////////////////////////////////////////////////
795
801
  // Texture - Internal Pixel Formats
796
802
 
@@ -57,6 +57,11 @@ export class BufferAttribute {
57
57
  */
58
58
  constructor(array: TypedArray, itemSize: number, normalized?: boolean);
59
59
 
60
+ /**
61
+ * Unique number for this attribute instance.
62
+ */
63
+ readonly id: number;
64
+
60
65
  /**
61
66
  * Optional name for this attribute instance.
62
67
  * @defaultValue ''
@@ -72,11 +72,6 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
72
72
  */
73
73
  resolveStencilBuffer: boolean;
74
74
 
75
- /**
76
- * @default null
77
- */
78
- depthTexture: DepthTexture | null;
79
-
80
75
  /**
81
76
  * Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
82
77
  * @default 0
@@ -88,6 +83,9 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
88
83
  get texture(): TTexture;
89
84
  set texture(value: TTexture);
90
85
 
86
+ set depthTexture(current: DepthTexture | null);
87
+ get depthTexture(): DepthTexture | null;
88
+
91
89
  setSize(width: number, height: number, depth?: number): void;
92
90
  clone(): this;
93
91
  copy(source: RenderTarget): this;
@@ -0,0 +1,9 @@
1
+ import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js";
2
+
3
+ declare class RenderTarget3D extends RenderTarget {
4
+ readonly isRenderTarget3D: true;
5
+
6
+ constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions);
7
+ }
8
+
9
+ export { RenderTarget3D };
@@ -0,0 +1,9 @@
1
+ import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js";
2
+
3
+ declare class RenderTargetArray extends RenderTarget {
4
+ readonly isRenderTargetArray: true;
5
+
6
+ constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions);
7
+ }
8
+
9
+ export { RenderTargetArray };
@@ -573,7 +573,9 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
573
573
  /**
574
574
  * An optional callback that is executed immediately before the shader program is compiled.
575
575
  * This function is called with the shader source code as a parameter.
576
- * Useful for the modification of built-in materials.
576
+ * Useful for the modification of built-in materials, but the recommended approach moving forward is to use
577
+ * `WebGPURenderer` with the new Node Material system and
578
+ * [TSL]{@link https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language}.
577
579
  * Unlike properties, the callback is not supported by {@link .clone()}, {@link .copy()} and {@link .toJSON()}.
578
580
  * This callback is only supported in `WebGLRenderer` (not `WebGPURenderer`).
579
581
  * @param parameters WebGL program parameters
@@ -62,10 +62,5 @@ export class MeshDepthMaterial extends Material {
62
62
  */
63
63
  wireframeLinewidth: number;
64
64
 
65
- /**
66
- * @default false
67
- */
68
- fog: boolean;
69
-
70
65
  setValues(parameters: MeshDepthMaterialParameters): void;
71
66
  }
@@ -48,10 +48,5 @@ export class MeshDistanceMaterial extends Material {
48
48
  */
49
49
  displacementBias: number;
50
50
 
51
- /**
52
- * @default false
53
- */
54
- fog: boolean;
55
-
56
51
  setValues(parameters: MeshDistanceMaterialParameters): void;
57
52
  }