@types/three 0.178.1 → 0.179.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 (56) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +1 -2
  3. three/examples/jsm/exporters/USDZExporter.d.ts +1 -0
  4. three/examples/jsm/loaders/EXRLoader.d.ts +18 -5
  5. three/examples/jsm/loaders/USDLoader.d.ts +9 -0
  6. three/examples/jsm/loaders/USDZLoader.d.ts +11 -8
  7. three/examples/jsm/tsl/display/TRAANode.d.ts +22 -0
  8. three/package.json +4 -4
  9. three/src/Three.Core.d.ts +1 -0
  10. three/src/Three.TSL.d.ts +55 -13
  11. three/src/animation/KeyframeTrack.d.ts +7 -2
  12. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +2 -2
  13. three/src/animation/tracks/StringKeyframeTrack.d.ts +2 -2
  14. three/src/cameras/Camera.d.ts +15 -8
  15. three/src/constants.d.ts +3 -1
  16. three/{examples/jsm/misc → src/core}/Timer.d.ts +3 -17
  17. three/src/helpers/SkeletonHelper.d.ts +7 -12
  18. three/src/loaders/FileLoader.d.ts +2 -2
  19. three/src/loaders/ImageBitmapLoader.d.ts +9 -9
  20. three/src/loaders/Loader.d.ts +1 -0
  21. three/src/loaders/LoadingManager.d.ts +23 -19
  22. three/src/materials/nodes/Line2NodeMaterial.d.ts +0 -6
  23. three/src/materials/nodes/PointsNodeMaterial.d.ts +5 -0
  24. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +22 -1
  25. three/src/math/Frustum.d.ts +1 -1
  26. three/src/math/Line3.d.ts +1 -0
  27. three/src/math/Matrix4.d.ts +2 -0
  28. three/src/nodes/Nodes.d.ts +1 -0
  29. three/src/nodes/TSL.d.ts +1 -0
  30. three/src/nodes/accessors/TextureNode.d.ts +2 -0
  31. three/src/nodes/core/ContextNode.d.ts +7 -1
  32. three/src/nodes/core/Node.d.ts +9 -2
  33. three/src/nodes/core/UniformNode.d.ts +9 -0
  34. three/src/nodes/core/VarNode.d.ts +11 -1
  35. three/src/nodes/display/PassNode.d.ts +10 -0
  36. three/src/nodes/gpgpu/ComputeNode.d.ts +15 -6
  37. three/src/nodes/materialx/MaterialXNodes.d.ts +85 -20
  38. three/src/nodes/materialx/lib/mx_noise.d.ts +28 -0
  39. three/src/nodes/math/MathNode.d.ts +10 -2
  40. three/src/nodes/tsl/TSLCore.d.ts +16 -0
  41. three/src/nodes/utils/EventNode.d.ts +21 -0
  42. three/src/nodes/utils/RTTNode.d.ts +2 -0
  43. three/src/renderers/common/Color4.d.ts +2 -2
  44. three/src/renderers/common/Renderer.d.ts +16 -8
  45. three/src/renderers/common/SampledTexture.d.ts +2 -9
  46. three/src/renderers/common/Sampler.d.ts +9 -3
  47. three/src/renderers/common/Storage3DTexture.d.ts +2 -0
  48. three/src/renderers/common/StorageArrayTexture.d.ts +2 -0
  49. three/src/renderers/common/StorageTexture.d.ts +2 -0
  50. three/src/renderers/common/XRManager.d.ts +1 -0
  51. three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
  52. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +0 -1
  53. three/src/renderers/webxr/WebXRDepthSensing.d.ts +4 -5
  54. three/src/renderers/webxr/WebXRManager.d.ts +4 -2
  55. three/src/textures/ExternalTexture.d.ts +11 -0
  56. three/examples/jsm/tsl/display/TRAAPassNode.d.ts +0 -15
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, 09 Jul 2025 18:02:54 GMT
11
+ * Last updated: Mon, 04 Aug 2025 15:38:34 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
@@ -116,7 +116,7 @@ export * from "./loaders/TGALoader.js";
116
116
  export * from "./loaders/TIFFLoader.js";
117
117
  export * from "./loaders/TTFLoader.js";
118
118
  export * from "./loaders/UltraHDRLoader.js";
119
- export * from "./loaders/USDZLoader.js";
119
+ export * from "./loaders/USDLoader.js";
120
120
  export * from "./loaders/VOXLoader.js";
121
121
  export * from "./loaders/VRMLLoader.js";
122
122
  export * from "./loaders/VTKLoader.js";
@@ -145,7 +145,6 @@ export * from "./misc/MorphAnimMesh.js";
145
145
  export * from "./misc/MorphBlendMesh.js";
146
146
  export * from "./misc/ProgressiveLightMap.js";
147
147
  export * from "./misc/RollerCoaster.js";
148
- export * from "./misc/Timer.js";
149
148
  export * from "./misc/TubePainter.js";
150
149
  export * from "./misc/Volume.js";
151
150
  export * from "./misc/VolumeSlice.js";
@@ -5,6 +5,7 @@ import * as WebGPUTextureUtils from "../utils/WebGPUTextureUtils.js";
5
5
  export interface USDZExporterOptions {
6
6
  ar?: { anchoring: { type: "plane" }; planeAnchoring: { alignment: "horizontal" | "vertical" | "any" } } | undefined;
7
7
  includeAnchoringProperties?: boolean | undefined;
8
+ onlyVisible?: boolean | undefined;
8
9
  quickLookCompatible?: boolean | undefined;
9
10
  maxTextureSize?: number | undefined;
10
11
  }
@@ -1,4 +1,14 @@
1
- import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
1
+ import {
2
+ DataTextureLoader,
3
+ FloatType,
4
+ HalfFloatType,
5
+ LoadingManager,
6
+ PixelFormat,
7
+ RedFormat,
8
+ RGBAFormat,
9
+ RGFormat,
10
+ TextureDataType,
11
+ } from "three";
2
12
 
3
13
  export interface EXR {
4
14
  header: object;
@@ -7,13 +17,16 @@ export interface EXR {
7
17
  data: Float32Array | Uint16Array;
8
18
  format: PixelFormat;
9
19
  colorSpace: string;
10
- type: TextureDataType;
20
+ type: typeof HalfFloatType | typeof FloatType;
11
21
  }
12
22
 
13
- export class EXRLoader extends DataTextureLoader {
14
- constructor(manager?: LoadingManager);
23
+ declare class EXRLoader extends DataTextureLoader {
15
24
  type: TextureDataType;
25
+ outputFormat: typeof RGBAFormat | typeof RGFormat | typeof RedFormat;
26
+
27
+ constructor(manager?: LoadingManager);
16
28
 
17
29
  parse(buffer: ArrayBuffer): EXR;
18
- setDataType(type: TextureDataType): this;
30
+ setDataType(type: typeof HalfFloatType | typeof FloatType): this;
31
+ setOutputFormat(value: typeof RGBAFormat | typeof RGFormat | typeof RedFormat): this;
19
32
  }
@@ -0,0 +1,9 @@
1
+ import { Group, Loader, LoadingManager } from "three";
2
+
3
+ declare class USDLoader extends Loader<Group> {
4
+ constructor(manager?: LoadingManager);
5
+
6
+ parse(buffer: ArrayBuffer | string): Group;
7
+ }
8
+
9
+ export { USDLoader };
@@ -1,11 +1,14 @@
1
- import { Group, Loader, LoadingManager, Mesh } from "three";
1
+ import { LoadingManager } from "three";
2
+ import { USDLoader } from "./USDLoader.js";
2
3
 
3
- export class USDAParser {
4
- parse(text: string): object;
5
- }
6
-
7
- export class USDZLoader extends Loader<Mesh> {
4
+ /**
5
+ * @deprecated USDZLoader has been deprecated. Please use USDLoader instead.
6
+ */
7
+ declare class USDZLoader extends USDLoader {
8
+ /**
9
+ * @deprecated USDZLoader has been deprecated. Please use USDLoader instead.
10
+ */
8
11
  constructor(manager?: LoadingManager);
9
-
10
- parse(buffer: ArrayBuffer | string): Group;
11
12
  }
13
+
14
+ export { USDZLoader };
@@ -0,0 +1,22 @@
1
+ import { ShaderNodeObject } from "three/tsl";
2
+ import { Camera, Node, TempNode, TextureNode } from "three/webgpu";
3
+
4
+ declare class TRAANode extends TempNode {
5
+ readonly isTRAANode: true;
6
+
7
+ beautyNode: TextureNode;
8
+ depthNode: TextureNode;
9
+ velocityNode: TextureNode;
10
+ camera: Camera;
11
+
12
+ constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera);
13
+ }
14
+
15
+ export default TRAANode;
16
+
17
+ export const traa: (
18
+ beautyNode: Node,
19
+ depthNode: TextureNode,
20
+ velocityNode: TextureNode,
21
+ camera: Camera,
22
+ ) => ShaderNodeObject<TRAANode>;
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.178.1",
3
+ "version": "0.179.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -46,9 +46,9 @@
46
46
  "@types/webxr": "*",
47
47
  "@webgpu/types": "*",
48
48
  "fflate": "~0.8.2",
49
- "meshoptimizer": "~0.18.1"
49
+ "meshoptimizer": "~0.22.0"
50
50
  },
51
51
  "peerDependencies": {},
52
- "typesPublisherContentHash": "d9c620a2d4d95c3bca7cfc75c9b59be43aedab8c28dfc9871f33870fefadd371",
53
- "typeScriptVersion": "5.1"
52
+ "typesPublisherContentHash": "184261baf6703d118d65b2d005bcc72af9877981f78da02aa9756329a95df8a8",
53
+ "typeScriptVersion": "5.2"
54
54
  }
three/src/Three.Core.d.ts CHANGED
@@ -39,6 +39,7 @@ export * from "./core/Object3D.js";
39
39
  export * from "./core/Raycaster.js";
40
40
  export * from "./core/RenderTarget.js";
41
41
  export * from "./core/RenderTarget3D.js";
42
+ export * from "./core/Timer.js";
42
43
  export * from "./core/Uniform.js";
43
44
  export * from "./core/UniformsGroup.js";
44
45
  export * from "./extras/Controls.js";
three/src/Three.TSL.d.ts CHANGED
@@ -2,8 +2,10 @@ import * as TSL from "./nodes/TSL.js";
2
2
 
3
3
  export const BRDF_GGX: typeof TSL.BRDF_GGX;
4
4
  export const BRDF_Lambert: typeof TSL.BRDF_Lambert;
5
+ export const BasicPointShadowFilter: typeof TSL.BasicPointShadowFilter;
5
6
  export const BasicShadowFilter: typeof TSL.BasicShadowFilter;
6
7
  export const Break: typeof TSL.Break;
8
+ export const Const: typeof TSL.Const;
7
9
  export const Continue: typeof TSL.Continue;
8
10
  export const DFGApprox: typeof TSL.DFGApprox;
9
11
  export const D_GGX: typeof TSL.D_GGX;
@@ -13,27 +15,32 @@ export const F_Schlick: typeof TSL.F_Schlick;
13
15
  export const Fn: typeof TSL.Fn;
14
16
  export const INFINITY: typeof TSL.INFINITY;
15
17
  export const If: typeof TSL.If;
16
- export const Switch: typeof TSL.Switch;
17
18
  export const Loop: typeof TSL.Loop;
19
+ export const NodeAccess: typeof TSL.NodeAccess;
18
20
  export const NodeShaderStage: typeof TSL.NodeShaderStage;
19
21
  export const NodeType: typeof TSL.NodeType;
20
22
  export const NodeUpdateType: typeof TSL.NodeUpdateType;
21
- export const NodeAccess: typeof TSL.NodeAccess;
22
23
  export const PCFShadowFilter: typeof TSL.PCFShadowFilter;
23
24
  export const PCFSoftShadowFilter: typeof TSL.PCFSoftShadowFilter;
24
25
  export const PI: typeof TSL.PI;
25
26
  export const PI2: typeof TSL.PI2;
27
+ export const PointShadowFilter: typeof TSL.PointShadowFilter;
26
28
  export const Return: typeof TSL.Return;
27
29
  export const Schlick_to_F0: typeof TSL.Schlick_to_F0;
28
30
  export const ScriptableNodeResources: typeof TSL.ScriptableNodeResources;
29
31
  export const ShaderNode: typeof TSL.ShaderNode;
32
+ export const Stack: typeof TSL.Stack;
33
+ export const Switch: typeof TSL.Switch;
30
34
  export const TBNViewMatrix: typeof TSL.TBNViewMatrix;
31
35
  export const VSMShadowFilter: typeof TSL.VSMShadowFilter;
32
36
  export const V_GGX_SmithCorrelated: typeof TSL.V_GGX_SmithCorrelated;
37
+ export const Var: typeof TSL.Var;
38
+ export const VarIntent: typeof TSL.VarIntent;
33
39
  export const abs: typeof TSL.abs;
34
40
  export const acesFilmicToneMapping: typeof TSL.acesFilmicToneMapping;
35
41
  export const acos: typeof TSL.acos;
36
42
  export const add: typeof TSL.add;
43
+ export const addMethodChaining: typeof TSL.addMethodChaining;
37
44
  export const addNodeElement: typeof TSL.addNodeElement;
38
45
  export const agxToneMapping: typeof TSL.agxToneMapping;
39
46
  export const all: typeof TSL.all;
@@ -53,13 +60,13 @@ export const atan2: typeof TSL.atan2;
53
60
  export const atomicAdd: typeof TSL.atomicAdd;
54
61
  export const atomicAnd: typeof TSL.atomicAnd;
55
62
  export const atomicFunc: typeof TSL.atomicFunc;
63
+ export const atomicLoad: typeof TSL.atomicLoad;
56
64
  export const atomicMax: typeof TSL.atomicMax;
57
65
  export const atomicMin: typeof TSL.atomicMin;
58
66
  export const atomicOr: typeof TSL.atomicOr;
59
67
  export const atomicStore: typeof TSL.atomicStore;
60
68
  export const atomicSub: typeof TSL.atomicSub;
61
69
  export const atomicXor: typeof TSL.atomicXor;
62
- export const atomicLoad: typeof TSL.atomicLoad;
63
70
  export const attenuationColor: typeof TSL.attenuationColor;
64
71
  export const attenuationDistance: typeof TSL.attenuationDistance;
65
72
  export const attribute: typeof TSL.attribute;
@@ -112,14 +119,15 @@ export const checker: typeof TSL.checker;
112
119
  export const cineonToneMapping: typeof TSL.cineonToneMapping;
113
120
  export const clamp: typeof TSL.clamp;
114
121
  export const clearcoat: typeof TSL.clearcoat;
122
+ export const clearcoatNormalView: typeof TSL.clearcoatNormalView;
115
123
  export const clearcoatRoughness: typeof TSL.clearcoatRoughness;
116
124
  export const code: typeof TSL.code;
117
125
  export const color: typeof TSL.color;
118
126
  export const colorSpaceToWorking: typeof TSL.colorSpaceToWorking;
119
127
  export const colorToDirection: typeof TSL.colorToDirection;
120
128
  export const compute: typeof TSL.compute;
129
+ export const computeKernel: typeof TSL.computeKernel;
121
130
  export const computeSkinning: typeof TSL.computeSkinning;
122
- export const Const: typeof TSL.Const;
123
131
  export const context: typeof TSL.context;
124
132
  export const convert: typeof TSL.convert;
125
133
  export const convertColorSpace: typeof TSL.convertColorSpace;
@@ -127,6 +135,8 @@ export const convertToTexture: typeof TSL.convertToTexture;
127
135
  export const cos: typeof TSL.cos;
128
136
  export const cross: typeof TSL.cross;
129
137
  export const cubeTexture: typeof TSL.cubeTexture;
138
+ export const cubeTextureBase: typeof TSL.cubeTextureBase;
139
+ export const cubeToUV: typeof TSL.cubeToUV;
130
140
  export const dFdx: typeof TSL.dFdx;
131
141
  export const dFdy: typeof TSL.dFdy;
132
142
  export const dashSize: typeof TSL.dashSize;
@@ -142,10 +152,12 @@ export const densityFog: typeof TSL.densityFog;
142
152
  export const densityFogFactor: typeof TSL.densityFogFactor;
143
153
  export const depth: typeof TSL.depth;
144
154
  export const depthPass: typeof TSL.depthPass;
155
+ export const determinant: typeof TSL.determinant;
145
156
  export const difference: typeof TSL.difference;
146
157
  export const diffuseColor: typeof TSL.diffuseColor;
147
158
  export const directPointLight: typeof TSL.directPointLight;
148
159
  export const directionToColor: typeof TSL.directionToColor;
160
+ export const directionToFaceDirection: typeof TSL.directionToFaceDirection;
149
161
  export const dispersion: typeof TSL.dispersion;
150
162
  export const distance: typeof TSL.distance;
151
163
  export const div: typeof TSL.div;
@@ -184,10 +196,11 @@ export const getParallaxCorrectNormal: typeof TSL.getParallaxCorrectNormal;
184
196
  export const getRoughness: typeof TSL.getRoughness;
185
197
  export const getScreenPosition: typeof TSL.getScreenPosition;
186
198
  export const getShIrradianceAt: typeof TSL.getShIrradianceAt;
187
- export const getTextureIndex: typeof TSL.getTextureIndex;
188
- export const getViewPosition: typeof TSL.getViewPosition;
189
199
  export const getShadowMaterial: typeof TSL.getShadowMaterial;
190
200
  export const getShadowRenderObjectFunction: typeof TSL.getShadowRenderObjectFunction;
201
+ export const getTextureIndex: typeof TSL.getTextureIndex;
202
+ export const getViewPosition: typeof TSL.getViewPosition;
203
+ export const globalId: typeof TSL.globalId;
191
204
  export const glsl: typeof TSL.glsl;
192
205
  export const glslFn: typeof TSL.glslFn;
193
206
  export const grayscale: typeof TSL.grayscale;
@@ -206,6 +219,7 @@ export const instancedBufferAttribute: typeof TSL.instancedBufferAttribute;
206
219
  export const instancedDynamicBufferAttribute: typeof TSL.instancedDynamicBufferAttribute;
207
220
  export const instancedMesh: typeof TSL.instancedMesh;
208
221
  export const int: typeof TSL.int;
222
+ export const inverse: typeof TSL.inverse;
209
223
  export const inverseSqrt: typeof TSL.inverseSqrt;
210
224
  export const inversesqrt: typeof TSL.inversesqrt;
211
225
  export const invocationLocalIndex: typeof TSL.invocationLocalIndex;
@@ -224,6 +238,7 @@ export const lengthSq: typeof TSL.lengthSq;
224
238
  export const lessThan: typeof TSL.lessThan;
225
239
  export const lessThanEqual: typeof TSL.lessThanEqual;
226
240
  export const lightPosition: typeof TSL.lightPosition;
241
+ export const lightProjectionUV: typeof TSL.lightProjectionUV;
227
242
  export const lightShadowMatrix: typeof TSL.lightShadowMatrix;
228
243
  export const lightTargetDirection: typeof TSL.lightTargetDirection;
229
244
  export const lightTargetPosition: typeof TSL.lightTargetPosition;
@@ -233,12 +248,10 @@ export const lights: typeof TSL.lights;
233
248
  export const linearDepth: typeof TSL.linearDepth;
234
249
  export const linearToneMapping: typeof TSL.linearToneMapping;
235
250
  export const localId: typeof TSL.localId;
236
- export const globalId: typeof TSL.globalId;
237
251
  export const log: typeof TSL.log;
238
252
  export const log2: typeof TSL.log2;
239
253
  export const logarithmicDepthToViewZ: typeof TSL.logarithmicDepthToViewZ;
240
254
  export const luminance: typeof TSL.luminance;
241
- export const mediumpModelViewMatrix: typeof TSL.mediumpModelViewMatrix;
242
255
  export const mat2: typeof TSL.mat2;
243
256
  export const mat3: typeof TSL.mat3;
244
257
  export const mat4: typeof TSL.mat4;
@@ -255,6 +268,8 @@ export const materialClearcoatRoughness: typeof TSL.materialClearcoatRoughness;
255
268
  export const materialColor: typeof TSL.materialColor;
256
269
  export const materialDispersion: typeof TSL.materialDispersion;
257
270
  export const materialEmissive: typeof TSL.materialEmissive;
271
+ export const materialEnvIntensity: typeof TSL.materialEnvIntensity;
272
+ export const materialEnvRotation: typeof TSL.materialEnvRotation;
258
273
  export const materialIOR: typeof TSL.materialIOR;
259
274
  export const materialIridescence: typeof TSL.materialIridescence;
260
275
  export const materialIridescenceIOR: typeof TSL.materialIridescenceIOR;
@@ -285,6 +300,7 @@ export const materialThickness: typeof TSL.materialThickness;
285
300
  export const materialTransmission: typeof TSL.materialTransmission;
286
301
  export const max: typeof TSL.max;
287
302
  export const maxMipLevel: typeof TSL.maxMipLevel;
303
+ export const mediumpModelViewMatrix: typeof TSL.mediumpModelViewMatrix;
288
304
  export const metalness: typeof TSL.metalness;
289
305
  export const min: typeof TSL.min;
290
306
  export const mix: typeof TSL.mix;
@@ -305,24 +321,45 @@ export const morphReference: typeof TSL.morphReference;
305
321
  export const mrt: typeof TSL.mrt;
306
322
  export const mul: typeof TSL.mul;
307
323
  export const mx_aastep: typeof TSL.mx_aastep;
324
+ export const mx_add: typeof TSL.mx_add;
325
+ export const mx_atan2: typeof TSL.mx_atan2;
308
326
  export const mx_cell_noise_float: typeof TSL.mx_cell_noise_float;
309
327
  export const mx_contrast: typeof TSL.mx_contrast;
328
+ export const mx_divide: typeof TSL.mx_divide;
310
329
  export const mx_fractal_noise_float: typeof TSL.mx_fractal_noise_float;
311
330
  export const mx_fractal_noise_vec2: typeof TSL.mx_fractal_noise_vec2;
312
331
  export const mx_fractal_noise_vec3: typeof TSL.mx_fractal_noise_vec3;
313
332
  export const mx_fractal_noise_vec4: typeof TSL.mx_fractal_noise_vec4;
333
+ export const mx_frame: typeof TSL.mx_frame;
334
+ export const mx_heighttonormal: typeof TSL.mx_heighttonormal;
314
335
  export const mx_hsvtorgb: typeof TSL.mx_hsvtorgb;
336
+ export const mx_ifequal: typeof TSL.mx_ifequal;
337
+ export const mx_ifgreater: typeof TSL.mx_ifgreater;
338
+ export const mx_ifgreatereq: typeof TSL.mx_ifgreatereq;
339
+ export const mx_invert: typeof TSL.mx_invert;
340
+ export const mx_modulo: typeof TSL.mx_modulo;
341
+ export const mx_multiply: typeof TSL.mx_multiply;
315
342
  export const mx_noise_float: typeof TSL.mx_noise_float;
316
343
  export const mx_noise_vec3: typeof TSL.mx_noise_vec3;
317
344
  export const mx_noise_vec4: typeof TSL.mx_noise_vec4;
345
+ export const mx_place2d: typeof TSL.mx_place2d;
346
+ export const mx_power: typeof TSL.mx_power;
347
+ export const mx_ramp4: typeof TSL.mx_ramp4;
318
348
  export const mx_ramplr: typeof TSL.mx_ramplr;
319
349
  export const mx_ramptb: typeof TSL.mx_ramptb;
320
350
  export const mx_rgbtohsv: typeof TSL.mx_rgbtohsv;
351
+ export const mx_rotate2d: typeof TSL.mx_rotate2d;
352
+ export const mx_rotate3d: typeof TSL.mx_rotate3d;
321
353
  export const mx_safepower: typeof TSL.mx_safepower;
354
+ export const mx_separate: typeof TSL.mx_separate;
322
355
  export const mx_splitlr: typeof TSL.mx_splitlr;
323
356
  export const mx_splittb: typeof TSL.mx_splittb;
324
357
  export const mx_srgb_texture_to_lin_rec709: typeof TSL.mx_srgb_texture_to_lin_rec709;
358
+ export const mx_subtract: typeof TSL.mx_subtract;
359
+ export const mx_timer: typeof TSL.mx_timer;
325
360
  export const mx_transform_uv: typeof TSL.mx_transform_uv;
361
+ export const mx_unifiednoise2d: typeof TSL.mx_unifiednoise2d;
362
+ export const mx_unifiednoise3d: typeof TSL.mx_unifiednoise3d;
326
363
  export const mx_worley_noise_float: typeof TSL.mx_worley_noise_float;
327
364
  export const mx_worley_noise_vec2: typeof TSL.mx_worley_noise_vec2;
328
365
  export const mx_worley_noise_vec3: typeof TSL.mx_worley_noise_vec3;
@@ -331,8 +368,10 @@ export const neutralToneMapping: typeof TSL.neutralToneMapping;
331
368
  export const nodeArray: typeof TSL.nodeArray;
332
369
  export const nodeImmutable: typeof TSL.nodeImmutable;
333
370
  export const nodeObject: typeof TSL.nodeObject;
371
+ export const nodeObjectIntent: typeof TSL.nodeObjectIntent;
334
372
  export const nodeObjects: typeof TSL.nodeObjects;
335
373
  export const nodeProxy: typeof TSL.nodeProxy;
374
+ export const nodeProxyIntent: typeof TSL.nodeProxyIntent;
336
375
  export const normalFlat: typeof TSL.normalFlat;
337
376
  export const normalGeometry: typeof TSL.normalGeometry;
338
377
  export const normalLocal: typeof TSL.normalLocal;
@@ -352,6 +391,8 @@ export const objectRadius: typeof TSL.objectRadius;
352
391
  export const objectScale: typeof TSL.objectScale;
353
392
  export const objectViewPosition: typeof TSL.objectViewPosition;
354
393
  export const objectWorldMatrix: typeof TSL.objectWorldMatrix;
394
+ export const OnObjectUpdate: typeof TSL.OnObjectUpdate;
395
+ export const OnMaterialUpdate: typeof TSL.OnMaterialUpdate;
355
396
  export const oneMinus: typeof TSL.oneMinus;
356
397
  export const or: typeof TSL.or;
357
398
  export const orthographicDepthToViewZ: typeof TSL.orthographicDepthToViewZ;
@@ -372,6 +413,7 @@ export const passTexture: typeof TSL.passTexture;
372
413
  export const pcurve: typeof TSL.pcurve;
373
414
  export const perspectiveDepthToViewZ: typeof TSL.perspectiveDepthToViewZ;
374
415
  export const pmremTexture: typeof TSL.pmremTexture;
416
+ export const pointShadow: typeof TSL.pointShadow;
375
417
  export const pointUV: typeof TSL.pointUV;
376
418
  export const pointWidth: typeof TSL.pointWidth;
377
419
  export const positionGeometry: typeof TSL.positionGeometry;
@@ -394,7 +436,6 @@ export const range: typeof TSL.range;
394
436
  export const rangeFog: typeof TSL.rangeFog;
395
437
  export const rangeFogFactor: typeof TSL.rangeFogFactor;
396
438
  export const reciprocal: typeof TSL.reciprocal;
397
- export const lightProjectionUV: typeof TSL.lightProjectionUV;
398
439
  export const reference: typeof TSL.reference;
399
440
  export const referenceBuffer: typeof TSL.referenceBuffer;
400
441
  export const reflect: typeof TSL.reflect;
@@ -430,12 +471,12 @@ export const scriptable: typeof TSL.scriptable;
430
471
  export const scriptableValue: typeof TSL.scriptableValue;
431
472
  export const select: typeof TSL.select;
432
473
  export const setCurrentStack: typeof TSL.setCurrentStack;
474
+ export const setName: typeof TSL.setName;
433
475
  export const shaderStages: typeof TSL.shaderStages;
434
476
  export const shadow: typeof TSL.shadow;
435
- export const pointShadow: typeof TSL.pointShadow;
436
477
  export const shadowPositionWorld: typeof TSL.shadowPositionWorld;
437
- export const sharedUniformGroup: typeof TSL.sharedUniformGroup;
438
478
  export const shapeCircle: typeof TSL.shapeCircle;
479
+ export const sharedUniformGroup: typeof TSL.sharedUniformGroup;
439
480
  export const sheen: typeof TSL.sheen;
440
481
  export const sheenRoughness: typeof TSL.sheenRoughness;
441
482
  export const shiftLeft: typeof TSL.shiftLeft;
@@ -455,6 +496,7 @@ export const spritesheetUV: typeof TSL.spritesheetUV;
455
496
  export const sqrt: typeof TSL.sqrt;
456
497
  export const stack: typeof TSL.stack;
457
498
  export const step: typeof TSL.step;
499
+ export const stepElement: typeof TSL.stepElement;
458
500
  export const storage: typeof TSL.storage;
459
501
  export const storageBarrier: typeof TSL.storageBarrier;
460
502
  export const storageObject: typeof TSL.storageObject;
@@ -502,8 +544,8 @@ export const triplanarTextures: typeof TSL.triplanarTextures;
502
544
  export const trunc: typeof TSL.trunc;
503
545
  export const uint: typeof TSL.uint;
504
546
  export const uniform: typeof TSL.uniform;
505
- export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
506
547
  export const uniformArray: typeof TSL.uniformArray;
548
+ export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
507
549
  export const uniformGroup: typeof TSL.uniformGroup;
508
550
  export const uniformTexture: typeof TSL.uniformTexture;
509
551
  export const unpremultiplyAlpha: typeof TSL.unpremultiplyAlpha;
@@ -512,7 +554,6 @@ export const uv: typeof TSL.uv;
512
554
  export const uvec2: typeof TSL.uvec2;
513
555
  export const uvec3: typeof TSL.uvec3;
514
556
  export const uvec4: typeof TSL.uvec4;
515
- export const Var: typeof TSL.Var;
516
557
  export const varying: typeof TSL.varying;
517
558
  export const varyingProperty: typeof TSL.varyingProperty;
518
559
  export const vec2: typeof TSL.vec2;
@@ -522,6 +563,7 @@ export const vectorComponents: typeof TSL.vectorComponents;
522
563
  export const velocity: typeof TSL.velocity;
523
564
  export const vertexColor: typeof TSL.vertexColor;
524
565
  export const vertexIndex: typeof TSL.vertexIndex;
566
+ export const vertexStage: typeof TSL.vertexStage;
525
567
  export const vibrance: typeof TSL.vibrance;
526
568
  export const viewZToLogarithmicDepth: typeof TSL.viewZToLogarithmicDepth;
527
569
  export const viewZToOrthographicDepth: typeof TSL.viewZToOrthographicDepth;
@@ -31,10 +31,15 @@ export class KeyframeTrack {
31
31
  *
32
32
  * @param {string} name - The keyframe track's name.
33
33
  * @param {Array<number>} times - A list of keyframe times.
34
- * @param {Array<number>} values - A list of keyframe values.
34
+ * @param {Array<number|string|boolean>} values - A list of keyframe values.
35
35
  * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
36
36
  */
37
- constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>, interpolation?: InterpolationModes);
37
+ constructor(
38
+ name: string,
39
+ times: ArrayLike<number>,
40
+ values: ArrayLike<number | string | boolean>,
41
+ interpolation?: InterpolationModes,
42
+ );
38
43
  /**
39
44
  * The track's name can refer to morph targets or bones or
40
45
  * possibly other values within an animated object. See {@link PropertyBinding#parseTrackName}
@@ -12,7 +12,7 @@ export class BooleanKeyframeTrack extends KeyframeTrack {
12
12
  *
13
13
  * @param {string} name - The keyframe track's name.
14
14
  * @param {Array<number>} times - A list of keyframe times.
15
- * @param {Array<number>} values - A list of keyframe values.
15
+ * @param {Array<boolean>} values - A list of keyframe values.
16
16
  */
17
- constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>);
17
+ constructor(name: string, times: ArrayLike<number>, values: ArrayLike<boolean>);
18
18
  }
@@ -12,7 +12,7 @@ export class StringKeyframeTrack extends KeyframeTrack {
12
12
  *
13
13
  * @param {string} name - The keyframe track's name.
14
14
  * @param {Array<number>} times - A list of keyframe times.
15
- * @param {Array<number>} values - A list of keyframe values.
15
+ * @param {Array<string>} values - A list of keyframe values.
16
16
  */
17
- constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>);
17
+ constructor(name: string, times: ArrayLike<number>, values: ArrayLike<string>);
18
18
  }
@@ -13,14 +13,6 @@ import { Vector4 } from "../math/Vector4.js";
13
13
  * @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/Camera.js | Source}
14
14
  */
15
15
  export class Camera extends Object3D {
16
- /**
17
- * @remarks
18
- * Note that this class is not intended to be called directly; you probably want a
19
- * {@link PerspectiveCamera | PerspectiveCamera} or
20
- * {@link OrthographicCamera | OrthographicCamera} instead.
21
- */
22
- constructor();
23
-
24
16
  /**
25
17
  * Read-only flag to check if a given object is of type {@link Camera}.
26
18
  * @remarks This is a _constant_ value
@@ -65,6 +57,21 @@ export class Camera extends Object3D {
65
57
 
66
58
  viewport?: Vector4;
67
59
 
60
+ /**
61
+ * @remarks
62
+ * Note that this class is not intended to be called directly; you probably want a
63
+ * {@link PerspectiveCamera | PerspectiveCamera} or
64
+ * {@link OrthographicCamera | OrthographicCamera} instead.
65
+ */
66
+ constructor();
67
+
68
+ /**
69
+ * The flag that indicates whether the camera uses a reversed depth buffer.
70
+ *
71
+ * @default false
72
+ */
73
+ get reversedDepth(): boolean;
74
+
68
75
  /**
69
76
  * Returns a {@link Vector3 | Vector3} representing the world space direction in which the {@link Camera} is looking.
70
77
  * @remarks Note: A {@link Camera} looks down its local, negative z-axis.
three/src/constants.d.ts CHANGED
@@ -774,7 +774,9 @@ export type GLSLVersion = typeof GLSL1 | typeof GLSL3;
774
774
 
775
775
  export const WebGLCoordinateSystem: 2000;
776
776
  export const WebGPUCoordinateSystem: 2001;
777
- export type CoordinateSystem = typeof WebGLCoordinateSystem | typeof WebGPUCoordinateSystem;
777
+ export type CoordinateSystem =
778
+ | typeof WebGLCoordinateSystem
779
+ | typeof WebGPUCoordinateSystem;
778
780
 
779
781
  export const TimestampQuery: {
780
782
  COMPUTE: "compute";
@@ -21,7 +21,7 @@
21
21
  *
22
22
  * @see https://threejs.org/examples/#webgl_morphtargets_sphere
23
23
  */
24
- export class Timer {
24
+ declare class Timer {
25
25
  constructor();
26
26
 
27
27
  /**
@@ -69,23 +69,9 @@ export class Timer {
69
69
  * Updates the internal state of the timer. This method should be called once per simulation step and before you
70
70
  * perform queries against the timer (e.g. via {@link getDelta()}).
71
71
  *
72
- * @param timescale (optional) The current time in milliseconds. Can be obtained from the {@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame | requestAnimationFrame} callback argument. If not provided, the current time will be determined with {@link https://developer.mozilla.org/en-US/docs/Web/API/Performance/now | performance.now}.
72
+ * @param timestamp The current time in milliseconds. Can be obtained from the {@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame | requestAnimationFrame} callback argument. If not provided, the current time will be determined with {@link https://developer.mozilla.org/en-US/docs/Web/API/Performance/now | performance.now}.
73
73
  */
74
74
  update(timestamp?: number): this;
75
75
  }
76
76
 
77
- /**
78
- * A timer that uses a fixed delta.
79
- */
80
- export class FixedTimer extends Timer {
81
- /**
82
- * @param fps The desired fixed delta expressed in frames per second.
83
- */
84
- constructor(fps?: number);
85
-
86
- /**
87
- * Updates the internal state of the timer. This method should be called once per simulation step and before you
88
- * perform queries against the timer (e.g. via {@link getDelta()}).
89
- */
90
- override update(): this;
91
- }
77
+ export { Timer };
@@ -1,4 +1,5 @@
1
1
  import { Object3D } from "../core/Object3D.js";
2
+ import { Color } from "../math/Color.js";
2
3
  import { Matrix4 } from "../math/Matrix4.js";
3
4
  import { Bone } from "../objects/Bone.js";
4
5
  import { LineSegments } from "../objects/LineSegments.js";
@@ -19,7 +20,7 @@ import { SkinnedMesh } from "../objects/SkinnedMesh.js";
19
20
  * @see {@link https://threejs.org/docs/index.html#api/en/helpers/SkeletonHelper | Official Documentation}
20
21
  * @see {@link https://github.com/mrdoob/three.js/blob/master/src/helpers/SkeletonHelper.js | Source}
21
22
  */
22
- export class SkeletonHelper extends LineSegments {
23
+ declare class SkeletonHelper extends LineSegments {
23
24
  /**
24
25
  * Create a new instance of {@link SkeletonHelper}
25
26
  * @param object Usually an instance of {@link THREE.SkinnedMesh | SkinnedMesh}.
@@ -42,20 +43,15 @@ export class SkeletonHelper extends LineSegments {
42
43
  */
43
44
  override readonly type: string | "SkeletonHelper";
44
45
 
45
- /**
46
- * The list of bones that the helper renders as {@link Line | Lines}.
47
- */
48
- bones: Bone[];
49
-
50
46
  /**
51
47
  * The object passed in the constructor.
52
48
  */
53
49
  root: SkinnedMesh | Object3D;
54
50
 
55
51
  /**
56
- * Reference to the {@link THREE.Object3D.matrixWorld | root.matrixWorld}.
52
+ * The list of bones that the helper renders as {@link Line | Lines}.
57
53
  */
58
- matrix: Matrix4;
54
+ bones: Bone[];
59
55
 
60
56
  /**
61
57
  * Is set to `false`, as the helper is using the {@link THREE.Object3D.matrixWorld | root.matrixWorld}.
@@ -64,10 +60,7 @@ export class SkeletonHelper extends LineSegments {
64
60
  */
65
61
  override matrixAutoUpdate: boolean;
66
62
 
67
- /**
68
- * Updates the helper.
69
- */
70
- update(): void;
63
+ setColors(color1: Color, color2: Color): this;
71
64
 
72
65
  /**
73
66
  * Frees the GPU-related resources allocated by this instance
@@ -76,3 +69,5 @@ export class SkeletonHelper extends LineSegments {
76
69
  */
77
70
  dispose(): void;
78
71
  }
72
+
73
+ export { SkeletonHelper };
@@ -14,6 +14,6 @@ export class FileLoader extends Loader<string | ArrayBuffer> {
14
14
  mimeType: string;
15
15
  responseType: string;
16
16
 
17
- setMimeType(mimeType: string): FileLoader;
18
- setResponseType(responseType: string): FileLoader;
17
+ setResponseType(value: string): this;
18
+ setMimeType(value: string): this;
19
19
  }