@types/three 0.173.0 → 0.175.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/Addons.d.ts +1 -1
- three/examples/jsm/animation/CCDIKSolver.d.ts +3 -2
- three/examples/jsm/controls/PointerLockControls.d.ts +4 -1
- three/examples/jsm/geometries/ParametricFunctions.d.ts +8 -0
- three/examples/jsm/interactive/HTMLMesh.d.ts +9 -2
- three/examples/jsm/loaders/LUTImageLoader.d.ts +2 -2
- three/examples/jsm/loaders/MTLLoader.d.ts +2 -1
- three/examples/jsm/misc/Timer.d.ts +13 -2
- three/examples/jsm/objects/Reflector.d.ts +1 -0
- 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/math/Bayer.d.ts +4 -0
- three/examples/jsm/tsl/utils/Raymarching.d.ts +9 -0
- three/examples/jsm/webxr/VRButton.d.ts +4 -2
- three/package.json +2 -2
- three/src/Three.TSL.d.ts +7 -1
- three/src/Three.d.ts +6 -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/constants.d.ts +2 -2
- three/src/core/BufferAttribute.d.ts +11 -0
- three/src/core/BufferGeometry.d.ts +1 -3
- three/src/core/Raycaster.d.ts +4 -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/extras/PMREMGenerator.d.ts +15 -2
- three/src/geometries/TorusGeometry.d.ts +5 -6
- 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 +3 -0
- three/src/materials/nodes/NodeMaterial.d.ts +2 -1
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +14 -2
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +4 -4
- three/src/nodes/Nodes.d.ts +2 -2
- three/src/nodes/TSL.d.ts +1 -0
- three/src/nodes/accessors/BufferAttributeNode.d.ts +36 -26
- three/src/nodes/accessors/Lights.d.ts +1 -1
- three/src/nodes/accessors/MaterialProperties.d.ts +5 -0
- three/src/nodes/accessors/ModelNode.d.ts +1 -0
- three/src/nodes/accessors/Object3DNode.d.ts +7 -5
- three/src/nodes/accessors/SkinningNode.d.ts +4 -3
- three/src/nodes/accessors/StorageTextureNode.d.ts +2 -2
- three/src/nodes/accessors/Texture3DNode.d.ts +2 -2
- three/src/nodes/accessors/TextureNode.d.ts +3 -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/LightingModel.d.ts +13 -28
- three/src/nodes/core/Node.d.ts +24 -24
- three/src/nodes/core/NodeAttribute.d.ts +3 -3
- three/src/nodes/core/NodeCache.d.ts +2 -2
- three/src/nodes/core/NodeParser.d.ts +1 -1
- three/src/nodes/core/NodeUniform.d.ts +4 -4
- three/src/nodes/core/NodeVar.d.ts +4 -4
- three/src/nodes/core/NodeVarying.d.ts +2 -2
- three/src/nodes/core/StructTypeNode.d.ts +3 -3
- three/src/nodes/core/UniformNode.d.ts +7 -7
- three/src/nodes/core/constants.d.ts +0 -1
- three/src/nodes/display/PassNode.d.ts +10 -1
- three/src/nodes/functions/BSDF/LTC.d.ts +5 -1
- three/src/nodes/functions/VolumetricLightingModel.d.ts +6 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +1 -12
- three/src/nodes/lighting/AnalyticLightNode.d.ts +13 -1
- three/src/nodes/lighting/LightingContextNode.d.ts +18 -4
- three/src/nodes/lighting/LightsNode.d.ts +24 -0
- three/src/nodes/lighting/PointLightNode.d.ts +8 -7
- three/src/nodes/lighting/ShadowBaseNode.d.ts +3 -0
- 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 +57 -26
- three/src/nodes/tsl/TSLBase.d.ts +1 -0
- three/src/nodes/tsl/TSLCore.d.ts +3 -0
- three/src/nodes/utils/DebugNode.d.ts +20 -0
- three/src/nodes/utils/ReflectorNode.d.ts +1 -0
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +2 -2
- three/src/objects/LOD.d.ts +4 -3
- three/src/renderers/common/Animation.d.ts +6 -6
- three/src/renderers/common/Attributes.d.ts +2 -2
- three/src/renderers/common/BindGroup.d.ts +2 -2
- three/src/renderers/common/Binding.d.ts +2 -2
- three/src/renderers/common/Buffer.d.ts +3 -3
- three/src/renderers/common/BufferUtils.d.ts +7 -8
- three/src/renderers/common/BundleGroup.d.ts +2 -2
- three/src/renderers/common/ChainMap.d.ts +3 -3
- three/src/renderers/common/ClippingContext.d.ts +3 -3
- three/src/renderers/common/Color4.d.ts +8 -8
- three/src/renderers/common/ComputePipeline.d.ts +1 -1
- three/src/renderers/common/CubeRenderTarget.d.ts +6 -0
- three/src/renderers/common/DataMap.d.ts +2 -2
- three/src/renderers/common/Geometries.d.ts +4 -4
- three/src/renderers/common/Info.d.ts +2 -2
- three/src/renderers/common/Pipeline.d.ts +1 -1
- three/src/renderers/common/Pipelines.d.ts +9 -9
- three/src/renderers/common/ProgrammableStage.d.ts +4 -4
- three/src/renderers/common/RenderContext.d.ts +2 -2
- three/src/renderers/common/RenderContexts.d.ts +3 -3
- three/src/renderers/common/RenderList.d.ts +11 -11
- three/src/renderers/common/RenderObject.d.ts +13 -13
- three/src/renderers/common/RenderObjects.d.ts +3 -3
- three/src/renderers/common/RenderPipeline.d.ts +1 -1
- three/src/renderers/common/Renderer.d.ts +143 -108
- three/src/renderers/common/Textures.d.ts +6 -6
- three/src/renderers/common/TimestampQueryPool.d.ts +13 -1
- three/src/renderers/common/Uniform.d.ts +13 -13
- three/src/renderers/common/UniformBuffer.d.ts +1 -1
- three/src/renderers/common/UniformsGroup.d.ts +13 -13
- three/src/renderers/common/XRManager.d.ts +79 -15
- three/src/renderers/common/XRRenderTarget.d.ts +4 -4
- three/src/renderers/common/extras/PMREMGenerator.d.ts +9 -2
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -3
- three/src/renderers/common/nodes/NodeLibrary.d.ts +11 -11
- three/src/renderers/common/nodes/NodeUniform.d.ts +9 -9
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +1 -1
- three/src/renderers/common/nodes/Nodes.d.ts +11 -11
- three/src/renderers/webgl/WebGLState.d.ts +7 -6
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
- three/src/textures/CanvasTexture.d.ts +1 -1
- three/examples/jsm/geometries/ParametricGeometries.d.ts +0 -32
|
@@ -34,13 +34,13 @@ declare class NumberNodeUniform extends NumberUniform {
|
|
|
34
34
|
/**
|
|
35
35
|
* Overwritten to return the value of the node uniform.
|
|
36
36
|
*
|
|
37
|
-
* @return {
|
|
37
|
+
* @return {number} The value.
|
|
38
38
|
*/
|
|
39
39
|
getValue(): number;
|
|
40
40
|
/**
|
|
41
41
|
* Returns the node uniform data type.
|
|
42
42
|
*
|
|
43
|
-
* @return {
|
|
43
|
+
* @return {string} The data type.
|
|
44
44
|
*/
|
|
45
45
|
getType(): string | null;
|
|
46
46
|
}
|
|
@@ -68,7 +68,7 @@ declare class Vector2NodeUniform extends Vector2Uniform {
|
|
|
68
68
|
/**
|
|
69
69
|
* Returns the node uniform data type.
|
|
70
70
|
*
|
|
71
|
-
* @return {
|
|
71
|
+
* @return {string} The data type.
|
|
72
72
|
*/
|
|
73
73
|
getType(): string | null;
|
|
74
74
|
}
|
|
@@ -96,7 +96,7 @@ declare class Vector3NodeUniform extends Vector3Uniform {
|
|
|
96
96
|
/**
|
|
97
97
|
* Returns the node uniform data type.
|
|
98
98
|
*
|
|
99
|
-
* @return {
|
|
99
|
+
* @return {string} The data type.
|
|
100
100
|
*/
|
|
101
101
|
getType(): string | null;
|
|
102
102
|
}
|
|
@@ -124,7 +124,7 @@ declare class Vector4NodeUniform extends Vector4Uniform {
|
|
|
124
124
|
/**
|
|
125
125
|
* Returns the node uniform data type.
|
|
126
126
|
*
|
|
127
|
-
* @return {
|
|
127
|
+
* @return {string} The data type.
|
|
128
128
|
*/
|
|
129
129
|
getType(): string | null;
|
|
130
130
|
}
|
|
@@ -152,7 +152,7 @@ declare class ColorNodeUniform extends ColorUniform {
|
|
|
152
152
|
/**
|
|
153
153
|
* Returns the node uniform data type.
|
|
154
154
|
*
|
|
155
|
-
* @return {
|
|
155
|
+
* @return {string} The data type.
|
|
156
156
|
*/
|
|
157
157
|
getType(): string | null;
|
|
158
158
|
}
|
|
@@ -180,7 +180,7 @@ declare class Matrix2NodeUniform extends Matrix2Uniform {
|
|
|
180
180
|
/**
|
|
181
181
|
* Returns the node uniform data type.
|
|
182
182
|
*
|
|
183
|
-
* @return {
|
|
183
|
+
* @return {string} The data type.
|
|
184
184
|
*/
|
|
185
185
|
getType(): string | null;
|
|
186
186
|
}
|
|
@@ -208,7 +208,7 @@ declare class Matrix3NodeUniform extends Matrix3Uniform {
|
|
|
208
208
|
/**
|
|
209
209
|
* Returns the node uniform data type.
|
|
210
210
|
*
|
|
211
|
-
* @return {
|
|
211
|
+
* @return {string} The data type.
|
|
212
212
|
*/
|
|
213
213
|
getType(): string | null;
|
|
214
214
|
}
|
|
@@ -236,7 +236,7 @@ declare class Matrix4NodeUniform extends Matrix4Uniform {
|
|
|
236
236
|
/**
|
|
237
237
|
* Returns the node uniform data type.
|
|
238
238
|
*
|
|
239
|
-
* @return {
|
|
239
|
+
* @return {string} The data type.
|
|
240
240
|
*/
|
|
241
241
|
getType(): string | null;
|
|
242
242
|
}
|
|
@@ -14,7 +14,7 @@ declare class NodeUniformsGroup extends UniformsGroup {
|
|
|
14
14
|
/**
|
|
15
15
|
* Constructs a new node-based uniforms group.
|
|
16
16
|
*
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {string} name - The group's name.
|
|
18
18
|
* @param {UniformGroupNode} groupNode - The uniform group node.
|
|
19
19
|
*/
|
|
20
20
|
constructor(name: string, groupNode: UniformGroupNode);
|
|
@@ -97,14 +97,14 @@ declare class Nodes extends DataMap<{
|
|
|
97
97
|
* Returns `true` if the given node uniforms group must be updated or not.
|
|
98
98
|
*
|
|
99
99
|
* @param {NodeUniformsGroup} nodeUniformsGroup - The node uniforms group.
|
|
100
|
-
* @return {
|
|
100
|
+
* @return {boolean} Whether the node uniforms group requires an update or not.
|
|
101
101
|
*/
|
|
102
102
|
updateGroup(nodeUniformsGroup: NodeUniformsGroup): boolean;
|
|
103
103
|
/**
|
|
104
104
|
* Returns the cache key for the given render object.
|
|
105
105
|
*
|
|
106
106
|
* @param {RenderObject} renderObject - The render object.
|
|
107
|
-
* @return {
|
|
107
|
+
* @return {number} The cache key.
|
|
108
108
|
*/
|
|
109
109
|
getForRenderCacheKey(renderObject: RenderObject): string;
|
|
110
110
|
/**
|
|
@@ -117,8 +117,8 @@ declare class Nodes extends DataMap<{
|
|
|
117
117
|
/**
|
|
118
118
|
* Deletes the given object from the internal data map
|
|
119
119
|
*
|
|
120
|
-
* @param {
|
|
121
|
-
* @return {Object
|
|
120
|
+
* @param {any} object - The object to delete.
|
|
121
|
+
* @return {?Object} The deleted dictionary.
|
|
122
122
|
*/
|
|
123
123
|
delete(
|
|
124
124
|
object: NodeUniformsGroup | RenderObject | ComputeNode | Scene,
|
|
@@ -169,14 +169,14 @@ declare class Nodes extends DataMap<{
|
|
|
169
169
|
*
|
|
170
170
|
* @param {Scene} scene - The scene.
|
|
171
171
|
* @param {LightsNode} lightsNode - The lights node.
|
|
172
|
-
* @return {
|
|
172
|
+
* @return {number} The cache key.
|
|
173
173
|
*/
|
|
174
174
|
getCacheKey(scene: Scene, lightsNode: LightsNode): number;
|
|
175
175
|
/**
|
|
176
176
|
* A boolean that indicates whether tone mapping should be enabled
|
|
177
177
|
* or not.
|
|
178
178
|
*
|
|
179
|
-
* @type {
|
|
179
|
+
* @type {boolean}
|
|
180
180
|
*/
|
|
181
181
|
get isToneMappingState(): boolean;
|
|
182
182
|
/**
|
|
@@ -190,10 +190,10 @@ declare class Nodes extends DataMap<{
|
|
|
190
190
|
* This method is part of the caching of nodes which are used to represents the
|
|
191
191
|
* scene's background, fog or environment.
|
|
192
192
|
*
|
|
193
|
-
* @param {
|
|
193
|
+
* @param {string} type - The type of object to cache.
|
|
194
194
|
* @param {Object} object - The object.
|
|
195
195
|
* @param {Function} callback - A callback that produces a node representation for the given object.
|
|
196
|
-
* @param {
|
|
196
|
+
* @param {boolean} [forceUpdate=false] - Whether an update should be enforced or not.
|
|
197
197
|
* @return {Node} The node representation.
|
|
198
198
|
*/
|
|
199
199
|
getCacheNode(
|
|
@@ -227,7 +227,7 @@ declare class Nodes extends DataMap<{
|
|
|
227
227
|
/**
|
|
228
228
|
* Returns the current output cache key.
|
|
229
229
|
*
|
|
230
|
-
* @return {
|
|
230
|
+
* @return {string} The output cache key.
|
|
231
231
|
*/
|
|
232
232
|
getOutputCacheKey(): string;
|
|
233
233
|
/**
|
|
@@ -235,7 +235,7 @@ declare class Nodes extends DataMap<{
|
|
|
235
235
|
* the given target has changed.
|
|
236
236
|
*
|
|
237
237
|
* @param {Texture} outputTarget - The output target.
|
|
238
|
-
* @return {
|
|
238
|
+
* @return {boolean} Whether the output configuration has changed or not.
|
|
239
239
|
*/
|
|
240
240
|
hasOutputChange(outputTarget: Texture): boolean;
|
|
241
241
|
/**
|
|
@@ -278,7 +278,7 @@ declare class Nodes extends DataMap<{
|
|
|
278
278
|
* Returns `true` if the given render object requires a refresh.
|
|
279
279
|
*
|
|
280
280
|
* @param {RenderObject} renderObject - The render object.
|
|
281
|
-
* @return {
|
|
281
|
+
* @return {boolean} Whether the given render object requires a refresh or not.
|
|
282
282
|
*/
|
|
283
283
|
needsRefresh(renderObject: RenderObject): boolean;
|
|
284
284
|
/**
|
|
@@ -11,14 +11,14 @@ import { Vector4 } from "../../math/Vector4.js";
|
|
|
11
11
|
import { WebGLRenderTarget } from "../WebGLRenderTarget.js";
|
|
12
12
|
import { WebGLExtensions } from "./WebGLExtensions.js";
|
|
13
13
|
|
|
14
|
-
declare class
|
|
14
|
+
declare class WebGLColorBuffer {
|
|
15
15
|
setMask(colorMask: boolean): void;
|
|
16
16
|
setLocked(lock: boolean): void;
|
|
17
17
|
setClear(r: number, g: number, b: number, a: number, premultipliedAlpha: boolean): void;
|
|
18
18
|
reset(): void;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
declare class
|
|
21
|
+
declare class WebGLDepthBuffer {
|
|
22
22
|
constructor();
|
|
23
23
|
|
|
24
24
|
setReversed(value: boolean): void;
|
|
@@ -31,7 +31,7 @@ declare class DepthBuffer {
|
|
|
31
31
|
reset(): void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
declare class
|
|
34
|
+
declare class WebGLStencilBuffer {
|
|
35
35
|
constructor();
|
|
36
36
|
|
|
37
37
|
setTest(stencilTest: boolean): void;
|
|
@@ -47,9 +47,9 @@ declare class WebGLState {
|
|
|
47
47
|
constructor(gl: WebGLRenderingContext, extensions: WebGLExtensions);
|
|
48
48
|
|
|
49
49
|
buffers: {
|
|
50
|
-
color:
|
|
51
|
-
depth:
|
|
52
|
-
stencil:
|
|
50
|
+
color: WebGLColorBuffer;
|
|
51
|
+
depth: WebGLDepthBuffer;
|
|
52
|
+
stencil: WebGLStencilBuffer;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
enable(id: number): void;
|
|
@@ -117,3 +117,4 @@ declare class WebGLState {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export { WebGLState };
|
|
120
|
+
export type { WebGLColorBuffer, WebGLDepthBuffer, WebGLStencilBuffer };
|
|
@@ -31,7 +31,7 @@ export class CanvasTexture extends Texture {
|
|
|
31
31
|
* @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
|
|
32
32
|
*/
|
|
33
33
|
constructor(
|
|
34
|
-
canvas
|
|
34
|
+
canvas?: TexImageSource | OffscreenCanvas,
|
|
35
35
|
mapping?: Mapping,
|
|
36
36
|
wrapS?: Wrapping,
|
|
37
37
|
wrapT?: Wrapping,
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Curve, Vector3 } from "three";
|
|
2
|
-
|
|
3
|
-
import { ParametricGeometry } from "./ParametricGeometry.js";
|
|
4
|
-
|
|
5
|
-
export namespace ParametricGeometries {
|
|
6
|
-
function klein(v: number, u: number, target: Vector3): Vector3;
|
|
7
|
-
function plane(width: number, height: number): (u: number, v: number, target: Vector3) => Vector3;
|
|
8
|
-
function mobius(u: number, t: number, target: Vector3): Vector3;
|
|
9
|
-
function mobius3d(u: number, t: number, target: Vector3): Vector3;
|
|
10
|
-
|
|
11
|
-
class TubeGeometry extends ParametricGeometry {
|
|
12
|
-
constructor(
|
|
13
|
-
path: Curve<Vector3>,
|
|
14
|
-
segments?: number,
|
|
15
|
-
radius?: number,
|
|
16
|
-
segmentsRadius?: number,
|
|
17
|
-
closed?: boolean,
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
class TorusKnotGeometry extends TubeGeometry {
|
|
22
|
-
constructor(radius?: number, tube?: number, segmentsT?: number, segmentsR?: number, p?: number, q?: number);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
class SphereGeometry extends ParametricGeometry {
|
|
26
|
-
constructor(size: number, u: number, v: number);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
class PlaneGeometry extends ParametricGeometry {
|
|
30
|
-
constructor(width: number, depth: number, segmentsWidth: number, segmentsDepth: number);
|
|
31
|
-
}
|
|
32
|
-
}
|