@types/three 0.175.0 → 0.177.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 +0 -1
- three/examples/jsm/helpers/RapierHelper.d.ts +13 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +8 -3
- three/examples/jsm/loaders/LottieLoader.d.ts +4 -0
- three/examples/jsm/math/Octree.d.ts +3 -0
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +12 -0
- three/examples/jsm/postprocessing/AfterimagePass.d.ts +13 -10
- three/examples/jsm/postprocessing/BokehPass.d.ts +2 -2
- three/examples/jsm/postprocessing/FXAAPass.d.ts +7 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +7 -1
- three/examples/jsm/tsl/shadows/TileShadowNode.d.ts +14 -0
- three/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts +14 -0
- three/package.json +4 -3
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +13 -5
- three/src/Three.WebGPU.Nodes.d.ts +1 -0
- three/src/Three.WebGPU.d.ts +1 -0
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
- three/src/audio/AudioListener.d.ts +1 -1
- three/src/cameras/ArrayCamera.d.ts +5 -0
- three/src/constants.d.ts +16 -15
- three/src/core/BufferGeometry.d.ts +5 -1
- three/src/core/RenderTarget.d.ts +11 -19
- three/src/extras/DataUtils.d.ts +4 -4
- three/src/geometries/CapsuleGeometry.d.ts +11 -3
- three/src/lights/LightShadow.d.ts +8 -0
- three/src/lights/SpotLightShadow.d.ts +2 -0
- three/src/lights/webgpu/ProjectorLight.d.ts +17 -0
- three/src/materials/Material.d.ts +3 -8
- three/src/materials/ShaderMaterial.d.ts +1 -1
- three/src/materials/nodes/NodeMaterial.d.ts +12 -2
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +2 -0
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +12 -0
- three/src/math/Box3.d.ts +8 -0
- three/src/math/ColorManagement.d.ts +12 -2
- three/src/math/FrustumArray.d.ts +27 -0
- three/src/math/Sphere.d.ts +8 -0
- three/src/math/Triangle.d.ts +3 -3
- three/src/nodes/Nodes.d.ts +1 -0
- three/src/nodes/TSL.d.ts +1 -0
- three/src/nodes/accessors/CubeTextureNode.d.ts +12 -1
- three/src/nodes/accessors/InstanceNode.d.ts +2 -3
- three/src/nodes/accessors/TextureNode.d.ts +11 -6
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
- three/src/nodes/core/AssignNode.d.ts +5 -1
- three/src/nodes/core/CacheNode.d.ts +3 -0
- three/src/nodes/core/Node.d.ts +11 -7
- three/src/nodes/core/NodeUtils.d.ts +4 -0
- three/src/nodes/core/NodeVarying.d.ts +11 -1
- three/src/nodes/core/StackNode.d.ts +7 -1
- three/src/nodes/core/VaryingNode.d.ts +6 -0
- three/src/nodes/display/BlendModes.d.ts +4 -0
- three/src/nodes/display/ColorSpaceNode.d.ts +2 -12
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +2 -2
- three/src/nodes/lighting/ProjectorLightNode.d.ts +5 -0
- three/src/nodes/lighting/ShadowFilterNode.d.ts +28 -0
- three/src/nodes/lighting/ShadowNode.d.ts +26 -24
- three/src/nodes/lighting/SpotLightNode.d.ts +15 -1
- three/src/nodes/math/OperatorNode.d.ts +9 -0
- three/src/nodes/tsl/TSLCore.d.ts +45 -32
- three/src/nodes/utils/DebugNode.d.ts +2 -1
- three/src/nodes/utils/ReflectorNode.d.ts +2 -1
- three/src/objects/Mesh.d.ts +8 -0
- three/src/objects/Sprite.d.ts +8 -0
- three/src/renderers/WebGLRenderer.d.ts +2 -2
- three/src/renderers/common/Animation.d.ts +2 -2
- three/src/renderers/common/Renderer.d.ts +24 -0
- 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 +55 -1
- three/src/renderers/webgpu/WebGPUBackend.d.ts +1 -0
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
- three/src/textures/DepthTexture.d.ts +4 -2
- three/src/textures/Source.d.ts +20 -16
- three/src/textures/Texture.d.ts +76 -2
- three/src/textures/VideoFrameTexture.d.ts +1 -1
- three/examples/jsm/effects/PeppersGhostEffect.d.ts +0 -10
- three/src/core/RenderTargetArray.d.ts +0 -9
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:
|
|
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: Mon, 02 Jun 2025 15:36:26 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
|
@@ -28,7 +28,6 @@ export * from "./effects/AnaglyphEffect.js";
|
|
|
28
28
|
export * from "./effects/AsciiEffect.js";
|
|
29
29
|
export * from "./effects/OutlineEffect.js";
|
|
30
30
|
export * from "./effects/ParallaxBarrierEffect.js";
|
|
31
|
-
export * from "./effects/PeppersGhostEffect.js";
|
|
32
31
|
export * from "./effects/StereoEffect.js";
|
|
33
32
|
|
|
34
33
|
export * from "./environments/DebugEnvironment.js";
|
|
@@ -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 };
|
|
@@ -19,11 +19,16 @@ export class LDrawLoader extends Loader<Group> {
|
|
|
19
19
|
): this;
|
|
20
20
|
|
|
21
21
|
preloadMaterials(url: string): Promise<void>;
|
|
22
|
-
setFileMap(fileMap: Record<string, string>): void;
|
|
23
|
-
setMaterials(materials: Material[]): void;
|
|
24
22
|
|
|
25
23
|
parse(text: string, path: string, onLoad: (data: Group) => void, onError?: (error: unknown) => void): void;
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
setMaterials(materials: Material[]): this;
|
|
26
|
+
clearMaterials(): this;
|
|
27
|
+
addMaterials(materials: Material[]): this;
|
|
28
|
+
addDefaultMaterials(): this;
|
|
29
|
+
|
|
30
|
+
setFileMap(fileMap: Record<string, string>): this;
|
|
31
|
+
|
|
32
|
+
addMaterial(material: Material): this;
|
|
28
33
|
getMaterial(colourCode: string): Material | null;
|
|
29
34
|
}
|
|
@@ -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;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { IUniform, ShaderMaterial
|
|
1
|
+
import { IUniform, ShaderMaterial } from "three";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Pass } from "./Pass.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
constructor(damp?: number);
|
|
7
|
-
shader: object;
|
|
5
|
+
declare class AfterimagePass extends Pass {
|
|
8
6
|
uniforms: Record<string, IUniform>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
|
|
8
|
+
compFsMaterial: ShaderMaterial;
|
|
9
|
+
copyFsMaterial: ShaderMaterial;
|
|
10
|
+
|
|
11
|
+
constructor(damp?: number);
|
|
12
|
+
|
|
13
|
+
get damp(): number;
|
|
14
|
+
set damp(value: number);
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
export { AfterimagePass };
|
|
@@ -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;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { NodeRepresentation, ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { Node } from "three/webgpu";
|
|
3
3
|
|
|
4
|
+
interface HashBlurOptions {
|
|
5
|
+
repeats?: NodeRepresentation | undefined;
|
|
6
|
+
mask?: NodeRepresentation | null | undefined;
|
|
7
|
+
premultipliedAlpha?: boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
export const hashBlur: (
|
|
5
11
|
textureNode: NodeRepresentation,
|
|
6
12
|
bluramount?: NodeRepresentation,
|
|
7
|
-
|
|
13
|
+
options?: HashBlurOptions,
|
|
8
14
|
) => ShaderNodeObject<Node>;
|
|
@@ -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 };
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.177.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": "b00477afa796eb933a6474b328923a76b02409bbc6391520fd096f0ace56fb28",
|
|
53
|
+
"typeScriptVersion": "5.1"
|
|
53
54
|
}
|
three/src/Three.Core.d.ts
CHANGED
|
@@ -39,7 +39,6 @@ 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/RenderTargetArray.js";
|
|
43
42
|
export * from "./core/Uniform.js";
|
|
44
43
|
export * from "./core/UniformsGroup.js";
|
|
45
44
|
export * from "./extras/Controls.js";
|
|
@@ -103,6 +102,7 @@ export { ColorManagement, ColorSpaceDefinition } from "./math/ColorManagement.js
|
|
|
103
102
|
export * from "./math/Cylindrical.js";
|
|
104
103
|
export * from "./math/Euler.js";
|
|
105
104
|
export * from "./math/Frustum.js";
|
|
105
|
+
export * from "./math/FrustumArray.js";
|
|
106
106
|
export * from "./math/Interpolant.js";
|
|
107
107
|
export * from "./math/interpolants/CubicInterpolant.js";
|
|
108
108
|
export * from "./math/interpolants/DiscreteInterpolant.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;
|
|
@@ -130,6 +131,8 @@ export const dFdx: typeof TSL.dFdx;
|
|
|
130
131
|
export const dFdy: typeof TSL.dFdy;
|
|
131
132
|
export const dashSize: typeof TSL.dashSize;
|
|
132
133
|
export const debug: typeof TSL.debug;
|
|
134
|
+
export const decrement: typeof TSL.decrement;
|
|
135
|
+
export const decrementBefore: typeof TSL.decrementBefore;
|
|
133
136
|
export const defaultBuildStages: typeof TSL.defaultBuildStages;
|
|
134
137
|
export const defaultShaderStages: typeof TSL.defaultShaderStages;
|
|
135
138
|
export const defined: typeof TSL.defined;
|
|
@@ -183,6 +186,8 @@ export const getScreenPosition: typeof TSL.getScreenPosition;
|
|
|
183
186
|
export const getShIrradianceAt: typeof TSL.getShIrradianceAt;
|
|
184
187
|
export const getTextureIndex: typeof TSL.getTextureIndex;
|
|
185
188
|
export const getViewPosition: typeof TSL.getViewPosition;
|
|
189
|
+
export const getShadowMaterial: typeof TSL.getShadowMaterial;
|
|
190
|
+
export const getShadowRenderObjectFunction: typeof TSL.getShadowRenderObjectFunction;
|
|
186
191
|
export const glsl: typeof TSL.glsl;
|
|
187
192
|
export const glslFn: typeof TSL.glslFn;
|
|
188
193
|
export const grayscale: typeof TSL.grayscale;
|
|
@@ -192,6 +197,8 @@ export const hash: typeof TSL.hash;
|
|
|
192
197
|
export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
|
|
193
198
|
export const highPrecisionModelViewMatrix: typeof TSL.highpModelViewMatrix;
|
|
194
199
|
export const hue: typeof TSL.hue;
|
|
200
|
+
export const increment: typeof TSL.increment;
|
|
201
|
+
export const incrementBefore: typeof TSL.incrementBefore;
|
|
195
202
|
export const instance: typeof TSL.instance;
|
|
196
203
|
export const instanceIndex: typeof TSL.instanceIndex;
|
|
197
204
|
export const instancedArray: typeof TSL.instancedArray;
|
|
@@ -217,6 +224,7 @@ export const lengthSq: typeof TSL.lengthSq;
|
|
|
217
224
|
export const lessThan: typeof TSL.lessThan;
|
|
218
225
|
export const lessThanEqual: typeof TSL.lessThanEqual;
|
|
219
226
|
export const lightPosition: typeof TSL.lightPosition;
|
|
227
|
+
export const lightShadowMatrix: typeof TSL.lightShadowMatrix;
|
|
220
228
|
export const lightTargetDirection: typeof TSL.lightTargetDirection;
|
|
221
229
|
export const lightTargetPosition: typeof TSL.lightTargetPosition;
|
|
222
230
|
export const lightViewPosition: typeof TSL.lightViewPosition;
|
|
@@ -319,6 +327,7 @@ export const mx_transform_uv: typeof TSL.mx_transform_uv;
|
|
|
319
327
|
export const mx_worley_noise_float: typeof TSL.mx_worley_noise_float;
|
|
320
328
|
export const mx_worley_noise_vec2: typeof TSL.mx_worley_noise_vec2;
|
|
321
329
|
export const mx_worley_noise_vec3: typeof TSL.mx_worley_noise_vec3;
|
|
330
|
+
export const namespace: typeof TSL.namespace;
|
|
322
331
|
export const negate: typeof TSL.negate;
|
|
323
332
|
export const neutralToneMapping: typeof TSL.neutralToneMapping;
|
|
324
333
|
export const nodeArray: typeof TSL.nodeArray;
|
|
@@ -377,6 +386,7 @@ export const pow: typeof TSL.pow;
|
|
|
377
386
|
export const pow2: typeof TSL.pow2;
|
|
378
387
|
export const pow3: typeof TSL.pow3;
|
|
379
388
|
export const pow4: typeof TSL.pow4;
|
|
389
|
+
export const premult: typeof TSL.premult;
|
|
380
390
|
export const property: typeof TSL.property;
|
|
381
391
|
export const radians: typeof TSL.radians;
|
|
382
392
|
export const rand: typeof TSL.rand;
|
|
@@ -469,13 +479,10 @@ export const textureLoad: typeof TSL.textureLoad;
|
|
|
469
479
|
export const textureSize: typeof TSL.textureSize;
|
|
470
480
|
export const textureStore: typeof TSL.textureStore;
|
|
471
481
|
export const thickness: typeof TSL.thickness;
|
|
472
|
-
export const threshold: typeof TSL.threshold;
|
|
473
482
|
export const time: typeof TSL.time;
|
|
474
483
|
export const timerDelta: typeof TSL.timerDelta;
|
|
475
484
|
export const timerGlobal: typeof TSL.timerGlobal;
|
|
476
485
|
export const timerLocal: typeof TSL.timerLocal;
|
|
477
|
-
export const toOutputColorSpace: typeof TSL.toOutputColorSpace;
|
|
478
|
-
export const toWorkingColorSpace: typeof TSL.toWorkingColorSpace;
|
|
479
486
|
export const toneMapping: typeof TSL.toneMapping;
|
|
480
487
|
export const toneMappingExposure: typeof TSL.toneMappingExposure;
|
|
481
488
|
export const toonOutlinePass: typeof TSL.toonOutlinePass;
|
|
@@ -492,8 +499,6 @@ export const transformedTangentView: typeof TSL.transformedTangentView;
|
|
|
492
499
|
export const transformedTangentWorld: typeof TSL.transformedTangentWorld;
|
|
493
500
|
export const transmission: typeof TSL.transmission;
|
|
494
501
|
export const transpose: typeof TSL.transpose;
|
|
495
|
-
export const tri: typeof TSL.tri;
|
|
496
|
-
export const tri3: typeof TSL.tri3;
|
|
497
502
|
export const triNoise3D: typeof TSL.triNoise3D;
|
|
498
503
|
export const triplanarTexture: typeof TSL.triplanarTexture;
|
|
499
504
|
export const triplanarTextures: typeof TSL.triplanarTextures;
|
|
@@ -501,9 +506,12 @@ export const trunc: typeof TSL.trunc;
|
|
|
501
506
|
export const tslFn: typeof TSL.tslFn;
|
|
502
507
|
export const uint: typeof TSL.uint;
|
|
503
508
|
export const uniform: typeof TSL.uniform;
|
|
509
|
+
export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
|
|
504
510
|
export const uniformArray: typeof TSL.uniformArray;
|
|
505
511
|
export const uniformGroup: typeof TSL.uniformGroup;
|
|
512
|
+
export const uniformTexture: typeof TSL.uniformTexture;
|
|
506
513
|
export const uniforms: typeof TSL.uniforms;
|
|
514
|
+
export const unpremult: typeof TSL.unpremult;
|
|
507
515
|
export const userData: typeof TSL.userData;
|
|
508
516
|
export const uv: typeof TSL.uv;
|
|
509
517
|
export const uvec2: typeof TSL.uvec2;
|
|
@@ -11,6 +11,7 @@ export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nod
|
|
|
11
11
|
import * as RendererUtils from "./renderers/common/RendererUtils.js";
|
|
12
12
|
export { RendererUtils };
|
|
13
13
|
export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
|
|
14
|
+
export { default as ProjectorLight } from "./lights/webgpu/ProjectorLight.js";
|
|
14
15
|
export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
15
16
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
16
17
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
three/src/Three.WebGPU.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.js"
|
|
|
11
11
|
import * as RendererUtils from "./renderers/common/RendererUtils.js";
|
|
12
12
|
export { RendererUtils };
|
|
13
13
|
export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
|
|
14
|
+
export { default as ProjectorLight } from "./lights/webgpu/ProjectorLight.js";
|
|
14
15
|
export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
15
16
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
16
17
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
@@ -13,5 +13,5 @@ export class NumberKeyframeTrack extends KeyframeTrack {
|
|
|
13
13
|
* @param {Array<number>} values - A list of keyframe values.
|
|
14
14
|
* @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
|
|
15
15
|
*/
|
|
16
|
-
constructor(name: string, times:
|
|
16
|
+
constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>, interpolation?: InterpolationModes);
|
|
17
17
|
}
|
|
@@ -13,5 +13,5 @@ export class QuaternionKeyframeTrack extends KeyframeTrack {
|
|
|
13
13
|
* @param {Array<number>} values - A list of keyframe values.
|
|
14
14
|
* @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
|
|
15
15
|
*/
|
|
16
|
-
constructor(name: string, times:
|
|
16
|
+
constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>, interpolation?: InterpolationModes);
|
|
17
17
|
}
|
|
@@ -14,5 +14,5 @@ export class StringKeyframeTrack extends KeyframeTrack {
|
|
|
14
14
|
* @param {Array<number>} times - A list of keyframe times.
|
|
15
15
|
* @param {Array<number>} values - A list of keyframe values.
|
|
16
16
|
*/
|
|
17
|
-
constructor(name: string, times:
|
|
17
|
+
constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>);
|
|
18
18
|
}
|
|
@@ -13,5 +13,5 @@ export class VectorKeyframeTrack extends KeyframeTrack {
|
|
|
13
13
|
* @param {Array<number>} values - A list of keyframe values.
|
|
14
14
|
* @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
|
|
15
15
|
*/
|
|
16
|
-
constructor(name: string, times:
|
|
16
|
+
constructor(name: string, times: ArrayLike<number>, values: ArrayLike<number>, interpolation?: InterpolationModes);
|
|
17
17
|
}
|
|
@@ -4,7 +4,7 @@ import { AudioContext } from "./AudioContext.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* The {@link AudioListener} represents a virtual {@link https://developer.mozilla.org/en-US/docs/Web/API/AudioListener | listener} of the all positional and non-positional audio effects in the scene.
|
|
6
6
|
* A three.js application usually creates a single instance of {@link AudioListener} * @remarks
|
|
7
|
-
* It is a mandatory
|
|
7
|
+
* It is a mandatory constructor parameter for audios entities like {@link Audio | Audio} and {@link PositionalAudio | PositionalAudio}.
|
|
8
8
|
* In most cases, the listener object is a child of the camera
|
|
9
9
|
* So the 3D transformation of the camera represents the 3D transformation of the listener.
|
|
10
10
|
* @example
|
|
@@ -18,6 +18,11 @@ export class ArrayCamera extends PerspectiveCamera {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly isArrayCamera: true;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Whether this camera is used with multiview rendering or not.
|
|
23
|
+
*/
|
|
24
|
+
isMultiViewCamera: boolean;
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* An array of cameras.
|
|
23
28
|
* @defaultValue `[]`
|
three/src/constants.d.ts
CHANGED
|
@@ -371,19 +371,6 @@ export const RGBFormat: 1022;
|
|
|
371
371
|
/** {@link RGBAFormat} is the default and reads the red, green, blue and alpha components. */
|
|
372
372
|
export const RGBAFormat: 1023;
|
|
373
373
|
|
|
374
|
-
/**
|
|
375
|
-
* {@link LuminanceFormat} reads each element as a single luminance component.
|
|
376
|
-
* This is then converted to a floating point, clamped to the range `[0,1]`, and then assembled into an RGBA element by
|
|
377
|
-
* placing the luminance value in the red, green and blue channels, and attaching `1.0` to the alpha channel.
|
|
378
|
-
*/
|
|
379
|
-
export const LuminanceFormat: 1024;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* {@link LuminanceAlphaFormat} reads each element as a luminance/alpha double.
|
|
383
|
-
* The same process occurs as for the {@link LuminanceFormat}, except that the alpha channel may have values other than `1.0`.
|
|
384
|
-
*/
|
|
385
|
-
export const LuminanceAlphaFormat: 1025;
|
|
386
|
-
|
|
387
374
|
/**
|
|
388
375
|
* {@link DepthFormat} reads each element as a single depth value, converts it to floating point, and clamps to the range `[0,1]`.
|
|
389
376
|
* @remarks This is the default for {@link THREE.DepthTexture}.
|
|
@@ -440,8 +427,6 @@ export type PixelFormat =
|
|
|
440
427
|
| typeof AlphaFormat
|
|
441
428
|
| typeof RGBFormat
|
|
442
429
|
| typeof RGBAFormat
|
|
443
|
-
| typeof LuminanceFormat
|
|
444
|
-
| typeof LuminanceAlphaFormat
|
|
445
430
|
| typeof DepthFormat
|
|
446
431
|
| typeof DepthStencilFormat
|
|
447
432
|
| typeof RedFormat
|
|
@@ -797,6 +782,22 @@ export const TimestampQuery: {
|
|
|
797
782
|
};
|
|
798
783
|
export type TimestampQuery = "compute" | "render";
|
|
799
784
|
|
|
785
|
+
export const InterpolationSamplingType: {
|
|
786
|
+
PERSPECTIVE: "perspective";
|
|
787
|
+
LINEAR: "linear";
|
|
788
|
+
FLAT: "flat";
|
|
789
|
+
};
|
|
790
|
+
export type InterpolationSamplingType = "perspective" | "linear" | "flat";
|
|
791
|
+
|
|
792
|
+
export const InterpolationSamplingMode: {
|
|
793
|
+
NORMAL: "normal";
|
|
794
|
+
CENTROID: "centroid";
|
|
795
|
+
SAMPLE: "sample";
|
|
796
|
+
FLAT_FIRST: "flat first";
|
|
797
|
+
FLAT_EITHER: "flat either";
|
|
798
|
+
};
|
|
799
|
+
export type InterpolationSamplingMode = "normal" | "centroid" | "sample" | "flat first" | "flat either";
|
|
800
|
+
|
|
800
801
|
///////////////////////////////////////////////////////////////////////////////
|
|
801
802
|
// Texture - Internal Pixel Formats
|
|
802
803
|
|
|
@@ -172,7 +172,11 @@ export class BufferGeometry<
|
|
|
172
172
|
* You will have to call {@link dispose | .dispose}(), and create a new instance of {@link THREE.BufferGeometry | BufferGeometry}.
|
|
173
173
|
* @defaultValue `{}`
|
|
174
174
|
*/
|
|
175
|
-
morphAttributes:
|
|
175
|
+
morphAttributes: {
|
|
176
|
+
position?: Array<BufferAttribute | InterleavedBufferAttribute> | undefined;
|
|
177
|
+
normal?: Array<BufferAttribute | InterleavedBufferAttribute> | undefined;
|
|
178
|
+
color?: Array<BufferAttribute | InterleavedBufferAttribute> | undefined;
|
|
179
|
+
};
|
|
176
180
|
|
|
177
181
|
/**
|
|
178
182
|
* Used to control the morph target behavior; when set to true, the morph target data is treated as relative offsets, rather than as absolute positions/normals.
|
three/src/core/RenderTarget.d.ts
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MagnificationTextureFilter,
|
|
3
|
-
MinificationTextureFilter,
|
|
4
|
-
PixelFormatGPU,
|
|
5
|
-
TextureDataType,
|
|
6
|
-
Wrapping,
|
|
7
|
-
} from "../constants.js";
|
|
8
1
|
import { Vector4 } from "../math/Vector4.js";
|
|
9
2
|
import { DepthTexture } from "../textures/DepthTexture.js";
|
|
10
|
-
import { Texture } from "../textures/Texture.js";
|
|
3
|
+
import { Texture, TextureParameters } from "../textures/Texture.js";
|
|
11
4
|
import { EventDispatcher } from "./EventDispatcher.js";
|
|
12
5
|
|
|
13
|
-
export interface RenderTargetOptions {
|
|
14
|
-
wrapS?: Wrapping | undefined;
|
|
15
|
-
wrapT?: Wrapping | undefined;
|
|
16
|
-
magFilter?: MagnificationTextureFilter | undefined;
|
|
17
|
-
minFilter?: MinificationTextureFilter | undefined;
|
|
18
|
-
generateMipmaps?: boolean | undefined; // true
|
|
19
|
-
format?: number | undefined; // RGBAFormat
|
|
20
|
-
type?: TextureDataType | undefined; // UnsignedByteType
|
|
21
|
-
anisotropy?: number | undefined; // 1
|
|
22
|
-
colorSpace?: string | undefined;
|
|
23
|
-
internalFormat?: PixelFormatGPU | null | undefined; // null
|
|
6
|
+
export interface RenderTargetOptions extends TextureParameters {
|
|
24
7
|
depthBuffer?: boolean | undefined; // true
|
|
25
8
|
stencilBuffer?: boolean | undefined; // false
|
|
26
9
|
resolveDepthBuffer?: boolean | undefined; // true
|
|
@@ -32,6 +15,8 @@ export interface RenderTargetOptions {
|
|
|
32
15
|
*/
|
|
33
16
|
samples?: number | undefined;
|
|
34
17
|
count?: number | undefined;
|
|
18
|
+
depth?: number | undefined;
|
|
19
|
+
multiview?: boolean | undefined;
|
|
35
20
|
}
|
|
36
21
|
|
|
37
22
|
export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extends EventDispatcher<{ dispose: {} }> {
|
|
@@ -78,6 +63,13 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
|
|
|
78
63
|
*/
|
|
79
64
|
samples: number;
|
|
80
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Whether to this target is used in multiview rendering.
|
|
68
|
+
*
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
multiview: boolean;
|
|
72
|
+
|
|
81
73
|
constructor(width?: number, height?: number, options?: RenderTargetOptions);
|
|
82
74
|
|
|
83
75
|
get texture(): TTexture;
|
three/src/extras/DataUtils.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ declare function toHalfFloat(val: number): number;
|
|
|
14
14
|
*/
|
|
15
15
|
declare function fromHalfFloat(val: number): number;
|
|
16
16
|
|
|
17
|
-
declare
|
|
18
|
-
toHalfFloat:
|
|
19
|
-
fromHalfFloat:
|
|
20
|
-
}
|
|
17
|
+
declare class DataUtils {
|
|
18
|
+
static toHalfFloat(val: number): number;
|
|
19
|
+
static fromHalfFloat(val: number): number;
|
|
20
|
+
}
|
|
21
21
|
|
|
22
22
|
export { DataUtils, fromHalfFloat, toHalfFloat };
|
|
@@ -19,11 +19,18 @@ export class CapsuleGeometry extends BufferGeometry {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create a new instance of {@link CapsuleGeometry}
|
|
21
21
|
* @param radius Radius of the capsule. Expects a `Float`. Default `1`
|
|
22
|
-
* @param
|
|
22
|
+
* @param height Height of the middle section. Expects a `Float`. Default `1`
|
|
23
23
|
* @param capSegments Number of curve segments used to build the caps. Expects a `Integer`. Default `4`
|
|
24
24
|
* @param radialSegments Number of segmented faces around the circumference of the capsule. Expects a `Integer`. Default `8`
|
|
25
|
+
* @param heightSegments Number of rows of faces along the height of the capsule. Optional; defaults to `1`.
|
|
25
26
|
*/
|
|
26
|
-
constructor(
|
|
27
|
+
constructor(
|
|
28
|
+
radius?: number,
|
|
29
|
+
height?: number,
|
|
30
|
+
capSegments?: number,
|
|
31
|
+
radialSegments?: number,
|
|
32
|
+
heightSegments?: number,
|
|
33
|
+
);
|
|
27
34
|
|
|
28
35
|
/**
|
|
29
36
|
* A Read-only _string_ to check if `this` object type.
|
|
@@ -38,9 +45,10 @@ export class CapsuleGeometry extends BufferGeometry {
|
|
|
38
45
|
*/
|
|
39
46
|
readonly parameters: {
|
|
40
47
|
readonly radius: number;
|
|
41
|
-
readonly
|
|
48
|
+
readonly height: number;
|
|
42
49
|
readonly capSegments: number;
|
|
43
50
|
readonly radialSegments: number;
|
|
51
|
+
readonly heightSegments: number;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
/** @internal */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Camera } from "../cameras/Camera.js";
|
|
2
|
+
import { TextureDataType } from "../constants.js";
|
|
2
3
|
import { Object3DJSONObject } from "../core/Object3D.js";
|
|
3
4
|
import { Frustum } from "../math/Frustum.js";
|
|
4
5
|
import { Matrix4 } from "../math/Matrix4.js";
|
|
@@ -86,6 +87,13 @@ export class LightShadow<TCamera extends Camera = Camera> {
|
|
|
86
87
|
*/
|
|
87
88
|
mapSize: Vector2;
|
|
88
89
|
|
|
90
|
+
/**
|
|
91
|
+
* The type of shadow texture. The default is `UnsignedByteType`.
|
|
92
|
+
*
|
|
93
|
+
* @default UnsignedByteType
|
|
94
|
+
*/
|
|
95
|
+
mapType: TextureDataType;
|
|
96
|
+
|
|
89
97
|
/**
|
|
90
98
|
* The depth map generated using the internal camera; a location beyond a pixel's depth is in shadow. Computed internally during rendering.
|
|
91
99
|
* @defaultValue null
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ColorRepresentation } from "../../math/Color.js";
|
|
2
|
+
import { SpotLight } from "../SpotLight.js";
|
|
3
|
+
|
|
4
|
+
declare class ProjectorLight extends SpotLight {
|
|
5
|
+
aspect: number | null;
|
|
6
|
+
|
|
7
|
+
constructor(
|
|
8
|
+
color?: ColorRepresentation,
|
|
9
|
+
intensity?: number,
|
|
10
|
+
distance?: number,
|
|
11
|
+
angle?: number,
|
|
12
|
+
penumbra?: number,
|
|
13
|
+
decay?: number,
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default ProjectorLight;
|