@types/three 0.181.0 → 0.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/DragControls.d.ts +1 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
- three/examples/jsm/controls/FlyControls.d.ts +1 -1
- three/examples/jsm/controls/OrbitControls.d.ts +1 -1
- three/examples/jsm/controls/PointerLockControls.d.ts +1 -1
- three/examples/jsm/controls/TrackballControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +1 -1
- three/examples/jsm/loaders/UltraHDRLoader.d.ts +7 -0
- three/examples/jsm/loaders/VOXLoader.d.ts +22 -5
- three/examples/jsm/math/Octree.d.ts +36 -14
- three/examples/jsm/objects/SkyMesh.d.ts +5 -0
- three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
- three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
- three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
- three/examples/jsm/transpiler/AST.d.ts +17 -0
- three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
- three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -1
- three/examples/jsm/tsl/display/SSSNode.d.ts +2 -0
- three/examples/jsm/tsl/display/TRAANode.d.ts +5 -0
- three/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
- three/package.json +3 -3
- three/src/Three.TSL.d.ts +14 -2
- three/src/animation/AnimationMixer.d.ts +42 -0
- three/src/animation/AnimationUtils.d.ts +3 -8
- three/src/constants.d.ts +14 -0
- three/src/core/BufferGeometry.d.ts +3 -1
- three/src/extras/Controls.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +10 -2
- three/src/lights/HemisphereLight.d.ts +8 -1
- three/src/lights/Light.d.ts +8 -12
- three/src/lights/LightProbe.d.ts +7 -3
- three/src/lights/PointLight.d.ts +12 -1
- three/src/lights/PointLightShadow.d.ts +1 -8
- three/src/lights/SpotLight.d.ts +17 -2
- three/src/materials/Material.d.ts +1 -0
- three/src/materials/ShaderMaterial.d.ts +18 -3
- three/src/materials/nodes/NodeMaterial.d.ts +7 -0
- three/src/nodes/TSL.d.ts +4 -1
- three/src/nodes/accessors/BufferAttributeNode.d.ts +13 -12
- three/src/nodes/accessors/InstanceNode.d.ts +7 -6
- three/src/nodes/accessors/Texture3DNode.d.ts +12 -0
- three/src/nodes/core/ContextNode.d.ts +19 -3
- three/src/nodes/core/NodeUtils.d.ts +1 -1
- three/src/nodes/core/PropertyNode.d.ts +2 -0
- three/src/nodes/display/NormalMapNode.d.ts +3 -1
- three/src/nodes/display/PassNode.d.ts +8 -0
- three/src/nodes/functions/BSDF/DFGLUT.d.ts +12 -0
- three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
- three/src/nodes/lighting/AnalyticLightNode.d.ts +2 -0
- three/src/nodes/lighting/PointShadowNode.d.ts +11 -15
- three/src/nodes/lighting/ShadowFilterNode.d.ts +2 -0
- three/src/nodes/math/BitcountNode.d.ts +21 -0
- three/src/nodes/math/PackFloatNode.d.ts +19 -0
- three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
- three/src/nodes/tsl/TSLCore.d.ts +18 -18
- three/src/nodes/utils/Packing.d.ts +1 -0
- three/src/nodes/utils/PostProcessingUtils.d.ts +2 -0
- three/src/nodes/utils/UVUtils.d.ts +3 -0
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +4 -2
- three/src/renderers/WebGLRenderer.d.ts +22 -4
- three/src/renderers/common/Binding.d.ts +6 -0
- three/src/renderers/common/Buffer.d.ts +24 -0
- three/src/renderers/common/ChainMap.d.ts +8 -1
- three/src/renderers/common/Geometries.d.ts +7 -0
- three/src/renderers/common/RenderContexts.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +6 -0
- three/src/renderers/common/Renderer.d.ts +24 -13
- three/src/renderers/common/UniformsGroup.d.ts +1 -0
- three/src/renderers/shaders/ShaderLib.d.ts +1 -1
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- three/src/renderers/webgl/WebGLPrograms.d.ts +0 -1
- three/src/textures/CubeDepthTexture.d.ts +41 -0
- three/src/textures/CubeTexture.d.ts +4 -4
- three/src/utils.d.ts +13 -1
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +0 -10
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:
|
|
11
|
+
* Last updated: Wed, 10 Dec 2025 22:36:27 GMT
|
|
12
12
|
* Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -130,7 +130,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
|
|
|
130
130
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
131
131
|
* @param scene The scene rendered by the camera. If not given, gizmos cannot be shown. (optional)
|
|
132
132
|
*/
|
|
133
|
-
constructor(camera: Camera, domElement?: HTMLElement | null, scene?: Scene | null);
|
|
133
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null, scene?: Scene | null);
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of
|
|
@@ -75,7 +75,7 @@ declare class DragControls extends Controls<DragControlsEventMap> {
|
|
|
75
75
|
* @param camera The camera of the rendered scene.
|
|
76
76
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
77
77
|
*/
|
|
78
|
-
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
|
|
78
|
+
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export { DragControls };
|
|
@@ -76,7 +76,7 @@ declare class FirstPersonControls extends Controls<{}> {
|
|
|
76
76
|
* @param object The camera to be controlled.
|
|
77
77
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
78
78
|
*/
|
|
79
|
-
constructor(object: Camera, domElement?: HTMLElement);
|
|
79
|
+
constructor(object: Camera, domElement?: HTMLElement | SVGElement);
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Should be called if the application window is resized.
|
|
@@ -38,7 +38,7 @@ declare class FlyControls extends Controls<FlyControlsEventMap> {
|
|
|
38
38
|
* @param object The camera to be controlled.
|
|
39
39
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
40
40
|
*/
|
|
41
|
-
constructor(object: Camera, domElement?: HTMLElement | null);
|
|
41
|
+
constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export { FlyControls };
|
|
@@ -206,7 +206,7 @@ declare class OrbitControls extends Controls<OrbitControlsEventMap> {
|
|
|
206
206
|
* is the scene itself.
|
|
207
207
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
208
208
|
*/
|
|
209
|
-
constructor(object: Camera, domElement?: HTMLElement | null);
|
|
209
|
+
constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* Get the current vertical rotation, in radians.
|
|
@@ -47,7 +47,7 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
|
|
|
47
47
|
* @param camera The camera of the rendered scene.
|
|
48
48
|
* @param domElement The HTML element used for event listeners.
|
|
49
49
|
*/
|
|
50
|
-
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
50
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Returns the look direction of the camera.
|
|
@@ -124,7 +124,7 @@ declare class TrackballControls extends Controls<TrackballControlsEventMap> {
|
|
|
124
124
|
* @param camera The camera of the rendered scene.
|
|
125
125
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
126
126
|
*/
|
|
127
|
-
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
127
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Should be called if the application window is resized.
|
|
@@ -163,7 +163,7 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
|
|
|
163
163
|
* @param camera The camera of the rendered scene.
|
|
164
164
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
165
165
|
*/
|
|
166
|
-
constructor(camera: Camera, domElement?: HTMLElement);
|
|
166
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Returns the visual representation of the controls. Add the helper to your scene to visually transform the
|
|
@@ -16,6 +16,13 @@ declare class UltraHDRLoader extends Loader<DataTexture> {
|
|
|
16
16
|
setDataType(value: TextureDataType): this;
|
|
17
17
|
|
|
18
18
|
parse(buffer: ArrayBuffer, onLoad: (texData: UltraHDRLoaderTextureData) => void): void;
|
|
19
|
+
|
|
20
|
+
load(
|
|
21
|
+
url: string,
|
|
22
|
+
onLoad: (data: DataTexture) => void,
|
|
23
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
24
|
+
onError?: (err: unknown) => void,
|
|
25
|
+
): DataTexture;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
export { UltraHDRLoader };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Data3DTexture, Loader, LoadingManager, Mesh } from "three";
|
|
1
|
+
import { BufferGeometry, Data3DTexture, Loader, LoadingManager, Mesh, MeshStandardMaterial, Object3D } from "three";
|
|
2
2
|
|
|
3
3
|
export interface Chunk {
|
|
4
4
|
palette: number[];
|
|
@@ -6,16 +6,33 @@ export interface Chunk {
|
|
|
6
6
|
data: Uint8Array;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export interface VOXLoaderResult {
|
|
10
|
+
chunks: Chunk[];
|
|
11
|
+
scene: Object3D;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class VOXLoader extends Loader<VOXLoaderResult> {
|
|
10
15
|
constructor(manager?: LoadingManager);
|
|
11
16
|
|
|
12
|
-
parse(data: ArrayBuffer):
|
|
17
|
+
parse(data: ArrayBuffer): VOXLoaderResult;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
declare function buildMesh(chunk: Chunk): Mesh<BufferGeometry, MeshStandardMaterial>;
|
|
21
|
+
|
|
22
|
+
declare function buildData3DTexture(chunk: Chunk): Data3DTexture;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use buildMesh() instead.
|
|
26
|
+
*/
|
|
27
|
+
declare class VOXMesh extends Mesh {
|
|
16
28
|
constructor(chunk: Chunk);
|
|
17
29
|
}
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use buildData3DTexture() instead.
|
|
33
|
+
*/
|
|
34
|
+
declare class VOXData3DTexture extends Data3DTexture {
|
|
20
35
|
constructor(chunk: Chunk);
|
|
21
36
|
}
|
|
37
|
+
|
|
38
|
+
export { buildData3DTexture, buildMesh, VOXData3DTexture, VOXLoader, VOXMesh };
|
|
@@ -1,32 +1,54 @@
|
|
|
1
|
-
import { Box3, Layers, Object3D, Ray, Sphere, Triangle } from "three";
|
|
1
|
+
import { Box3, Layers, Object3D, Ray, Sphere, Triangle, Vector3 } from "three";
|
|
2
2
|
|
|
3
3
|
import { Capsule } from "./Capsule.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
interface OctreeTriangleIntersection {
|
|
6
|
+
normal: Vector3;
|
|
7
|
+
point: Vector3;
|
|
8
|
+
depth: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface OctreeIntersection {
|
|
12
|
+
normal: Vector3;
|
|
13
|
+
depth: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface OctreeRayIntersection {
|
|
17
|
+
distance: number;
|
|
18
|
+
triangle: Triangle;
|
|
19
|
+
position: Vector3;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class Octree {
|
|
23
|
+
box: Box3 | undefined;
|
|
7
24
|
bounds: Box3;
|
|
8
25
|
|
|
9
|
-
subTrees: Octree[];
|
|
10
|
-
triangles: Triangle[];
|
|
11
26
|
layers: Layers;
|
|
12
|
-
|
|
13
27
|
trianglesPerLeaf: number;
|
|
14
28
|
maxLevel: number;
|
|
15
29
|
|
|
16
|
-
|
|
30
|
+
subTrees: Octree[];
|
|
31
|
+
triangles: Triangle[];
|
|
32
|
+
|
|
33
|
+
constructor(box?: Box3);
|
|
17
34
|
|
|
18
35
|
addTriangle(triangle: Triangle): this;
|
|
19
36
|
calcBox(): this;
|
|
20
37
|
split(level: number): this;
|
|
21
38
|
build(): this;
|
|
22
39
|
getRayTriangles(ray: Ray, triangles: Triangle[]): Triangle[];
|
|
23
|
-
triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle):
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle): OctreeTriangleIntersection | false;
|
|
41
|
+
triangleBoxIntersect(box: Box3, triangle: Triangle): OctreeTriangleIntersection | false;
|
|
42
|
+
triangleSphereIntersect(sphere: Sphere, triangle: Triangle): OctreeTriangleIntersection | false;
|
|
43
|
+
getSphereTriangles(sphere: Sphere, triangles: Triangle[]): void;
|
|
44
|
+
getBoxTriangles(box: Box3, triangles: Triangle[]): void;
|
|
45
|
+
getCapsuleTriangles(capsule: Capsule, triangles: Triangle[]): void;
|
|
46
|
+
boxIntersect(box: Box3): OctreeIntersection | false;
|
|
47
|
+
sphereIntersect(sphere: Sphere): OctreeIntersection | false;
|
|
48
|
+
capsuleIntersect(capsule: Capsule): OctreeIntersection | false;
|
|
49
|
+
rayIntersect(ray: Ray): OctreeRayIntersection | false;
|
|
30
50
|
fromGraphNode(group: Object3D): this;
|
|
31
51
|
clear(): this;
|
|
32
52
|
}
|
|
53
|
+
|
|
54
|
+
export { Octree };
|
|
@@ -8,8 +8,13 @@ declare class SkyMesh extends Mesh<BoxGeometry, NodeMaterial> {
|
|
|
8
8
|
sunPosition: UniformNode<Vector3>;
|
|
9
9
|
upUniform: UniformNode<Vector3>;
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
11
14
|
readonly isSky: true;
|
|
12
15
|
|
|
16
|
+
readonly isSkyMesh: true;
|
|
17
|
+
|
|
13
18
|
constructor();
|
|
14
19
|
}
|
|
15
20
|
|
|
@@ -2,7 +2,7 @@ import { Mesh, Object3D, Vector3 } from "three";
|
|
|
2
2
|
|
|
3
3
|
export interface AmmoPhysicsObject {
|
|
4
4
|
addScene: (scene: Object3D) => void;
|
|
5
|
-
addMesh: (mesh: Mesh, mass?: number) => void;
|
|
5
|
+
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
|
|
6
6
|
setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUniform, RawShaderMaterial } from "three";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Pass } from "./Pass.js";
|
|
4
|
+
|
|
5
|
+
declare class OutputPass extends Pass {
|
|
6
|
+
readonly isOutputPass: true;
|
|
7
|
+
|
|
8
|
+
uniforms: Record<string, IUniform>;
|
|
9
|
+
material: RawShaderMaterial;
|
|
4
10
|
|
|
5
|
-
export class OutputPass extends Pass {
|
|
6
11
|
constructor();
|
|
7
|
-
uniforms: object;
|
|
8
|
-
material: ShaderMaterial;
|
|
9
|
-
fsQuad: FullScreenQuad;
|
|
10
12
|
}
|
|
13
|
+
|
|
14
|
+
export { OutputPass };
|
|
@@ -2,15 +2,7 @@ import { Camera, Color, Material, Scene } from "three";
|
|
|
2
2
|
|
|
3
3
|
import { Pass } from "./Pass.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
constructor(
|
|
7
|
-
scene: Scene,
|
|
8
|
-
camera: Camera,
|
|
9
|
-
overrideMaterial?: Material | null,
|
|
10
|
-
clearColor?: Color | null,
|
|
11
|
-
clearAlpha?: number | null,
|
|
12
|
-
);
|
|
13
|
-
|
|
5
|
+
declare class RenderPass extends Pass {
|
|
14
6
|
scene: Scene;
|
|
15
7
|
camera: Camera;
|
|
16
8
|
|
|
@@ -18,6 +10,19 @@ export class RenderPass extends Pass {
|
|
|
18
10
|
|
|
19
11
|
clearColor: Color | null;
|
|
20
12
|
clearAlpha: number | null;
|
|
21
|
-
|
|
13
|
+
clear: boolean;
|
|
22
14
|
clearDepth: boolean;
|
|
15
|
+
needsSwap: boolean;
|
|
16
|
+
|
|
17
|
+
readonly isRenderPass: true;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
scene: Scene,
|
|
21
|
+
camera: Camera,
|
|
22
|
+
overrideMaterial?: Material | null,
|
|
23
|
+
clearColor?: Color | null,
|
|
24
|
+
clearAlpha?: number | null,
|
|
25
|
+
);
|
|
23
26
|
}
|
|
27
|
+
|
|
28
|
+
export { RenderPass };
|
|
@@ -41,6 +41,7 @@ export type Statement =
|
|
|
41
41
|
| While
|
|
42
42
|
| Switch
|
|
43
43
|
| SwitchCase
|
|
44
|
+
| StructMember
|
|
44
45
|
| null;
|
|
45
46
|
|
|
46
47
|
export class VariableDeclaration {
|
|
@@ -273,3 +274,19 @@ export class SwitchCase {
|
|
|
273
274
|
isDefault: boolean;
|
|
274
275
|
readonly isSwitchCase: true;
|
|
275
276
|
}
|
|
277
|
+
|
|
278
|
+
export class StructMember {
|
|
279
|
+
type: string;
|
|
280
|
+
name: string;
|
|
281
|
+
readonly isStructMember: true;
|
|
282
|
+
|
|
283
|
+
constructor(type: string, name: string);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export class StructDefinition {
|
|
287
|
+
name: string;
|
|
288
|
+
members: StructMember[];
|
|
289
|
+
readonly isStructDefinition: true;
|
|
290
|
+
|
|
291
|
+
constructor(name: string, members?: StructMember[]);
|
|
292
|
+
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
FunctionDeclaration,
|
|
7
7
|
Program,
|
|
8
8
|
Statement,
|
|
9
|
+
StructDefinition,
|
|
9
10
|
Switch,
|
|
10
11
|
Ternary,
|
|
11
12
|
Uniform,
|
|
@@ -38,6 +39,7 @@ export default class TSLEncoder {
|
|
|
38
39
|
emitWhile(node: While): string;
|
|
39
40
|
emitVariables(node: VariableDeclaration, isRoot?: boolean): string;
|
|
40
41
|
emitVarying(node: Varying): string;
|
|
42
|
+
emitStructDefinition(node: StructDefinition): string;
|
|
41
43
|
emitOverloadingFunction(nodes: FunctionDeclaration[]): string;
|
|
42
44
|
emitFunction(node: FunctionDeclaration): string;
|
|
43
45
|
setLastStatement(statement: Statement | null): void;
|
|
@@ -8,6 +8,11 @@ declare class TRAANode extends TempNode {
|
|
|
8
8
|
velocityNode: TextureNode;
|
|
9
9
|
camera: Camera;
|
|
10
10
|
|
|
11
|
+
depthThreshold: number;
|
|
12
|
+
edgeDepthDiff: number;
|
|
13
|
+
maxVelocityLength: number;
|
|
14
|
+
useSubpixelCorrection: boolean;
|
|
15
|
+
|
|
11
16
|
constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera);
|
|
12
17
|
}
|
|
13
18
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Node } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface RadialBlurOptions {
|
|
4
|
+
center?: Node | undefined;
|
|
5
|
+
weight?: Node | undefined;
|
|
6
|
+
decay?: Node | undefined;
|
|
7
|
+
count?: Node | undefined;
|
|
8
|
+
exposure?: Node | undefined;
|
|
9
|
+
premultipliedAlpha?: boolean | undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const radialBlur: (textureNode: Node, options?: RadialBlurOptions) => Node;
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.182.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"@dimforge/rapier3d-compat": "~0.12.0",
|
|
44
44
|
"@tweenjs/tween.js": "~23.1.3",
|
|
45
45
|
"@types/stats.js": "*",
|
|
46
|
-
"@types/webxr": "
|
|
46
|
+
"@types/webxr": ">=0.5.17",
|
|
47
47
|
"@webgpu/types": "*",
|
|
48
48
|
"fflate": "~0.8.2",
|
|
49
49
|
"meshoptimizer": "~0.22.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {},
|
|
52
|
-
"typesPublisherContentHash": "
|
|
52
|
+
"typesPublisherContentHash": "f3281b335e326a31ecce951778649efebdd62165c3fa47922257c4a8aebf0fa4",
|
|
53
53
|
"typeScriptVersion": "5.2"
|
|
54
54
|
}
|
three/src/Three.TSL.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const BasicShadowFilter: typeof TSL.BasicShadowFilter;
|
|
|
7
7
|
export const Break: typeof TSL.Break;
|
|
8
8
|
export const Const: typeof TSL.Const;
|
|
9
9
|
export const Continue: typeof TSL.Continue;
|
|
10
|
-
export const
|
|
10
|
+
export const DFGLUT: typeof TSL.DFGLUT;
|
|
11
11
|
export const D_GGX: typeof TSL.D_GGX;
|
|
12
12
|
export const Discard: typeof TSL.Discard;
|
|
13
13
|
export const EPSILON: typeof TSL.EPSILON;
|
|
@@ -100,6 +100,8 @@ export const bufferAttribute: typeof TSL.bufferAttribute;
|
|
|
100
100
|
export const bumpMap: typeof TSL.bumpMap;
|
|
101
101
|
export const burn: typeof TSL.burn;
|
|
102
102
|
export const builtin: typeof TSL.builtin;
|
|
103
|
+
export const builtinAOContext: typeof TSL.builtinAOContext;
|
|
104
|
+
export const builtinShadowContext: typeof TSL.builtinShadowContext;
|
|
103
105
|
export const bvec2: typeof TSL.bvec2;
|
|
104
106
|
export const bvec3: typeof TSL.bvec3;
|
|
105
107
|
export const bvec4: typeof TSL.bvec4;
|
|
@@ -136,11 +138,13 @@ export const context: typeof TSL.context;
|
|
|
136
138
|
export const convert: typeof TSL.convert;
|
|
137
139
|
export const convertColorSpace: typeof TSL.convertColorSpace;
|
|
138
140
|
export const convertToTexture: typeof TSL.convertToTexture;
|
|
141
|
+
export const countLeadingZeros: typeof TSL.countLeadingZeros;
|
|
142
|
+
export const countOneBits: typeof TSL.countOneBits;
|
|
143
|
+
export const countTrailingZeros: typeof TSL.countTrailingZeros;
|
|
139
144
|
export const cos: typeof TSL.cos;
|
|
140
145
|
export const cross: typeof TSL.cross;
|
|
141
146
|
export const cubeTexture: typeof TSL.cubeTexture;
|
|
142
147
|
export const cubeTextureBase: typeof TSL.cubeTextureBase;
|
|
143
|
-
export const cubeToUV: typeof TSL.cubeToUV;
|
|
144
148
|
export const dFdx: typeof TSL.dFdx;
|
|
145
149
|
export const dFdy: typeof TSL.dFdy;
|
|
146
150
|
export const dashSize: typeof TSL.dashSize;
|
|
@@ -199,6 +203,7 @@ export const getDistanceAttenuation: typeof TSL.getDistanceAttenuation;
|
|
|
199
203
|
export const getGeometryRoughness: typeof TSL.getGeometryRoughness;
|
|
200
204
|
export const getNormalFromDepth: typeof TSL.getNormalFromDepth;
|
|
201
205
|
export const interleavedGradientNoise: typeof TSL.interleavedGradientNoise;
|
|
206
|
+
export const vogelDiskSample: typeof TSL.vogelDiskSample;
|
|
202
207
|
export const getParallaxCorrectNormal: typeof TSL.getParallaxCorrectNormal;
|
|
203
208
|
export const getRoughness: typeof TSL.getRoughness;
|
|
204
209
|
export const getScreenPosition: typeof TSL.getScreenPosition;
|
|
@@ -414,6 +419,9 @@ export const output: typeof TSL.output;
|
|
|
414
419
|
export const outputStruct: typeof TSL.outputStruct;
|
|
415
420
|
export const overlay: typeof TSL.overlay;
|
|
416
421
|
export const overloadingFn: typeof TSL.overloadingFn;
|
|
422
|
+
export const packHalf2x16: typeof TSL.packHalf2x16;
|
|
423
|
+
export const packSnorm2x16: typeof TSL.packSnorm2x16;
|
|
424
|
+
export const packUnorm2x16: typeof TSL.packUnorm2x16;
|
|
417
425
|
export const parabola: typeof TSL.parabola;
|
|
418
426
|
export const parallaxDirection: typeof TSL.parallaxDirection;
|
|
419
427
|
export const parallaxUV: typeof TSL.parallaxUV;
|
|
@@ -461,6 +469,7 @@ export const remapClamp: typeof TSL.remapClamp;
|
|
|
461
469
|
export const renderGroup: typeof TSL.renderGroup;
|
|
462
470
|
export const renderOutput: typeof TSL.renderOutput;
|
|
463
471
|
export const rendererReference: typeof TSL.rendererReference;
|
|
472
|
+
export const replaceDefaultUV: typeof TSL.replaceDefaultUV;
|
|
464
473
|
export const rotate: typeof TSL.rotate;
|
|
465
474
|
export const rotateUV: typeof TSL.rotateUV;
|
|
466
475
|
export const roughness: typeof TSL.roughness;
|
|
@@ -579,6 +588,9 @@ export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
|
|
|
579
588
|
export const uniformGroup: typeof TSL.uniformGroup;
|
|
580
589
|
export const uniformFlow: typeof TSL.uniformFlow;
|
|
581
590
|
export const uniformTexture: typeof TSL.uniformTexture;
|
|
591
|
+
export const unpackHalf2x16: typeof TSL.unpackHalf2x16;
|
|
592
|
+
export const unpackSnorm2x16: typeof TSL.unpackSnorm2x16;
|
|
593
|
+
export const unpackUnorm2x16: typeof TSL.unpackUnorm2x16;
|
|
582
594
|
export const unpremultiplyAlpha: typeof TSL.unpremultiplyAlpha;
|
|
583
595
|
export const userData: typeof TSL.userData;
|
|
584
596
|
export const uv: typeof TSL.uv;
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import { AnimationBlendMode } from "../constants.js";
|
|
2
2
|
import { EventDispatcher } from "../core/EventDispatcher.js";
|
|
3
3
|
import { Object3D } from "../core/Object3D.js";
|
|
4
|
+
import { LinearInterpolant } from "../math/interpolants/LinearInterpolant.js";
|
|
4
5
|
import { AnimationAction } from "./AnimationAction.js";
|
|
5
6
|
import { AnimationClip } from "./AnimationClip.js";
|
|
6
7
|
import { AnimationObjectGroup } from "./AnimationObjectGroup.js";
|
|
8
|
+
import { PropertyMixer } from "./PropertyMixer.js";
|
|
7
9
|
|
|
8
10
|
export interface AnimationMixerEventMap {
|
|
9
11
|
loop: { action: AnimationAction; loopDelta: number };
|
|
10
12
|
finished: { action: AnimationAction; direction: number };
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
export interface MixerControlInterpolant extends LinearInterpolant {
|
|
16
|
+
__cacheIndex: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface AnimationMixerStats {
|
|
20
|
+
actions: {
|
|
21
|
+
readonly total: number;
|
|
22
|
+
readonly inUse: number;
|
|
23
|
+
};
|
|
24
|
+
bindings: {
|
|
25
|
+
readonly total: number;
|
|
26
|
+
readonly inUse: number;
|
|
27
|
+
};
|
|
28
|
+
controlInterpolants: {
|
|
29
|
+
readonly total: number;
|
|
30
|
+
readonly inUse: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
13
34
|
/**
|
|
14
35
|
* `AnimationMixer` is a player for animations on a particular object in
|
|
15
36
|
* the scene. When multiple objects in the scene are animated independently,
|
|
@@ -28,6 +49,23 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
28
49
|
* @default 0
|
|
29
50
|
*/
|
|
30
51
|
time: number;
|
|
52
|
+
protected _root: Object3D | AnimationObjectGroup;
|
|
53
|
+
protected _actions: AnimationAction[];
|
|
54
|
+
protected _nActiveActions: number;
|
|
55
|
+
protected _bindings: PropertyMixer[];
|
|
56
|
+
protected _nActiveBindings: number;
|
|
57
|
+
protected _controlInterpolants: MixerControlInterpolant[];
|
|
58
|
+
protected _nActiveControlInterpolants: number;
|
|
59
|
+
protected _bindingsByRootAndName: {
|
|
60
|
+
[rootUuid: string]: { [trackName: string]: PropertyMixer };
|
|
61
|
+
};
|
|
62
|
+
protected _actionsByClip: {
|
|
63
|
+
[clipUuid: string]: {
|
|
64
|
+
knownActions: AnimationAction[];
|
|
65
|
+
actionByRoot: { [rootUuid: string]: AnimationAction };
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
protected _accuIndex: number;
|
|
31
69
|
/**
|
|
32
70
|
* A scaling factor for the global time.
|
|
33
71
|
*
|
|
@@ -38,6 +76,10 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
38
76
|
* @default 1
|
|
39
77
|
*/
|
|
40
78
|
timeScale: number;
|
|
79
|
+
/**
|
|
80
|
+
* The AnimationMixer stats track the actions of the mixer.
|
|
81
|
+
*/
|
|
82
|
+
stats: AnimationMixerStats;
|
|
41
83
|
/**
|
|
42
84
|
* Returns an instance of {@link AnimationAction} for the passed clip.
|
|
43
85
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypedArray, TypedArrayConstructor } from "../core/BufferAttribute.js";
|
|
2
|
+
import { isTypedArray } from "../utils.js";
|
|
2
3
|
import { AnimationClip } from "./AnimationClip.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -8,14 +9,7 @@ import { AnimationClip } from "./AnimationClip.js";
|
|
|
8
9
|
* @param {TypedArray.constructor} type - The constructor of a typed array that defines the new type.
|
|
9
10
|
* @return {TypedArray} The converted array.
|
|
10
11
|
*/
|
|
11
|
-
export function convertArray(array: TypedArray | number[], type: TypedArrayConstructor): TypedArray
|
|
12
|
-
/**
|
|
13
|
-
* Returns `true` if the given object is a typed array.
|
|
14
|
-
*
|
|
15
|
-
* @param {any} object - The object to check.
|
|
16
|
-
* @return {boolean} Whether the given object is a typed array.
|
|
17
|
-
*/
|
|
18
|
-
export function isTypedArray(object: unknown): boolean;
|
|
12
|
+
export function convertArray(array: TypedArray | number[], type: TypedArrayConstructor): TypedArray;
|
|
19
13
|
/**
|
|
20
14
|
* Returns an array by which times and values can be sorted.
|
|
21
15
|
*
|
|
@@ -169,3 +163,4 @@ export class AnimationUtils {
|
|
|
169
163
|
fps?: number,
|
|
170
164
|
): AnimationClip;
|
|
171
165
|
}
|
|
166
|
+
export { isTypedArray };
|
three/src/constants.d.ts
CHANGED
|
@@ -508,6 +508,11 @@ export const RGB_ETC2_Format: 37492;
|
|
|
508
508
|
*/
|
|
509
509
|
export const RGBA_ETC2_EAC_Format: 37496;
|
|
510
510
|
|
|
511
|
+
export const R11_EAC_Format: 37488;
|
|
512
|
+
export const SIGNED_R11_EAC_Format: 37489;
|
|
513
|
+
export const RG11_EAC_Format: 37490;
|
|
514
|
+
export const SIGNED_RG11_EAC_Format: 37491;
|
|
515
|
+
|
|
511
516
|
// ASTC compressed texture formats
|
|
512
517
|
|
|
513
518
|
/**
|
|
@@ -598,6 +603,10 @@ export type CompressedPixelFormat =
|
|
|
598
603
|
| typeof RGB_ETC1_Format
|
|
599
604
|
| typeof RGB_ETC2_Format
|
|
600
605
|
| typeof RGBA_ETC2_EAC_Format
|
|
606
|
+
| typeof R11_EAC_Format
|
|
607
|
+
| typeof SIGNED_R11_EAC_Format
|
|
608
|
+
| typeof RG11_EAC_Format
|
|
609
|
+
| typeof SIGNED_RG11_EAC_Format
|
|
601
610
|
| typeof RGBA_ASTC_4x4_Format
|
|
602
611
|
| typeof RGBA_ASTC_5x4_Format
|
|
603
612
|
| typeof RGBA_ASTC_5x5_Format
|
|
@@ -693,6 +702,11 @@ export const LinearTransfer: "linear";
|
|
|
693
702
|
export const SRGBTransfer: "srgb";
|
|
694
703
|
export type ColorSpaceTransfer = typeof LinearTransfer | typeof SRGBTransfer;
|
|
695
704
|
|
|
705
|
+
export const NoNormalPacking: "";
|
|
706
|
+
export const NormalRGPacking: "rg";
|
|
707
|
+
export const NormalGAPacking: "ga";
|
|
708
|
+
export type NormalPacking = typeof NoNormalPacking | typeof NormalRGPacking | typeof NormalGAPacking;
|
|
709
|
+
|
|
696
710
|
// Stencil Op types
|
|
697
711
|
export const ZeroStencilOp: 0;
|
|
698
712
|
export const KeepStencilOp: 7680;
|
|
@@ -163,6 +163,8 @@ export class BufferGeometry<
|
|
|
163
163
|
|
|
164
164
|
indirect: IndirectStorageBufferAttribute | null;
|
|
165
165
|
|
|
166
|
+
indirectOffset: number | number[];
|
|
167
|
+
|
|
166
168
|
/**
|
|
167
169
|
* This hashmap has as id the name of the attribute to be set and as value the {@link THREE.BufferAttribute | buffer} to set it to. Rather than accessing this property directly,
|
|
168
170
|
* use {@link setAttribute | .setAttribute} and {@link getAttribute | .getAttribute} to access attributes of this geometry.
|
|
@@ -243,7 +245,7 @@ export class BufferGeometry<
|
|
|
243
245
|
*/
|
|
244
246
|
setIndex(index: BufferAttribute | number[] | null): this;
|
|
245
247
|
|
|
246
|
-
setIndirect(indirect: IndirectStorageBufferAttribute | null): this;
|
|
248
|
+
setIndirect(indirect: IndirectStorageBufferAttribute | null, indirectOffset?: number | number[]): this;
|
|
247
249
|
|
|
248
250
|
getIndirect(): IndirectStorageBufferAttribute | null;
|
|
249
251
|
|
three/src/extras/Controls.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TE
|
|
|
14
14
|
* The HTML element used for event listeners. If not provided via the constructor, {@link .connect} must be called
|
|
15
15
|
* after `domElement` has been set.
|
|
16
16
|
*/
|
|
17
|
-
domElement: HTMLElement | null;
|
|
17
|
+
domElement: HTMLElement | SVGElement | null;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* When set to `false`, the controls will not respond to user input. Default is `true`.
|
|
@@ -26,13 +26,13 @@ declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TE
|
|
|
26
26
|
* @param object The object the controls should manage (usually the camera).
|
|
27
27
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
28
28
|
*/
|
|
29
|
-
constructor(object: Object3D, domElement?: HTMLElement | null);
|
|
29
|
+
constructor(object: Object3D, domElement?: HTMLElement | SVGElement | null);
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Connects the controls to the DOM. This method has so called "side effects" since it adds the module's event
|
|
33
33
|
* listeners to the DOM.
|
|
34
34
|
*/
|
|
35
|
-
connect(element: HTMLElement): void;
|
|
35
|
+
connect(element: HTMLElement | SVGElement): void;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Disconnects the controls from the DOM.
|