@types/three 0.174.0 → 0.176.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 +2 -2
- three/examples/jsm/Addons.d.ts +1 -1
- three/examples/jsm/controls/PointerLockControls.d.ts +4 -1
- three/examples/jsm/geometries/ParametricFunctions.d.ts +8 -0
- three/examples/jsm/helpers/RapierHelper.d.ts +13 -0
- three/examples/jsm/interactive/HTMLMesh.d.ts +9 -2
- three/examples/jsm/loaders/LUTImageLoader.d.ts +2 -2
- three/examples/jsm/loaders/LottieLoader.d.ts +4 -0
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +12 -0
- three/examples/jsm/postprocessing/BokehPass.d.ts +2 -2
- three/examples/jsm/postprocessing/HalftonePass.d.ts +1 -1
- three/examples/jsm/postprocessing/LUTPass.d.ts +1 -1
- three/examples/jsm/postprocessing/SMAAPass.d.ts +1 -1
- three/examples/jsm/transpiler/AST.d.ts +218 -1
- three/examples/jsm/transpiler/TSLEncoder.d.ts +35 -1
- three/examples/jsm/tsl/shadows/TileShadowNode.d.ts +14 -0
- three/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts +14 -0
- three/examples/jsm/webxr/VRButton.d.ts +4 -2
- three/package.json +4 -3
- three/src/Three.Core.d.ts +2 -0
- three/src/Three.TSL.d.ts +11 -1
- three/src/animation/AnimationAction.d.ts +219 -19
- three/src/animation/AnimationClip.d.ts +140 -28
- three/src/animation/AnimationMixer.d.ts +100 -8
- three/src/animation/AnimationObjectGroup.d.ts +55 -14
- three/src/animation/AnimationUtils.d.ts +154 -43
- three/src/animation/KeyframeTrack.d.ts +134 -25
- three/src/animation/PropertyBinding.d.ts +89 -31
- three/src/animation/PropertyMixer.d.ts +62 -5
- three/src/animation/tracks/BooleanKeyframeTrack.d.ts +12 -4
- three/src/animation/tracks/ColorKeyframeTrack.d.ts +10 -4
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +10 -4
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +10 -4
- three/src/animation/tracks/StringKeyframeTrack.d.ts +12 -4
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +10 -4
- three/src/audio/AudioListener.d.ts +1 -1
- three/src/cameras/ArrayCamera.d.ts +5 -0
- three/src/constants.d.ts +18 -17
- three/src/core/BufferAttribute.d.ts +11 -0
- three/src/core/BufferGeometry.d.ts +1 -3
- three/src/core/RenderTarget.d.ts +9 -0
- three/src/extras/Controls.d.ts +1 -1
- three/src/extras/Earcut.d.ts +5 -3
- three/src/extras/ImageUtils.d.ts +1 -0
- three/src/geometries/CapsuleGeometry.d.ts +10 -3
- three/src/lights/LightShadow.d.ts +8 -0
- three/src/lights/PointLight.d.ts +1 -1
- three/src/loaders/FileLoader.d.ts +2 -2
- three/src/loaders/LoaderUtils.d.ts +0 -5
- three/src/materials/Material.d.ts +6 -8
- three/src/materials/ShaderMaterial.d.ts +1 -1
- three/src/materials/nodes/NodeMaterial.d.ts +10 -2
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +8 -0
- three/src/math/FrustumArray.d.ts +27 -0
- three/src/nodes/Nodes.d.ts +1 -0
- three/src/nodes/TSL.d.ts +1 -0
- three/src/nodes/accessors/BufferAttributeNode.d.ts +11 -4
- three/src/nodes/accessors/InstanceNode.d.ts +2 -3
- three/src/nodes/accessors/Object3DNode.d.ts +6 -6
- three/src/nodes/accessors/SkinningNode.d.ts +4 -3
- three/src/nodes/accessors/StorageTextureNode.d.ts +2 -2
- three/src/nodes/accessors/TextureNode.d.ts +3 -1
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
- three/src/nodes/code/ExpressionNode.d.ts +3 -2
- three/src/nodes/code/ScriptableNode.d.ts +1 -1
- three/src/nodes/code/ScriptableValueNode.d.ts +1 -1
- three/src/nodes/core/Node.d.ts +8 -5
- three/src/nodes/core/NodeVarying.d.ts +11 -1
- three/src/nodes/core/StackNode.d.ts +7 -1
- three/src/nodes/core/StructTypeNode.d.ts +1 -1
- three/src/nodes/core/VaryingNode.d.ts +6 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +3 -14
- three/src/nodes/lighting/ShadowFilterNode.d.ts +28 -0
- three/src/nodes/lighting/ShadowNode.d.ts +26 -24
- three/src/nodes/math/ConditionalNode.d.ts +4 -4
- three/src/nodes/math/MathNode.d.ts +20 -12
- three/src/nodes/math/OperatorNode.d.ts +65 -25
- three/src/nodes/tsl/TSLBase.d.ts +1 -0
- three/src/nodes/tsl/TSLCore.d.ts +34 -26
- three/src/nodes/utils/DebugNode.d.ts +21 -0
- three/src/nodes/utils/ReflectorNode.d.ts +1 -1
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +2 -2
- three/src/renderers/common/Animation.d.ts +4 -4
- three/src/renderers/common/Attributes.d.ts +1 -1
- three/src/renderers/common/Color4.d.ts +1 -1
- three/src/renderers/common/CubeRenderTarget.d.ts +6 -0
- three/src/renderers/common/RenderList.d.ts +2 -2
- three/src/renderers/common/RenderObject.d.ts +1 -1
- three/src/renderers/common/RenderObjects.d.ts +2 -2
- three/src/renderers/common/Renderer.d.ts +55 -27
- three/src/renderers/common/Textures.d.ts +0 -7
- three/src/renderers/common/TimestampQueryPool.d.ts +1 -0
- three/src/renderers/common/XRManager.d.ts +79 -4
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -3
- three/src/renderers/webgpu/WebGPUBackend.d.ts +1 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
- three/src/textures/CanvasTexture.d.ts +1 -1
- three/src/textures/DepthArrayTexture.d.ts +14 -0
- three/src/textures/Texture.d.ts +8 -1
- three/src/textures/VideoFrameTexture.d.ts +1 -1
- three/examples/jsm/geometries/ParametricGeometries.d.ts +0 -32
three/README.md
CHANGED
|
@@ -8,8 +8,8 @@ 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: Thu,
|
|
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)
|
|
11
|
+
* Last updated: Thu, 24 Apr 2025 08:02:30 GMT
|
|
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
|
|
15
15
|
These definitions were written by [Josh Ellis](https://github.com/joshuaellis), and [Nathan Bierema](https://github.com/Methuselah96).
|
three/examples/jsm/Addons.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export * from "./exporters/USDZExporter.js";
|
|
|
46
46
|
export * from "./geometries/BoxLineGeometry.js";
|
|
47
47
|
export * from "./geometries/ConvexGeometry.js";
|
|
48
48
|
export * from "./geometries/DecalGeometry.js";
|
|
49
|
-
export * from "./geometries/
|
|
49
|
+
export * from "./geometries/ParametricFunctions.js";
|
|
50
50
|
export * from "./geometries/ParametricGeometry.js";
|
|
51
51
|
export * from "./geometries/RoundedBoxGeometry.js";
|
|
52
52
|
export * from "./geometries/TeapotGeometry.js";
|
|
@@ -74,8 +74,11 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Activates the pointer lock.
|
|
77
|
+
*
|
|
78
|
+
* @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead.
|
|
79
|
+
* Setting it to true will disable mouse acceleration.
|
|
77
80
|
*/
|
|
78
|
-
lock(): void;
|
|
81
|
+
lock(unadjustedMovement?: boolean): void;
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
84
|
* Exits the pointer lock.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Vector3 } from "three";
|
|
2
|
+
|
|
3
|
+
declare function klein(v: number, u: number, target: Vector3): void;
|
|
4
|
+
declare function plane(u: number, v: number, target: Vector3): void;
|
|
5
|
+
declare function mobius(u: number, t: number, target: Vector3): void;
|
|
6
|
+
declare function mobius3d(u: number, t: number, target: Vector3): void;
|
|
7
|
+
|
|
8
|
+
export { klein, mobius, mobius3d, plane };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as RAPIER from "@dimforge/rapier3d-compat";
|
|
2
|
+
import { LineSegments } from "three";
|
|
3
|
+
|
|
4
|
+
declare class RapierHelper extends LineSegments {
|
|
5
|
+
world: RAPIER.World;
|
|
6
|
+
|
|
7
|
+
constructor(world: RAPIER.World);
|
|
8
|
+
|
|
9
|
+
update(): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { RapierHelper };
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { Mesh, MeshBasicMaterial, PlaneGeometry } from "three";
|
|
1
|
+
import { Mesh, MeshBasicMaterial, Object3DEventMap, PlaneGeometry } from "three";
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface HTMLMeshEventMap extends Object3DEventMap {
|
|
4
|
+
mousedown: { data: { x: number; y: number } };
|
|
5
|
+
mousemove: { data: { x: number; y: number } };
|
|
6
|
+
mouseup: { data: { x: number; y: number } };
|
|
7
|
+
click: { data: { x: number; y: number } };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class HTMLMesh extends Mesh<PlaneGeometry, MeshBasicMaterial, HTMLMeshEventMap> {
|
|
4
11
|
constructor(dom: HTMLElement);
|
|
5
12
|
dispose(): void;
|
|
6
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Data3DTexture, Loader, Texture } from "three";
|
|
1
|
+
import { Data3DTexture, Loader, LoadingManager, Texture } from "three";
|
|
2
2
|
|
|
3
3
|
export interface LUTImageResult {
|
|
4
4
|
size: number;
|
|
@@ -8,7 +8,7 @@ export interface LUTImageResult {
|
|
|
8
8
|
export class LUTImageLoader extends Loader<LUTImageResult> {
|
|
9
9
|
flip: boolean;
|
|
10
10
|
|
|
11
|
-
constructor(
|
|
11
|
+
constructor(manager?: LoadingManager);
|
|
12
12
|
|
|
13
13
|
getImageData(texture: Texture): ImageData;
|
|
14
14
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CanvasTexture, Loader, LoadingManager } from "three";
|
|
2
2
|
|
|
3
3
|
export class LottieLoader extends Loader<CanvasTexture> {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated The loader has been deprecated and will be removed with r186. Use lottie-web instead and create your
|
|
6
|
+
* animated texture manually.
|
|
7
|
+
*/
|
|
4
8
|
constructor(manager?: LoadingManager);
|
|
5
9
|
|
|
6
10
|
load(
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
import * as RAPIER from "@dimforge/rapier3d-compat";
|
|
1
2
|
import { Mesh, Object3D } from "three";
|
|
2
3
|
|
|
3
4
|
type Vector = { x: number; y: number; z: number };
|
|
4
5
|
|
|
5
6
|
export interface RapierPhysicsObject {
|
|
7
|
+
RAPIER: typeof RAPIER;
|
|
8
|
+
world: RAPIER.World;
|
|
6
9
|
addScene: (scene: Object3D) => void;
|
|
7
10
|
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
|
|
8
11
|
setMeshPosition: (mesh: Mesh, position: Vector, index?: number) => void;
|
|
9
12
|
setMeshVelocity: (mesh: Mesh, velocity: Vector, index?: number) => void;
|
|
13
|
+
addHeightfield: (
|
|
14
|
+
mesh: Mesh,
|
|
15
|
+
width: number,
|
|
16
|
+
depth: number,
|
|
17
|
+
heights: Float32Array,
|
|
18
|
+
scale: Vector,
|
|
19
|
+
) => RAPIER.RigidBody;
|
|
10
20
|
}
|
|
11
21
|
|
|
12
22
|
export function RapierPhysics(): Promise<RapierPhysicsObject>;
|
|
23
|
+
|
|
24
|
+
export type RAPIER = typeof RAPIER;
|
|
@@ -2,7 +2,7 @@ import { Camera, Color, MeshDepthMaterial, Scene, ShaderMaterial, WebGLRenderTar
|
|
|
2
2
|
|
|
3
3
|
import { FullScreenQuad, Pass } from "./Pass.js";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface BokehPassParameters {
|
|
6
6
|
focus?: number;
|
|
7
7
|
aspect?: number;
|
|
8
8
|
aperture?: number;
|
|
@@ -10,7 +10,7 @@ export interface BokehPassParamters {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export class BokehPass extends Pass {
|
|
13
|
-
constructor(scene: Scene, camera: Camera, params:
|
|
13
|
+
constructor(scene: Scene, camera: Camera, params: BokehPassParameters);
|
|
14
14
|
scene: Scene;
|
|
15
15
|
camera: Camera;
|
|
16
16
|
renderTargetColor: WebGLRenderTarget;
|
|
@@ -16,7 +16,7 @@ export interface HalftonePassParameters {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export class HalftonePass extends Pass {
|
|
19
|
-
constructor(
|
|
19
|
+
constructor(params: HalftonePassParameters);
|
|
20
20
|
uniforms: {
|
|
21
21
|
tDiffuse: IUniform;
|
|
22
22
|
shape: IUniform<number>;
|
|
@@ -3,7 +3,7 @@ import { ShaderMaterial, Texture, WebGLRenderTarget } from "three";
|
|
|
3
3
|
import { FullScreenQuad, Pass } from "./Pass.js";
|
|
4
4
|
|
|
5
5
|
export class SMAAPass extends Pass {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor();
|
|
7
7
|
edgesRT: WebGLRenderTarget;
|
|
8
8
|
weightsRT: WebGLRenderTarget;
|
|
9
9
|
areaTexture: Texture;
|
|
@@ -1,7 +1,224 @@
|
|
|
1
1
|
export class Program {
|
|
2
|
-
|
|
2
|
+
constructor();
|
|
3
|
+
|
|
4
|
+
body: Statement[];
|
|
3
5
|
|
|
4
6
|
isProgram: true;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Boolean seems to be handled as a Unary
|
|
10
|
+
export type Statement =
|
|
11
|
+
| VariableDeclaration
|
|
12
|
+
| Uniform
|
|
13
|
+
| Varying
|
|
14
|
+
| FunctionParameter
|
|
15
|
+
| FunctionDeclaration
|
|
16
|
+
| Expression
|
|
17
|
+
| Ternary
|
|
18
|
+
| Operator
|
|
19
|
+
| Unary
|
|
20
|
+
| Number
|
|
21
|
+
| String
|
|
22
|
+
| Conditional
|
|
23
|
+
| FunctionCall
|
|
24
|
+
| Return
|
|
25
|
+
| Discard
|
|
26
|
+
| Accessor
|
|
27
|
+
| StaticElement
|
|
28
|
+
| DynamicElement
|
|
29
|
+
| AccessorElements
|
|
30
|
+
| For
|
|
31
|
+
| null;
|
|
32
|
+
|
|
33
|
+
export class VariableDeclaration {
|
|
34
|
+
constructor(
|
|
35
|
+
type: string,
|
|
36
|
+
name: string,
|
|
37
|
+
value?: Accessor | null,
|
|
38
|
+
next?: VariableDeclaration | null,
|
|
39
|
+
immutable?: boolean,
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
type: string;
|
|
43
|
+
name: string;
|
|
44
|
+
value: Accessor | null;
|
|
45
|
+
next: VariableDeclaration | null;
|
|
46
|
+
|
|
47
|
+
immutable: boolean;
|
|
48
|
+
|
|
49
|
+
isVariableDeclaration: true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export class Uniform {
|
|
53
|
+
constructor(type: string, name: string);
|
|
54
|
+
|
|
55
|
+
type: string;
|
|
56
|
+
name: string;
|
|
57
|
+
|
|
58
|
+
isUniform: true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class Varying {
|
|
62
|
+
constructor(type: string, name: string);
|
|
63
|
+
|
|
64
|
+
type: string;
|
|
65
|
+
name: string;
|
|
66
|
+
|
|
67
|
+
isVarying: true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export class FunctionParameter {
|
|
71
|
+
constructor(type: string, name: string, qualifier?: string | null, immutable?: boolean);
|
|
72
|
+
|
|
73
|
+
type: string;
|
|
74
|
+
name: string;
|
|
75
|
+
qualifier: string | null;
|
|
76
|
+
immutable: boolean;
|
|
77
|
+
|
|
78
|
+
isFunctionParameter: true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export class FunctionDeclaration {
|
|
82
|
+
constructor(type: string, name: string, params?: FunctionParameter[]);
|
|
83
|
+
|
|
84
|
+
type: string;
|
|
85
|
+
name: string;
|
|
86
|
+
params: FunctionParameter[];
|
|
87
|
+
body: Statement[];
|
|
88
|
+
|
|
89
|
+
isFunctionDeclaration: true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class Expression {
|
|
93
|
+
constructor(expression: string);
|
|
94
|
+
|
|
95
|
+
expression: string;
|
|
96
|
+
|
|
97
|
+
isExpression: true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export class Ternary {
|
|
101
|
+
constructor(cond: Statement, left: Statement, right: Statement);
|
|
102
|
+
|
|
103
|
+
cond: Statement;
|
|
104
|
+
left: Statement;
|
|
105
|
+
right: Statement;
|
|
106
|
+
|
|
107
|
+
isTernary: true;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export class Operator {
|
|
111
|
+
constructor(type: string, left: Statement, right: Statement);
|
|
112
|
+
|
|
113
|
+
type: string;
|
|
114
|
+
left: Statement;
|
|
115
|
+
right: Statement;
|
|
116
|
+
|
|
117
|
+
isOperator: true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export class Unary {
|
|
121
|
+
constructor(type: string, expression: Statement, after?: boolean);
|
|
122
|
+
|
|
123
|
+
type: string;
|
|
124
|
+
expression: Statement;
|
|
125
|
+
after: boolean;
|
|
126
|
+
|
|
127
|
+
isUnary: true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export class Number {
|
|
131
|
+
constructor(value: string, type?: string);
|
|
5
132
|
|
|
133
|
+
type: string;
|
|
134
|
+
value: string;
|
|
135
|
+
|
|
136
|
+
isNumber: true;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export class String {
|
|
140
|
+
constructor(value: string);
|
|
141
|
+
|
|
142
|
+
value: string;
|
|
143
|
+
|
|
144
|
+
isString: true;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export class Conditional {
|
|
148
|
+
constructor(cond?: Conditional | null);
|
|
149
|
+
|
|
150
|
+
cond: Conditional | null;
|
|
151
|
+
|
|
152
|
+
body: Statement[];
|
|
153
|
+
elseConditional: Conditional | null;
|
|
154
|
+
|
|
155
|
+
isConditional: true;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export class FunctionCall {
|
|
159
|
+
constructor(name: string, params?: Statement[]);
|
|
160
|
+
|
|
161
|
+
name: string;
|
|
162
|
+
params: Statement[];
|
|
163
|
+
|
|
164
|
+
isFunctionCall: true;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export class Return {
|
|
168
|
+
constructor(value: Statement);
|
|
169
|
+
|
|
170
|
+
value: Statement;
|
|
171
|
+
|
|
172
|
+
isReturn: true;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export class Discard {
|
|
6
176
|
constructor();
|
|
177
|
+
|
|
178
|
+
isDiscard: true;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export class Accessor {
|
|
182
|
+
constructor(property: string);
|
|
183
|
+
|
|
184
|
+
property: string;
|
|
185
|
+
|
|
186
|
+
isAccessor: true;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export class StaticElement {
|
|
190
|
+
constructor(value: Statement);
|
|
191
|
+
|
|
192
|
+
value: Statement;
|
|
193
|
+
|
|
194
|
+
isStaticElement: true;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export class DynamicElement {
|
|
198
|
+
constructor(value: Statement);
|
|
199
|
+
|
|
200
|
+
value: Statement;
|
|
201
|
+
|
|
202
|
+
isDynamicElement: true;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export class AccessorElements {
|
|
206
|
+
constructor(object: FunctionCall | Accessor, elements?: (StaticElement | DynamicElement)[]);
|
|
207
|
+
|
|
208
|
+
object: FunctionCall | Accessor;
|
|
209
|
+
elements: (StaticElement | DynamicElement)[];
|
|
210
|
+
|
|
211
|
+
isAccessorElements: true;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export class For {
|
|
215
|
+
constructor(initialization: Statement, condition: Statement, afterthought: Statement);
|
|
216
|
+
|
|
217
|
+
initialization: Statement;
|
|
218
|
+
condition: Statement;
|
|
219
|
+
afterthought: Statement;
|
|
220
|
+
|
|
221
|
+
body: Statement[];
|
|
222
|
+
|
|
223
|
+
isFor: true;
|
|
7
224
|
}
|
|
@@ -1,7 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Conditional,
|
|
3
|
+
Expression,
|
|
4
|
+
For,
|
|
5
|
+
FunctionDeclaration,
|
|
6
|
+
Program,
|
|
7
|
+
Statement,
|
|
8
|
+
Ternary,
|
|
9
|
+
Uniform,
|
|
10
|
+
VariableDeclaration,
|
|
11
|
+
Varying,
|
|
12
|
+
} from "./AST.js";
|
|
2
13
|
|
|
3
14
|
export default class TSLEncoder {
|
|
4
15
|
constructor();
|
|
5
16
|
|
|
17
|
+
tab: string;
|
|
18
|
+
imports: Set<string>;
|
|
19
|
+
global: Set<string>;
|
|
20
|
+
overloadings: Map<string, string>;
|
|
21
|
+
iife: boolean;
|
|
22
|
+
uniqueNames: boolean;
|
|
23
|
+
reference: boolean;
|
|
24
|
+
|
|
25
|
+
addImport(name: string): void;
|
|
26
|
+
emitUniform(node: Uniform): string;
|
|
27
|
+
emitExpression(node: Expression): string;
|
|
28
|
+
emitBody(body: Statement[]): string;
|
|
29
|
+
emitTernary(node: Ternary): string;
|
|
30
|
+
emitConditional(node: Conditional): string;
|
|
31
|
+
emitLoop(node: For): string;
|
|
32
|
+
emitFor(node: For): string;
|
|
33
|
+
emitForWhile(node: For): string;
|
|
34
|
+
emitVariables(node: VariableDeclaration, isRoot?: boolean): string;
|
|
35
|
+
emitVarying(node: Varying): string;
|
|
36
|
+
emitOverloadingFunction(nodes: FunctionDeclaration[]): string;
|
|
37
|
+
emitFunction(node: FunctionDeclaration): string;
|
|
38
|
+
setLastStatement(statement: Statement | null): void;
|
|
39
|
+
emitExtraLine(statement: Statement): string;
|
|
6
40
|
emit(ast: Program): string;
|
|
7
41
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Light, ShadowBaseNode } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface TileShadeNodeConfig {
|
|
4
|
+
tilesX?: number | undefined;
|
|
5
|
+
tilesY?: number | undefined;
|
|
6
|
+
resolution?: { width: number; height: number };
|
|
7
|
+
debug?: boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class TileShadowNode extends ShadowBaseNode {
|
|
11
|
+
constructor(light: Light, options?: TileShadeNodeConfig);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { TileShadowNode };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Group } from "three/webgpu";
|
|
2
|
+
import { TileShadowNode } from "./TileShadowNode.js";
|
|
3
|
+
|
|
4
|
+
declare class TileShadowNodeHelper extends Group {
|
|
5
|
+
constructor(tileShadowNode: TileShadowNode);
|
|
6
|
+
|
|
7
|
+
init(): void;
|
|
8
|
+
|
|
9
|
+
update(): void;
|
|
10
|
+
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { TileShadowNodeHelper };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export interface VRButtonRenderer {
|
|
2
|
+
xr: { setSession: (value: XRSession) => Promise<void> };
|
|
3
|
+
}
|
|
2
4
|
|
|
3
5
|
export class VRButton {
|
|
4
|
-
static createButton(renderer:
|
|
6
|
+
static createButton(renderer: VRButtonRenderer, sessionInit?: XRSessionInit): HTMLElement;
|
|
5
7
|
}
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.176.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"scripts": {},
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@dimforge/rapier3d-compat": "^0.12.0",
|
|
43
44
|
"@tweenjs/tween.js": "~23.1.3",
|
|
44
45
|
"@types/stats.js": "*",
|
|
45
46
|
"@types/webxr": "*",
|
|
@@ -48,6 +49,6 @@
|
|
|
48
49
|
"meshoptimizer": "~0.18.1"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {},
|
|
51
|
-
"typesPublisherContentHash": "
|
|
52
|
-
"typeScriptVersion": "5.
|
|
52
|
+
"typesPublisherContentHash": "2633ecc9f78b2c3a7ff53ae098668242bacbcea8b1a3e8ca27d1bf0a943233a6",
|
|
53
|
+
"typeScriptVersion": "5.1"
|
|
53
54
|
}
|
three/src/Three.Core.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export { ColorManagement, ColorSpaceDefinition } from "./math/ColorManagement.js
|
|
|
103
103
|
export * from "./math/Cylindrical.js";
|
|
104
104
|
export * from "./math/Euler.js";
|
|
105
105
|
export * from "./math/Frustum.js";
|
|
106
|
+
export * from "./math/FrustumArray.js";
|
|
106
107
|
export * from "./math/Interpolant.js";
|
|
107
108
|
export * from "./math/interpolants/CubicInterpolant.js";
|
|
108
109
|
export * from "./math/interpolants/DiscreteInterpolant.js";
|
|
@@ -152,6 +153,7 @@ export * from "./textures/CubeTexture.js";
|
|
|
152
153
|
export * from "./textures/Data3DTexture.js";
|
|
153
154
|
export * from "./textures/DataArrayTexture.js";
|
|
154
155
|
export * from "./textures/DataTexture.js";
|
|
156
|
+
export * from "./textures/DepthArrayTexture.js";
|
|
155
157
|
export * from "./textures/DepthTexture.js";
|
|
156
158
|
export * from "./textures/FramebufferTexture.js";
|
|
157
159
|
export * from "./textures/Source.js";
|
three/src/Three.TSL.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export const F_Schlick: typeof TSL.F_Schlick;
|
|
|
13
13
|
export const Fn: typeof TSL.Fn;
|
|
14
14
|
export const INFINITY: typeof TSL.INFINITY;
|
|
15
15
|
export const If: typeof TSL.If;
|
|
16
|
+
export const Switch: typeof TSL.Switch;
|
|
16
17
|
export const Loop: typeof TSL.Loop;
|
|
17
18
|
export const NodeShaderStage: typeof TSL.NodeShaderStage;
|
|
18
19
|
export const NodeType: typeof TSL.NodeType;
|
|
@@ -116,6 +117,7 @@ export const color: typeof TSL.color;
|
|
|
116
117
|
export const colorSpaceToWorking: typeof TSL.colorSpaceToWorking;
|
|
117
118
|
export const colorToDirection: typeof TSL.colorToDirection;
|
|
118
119
|
export const compute: typeof TSL.compute;
|
|
120
|
+
export const computeSkinning: typeof TSL.computeSkinning;
|
|
119
121
|
export const cond: typeof TSL.cond;
|
|
120
122
|
export const Const: typeof TSL.Const;
|
|
121
123
|
export const context: typeof TSL.context;
|
|
@@ -128,6 +130,9 @@ export const cubeTexture: typeof TSL.cubeTexture;
|
|
|
128
130
|
export const dFdx: typeof TSL.dFdx;
|
|
129
131
|
export const dFdy: typeof TSL.dFdy;
|
|
130
132
|
export const dashSize: typeof TSL.dashSize;
|
|
133
|
+
export const debug: typeof TSL.debug;
|
|
134
|
+
export const decrement: typeof TSL.decrement;
|
|
135
|
+
export const decrementBefore: typeof TSL.decrementBefore;
|
|
131
136
|
export const defaultBuildStages: typeof TSL.defaultBuildStages;
|
|
132
137
|
export const defaultShaderStages: typeof TSL.defaultShaderStages;
|
|
133
138
|
export const defined: typeof TSL.defined;
|
|
@@ -181,6 +186,8 @@ export const getScreenPosition: typeof TSL.getScreenPosition;
|
|
|
181
186
|
export const getShIrradianceAt: typeof TSL.getShIrradianceAt;
|
|
182
187
|
export const getTextureIndex: typeof TSL.getTextureIndex;
|
|
183
188
|
export const getViewPosition: typeof TSL.getViewPosition;
|
|
189
|
+
export const getShadowMaterial: typeof TSL.getShadowMaterial;
|
|
190
|
+
export const getShadowRenderObjectFunction: typeof TSL.getShadowRenderObjectFunction;
|
|
184
191
|
export const glsl: typeof TSL.glsl;
|
|
185
192
|
export const glslFn: typeof TSL.glslFn;
|
|
186
193
|
export const grayscale: typeof TSL.grayscale;
|
|
@@ -190,6 +197,8 @@ export const hash: typeof TSL.hash;
|
|
|
190
197
|
export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
|
|
191
198
|
export const highPrecisionModelViewMatrix: typeof TSL.highpModelViewMatrix;
|
|
192
199
|
export const hue: typeof TSL.hue;
|
|
200
|
+
export const increment: typeof TSL.increment;
|
|
201
|
+
export const incrementBefore: typeof TSL.incrementBefore;
|
|
193
202
|
export const instance: typeof TSL.instance;
|
|
194
203
|
export const instanceIndex: typeof TSL.instanceIndex;
|
|
195
204
|
export const instancedArray: typeof TSL.instancedArray;
|
|
@@ -215,6 +224,7 @@ export const lengthSq: typeof TSL.lengthSq;
|
|
|
215
224
|
export const lessThan: typeof TSL.lessThan;
|
|
216
225
|
export const lessThanEqual: typeof TSL.lessThanEqual;
|
|
217
226
|
export const lightPosition: typeof TSL.lightPosition;
|
|
227
|
+
export const lightShadowMatrix: typeof TSL.lightShadowMatrix;
|
|
218
228
|
export const lightTargetDirection: typeof TSL.lightTargetDirection;
|
|
219
229
|
export const lightTargetPosition: typeof TSL.lightTargetPosition;
|
|
220
230
|
export const lightViewPosition: typeof TSL.lightViewPosition;
|
|
@@ -407,6 +417,7 @@ export const rtt: typeof TSL.rtt;
|
|
|
407
417
|
export const sRGBTransferEOTF: typeof TSL.sRGBTransferEOTF;
|
|
408
418
|
export const sRGBTransferOETF: typeof TSL.sRGBTransferOETF;
|
|
409
419
|
export const sampler: typeof TSL.sampler;
|
|
420
|
+
export const samplerComparison: typeof TSL.samplerComparison;
|
|
410
421
|
export const saturate: typeof TSL.saturate;
|
|
411
422
|
export const saturation: typeof TSL.saturation;
|
|
412
423
|
export const screen: typeof TSL.screen;
|
|
@@ -432,7 +443,6 @@ export const sign: typeof TSL.sign;
|
|
|
432
443
|
export const sin: typeof TSL.sin;
|
|
433
444
|
export const sinc: typeof TSL.sinc;
|
|
434
445
|
export const skinning: typeof TSL.skinning;
|
|
435
|
-
export const skinningReference: typeof TSL.skinningReference;
|
|
436
446
|
export const smoothstep: typeof TSL.smoothstep;
|
|
437
447
|
export const smoothstepElement: typeof TSL.smoothstepElement;
|
|
438
448
|
export const specularColor: typeof TSL.specularColor;
|