@types/three 0.178.1 → 0.180.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 +2 -3
- three/examples/jsm/controls/DragControls.d.ts +0 -30
- three/examples/jsm/controls/PointerLockControls.d.ts +0 -5
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/EXRExporter.d.ts +2 -2
- three/examples/jsm/exporters/KTX2Exporter.d.ts +2 -2
- three/examples/jsm/exporters/STLExporter.d.ts +2 -2
- three/examples/jsm/exporters/USDZExporter.d.ts +3 -2
- three/examples/jsm/loaders/EXRLoader.d.ts +18 -5
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +2 -2
- three/examples/jsm/loaders/HDRLoader.d.ts +22 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +5 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +9 -15
- three/examples/jsm/loaders/USDLoader.d.ts +9 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +11 -8
- three/examples/jsm/materials/WoodNodeMaterial.d.ts +75 -0
- three/examples/jsm/math/ColorSpaces.d.ts +4 -0
- three/examples/jsm/postprocessing/SSRPass.d.ts +6 -29
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +10 -1
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +14 -8
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +26 -6
- three/examples/jsm/tsl/display/SSRNode.d.ts +8 -3
- three/examples/jsm/tsl/display/TRAANode.d.ts +22 -0
- three/examples/jsm/tsl/display/boxBlur.d.ts +11 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
- three/package.json +4 -4
- three/src/Three.Core.d.ts +2 -0
- three/src/Three.TSL.d.ts +84 -17
- three/src/animation/AnimationClip.d.ts +5 -0
- three/src/animation/KeyframeTrack.d.ts +7 -2
- three/src/animation/tracks/BooleanKeyframeTrack.d.ts +2 -2
- three/src/animation/tracks/StringKeyframeTrack.d.ts +2 -2
- three/src/cameras/Camera.d.ts +15 -8
- three/src/constants.d.ts +6 -2
- three/{examples/jsm/misc → src/core}/Timer.d.ts +3 -17
- three/src/helpers/SkeletonHelper.d.ts +7 -12
- three/src/loaders/FileLoader.d.ts +2 -2
- three/src/loaders/ImageBitmapLoader.d.ts +9 -9
- three/src/loaders/Loader.d.ts +1 -0
- three/src/loaders/LoadingManager.d.ts +23 -19
- three/src/materials/LineBasicMaterial.d.ts +1 -0
- three/src/materials/LineDashedMaterial.d.ts +1 -0
- three/src/materials/MeshBasicMaterial.d.ts +1 -0
- three/src/materials/MeshDepthMaterial.d.ts +1 -0
- three/src/materials/MeshDistanceMaterial.d.ts +2 -1
- three/src/materials/MeshLambertMaterial.d.ts +1 -0
- three/src/materials/MeshMatcapMaterial.d.ts +1 -0
- three/src/materials/MeshNormalMaterial.d.ts +1 -0
- three/src/materials/MeshPhongMaterial.d.ts +1 -0
- three/src/materials/MeshToonMaterial.d.ts +1 -0
- three/src/materials/PointsMaterial.d.ts +1 -0
- three/src/materials/ShaderMaterial.d.ts +1 -0
- three/src/materials/ShadowMaterial.d.ts +1 -0
- three/src/materials/SpriteMaterial.d.ts +1 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -6
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/PointsNodeMaterial.d.ts +22 -0
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +22 -1
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Frustum.d.ts +1 -1
- three/src/math/Line3.d.ts +1 -0
- three/src/math/Matrix4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +4 -0
- three/src/nodes/TSL.d.ts +4 -0
- three/src/nodes/accessors/Camera.d.ts +2 -0
- three/src/nodes/accessors/TextureNode.d.ts +4 -0
- three/src/nodes/core/ContextNode.d.ts +11 -1
- three/src/nodes/core/Node.d.ts +13 -13
- three/src/nodes/core/UniformNode.d.ts +13 -4
- three/src/nodes/core/VarNode.d.ts +11 -15
- three/src/nodes/display/PassNode.d.ts +10 -0
- three/src/nodes/display/ScreenNode.d.ts +4 -1
- three/src/nodes/display/ToneMappingNode.d.ts +2 -2
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -0
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +3 -0
- three/src/nodes/display/ViewportTextureNode.d.ts +4 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +15 -6
- three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +100 -0
- three/src/nodes/materialx/MaterialXNodes.d.ts +85 -20
- three/src/nodes/materialx/lib/mx_noise.d.ts +28 -0
- three/src/nodes/math/BitcastNode.d.ts +25 -0
- three/src/nodes/math/MathNode.d.ts +10 -5
- three/src/nodes/tsl/TSLCore.d.ts +16 -0
- three/src/nodes/utils/EventNode.d.ts +21 -0
- three/src/nodes/utils/RTTNode.d.ts +2 -0
- three/src/nodes/utils/ReflectorNode.d.ts +16 -1
- three/src/nodes/utils/SampleNode.d.ts +3 -2
- three/src/nodes/utils/Timer.d.ts +0 -15
- three/src/objects/InstancedMesh.d.ts +2 -3
- three/src/renderers/WebGLRenderer.d.ts +0 -25
- three/src/renderers/common/Attributes.d.ts +1 -1
- three/src/renderers/common/Color4.d.ts +2 -2
- three/src/renderers/common/Renderer.d.ts +17 -9
- three/src/renderers/common/SampledTexture.d.ts +2 -9
- three/src/renderers/common/Sampler.d.ts +9 -3
- three/src/renderers/common/Storage3DTexture.d.ts +2 -0
- three/src/renderers/common/StorageArrayTexture.d.ts +2 -0
- three/src/renderers/common/StorageTexture.d.ts +2 -0
- three/src/renderers/common/Textures.d.ts +1 -1
- three/src/renderers/common/TimestampQueryPool.d.ts +3 -4
- three/src/renderers/common/XRManager.d.ts +11 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +5 -5
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +0 -1
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +4 -5
- three/src/renderers/webxr/WebXRManager.d.ts +4 -2
- three/src/textures/CompressedTexture.d.ts +4 -4
- three/src/textures/Data3DTexture.d.ts +2 -1
- three/src/textures/DataTexture.d.ts +3 -2
- three/src/textures/ExternalTexture.d.ts +11 -0
- three/src/textures/Texture.d.ts +1 -1
- three/examples/jsm/loaders/RGBMLoader.d.ts +0 -37
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +0 -15
three/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
11
|
+
* Last updated: Wed, 03 Sep 2025 18:38:35 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
|
three/examples/jsm/Addons.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export * from "./loaders/FontLoader.js";
|
|
|
89
89
|
export * from "./loaders/GCodeLoader.js";
|
|
90
90
|
export * from "./loaders/GLTFLoader.js";
|
|
91
91
|
export * from "./loaders/HDRCubeTextureLoader.js";
|
|
92
|
+
export * from "./loaders/HDRLoader.js";
|
|
92
93
|
export * from "./loaders/IESLoader.js";
|
|
93
94
|
export * from "./loaders/KMZLoader.js";
|
|
94
95
|
export * from "./loaders/KTX2Loader.js";
|
|
@@ -108,7 +109,6 @@ export * from "./loaders/PDBLoader.js";
|
|
|
108
109
|
export * from "./loaders/PLYLoader.js";
|
|
109
110
|
export * from "./loaders/PVRLoader.js";
|
|
110
111
|
export * from "./loaders/RGBELoader.js";
|
|
111
|
-
export * from "./loaders/RGBMLoader.js";
|
|
112
112
|
export * from "./loaders/STLLoader.js";
|
|
113
113
|
export * from "./loaders/SVGLoader.js";
|
|
114
114
|
export * from "./loaders/TDSLoader.js";
|
|
@@ -116,7 +116,7 @@ export * from "./loaders/TGALoader.js";
|
|
|
116
116
|
export * from "./loaders/TIFFLoader.js";
|
|
117
117
|
export * from "./loaders/TTFLoader.js";
|
|
118
118
|
export * from "./loaders/UltraHDRLoader.js";
|
|
119
|
-
export * from "./loaders/
|
|
119
|
+
export * from "./loaders/USDLoader.js";
|
|
120
120
|
export * from "./loaders/VOXLoader.js";
|
|
121
121
|
export * from "./loaders/VRMLLoader.js";
|
|
122
122
|
export * from "./loaders/VTKLoader.js";
|
|
@@ -145,7 +145,6 @@ export * from "./misc/MorphAnimMesh.js";
|
|
|
145
145
|
export * from "./misc/MorphBlendMesh.js";
|
|
146
146
|
export * from "./misc/ProgressiveLightMap.js";
|
|
147
147
|
export * from "./misc/RollerCoaster.js";
|
|
148
|
-
export * from "./misc/Timer.js";
|
|
149
148
|
export * from "./misc/TubePainter.js";
|
|
150
149
|
export * from "./misc/Volume.js";
|
|
151
150
|
export * from "./misc/VolumeSlice.js";
|
|
@@ -76,36 +76,6 @@ declare class DragControls extends Controls<DragControlsEventMap> {
|
|
|
76
76
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
77
77
|
*/
|
|
78
78
|
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Returns the internal {@link Raycaster} instance that is used for intersection tests.
|
|
82
|
-
* @deprecated getRaycaster() has been deprecated. Use controls.raycaster instead.
|
|
83
|
-
*/
|
|
84
|
-
getRaycaster(): Raycaster;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Sets an array of draggable objects by overwriting the existing one.
|
|
88
|
-
* @deprecated setObjects() has been deprecated. Use controls.objects instead.
|
|
89
|
-
*/
|
|
90
|
-
setObjects(objects: readonly Object3D[]): void;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Returns the array of draggable objects.
|
|
94
|
-
* @deprecated getObjects() has been deprecated. Use controls.objects instead.
|
|
95
|
-
*/
|
|
96
|
-
getObjects(): Object3D[];
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Adds the event listeners of the controls.
|
|
100
|
-
* @deprecated activate() has been renamed to connect().
|
|
101
|
-
*/
|
|
102
|
-
activate(): void;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Removes the event listeners of the controls.
|
|
106
|
-
* @deprecated deactivate() has been renamed to disconnect().
|
|
107
|
-
*/
|
|
108
|
-
deactivate(): void;
|
|
109
79
|
}
|
|
110
80
|
|
|
111
81
|
export { DragControls };
|
|
@@ -49,11 +49,6 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
|
|
|
49
49
|
*/
|
|
50
50
|
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated getObject() has been deprecated. Use controls.object instead.
|
|
54
|
-
*/
|
|
55
|
-
getObject(): Camera;
|
|
56
|
-
|
|
57
52
|
/**
|
|
58
53
|
* Returns the look direction of the camera.
|
|
59
54
|
* @param v The target vector.
|
|
@@ -22,6 +22,6 @@ export class EXRExporter {
|
|
|
22
22
|
renderer: WebGLRenderer | WebGPURenderer,
|
|
23
23
|
renderTarget: WebGLRenderTarget,
|
|
24
24
|
options?: EXRExporterParseOptions,
|
|
25
|
-
): Promise<Uint8Array
|
|
26
|
-
parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array
|
|
25
|
+
): Promise<Uint8Array<ArrayBuffer>>;
|
|
26
|
+
parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array<ArrayBuffer>>;
|
|
27
27
|
}
|
|
@@ -2,6 +2,6 @@ import { Data3DTexture, DataTexture, WebGLRenderer, WebGLRenderTarget } from "th
|
|
|
2
2
|
import { WebGPURenderer } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
export class KTX2Exporter {
|
|
5
|
-
parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array
|
|
6
|
-
parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array
|
|
5
|
+
parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array<ArrayBuffer>>;
|
|
6
|
+
parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array<ArrayBuffer>>;
|
|
7
7
|
}
|
|
@@ -15,7 +15,7 @@ export interface STLExporterOptions {
|
|
|
15
15
|
export class STLExporter {
|
|
16
16
|
constructor();
|
|
17
17
|
|
|
18
|
-
parse(scene: Object3D, options: STLExporterOptionsBinary): DataView
|
|
18
|
+
parse(scene: Object3D, options: STLExporterOptionsBinary): DataView<ArrayBuffer>;
|
|
19
19
|
parse(scene: Object3D, options?: STLExporterOptionsString): string;
|
|
20
|
-
parse(scene: Object3D, options?: STLExporterOptions): string | DataView
|
|
20
|
+
parse(scene: Object3D, options?: STLExporterOptions): string | DataView<ArrayBuffer>;
|
|
21
21
|
}
|
|
@@ -5,6 +5,7 @@ import * as WebGPUTextureUtils from "../utils/WebGPUTextureUtils.js";
|
|
|
5
5
|
export interface USDZExporterOptions {
|
|
6
6
|
ar?: { anchoring: { type: "plane" }; planeAnchoring: { alignment: "horizontal" | "vertical" | "any" } } | undefined;
|
|
7
7
|
includeAnchoringProperties?: boolean | undefined;
|
|
8
|
+
onlyVisible?: boolean | undefined;
|
|
8
9
|
quickLookCompatible?: boolean | undefined;
|
|
9
10
|
maxTextureSize?: number | undefined;
|
|
10
11
|
}
|
|
@@ -16,10 +17,10 @@ export class USDZExporter {
|
|
|
16
17
|
|
|
17
18
|
parse(
|
|
18
19
|
scene: Object3D,
|
|
19
|
-
onDone: (result: Uint8Array) => void,
|
|
20
|
+
onDone: (result: Uint8Array<ArrayBuffer>) => void,
|
|
20
21
|
onError: (error: unknown) => void,
|
|
21
22
|
options?: USDZExporterOptions,
|
|
22
23
|
): void;
|
|
23
24
|
|
|
24
|
-
parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array
|
|
25
|
+
parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array<ArrayBuffer>>;
|
|
25
26
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DataTextureLoader,
|
|
3
|
+
FloatType,
|
|
4
|
+
HalfFloatType,
|
|
5
|
+
LoadingManager,
|
|
6
|
+
PixelFormat,
|
|
7
|
+
RedFormat,
|
|
8
|
+
RGBAFormat,
|
|
9
|
+
RGFormat,
|
|
10
|
+
TextureDataType,
|
|
11
|
+
} from "three";
|
|
2
12
|
|
|
3
13
|
export interface EXR {
|
|
4
14
|
header: object;
|
|
@@ -7,13 +17,16 @@ export interface EXR {
|
|
|
7
17
|
data: Float32Array | Uint16Array;
|
|
8
18
|
format: PixelFormat;
|
|
9
19
|
colorSpace: string;
|
|
10
|
-
type:
|
|
20
|
+
type: typeof HalfFloatType | typeof FloatType;
|
|
11
21
|
}
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
constructor(manager?: LoadingManager);
|
|
23
|
+
declare class EXRLoader extends DataTextureLoader {
|
|
15
24
|
type: TextureDataType;
|
|
25
|
+
outputFormat: typeof RGBAFormat | typeof RGFormat | typeof RedFormat;
|
|
26
|
+
|
|
27
|
+
constructor(manager?: LoadingManager);
|
|
16
28
|
|
|
17
29
|
parse(buffer: ArrayBuffer): EXR;
|
|
18
|
-
setDataType(type:
|
|
30
|
+
setDataType(type: typeof HalfFloatType | typeof FloatType): this;
|
|
31
|
+
setOutputFormat(value: typeof RGBAFormat | typeof RGFormat | typeof RedFormat): this;
|
|
19
32
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CubeTexture, Loader, LoadingManager, TextureDataType } from "three";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { HDRLoader } from "./HDRLoader.js";
|
|
4
4
|
|
|
5
5
|
export class HDRCubeTextureLoader extends Loader<CubeTexture, readonly string[]> {
|
|
6
6
|
constructor(manager?: LoadingManager);
|
|
7
|
-
hdrLoader:
|
|
7
|
+
hdrLoader: HDRLoader;
|
|
8
8
|
type: TextureDataType;
|
|
9
9
|
|
|
10
10
|
load(
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DataTextureLoader, LoadingManager, TextureDataType } from "three";
|
|
2
|
+
|
|
3
|
+
export interface HDR {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
data: Float32Array | Uint8Array;
|
|
7
|
+
header: string;
|
|
8
|
+
gamma: number;
|
|
9
|
+
exposure: number;
|
|
10
|
+
type: TextureDataType;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class HDRLoader extends DataTextureLoader {
|
|
14
|
+
type: TextureDataType;
|
|
15
|
+
|
|
16
|
+
constructor(manager?: LoadingManager);
|
|
17
|
+
|
|
18
|
+
parse(buffer: ArrayBuffer): HDR;
|
|
19
|
+
setDataType(type: TextureDataType): this;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { HDRLoader };
|
|
@@ -10,17 +10,21 @@ export class LDrawLoader extends Loader<Group> {
|
|
|
10
10
|
|
|
11
11
|
smoothNormals: boolean;
|
|
12
12
|
|
|
13
|
+
partsLibraryPath: string;
|
|
14
|
+
|
|
13
15
|
ConditionalLineMaterial: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial | null;
|
|
14
16
|
|
|
15
17
|
constructor(manager?: LoadingManager);
|
|
16
18
|
|
|
19
|
+
setPartsLibraryPath(path: string): this;
|
|
20
|
+
|
|
17
21
|
setConditionalLineMaterial(
|
|
18
22
|
type: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial,
|
|
19
23
|
): this;
|
|
20
24
|
|
|
21
25
|
preloadMaterials(url: string): Promise<void>;
|
|
22
26
|
|
|
23
|
-
parse(text: string,
|
|
27
|
+
parse(text: string, onLoad: (data: Group) => void, onError?: (error: unknown) => void): void;
|
|
24
28
|
|
|
25
29
|
setMaterials(materials: Material[]): this;
|
|
26
30
|
clearMaterials(): this;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HDR, HDRLoader } from "./HDRLoader.js";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
header: string;
|
|
8
|
-
gamma: number;
|
|
9
|
-
exposure: number;
|
|
10
|
-
type: TextureDataType;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated RGBELoader has been deprecated. Please use HDRLoader instead.
|
|
5
|
+
*/
|
|
6
|
+
export interface RGBE extends HDR {
|
|
11
7
|
}
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
parse(buffer: ArrayBuffer): RGBE;
|
|
18
|
-
setDataType(type: TextureDataType): this;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated RGBELoader has been deprecated. Please use HDRLoader instead.
|
|
11
|
+
*/
|
|
12
|
+
export class RGBELoader extends HDRLoader {
|
|
19
13
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoadingManager } from "three";
|
|
2
|
+
import { USDLoader } from "./USDLoader.js";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated USDZLoader has been deprecated. Please use USDLoader instead.
|
|
6
|
+
*/
|
|
7
|
+
declare class USDZLoader extends USDLoader {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated USDZLoader has been deprecated. Please use USDLoader instead.
|
|
10
|
+
*/
|
|
8
11
|
constructor(manager?: LoadingManager);
|
|
9
|
-
|
|
10
|
-
parse(buffer: ArrayBuffer | string): Group;
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export { USDZLoader };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
|
|
3
|
+
export type WoodGenus =
|
|
4
|
+
| "teak"
|
|
5
|
+
| "walnut"
|
|
6
|
+
| "white_oak"
|
|
7
|
+
| "pine"
|
|
8
|
+
| "poplar"
|
|
9
|
+
| "maple"
|
|
10
|
+
| "red_oak"
|
|
11
|
+
| "cherry"
|
|
12
|
+
| "cedar"
|
|
13
|
+
| "mahogany";
|
|
14
|
+
export type WoodFinish = "raw" | "matte" | "semigloss" | "gloss";
|
|
15
|
+
|
|
16
|
+
export const WoodGenuses: WoodGenus[];
|
|
17
|
+
export const Finishes: WoodFinish[];
|
|
18
|
+
|
|
19
|
+
export interface WoodParameters {
|
|
20
|
+
transformationMatrix: THREE.Matrix4;
|
|
21
|
+
centerSize: number;
|
|
22
|
+
largeWarpScale: number;
|
|
23
|
+
largeGrainStretch: number;
|
|
24
|
+
smallWarpStrength: number;
|
|
25
|
+
smallWarpScale: number;
|
|
26
|
+
fineWarpStrength: number;
|
|
27
|
+
fineWarpScale: number;
|
|
28
|
+
ringThickness: number;
|
|
29
|
+
ringBias: number;
|
|
30
|
+
ringSizeVariance: number;
|
|
31
|
+
ringVarianceScale: number;
|
|
32
|
+
barkThickness: number;
|
|
33
|
+
splotchScale: number;
|
|
34
|
+
splotchIntensity: number;
|
|
35
|
+
cellScale: number;
|
|
36
|
+
cellSize: number;
|
|
37
|
+
darkGrainColor: string | THREE.Color;
|
|
38
|
+
lightGrainColor: string | THREE.Color;
|
|
39
|
+
genus: WoodGenus;
|
|
40
|
+
finish: WoodFinish;
|
|
41
|
+
clearcoat: number;
|
|
42
|
+
clearcoatRoughness: number;
|
|
43
|
+
clearcoatDarken: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function GetWoodPreset(genus: WoodGenus, finish: WoodFinish): WoodParameters;
|
|
47
|
+
|
|
48
|
+
export class WoodNodeMaterial extends THREE.MeshPhysicalMaterial {
|
|
49
|
+
readonly isWoodNodeMaterial: true;
|
|
50
|
+
|
|
51
|
+
transformationMatrix: THREE.Matrix4;
|
|
52
|
+
centerSize: number;
|
|
53
|
+
largeWarpScale: number;
|
|
54
|
+
largeGrainStretch: number;
|
|
55
|
+
smallWarpStrength: number;
|
|
56
|
+
smallWarpScale: number;
|
|
57
|
+
fineWarpStrength: number;
|
|
58
|
+
fineWarpScale: number;
|
|
59
|
+
ringThickness: number;
|
|
60
|
+
ringBias: number;
|
|
61
|
+
ringSizeVariance: number;
|
|
62
|
+
ringVarianceScale: number;
|
|
63
|
+
barkThickness: number;
|
|
64
|
+
splotchScale: number;
|
|
65
|
+
splotchIntensity: number;
|
|
66
|
+
cellScale: number;
|
|
67
|
+
cellSize: number;
|
|
68
|
+
darkGrainColor: THREE.Color;
|
|
69
|
+
lightGrainColor: THREE.Color;
|
|
70
|
+
clearcoatDarken: number;
|
|
71
|
+
|
|
72
|
+
constructor(params?: Partial<WoodParameters>);
|
|
73
|
+
|
|
74
|
+
static fromPreset(genus?: WoodGenus, finish?: WoodFinish): WoodNodeMaterial;
|
|
75
|
+
}
|
|
@@ -9,3 +9,7 @@ export const LinearDisplayP3ColorSpaceImpl: ColorSpaceDefinition;
|
|
|
9
9
|
export const LinearRec2020ColorSpace: "rec2020-linear";
|
|
10
10
|
|
|
11
11
|
export const LinearRec2020ColorSpaceImpl: ColorSpaceDefinition;
|
|
12
|
+
|
|
13
|
+
export const ExtendedSRGBColorSpace: "extended-srgb";
|
|
14
|
+
|
|
15
|
+
export const ExtendedSRGBColorSpaceImpl: ColorSpaceDefinition;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Camera,
|
|
3
3
|
Color,
|
|
4
|
-
ColorRepresentation,
|
|
5
|
-
Material,
|
|
6
4
|
Mesh,
|
|
7
5
|
MeshBasicMaterial,
|
|
8
6
|
MeshNormalMaterial,
|
|
@@ -12,7 +10,7 @@ import {
|
|
|
12
10
|
WebGLRenderTarget,
|
|
13
11
|
} from "three";
|
|
14
12
|
import { ReflectorForSSRPass } from "../objects/ReflectorForSSRPass.js";
|
|
15
|
-
import { FullScreenQuad, Pass } from "
|
|
13
|
+
import { FullScreenQuad, Pass } from "./Pass.js";
|
|
16
14
|
|
|
17
15
|
export interface SSRPassParams {
|
|
18
16
|
renderer: WebGLRenderer;
|
|
@@ -26,7 +24,7 @@ export interface SSRPassParams {
|
|
|
26
24
|
groundReflector: ReflectorForSSRPass | null;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
declare class SSRPass extends Pass {
|
|
30
28
|
width: number;
|
|
31
29
|
height: number;
|
|
32
30
|
clear: boolean;
|
|
@@ -94,29 +92,8 @@ export class SSRPass extends Pass {
|
|
|
94
92
|
|
|
95
93
|
constructor(params: SSRPassParams);
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
renderPass: (
|
|
100
|
-
renderer: WebGLRenderer,
|
|
101
|
-
passMaterial: Material,
|
|
102
|
-
renderTarget: WebGLRenderTarget,
|
|
103
|
-
clearColor: ColorRepresentation,
|
|
104
|
-
clearAlpha: ColorRepresentation,
|
|
105
|
-
) => void;
|
|
106
|
-
|
|
107
|
-
renderOverride: (
|
|
108
|
-
renderer: WebGLRenderer,
|
|
109
|
-
passMaterial: Material,
|
|
110
|
-
renderTarget: WebGLRenderTarget,
|
|
111
|
-
clearColor: ColorRepresentation,
|
|
112
|
-
clearAlpha: ColorRepresentation,
|
|
113
|
-
) => void;
|
|
114
|
-
|
|
115
|
-
renderMetalness: (
|
|
116
|
-
renderer: WebGLRenderer,
|
|
117
|
-
passMaterial: Material,
|
|
118
|
-
renderTarget: WebGLRenderTarget,
|
|
119
|
-
clearColor: ColorRepresentation,
|
|
120
|
-
clearAlpha: ColorRepresentation,
|
|
121
|
-
) => void;
|
|
95
|
+
get resolutionScale(): number;
|
|
96
|
+
set resolutionScale(value: number);
|
|
122
97
|
}
|
|
98
|
+
|
|
99
|
+
export { SSRPass };
|
|
@@ -6,13 +6,22 @@ export default class AnamorphicNode extends TempNode {
|
|
|
6
6
|
thresholdNode: Node;
|
|
7
7
|
scaleNode: Node;
|
|
8
8
|
samples: number;
|
|
9
|
-
|
|
9
|
+
resolutionScale: number;
|
|
10
10
|
|
|
11
11
|
constructor(textureNode: Node, thresholdNode: Node, scaleNode: Node, samples: number);
|
|
12
12
|
|
|
13
13
|
getTextureNode(): Node;
|
|
14
14
|
|
|
15
15
|
setSize(width: number, height: number): void;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
|
|
19
|
+
*/
|
|
20
|
+
get resolution(): Vector2;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
|
|
23
|
+
*/
|
|
24
|
+
set resolution(value: Vector2);
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
export const anamorphic: (
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
-
import { Node, TempNode, TextureNode
|
|
2
|
+
import { Node, TempNode, TextureNode } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
declare class DepthOfFieldNode extends TempNode {
|
|
5
5
|
textureNode: TextureNode;
|
|
6
6
|
viewZNode: Node;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
focusDistanceNode: Node;
|
|
9
|
+
focalLengthNode: Node;
|
|
10
|
+
bokehScaleNode: Node;
|
|
11
11
|
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
textureNode: TextureNode,
|
|
14
|
+
viewZNode: Node,
|
|
15
|
+
focusDistanceNode: Node,
|
|
16
|
+
focalLengthNode: Node,
|
|
17
|
+
bokehScaleNode: Node,
|
|
18
|
+
);
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
export default DepthOfFieldNode;
|
|
@@ -17,7 +23,7 @@ export default DepthOfFieldNode;
|
|
|
17
23
|
export const dof: (
|
|
18
24
|
node: Node,
|
|
19
25
|
viewZNode: Node,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
focusDistance?: Node | number,
|
|
27
|
+
focalLength?: Node | number,
|
|
28
|
+
bokehScale?: Node | number,
|
|
23
29
|
) => ShaderNodeObject<DepthOfFieldNode>;
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
import { ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { Node, TempNode, TextureNode, Vector2 } from "three/webgpu";
|
|
3
3
|
|
|
4
|
+
export interface GaussianBlurNodeOptions {
|
|
5
|
+
premultipliedAlpha?: boolean | undefined;
|
|
6
|
+
resolution?: Vector2 | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
declare class GaussianBlurNode extends TempNode {
|
|
5
10
|
textureNode: TextureNode;
|
|
6
11
|
directionNode: Node | null;
|
|
7
12
|
sigma: number;
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
resolutionScale: number;
|
|
10
15
|
|
|
11
16
|
premultipliedAlpha: boolean;
|
|
12
17
|
|
|
13
|
-
constructor(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
constructor(
|
|
19
|
+
textureNode: TextureNode,
|
|
20
|
+
directionNode?: Node | null,
|
|
21
|
+
sigma?: number,
|
|
22
|
+
options?: GaussianBlurNodeOptions,
|
|
23
|
+
);
|
|
18
24
|
|
|
19
25
|
setSize(width: number, height: number): void;
|
|
20
26
|
|
|
21
27
|
getTextureNode(): TextureNode;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
|
|
31
|
+
*/
|
|
32
|
+
get resolution(): Vector2;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
|
|
35
|
+
*/
|
|
36
|
+
set resolution(value: Vector2);
|
|
22
37
|
}
|
|
23
38
|
|
|
24
39
|
export default GaussianBlurNode;
|
|
@@ -27,7 +42,12 @@ export const gaussianBlur: (
|
|
|
27
42
|
node: Node,
|
|
28
43
|
directionNode?: Node | number | null,
|
|
29
44
|
sigma?: number,
|
|
45
|
+
options?: GaussianBlurNodeOptions,
|
|
30
46
|
) => ShaderNodeObject<GaussianBlurNode>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated "premultipliedGaussianBlur()" is deprecated. Use "gaussianBlur()" with "premultipliedAlpha: true" option instead.
|
|
50
|
+
*/
|
|
31
51
|
export const premultipliedGaussianBlur: (
|
|
32
52
|
node: Node,
|
|
33
53
|
directionNode?: Node | number | null,
|
|
@@ -6,20 +6,24 @@ declare class SSRNode extends TempNode {
|
|
|
6
6
|
depthNode: ShaderNodeObject<Node>;
|
|
7
7
|
normalNode: ShaderNodeObject<Node>;
|
|
8
8
|
metalnessNode: ShaderNodeObject<Node>;
|
|
9
|
-
|
|
9
|
+
roughnessNode: ShaderNodeObject<Node> | null;
|
|
10
|
+
camera: Camera | null;
|
|
10
11
|
|
|
11
12
|
resolutionScale: number;
|
|
12
13
|
|
|
13
14
|
maxDistance: UniformNode<number>;
|
|
14
15
|
thickness: UniformNode<number>;
|
|
15
16
|
opacity: UniformNode<number>;
|
|
17
|
+
quality: UniformNode<number>;
|
|
18
|
+
blurQuality: UniformNode<number>;
|
|
16
19
|
|
|
17
20
|
constructor(
|
|
18
21
|
colorNode: ShaderNodeObject<Node>,
|
|
19
22
|
depthNode: ShaderNodeObject<Node>,
|
|
20
23
|
normalNode: ShaderNodeObject<Node>,
|
|
21
24
|
metalnessNode: ShaderNodeObject<Node>,
|
|
22
|
-
|
|
25
|
+
roughnessNode?: ShaderNodeObject<Node> | null,
|
|
26
|
+
camera?: Camera | null,
|
|
23
27
|
);
|
|
24
28
|
|
|
25
29
|
getTextureNode(): ShaderNodeObject<TextureNode>;
|
|
@@ -34,5 +38,6 @@ export const ssr: (
|
|
|
34
38
|
depthNode: Node,
|
|
35
39
|
normalNode: Node,
|
|
36
40
|
metalnessNode: Node,
|
|
37
|
-
|
|
41
|
+
roughnessNode?: Node | null,
|
|
42
|
+
camera?: Camera | null,
|
|
38
43
|
) => ShaderNodeObject<SSRNode>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Camera, Node, TempNode, TextureNode } from "three/webgpu";
|
|
3
|
+
|
|
4
|
+
declare class TRAANode extends TempNode {
|
|
5
|
+
readonly isTRAANode: true;
|
|
6
|
+
|
|
7
|
+
beautyNode: TextureNode;
|
|
8
|
+
depthNode: TextureNode;
|
|
9
|
+
velocityNode: TextureNode;
|
|
10
|
+
camera: Camera;
|
|
11
|
+
|
|
12
|
+
constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default TRAANode;
|
|
16
|
+
|
|
17
|
+
export const traa: (
|
|
18
|
+
beautyNode: Node,
|
|
19
|
+
depthNode: TextureNode,
|
|
20
|
+
velocityNode: TextureNode,
|
|
21
|
+
camera: Camera,
|
|
22
|
+
) => ShaderNodeObject<TRAANode>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Node } from "three/webgpu";
|
|
3
|
+
|
|
4
|
+
export interface BoxBlurOptions {
|
|
5
|
+
size?: Node | undefined;
|
|
6
|
+
separation?: Node | undefined;
|
|
7
|
+
mask?: Node | null | undefined;
|
|
8
|
+
premultipliedAlpha?: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const boxBlur: (textureNode: Node, options?: BoxBlurOptions) => ShaderNodeObject<Node>;
|