@types/three 0.148.1 → 0.150.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/build/three.d.cts +2 -0
- three/build/three.d.ts +2 -0
- three/build/three.module.d.ts +2 -0
- three/examples/jsm/controls/OrbitControls.d.ts +8 -3
- three/examples/jsm/controls/TrackballControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +4 -4
- three/examples/jsm/helpers/OctreeHelper.d.ts +1 -1
- three/examples/jsm/helpers/ViewHelper.d.ts +16 -0
- three/examples/jsm/libs/fflate.module.d.ts +1 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +1 -0
- three/examples/jsm/libs/stats.module.d.ts +2 -23
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +1 -1
- three/examples/jsm/loaders/IFCLoader.d.ts +1 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +1 -0
- three/examples/jsm/loaders/VOXLoader.d.ts +1 -1
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +1 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +3 -4
- three/examples/jsm/objects/MarchingCubes.d.ts +1 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +2 -2
- three/index.d.ts +1 -1
- three/package.json +19 -4
- three/src/Three.d.ts +1 -5
- three/src/constants.d.ts +395 -253
- three/src/core/BufferAttribute.d.ts +456 -85
- three/src/core/BufferGeometry.d.ts +241 -70
- three/src/core/Clock.d.ts +28 -20
- three/src/core/EventDispatcher.d.ts +20 -4
- three/src/core/GLBufferAttribute.d.ts +105 -7
- three/src/core/InstancedBufferAttribute.d.ts +13 -24
- three/src/core/InstancedBufferGeometry.d.ts +22 -4
- three/src/core/InstancedInterleavedBuffer.d.ts +10 -2
- three/src/core/InterleavedBuffer.d.ts +98 -14
- three/src/core/InterleavedBufferAttribute.d.ts +146 -7
- three/src/core/Layers.d.ts +61 -6
- three/src/core/Object3D.d.ts +252 -119
- three/src/core/Raycaster.d.ts +103 -27
- three/src/core/Uniform.d.ts +30 -13
- three/src/core/UniformsGroup.d.ts +10 -4
- three/src/extras/Earcut.d.ts +3 -4
- three/src/helpers/CameraHelper.d.ts +43 -0
- three/src/lights/DirectionalLight.d.ts +3 -1
- three/src/lights/HemisphereLight.d.ts +3 -1
- three/src/lights/SpotLight.d.ts +3 -1
- three/src/loaders/CubeTextureLoader.d.ts +1 -1
- three/src/loaders/Loader.d.ts +1 -2
- three/src/materials/Material.d.ts +9 -2
- three/src/materials/MeshPhysicalMaterial.d.ts +13 -1
- three/src/math/Color.d.ts +157 -3
- three/src/math/ColorManagement.d.ts +13 -7
- three/src/math/Euler.d.ts +2 -3
- three/src/objects/Mesh.d.ts +2 -2
- three/src/renderers/WebGLRenderer.d.ts +2 -2
- three/src/renderers/webgl/WebGLAttributes.d.ts +4 -3
- three/src/renderers/webgl/WebGLClipping.d.ts +3 -1
- three/src/renderers/webxr/WebXRManager.d.ts +2 -2
- three/src/textures/Data3DTexture.d.ts +2 -2
- three/src/utils.d.ts +5 -2
- three/examples/jsm/libs/fflate.module.min.d.ts +0 -1185
- three/src/renderers/WebGLMultisampleRenderTarget.d.ts +0 -6
- three/src/textures/DataTexture2DArray.d.ts +0 -6
- three/src/textures/DataTexture3D.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorSpace, LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
|
|
1
|
+
import { ColorSpace, DisplayP3ColorSpace, LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
|
|
2
2
|
import { Color } from './Color';
|
|
3
3
|
|
|
4
4
|
export function SRGBToLinear(c: number): number;
|
|
@@ -7,9 +7,9 @@ export function LinearToSRGB(c: number): number;
|
|
|
7
7
|
|
|
8
8
|
export namespace ColorManagement {
|
|
9
9
|
/**
|
|
10
|
-
* @default
|
|
10
|
+
* @default false
|
|
11
11
|
*/
|
|
12
|
-
let
|
|
12
|
+
let enabled: boolean;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @default LinearSRGBColorSpace
|
|
@@ -18,11 +18,17 @@ export namespace ColorManagement {
|
|
|
18
18
|
|
|
19
19
|
function convert(
|
|
20
20
|
color: Color,
|
|
21
|
-
sourceColorSpace: SRGBColorSpace | LinearSRGBColorSpace,
|
|
22
|
-
targetColorSpace: SRGBColorSpace | LinearSRGBColorSpace,
|
|
21
|
+
sourceColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
|
|
22
|
+
targetColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
|
|
23
23
|
): Color;
|
|
24
24
|
|
|
25
|
-
function fromWorkingColorSpace(
|
|
25
|
+
function fromWorkingColorSpace(
|
|
26
|
+
color: Color,
|
|
27
|
+
targetColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace,
|
|
28
|
+
): Color;
|
|
26
29
|
|
|
27
|
-
function toWorkingColorSpace(
|
|
30
|
+
function toWorkingColorSpace(
|
|
31
|
+
color: Color,
|
|
32
|
+
sourceColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace,
|
|
33
|
+
): Color;
|
|
28
34
|
}
|
three/src/math/Euler.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export class Euler {
|
|
|
23
23
|
z: number;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* @default THREE.Euler.
|
|
26
|
+
* @default THREE.Euler.DEFAULT_ORDER
|
|
27
27
|
*/
|
|
28
28
|
order: EulerOrder;
|
|
29
29
|
readonly isEuler: true;
|
|
@@ -42,8 +42,7 @@ export class Euler {
|
|
|
42
42
|
toArray(array?: Array<number | string | undefined>, offset?: number): Array<number | string | undefined>;
|
|
43
43
|
_onChange(callback: () => void): this;
|
|
44
44
|
|
|
45
|
-
static
|
|
46
|
-
static DefaultOrder: 'XYZ';
|
|
45
|
+
static DEFAULT_ORDER: 'XYZ';
|
|
47
46
|
|
|
48
47
|
[Symbol.iterator](): Generator<string | number, void>;
|
|
49
48
|
}
|
three/src/objects/Mesh.d.ts
CHANGED
|
@@ -21,10 +21,10 @@ export class Mesh<
|
|
|
21
21
|
updateMorphTargets(): void;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Get the
|
|
24
|
+
* Get the local-space position of the vertex at the given index,
|
|
25
25
|
* taking into account the current animation state of both morph targets and skinning.
|
|
26
26
|
*/
|
|
27
|
-
getVertexPosition(
|
|
27
|
+
getVertexPosition(index: number, target: Vector3): Vector3;
|
|
28
28
|
|
|
29
29
|
raycast(raycaster: Raycaster, intersects: Intersection[]): void;
|
|
30
30
|
}
|
|
@@ -178,9 +178,9 @@ export class WebGLRenderer implements Renderer {
|
|
|
178
178
|
outputEncoding: TextureEncoding;
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
|
-
* @default
|
|
181
|
+
* @default true
|
|
182
182
|
*/
|
|
183
|
-
|
|
183
|
+
useLegacyLights: boolean;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* @default THREE.NoToneMapping
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { WebGLCapabilities } from './WebGLCapabilities';
|
|
2
2
|
import { BufferAttribute } from '../../core/BufferAttribute';
|
|
3
3
|
import { InterleavedBufferAttribute } from '../../core/InterleavedBufferAttribute';
|
|
4
|
+
import { GLBufferAttribute } from '../../core/GLBufferAttribute';
|
|
4
5
|
|
|
5
6
|
export class WebGLAttributes {
|
|
6
7
|
constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, capabilities: WebGLCapabilities);
|
|
7
8
|
|
|
8
|
-
get(attribute: BufferAttribute | InterleavedBufferAttribute): {
|
|
9
|
+
get(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute): {
|
|
9
10
|
buffer: WebGLBuffer;
|
|
10
11
|
type: number;
|
|
11
12
|
bytesPerElement: number;
|
|
12
13
|
version: number;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
remove(attribute: BufferAttribute | InterleavedBufferAttribute): void;
|
|
16
|
+
remove(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute): void;
|
|
16
17
|
|
|
17
|
-
update(attribute: BufferAttribute | InterleavedBufferAttribute, bufferType: number): void;
|
|
18
|
+
update(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute, bufferType: number): void;
|
|
18
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Camera } from './../../cameras/Camera';
|
|
2
2
|
import { Material } from './../../materials/Material';
|
|
3
|
+
import { Plane } from '../../math/Plane';
|
|
3
4
|
import { WebGLProperties } from './WebGLProperties';
|
|
4
5
|
|
|
5
6
|
export class WebGLClipping {
|
|
@@ -17,8 +18,9 @@ export class WebGLClipping {
|
|
|
17
18
|
*/
|
|
18
19
|
numIntersection: number;
|
|
19
20
|
|
|
20
|
-
init(planes: any[], enableLocalClipping: boolean
|
|
21
|
+
init(planes: any[], enableLocalClipping: boolean): boolean;
|
|
21
22
|
beginShadows(): void;
|
|
22
23
|
endShadows(): void;
|
|
24
|
+
setGlobalState(planes: Plane[], camera: Camera): void;
|
|
23
25
|
setState(material: Material, camera: Camera, useCache: boolean): void;
|
|
24
26
|
}
|
|
@@ -40,12 +40,12 @@ export class WebXRManager extends EventDispatcher {
|
|
|
40
40
|
getBinding(): XRWebGLBinding;
|
|
41
41
|
getFrame(): XRFrame;
|
|
42
42
|
getSession(): XRSession | null;
|
|
43
|
-
setSession(value: XRSession): Promise<void>;
|
|
43
|
+
setSession(value: XRSession | null): Promise<void>;
|
|
44
44
|
getCamera(): WebXRArrayCamera;
|
|
45
45
|
updateCamera(camera: PerspectiveCamera): void;
|
|
46
46
|
setAnimationLoop(callback: XRFrameRequestCallback | null): void;
|
|
47
47
|
getFoveation(): number | undefined;
|
|
48
|
-
setFoveation(
|
|
48
|
+
setFoveation(value: number): void;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Returns the set of planes detected by WebXR's plane detection API.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Texture } from './Texture';
|
|
2
|
-
import { TextureFilter } from '../constants';
|
|
2
|
+
import { TextureFilter, Wrapping } from '../constants';
|
|
3
3
|
|
|
4
4
|
export class Data3DTexture extends Texture {
|
|
5
5
|
constructor(data: BufferSource, width: number, height: number, depth: number);
|
|
@@ -17,7 +17,7 @@ export class Data3DTexture extends Texture {
|
|
|
17
17
|
/**
|
|
18
18
|
* @default THREE.ClampToEdgeWrapping
|
|
19
19
|
*/
|
|
20
|
-
wrapR:
|
|
20
|
+
wrapR: Wrapping;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @default false
|
three/src/utils.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { Color } from './math/Color';
|
|
1
|
+
import { Color, ColorKeyword } from './math/Color';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type ColorModelString = `${'rgb' | 'hsl'}(${string})`;
|
|
4
|
+
export type HexColorString = `#${string}`;
|
|
5
|
+
|
|
6
|
+
export type ColorRepresentation = Color | ColorKeyword | ColorModelString | HexColorString | number;
|