@types/three 0.181.0 → 0.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/DragControls.d.ts +1 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
- three/examples/jsm/controls/FlyControls.d.ts +1 -1
- three/examples/jsm/controls/OrbitControls.d.ts +1 -1
- three/examples/jsm/controls/PointerLockControls.d.ts +1 -1
- three/examples/jsm/controls/TrackballControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +1 -1
- three/examples/jsm/loaders/UltraHDRLoader.d.ts +7 -0
- three/examples/jsm/loaders/VOXLoader.d.ts +22 -5
- three/examples/jsm/math/Octree.d.ts +36 -14
- three/examples/jsm/objects/SkyMesh.d.ts +5 -0
- three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
- three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
- three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
- three/examples/jsm/transpiler/AST.d.ts +17 -0
- three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
- three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -1
- three/examples/jsm/tsl/display/SSSNode.d.ts +2 -0
- three/examples/jsm/tsl/display/TRAANode.d.ts +5 -0
- three/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
- three/package.json +3 -3
- three/src/Three.TSL.d.ts +14 -2
- three/src/animation/AnimationMixer.d.ts +42 -0
- three/src/animation/AnimationUtils.d.ts +3 -8
- three/src/constants.d.ts +14 -0
- three/src/core/BufferGeometry.d.ts +3 -1
- three/src/extras/Controls.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +10 -2
- three/src/lights/HemisphereLight.d.ts +8 -1
- three/src/lights/Light.d.ts +8 -12
- three/src/lights/LightProbe.d.ts +7 -3
- three/src/lights/PointLight.d.ts +12 -1
- three/src/lights/PointLightShadow.d.ts +1 -8
- three/src/lights/SpotLight.d.ts +17 -2
- three/src/materials/Material.d.ts +1 -0
- three/src/materials/ShaderMaterial.d.ts +18 -3
- three/src/materials/nodes/NodeMaterial.d.ts +7 -0
- three/src/nodes/TSL.d.ts +4 -1
- three/src/nodes/accessors/BufferAttributeNode.d.ts +13 -12
- three/src/nodes/accessors/InstanceNode.d.ts +7 -6
- three/src/nodes/accessors/Texture3DNode.d.ts +12 -0
- three/src/nodes/core/ContextNode.d.ts +19 -3
- three/src/nodes/core/NodeUtils.d.ts +1 -1
- three/src/nodes/core/PropertyNode.d.ts +2 -0
- three/src/nodes/display/NormalMapNode.d.ts +3 -1
- three/src/nodes/display/PassNode.d.ts +8 -0
- three/src/nodes/functions/BSDF/DFGLUT.d.ts +12 -0
- three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
- three/src/nodes/lighting/AnalyticLightNode.d.ts +2 -0
- three/src/nodes/lighting/PointShadowNode.d.ts +11 -15
- three/src/nodes/lighting/ShadowFilterNode.d.ts +2 -0
- three/src/nodes/math/BitcountNode.d.ts +21 -0
- three/src/nodes/math/PackFloatNode.d.ts +19 -0
- three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
- three/src/nodes/tsl/TSLCore.d.ts +18 -18
- three/src/nodes/utils/Packing.d.ts +1 -0
- three/src/nodes/utils/PostProcessingUtils.d.ts +2 -0
- three/src/nodes/utils/UVUtils.d.ts +3 -0
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +4 -2
- three/src/renderers/WebGLRenderer.d.ts +22 -4
- three/src/renderers/common/Binding.d.ts +6 -0
- three/src/renderers/common/Buffer.d.ts +24 -0
- three/src/renderers/common/ChainMap.d.ts +8 -1
- three/src/renderers/common/Geometries.d.ts +7 -0
- three/src/renderers/common/RenderContexts.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +6 -0
- three/src/renderers/common/Renderer.d.ts +24 -13
- three/src/renderers/common/UniformsGroup.d.ts +1 -0
- three/src/renderers/shaders/ShaderLib.d.ts +1 -1
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- three/src/renderers/webgl/WebGLPrograms.d.ts +0 -1
- three/src/textures/CubeDepthTexture.d.ts +41 -0
- three/src/textures/CubeTexture.d.ts +4 -4
- three/src/utils.d.ts +13 -1
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +0 -10
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import TempNode from "../core/TempNode.js";
|
|
3
|
+
import { PackFloatNodeEncoding } from "./PackFloatNode.js";
|
|
4
|
+
|
|
5
|
+
declare class PackFloatNode extends TempNode {
|
|
6
|
+
uintNode: Node;
|
|
7
|
+
encoding: PackFloatNodeEncoding;
|
|
8
|
+
|
|
9
|
+
readonly isPackFloatNode: true;
|
|
10
|
+
|
|
11
|
+
constructor(encoding: PackFloatNodeEncoding, uintNode: Node);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default PackFloatNode;
|
|
15
|
+
|
|
16
|
+
export const unpackSnorm2x16: (value: Node) => PackFloatNode;
|
|
17
|
+
export const unpackUnorm2x16: (value: Node) => PackFloatNode;
|
|
18
|
+
export const unpackHalf2x16: (value: Node) => PackFloatNode;
|
three/src/nodes/tsl/TSLCore.d.ts
CHANGED
|
@@ -483,38 +483,38 @@ declare module "../Nodes.js" {
|
|
|
483
483
|
toVec2: () => Node;
|
|
484
484
|
toVec2Assign: () => this;
|
|
485
485
|
|
|
486
|
-
|
|
487
|
-
|
|
486
|
+
toIVec2: () => Node;
|
|
487
|
+
toIVec2Assign: () => this;
|
|
488
488
|
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
toUVec2: () => Node;
|
|
490
|
+
toUVec2Assign: () => this;
|
|
491
491
|
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
toBVec2: () => Node;
|
|
493
|
+
toBVec2Assign: () => this;
|
|
494
494
|
|
|
495
495
|
toVec3: () => Node;
|
|
496
496
|
toVec3Assign: () => this;
|
|
497
497
|
|
|
498
|
-
|
|
499
|
-
|
|
498
|
+
toIVec3: () => Node;
|
|
499
|
+
toIVec3Assign: () => this;
|
|
500
500
|
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
toUVec3: () => Node;
|
|
502
|
+
toUVec3Assign: () => this;
|
|
503
503
|
|
|
504
|
-
|
|
505
|
-
|
|
504
|
+
toBVec3: () => Node;
|
|
505
|
+
toBVec3Assign: () => this;
|
|
506
506
|
|
|
507
507
|
toVec4: () => Node;
|
|
508
508
|
toVec4Assign: () => this;
|
|
509
509
|
|
|
510
|
-
|
|
511
|
-
|
|
510
|
+
toIVec4: () => Node;
|
|
511
|
+
toIVec4Assign: () => this;
|
|
512
512
|
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
toUVec4: () => Node;
|
|
514
|
+
toUVec4Assign: () => this;
|
|
515
515
|
|
|
516
|
-
|
|
517
|
-
|
|
516
|
+
toBVec4: () => Node;
|
|
517
|
+
toBVec4Assign: () => this;
|
|
518
518
|
|
|
519
519
|
toMat2: () => Node;
|
|
520
520
|
toMat2Assign: () => this;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import ContextNode from "../core/ContextNode.js";
|
|
1
2
|
import Node from "../core/Node.js";
|
|
2
3
|
import OperatorNode from "../math/OperatorNode.js";
|
|
3
4
|
|
|
5
|
+
export function replaceDefaultUV(callback: (node: Node) => Node, node?: Node | null): ContextNode;
|
|
6
|
+
|
|
4
7
|
export const rotateUV: (
|
|
5
8
|
uv: Node,
|
|
6
9
|
rotation: Node,
|
three/src/objects/LOD.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export class LOD<TEventMap extends Object3DEventMap = Object3DEventMap> extends
|
|
|
57
57
|
/**
|
|
58
58
|
* An array of level objects
|
|
59
59
|
*/
|
|
60
|
-
levels: Array<{
|
|
60
|
+
readonly levels: Array<{
|
|
61
61
|
/** The Object3D to display at this level. */
|
|
62
62
|
object: Object3D;
|
|
63
63
|
/** The distance at which to display this level of detail. Expects a `Float`. */
|
three/src/objects/Skeleton.d.ts
CHANGED
|
@@ -61,12 +61,14 @@ export class Skeleton {
|
|
|
61
61
|
/**
|
|
62
62
|
* The array buffer holding the bone data when using a vertex texture.
|
|
63
63
|
*/
|
|
64
|
-
boneMatrices: Float32Array;
|
|
64
|
+
boneMatrices: Float32Array | null;
|
|
65
|
+
|
|
66
|
+
previousBoneMatrices: Float32Array | null;
|
|
65
67
|
|
|
66
68
|
/**
|
|
67
69
|
* The {@link THREE.DataTexture | DataTexture} holding the bone data when using a vertex texture.
|
|
68
70
|
*/
|
|
69
|
-
boneTexture:
|
|
71
|
+
boneTexture: DataTexture | null;
|
|
70
72
|
|
|
71
73
|
frame: number;
|
|
72
74
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Camera } from "../cameras/Camera.js";
|
|
2
|
-
import { CullFace, ShadowMapType, ToneMapping, WebGLCoordinateSystem } from "../constants.js";
|
|
2
|
+
import { CullFace, ShadowMapType, TextureDataType, ToneMapping, WebGLCoordinateSystem } from "../constants.js";
|
|
3
3
|
import { TypedArray } from "../core/BufferAttribute.js";
|
|
4
4
|
import { BufferGeometry } from "../core/BufferGeometry.js";
|
|
5
5
|
import { Object3D } from "../core/Object3D.js";
|
|
@@ -76,6 +76,11 @@ export interface WebGLRendererParameters extends WebGLCapabilitiesParameters {
|
|
|
76
76
|
* default is false.
|
|
77
77
|
*/
|
|
78
78
|
failIfMajorPerformanceCaveat?: boolean | undefined;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @default UnsignedByteType
|
|
82
|
+
*/
|
|
83
|
+
outputBufferType?: TextureDataType | undefined;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
export interface WebGLDebug {
|
|
@@ -100,6 +105,17 @@ export interface WebGLDebug {
|
|
|
100
105
|
| null;
|
|
101
106
|
}
|
|
102
107
|
|
|
108
|
+
export interface Effect {
|
|
109
|
+
setSize(width: number, height: number): void;
|
|
110
|
+
render(
|
|
111
|
+
renderer: WebGLRenderer,
|
|
112
|
+
writeBuffer: WebGLRenderTarget,
|
|
113
|
+
readBuffer: WebGLRenderTarget,
|
|
114
|
+
deltaTime: number,
|
|
115
|
+
maskActive: boolean,
|
|
116
|
+
): void;
|
|
117
|
+
}
|
|
118
|
+
|
|
103
119
|
/**
|
|
104
120
|
* The WebGL renderer displays your beautifully crafted scenes using WebGL, if your device supports it.
|
|
105
121
|
* This renderer has way better performance than CanvasRenderer.
|
|
@@ -228,9 +244,6 @@ export class WebGLRenderer {
|
|
|
228
244
|
getPixelRatio(): number;
|
|
229
245
|
setPixelRatio(value: number): void;
|
|
230
246
|
|
|
231
|
-
getDrawingBufferSize(target: Vector2): Vector2;
|
|
232
|
-
setDrawingBufferSize(width: number, height: number, pixelRatio: number): void;
|
|
233
|
-
|
|
234
247
|
getSize(target: Vector2): Vector2;
|
|
235
248
|
|
|
236
249
|
/**
|
|
@@ -238,6 +251,11 @@ export class WebGLRenderer {
|
|
|
238
251
|
*/
|
|
239
252
|
setSize(width: number, height: number, updateStyle?: boolean): void;
|
|
240
253
|
|
|
254
|
+
getDrawingBufferSize(target: Vector2): Vector2;
|
|
255
|
+
setDrawingBufferSize(width: number, height: number, pixelRatio: number): void;
|
|
256
|
+
|
|
257
|
+
setEffects(effects: Effect[] | null): void;
|
|
258
|
+
|
|
241
259
|
getCurrentViewport(target: Vector4): Vector4;
|
|
242
260
|
|
|
243
261
|
/**
|
|
@@ -22,6 +22,12 @@ declare class Binding {
|
|
|
22
22
|
* @param {number} visibility - The shader stage.
|
|
23
23
|
*/
|
|
24
24
|
setVisibility(visibility: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* The shader stages in which the binding's resource is visible.
|
|
27
|
+
*
|
|
28
|
+
* @return {number} The visibility bitmask.
|
|
29
|
+
*/
|
|
30
|
+
getVisibility(): number;
|
|
25
31
|
/**
|
|
26
32
|
* Clones the binding.
|
|
27
33
|
*
|
|
@@ -10,6 +10,10 @@ declare class Buffer extends Binding {
|
|
|
10
10
|
readonly isBuffer: true;
|
|
11
11
|
bytesPerElement: number;
|
|
12
12
|
_buffer: Float32Array | null;
|
|
13
|
+
_updateRanges: {
|
|
14
|
+
start: number;
|
|
15
|
+
count: number;
|
|
16
|
+
}[];
|
|
13
17
|
/**
|
|
14
18
|
* Constructs a new buffer.
|
|
15
19
|
*
|
|
@@ -17,6 +21,26 @@ declare class Buffer extends Binding {
|
|
|
17
21
|
* @param {TypedArray} [buffer=null] - The buffer.
|
|
18
22
|
*/
|
|
19
23
|
constructor(name?: string, buffer?: Float32Array | null);
|
|
24
|
+
/**
|
|
25
|
+
* The array of update ranges.
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<{start: number, count: number}>}
|
|
28
|
+
*/
|
|
29
|
+
get updateRanges(): {
|
|
30
|
+
start: number;
|
|
31
|
+
count: number;
|
|
32
|
+
}[];
|
|
33
|
+
/**
|
|
34
|
+
* Adds an update range.
|
|
35
|
+
*
|
|
36
|
+
* @param {number} start - The start index.
|
|
37
|
+
* @param {number} count - The number of elements.
|
|
38
|
+
*/
|
|
39
|
+
addUpdateRange(start: number, count: number): void;
|
|
40
|
+
/**
|
|
41
|
+
* Clears all update ranges.
|
|
42
|
+
*/
|
|
43
|
+
clearUpdateRanges(): void;
|
|
20
44
|
/**
|
|
21
45
|
* The buffer's byte length.
|
|
22
46
|
*
|
|
@@ -8,11 +8,18 @@ type RecursiveWeakMap<K extends readonly object[], V> = WeakMap<K[number], V | R
|
|
|
8
8
|
* @private
|
|
9
9
|
*/
|
|
10
10
|
declare class ChainMap<K extends readonly object[], V> {
|
|
11
|
-
|
|
11
|
+
weakMaps: Record<number, RecursiveWeakMap<K, V>>;
|
|
12
12
|
/**
|
|
13
13
|
* Constructs a new Chain Map.
|
|
14
14
|
*/
|
|
15
15
|
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Returns the Weak Map for the given keys.
|
|
18
|
+
*
|
|
19
|
+
* @param {Array<Object>} keys - List of keys.
|
|
20
|
+
* @return {WeakMap} The weak map.
|
|
21
|
+
*/
|
|
22
|
+
_getWeakMap(keys: K): RecursiveWeakMap<K, V>;
|
|
16
23
|
/**
|
|
17
24
|
* Returns the value for the given array of keys.
|
|
18
25
|
*
|
|
@@ -72,6 +72,13 @@ declare class Geometries extends DataMap<{
|
|
|
72
72
|
* @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used.
|
|
73
73
|
*/
|
|
74
74
|
getIndirect(renderObject: RenderObject): import("./IndirectStorageBufferAttribute.js").default | null;
|
|
75
|
+
/**
|
|
76
|
+
* Returns the byte offset into the indirect attribute buffer of the given render object.
|
|
77
|
+
*
|
|
78
|
+
* @param {RenderObject} renderObject - The render object.
|
|
79
|
+
* @return {number} The byte offset into the indirect attribute buffer.
|
|
80
|
+
*/
|
|
81
|
+
getIndirectOffset(renderObject: RenderObject): number | number[];
|
|
75
82
|
/**
|
|
76
83
|
* Returns the index of the given render object's geometry. This is implemented
|
|
77
84
|
* in a method to return a wireframe index if necessary.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Camera } from "../../cameras/Camera.js";
|
|
2
2
|
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
3
|
+
import MRTNode from "../../nodes/core/MRTNode.js";
|
|
3
4
|
import { Scene } from "../../scenes/Scene.js";
|
|
4
5
|
import ChainMap from "./ChainMap.js";
|
|
5
6
|
import RenderContext from "./RenderContext.js";
|
|
@@ -22,9 +23,10 @@ declare class RenderContexts {
|
|
|
22
23
|
* @param {Scene} scene - The scene.
|
|
23
24
|
* @param {Camera} camera - The camera that is used to render the scene.
|
|
24
25
|
* @param {?RenderTarget} [renderTarget=null] - The active render target.
|
|
26
|
+
* @param {?MRT} [mrt=null] - The active multiple render target.
|
|
25
27
|
* @return {RenderContext} The render context.
|
|
26
28
|
*/
|
|
27
|
-
get(scene: Scene, camera: Camera, renderTarget?: RenderTarget | null): RenderContext;
|
|
29
|
+
get(scene: Scene, camera: Camera, renderTarget?: RenderTarget | null, mrt?: MRTNode | null): RenderContext;
|
|
28
30
|
/**
|
|
29
31
|
* Returns a render context intended for clear operations.
|
|
30
32
|
*
|
|
@@ -163,6 +163,12 @@ declare class RenderObject {
|
|
|
163
163
|
* @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used.
|
|
164
164
|
*/
|
|
165
165
|
getIndirect(): import("./IndirectStorageBufferAttribute.js").default | null;
|
|
166
|
+
/**
|
|
167
|
+
* Returns the byte offset into the indirect attribute buffer.
|
|
168
|
+
*
|
|
169
|
+
* @return {number|Array<number>} The byte offset into the indirect attribute buffer.
|
|
170
|
+
*/
|
|
171
|
+
getIndirectOffset(): number | number[];
|
|
166
172
|
/**
|
|
167
173
|
* Returns an array that acts as a key for identifying the render object in a chain map.
|
|
168
174
|
*
|
|
@@ -64,7 +64,7 @@ export interface RendererParameters {
|
|
|
64
64
|
antialias?: boolean | undefined;
|
|
65
65
|
samples?: number | undefined;
|
|
66
66
|
getFallback?: ((error: unknown) => Backend) | null | undefined;
|
|
67
|
-
|
|
67
|
+
outputBufferType?: TextureDataType | undefined;
|
|
68
68
|
multiview?: boolean | undefined;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -156,7 +156,7 @@ declare class Renderer {
|
|
|
156
156
|
) => void;
|
|
157
157
|
_isDeviceLost: boolean;
|
|
158
158
|
onDeviceLost: (info: DeviceLostInfo) => void;
|
|
159
|
-
|
|
159
|
+
_outputBufferType: TextureDataType;
|
|
160
160
|
_initialized: boolean;
|
|
161
161
|
_initPromise: Promise<this> | null;
|
|
162
162
|
_compilationPromises: Promise<void>[] | null;
|
|
@@ -195,7 +195,7 @@ declare class Renderer {
|
|
|
195
195
|
* @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0
|
|
196
196
|
* to overwrite the default.
|
|
197
197
|
* @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted.
|
|
198
|
-
* @property {number} [
|
|
198
|
+
* @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best
|
|
199
199
|
* quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though.
|
|
200
200
|
* @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported.
|
|
201
201
|
*/
|
|
@@ -243,7 +243,7 @@ declare class Renderer {
|
|
|
243
243
|
* @param {Object3D} scene - The scene or 3D object to precompile.
|
|
244
244
|
* @param {Camera} camera - The camera that is used to render the scene.
|
|
245
245
|
* @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added.
|
|
246
|
-
* @return {Promise
|
|
246
|
+
* @return {Promise} A Promise that resolves when the compile has been finished.
|
|
247
247
|
*/
|
|
248
248
|
compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise<void>;
|
|
249
249
|
/**
|
|
@@ -265,12 +265,12 @@ declare class Renderer {
|
|
|
265
265
|
* @return {Promise} A Promise that resolves when synchronization has been finished.
|
|
266
266
|
*/
|
|
267
267
|
waitForGPU(): Promise<void>;
|
|
268
|
+
set inspector(value: InspectorBase);
|
|
268
269
|
/**
|
|
269
|
-
*
|
|
270
|
+
* The inspector instance. The inspector can be any class that extends from `InspectorBase`.
|
|
270
271
|
*
|
|
271
|
-
* @
|
|
272
|
+
* @type {InspectorBase}
|
|
272
273
|
*/
|
|
273
|
-
set inspector(value: InspectorBase);
|
|
274
274
|
get inspector(): InspectorBase;
|
|
275
275
|
/**
|
|
276
276
|
* Enables or disables high precision for model-view and normal-view matrices.
|
|
@@ -303,9 +303,16 @@ declare class Renderer {
|
|
|
303
303
|
*/
|
|
304
304
|
getMRT(): MRTNode | null;
|
|
305
305
|
/**
|
|
306
|
-
* Returns the
|
|
306
|
+
* Returns the output buffer type.
|
|
307
|
+
*
|
|
308
|
+
* @return {number} The output buffer type.
|
|
309
|
+
*/
|
|
310
|
+
getOutputBufferType(): TextureDataType;
|
|
311
|
+
/**
|
|
312
|
+
* Returns the output buffer type.
|
|
307
313
|
*
|
|
308
|
-
* @
|
|
314
|
+
* @deprecated since r182. Use `.getOutputBufferType()` instead.
|
|
315
|
+
* @return {number} The output buffer type.
|
|
309
316
|
*/
|
|
310
317
|
getColorBufferType(): TextureDataType;
|
|
311
318
|
/**
|
|
@@ -495,9 +502,9 @@ declare class Renderer {
|
|
|
495
502
|
/**
|
|
496
503
|
* Defines the scissor rectangle.
|
|
497
504
|
*
|
|
498
|
-
* @param {number | Vector4} x - The horizontal coordinate for the
|
|
505
|
+
* @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the box in logical pixel unit.
|
|
499
506
|
* Instead of passing four arguments, the method also works with a single four-dimensional vector.
|
|
500
|
-
* @param {number} y - The vertical coordinate for the
|
|
507
|
+
* @param {number} y - The vertical coordinate for the upper left corner of the box in logical pixel unit.
|
|
501
508
|
* @param {number} width - The width of the scissor box in logical pixel unit.
|
|
502
509
|
* @param {number} height - The height of the scissor box in logical pixel unit.
|
|
503
510
|
*/
|
|
@@ -525,8 +532,8 @@ declare class Renderer {
|
|
|
525
532
|
/**
|
|
526
533
|
* Defines the viewport.
|
|
527
534
|
*
|
|
528
|
-
* @param {number | Vector4} x - The horizontal coordinate for the
|
|
529
|
-
* @param {number} y - The vertical coordinate for the
|
|
535
|
+
* @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the viewport origin in logical pixel unit.
|
|
536
|
+
* @param {number} y - The vertical coordinate for the upper left corner of the viewport origin in logical pixel unit.
|
|
530
537
|
* @param {number} width - The width of the viewport in logical pixel unit.
|
|
531
538
|
* @param {number} height - The height of the viewport in logical pixel unit.
|
|
532
539
|
* @param {number} minDepth - The minimum depth value of the viewport. WebGPU only.
|
|
@@ -738,6 +745,8 @@ declare class Renderer {
|
|
|
738
745
|
getCanvasTarget(): CanvasTarget;
|
|
739
746
|
/**
|
|
740
747
|
* Resets the renderer to the initial state before WebXR started.
|
|
748
|
+
*
|
|
749
|
+
* @private
|
|
741
750
|
*/
|
|
742
751
|
_resetXRState(): void;
|
|
743
752
|
/**
|
|
@@ -920,6 +929,7 @@ declare class Renderer {
|
|
|
920
929
|
* Analyzes the given 3D object's hierarchy and builds render lists from the
|
|
921
930
|
* processed hierarchy.
|
|
922
931
|
*
|
|
932
|
+
* @private
|
|
923
933
|
* @param {Object3D} object - The 3D object to process (usually a scene).
|
|
924
934
|
* @param {Camera} camera - The camera the object is rendered with.
|
|
925
935
|
* @param {number} groupOrder - The group order is derived from the `renderOrder` of groups and is used to group 3D objects within groups.
|
|
@@ -980,6 +990,7 @@ declare class Renderer {
|
|
|
980
990
|
* Retrieves shadow nodes for the given material. This is used to setup shadow passes.
|
|
981
991
|
* The result is cached per material and updated when the material's version changes.
|
|
982
992
|
*
|
|
993
|
+
* @private
|
|
983
994
|
* @param {Material} material
|
|
984
995
|
* @returns {Object} - The shadow nodes for the material.
|
|
985
996
|
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DepthTexturePixelFormat,
|
|
3
|
+
MagnificationTextureFilter,
|
|
4
|
+
Mapping,
|
|
5
|
+
MinificationTextureFilter,
|
|
6
|
+
TextureDataType,
|
|
7
|
+
Wrapping,
|
|
8
|
+
} from "../constants.js";
|
|
9
|
+
import { DepthTextureImageData } from "./DepthTexture.js";
|
|
10
|
+
import { Texture } from "./Texture.js";
|
|
11
|
+
|
|
12
|
+
declare class CubeDepthTexture extends Texture<CubeDepthTextureImageData> {
|
|
13
|
+
readonly isCubeDepthTexture: true;
|
|
14
|
+
readonly isCubeTexture: true;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
size: number,
|
|
18
|
+
type?: TextureDataType,
|
|
19
|
+
mapping?: Mapping,
|
|
20
|
+
wrapS?: Wrapping,
|
|
21
|
+
wrapT?: Wrapping,
|
|
22
|
+
magFilter?: MagnificationTextureFilter,
|
|
23
|
+
minFilter?: MinificationTextureFilter,
|
|
24
|
+
anisotropy?: number,
|
|
25
|
+
format?: DepthTexturePixelFormat,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
get images(): CubeDepthTextureImageData;
|
|
29
|
+
set images(value: CubeDepthTextureImageData);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { CubeDepthTexture };
|
|
33
|
+
|
|
34
|
+
export type CubeDepthTextureImageData = [
|
|
35
|
+
DepthTextureImageData,
|
|
36
|
+
DepthTextureImageData,
|
|
37
|
+
DepthTextureImageData,
|
|
38
|
+
DepthTextureImageData,
|
|
39
|
+
DepthTextureImageData,
|
|
40
|
+
DepthTextureImageData,
|
|
41
|
+
];
|
|
@@ -27,7 +27,7 @@ import { Texture } from "./Texture.js";
|
|
|
27
27
|
* @see {@link https://threejs.org/docs/index.html#api/en/textures/CubeTexture | Official Documentation}
|
|
28
28
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/CubeTexture.js | Source}
|
|
29
29
|
*/
|
|
30
|
-
export class CubeTexture extends Texture<
|
|
30
|
+
export class CubeTexture<TImage = unknown> extends Texture<TImage[]> {
|
|
31
31
|
/**
|
|
32
32
|
* This creates a new {@link THREE.CubeTexture | CubeTexture} object.
|
|
33
33
|
* @param images
|
|
@@ -42,7 +42,7 @@ export class CubeTexture extends Texture<HTMLImageElement[]> {
|
|
|
42
42
|
* @param colorSpace See {@link Texture.colorSpace | .colorSpace}. Default {@link NoColorSpace}
|
|
43
43
|
*/
|
|
44
44
|
constructor(
|
|
45
|
-
images?:
|
|
45
|
+
images?: TImage[],
|
|
46
46
|
mapping?: CubeTextureMapping,
|
|
47
47
|
wrapS?: Wrapping,
|
|
48
48
|
wrapT?: Wrapping,
|
|
@@ -65,8 +65,8 @@ export class CubeTexture extends Texture<HTMLImageElement[]> {
|
|
|
65
65
|
* An image object, typically created using the {@link THREE.CubeTextureLoader.load | CubeTextureLoader.load()} method.
|
|
66
66
|
* @see {@link Texture.image}
|
|
67
67
|
*/
|
|
68
|
-
get images():
|
|
69
|
-
set images(value:
|
|
68
|
+
get images(): TImage[];
|
|
69
|
+
set images(value: TImage[]);
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @inheritDoc
|
three/src/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
declare function isTypedArray(object: unknown): boolean;
|
|
2
|
+
|
|
1
3
|
declare function createCanvasElement(): HTMLCanvasElement;
|
|
2
4
|
|
|
3
5
|
declare function setConsoleFunction(
|
|
@@ -16,4 +18,14 @@ declare function warnOnce(...params: unknown[]): void;
|
|
|
16
18
|
|
|
17
19
|
declare function probeAsync(gl: WebGLRenderingContext, sync: WebGLSync, interval: number): Promise<void>;
|
|
18
20
|
|
|
19
|
-
export {
|
|
21
|
+
export {
|
|
22
|
+
createCanvasElement,
|
|
23
|
+
error,
|
|
24
|
+
getConsoleFunction,
|
|
25
|
+
isTypedArray,
|
|
26
|
+
log,
|
|
27
|
+
probeAsync,
|
|
28
|
+
setConsoleFunction,
|
|
29
|
+
warn,
|
|
30
|
+
warnOnce,
|
|
31
|
+
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Node from "../../core/Node.js";
|
|
2
|
-
import OperatorNode from "../../math/OperatorNode.js";
|
|
3
|
-
|
|
4
|
-
// Analytical approximation of the DFG LUT, one half of the
|
|
5
|
-
// split-sum approximation used in indirect specular lighting.
|
|
6
|
-
// via 'environmentBRDF' from "Physically Based Shading on Mobile"
|
|
7
|
-
// https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
|
8
|
-
declare const DFGApprox: (args: { roughness: Node; dotNV: Node }) => OperatorNode;
|
|
9
|
-
|
|
10
|
-
export default DFGApprox;
|