@types/three 0.168.0 → 0.169.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/build/three.webgpu.nodes.d.ts +1 -0
- three/build/three.webgpu.nodes.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +0 -7
- three/examples/jsm/controls/DragControls.d.ts +0 -15
- three/examples/jsm/controls/TransformControls.d.ts +152 -25
- three/examples/jsm/exporters/EXRExporter.d.ts +7 -2
- three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
- three/examples/jsm/helpers/LightProbeHelper.d.ts +5 -3
- three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
- three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
- three/examples/jsm/lines/Line2.d.ts +15 -1
- three/examples/jsm/lines/LineGeometry.d.ts +18 -1
- three/examples/jsm/lines/LineMaterial.d.ts +65 -12
- three/examples/jsm/lines/LineSegments2.d.ts +25 -2
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
- three/examples/jsm/loaders/DRACOLoader.d.ts +6 -0
- three/examples/jsm/modifiers/CurveModifier.d.ts +7 -3
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
- three/examples/jsm/objects/Lensflare.d.ts +13 -9
- three/examples/jsm/objects/LensflareMesh.d.ts +21 -0
- three/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
- three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
- three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
- three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
- three/examples/jsm/utils/TextureUtilsGPU.d.ts +3 -0
- three/package.json +2 -2
- three/src/Three.WebGPU.Nodes.d.ts +201 -0
- three/src/Three.WebGPU.d.ts +2 -1
- three/src/audio/Audio.d.ts +4 -1
- three/src/core/BufferAttribute.d.ts +0 -15
- three/src/core/InterleavedBuffer.d.ts +0 -12
- three/src/core/Object3D.d.ts +1 -1
- three/src/core/Raycaster.d.ts +2 -1
- three/src/extras/Controls.d.ts +3 -3
- three/src/loaders/MaterialLoader.d.ts +2 -0
- three/src/loaders/nodes/NodeLoader.d.ts +5 -0
- three/src/loaders/nodes/NodeMaterialLoader.d.ts +3 -0
- three/src/loaders/nodes/NodeObjectLoader.d.ts +12 -0
- three/src/materials/nodes/NodeMaterial.d.ts +2 -4
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +81 -0
- three/src/math/Quaternion.d.ts +4 -3
- three/src/math/Triangle.d.ts +24 -0
- three/src/nodes/Nodes.d.ts +2 -2
- three/src/nodes/TSL.d.ts +92 -186
- three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -0
- three/src/nodes/accessors/MaterialNode.d.ts +0 -1
- three/src/nodes/accessors/ModelNode.d.ts +7 -3
- three/src/nodes/accessors/Normal.d.ts +6 -0
- three/src/nodes/accessors/Object3DNode.d.ts +1 -5
- three/src/nodes/accessors/VelocityNode.d.ts +2 -1
- three/src/nodes/core/Node.d.ts +3 -12
- three/src/nodes/core/NodeUtils.d.ts +5 -1
- three/src/nodes/core/StructTypeNode.d.ts +1 -0
- three/src/nodes/core/UniformNode.d.ts +1 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
- three/src/nodes/display/ColorSpaceNode.d.ts +26 -7
- three/src/nodes/display/ScreenNode.d.ts +48 -0
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -6
- three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +6 -0
- three/src/objects/BatchedMesh.d.ts +33 -0
- three/src/objects/Group.d.ts +0 -6
- three/src/objects/LOD.d.ts +7 -0
- three/src/renderers/WebGLRenderer.d.ts +2 -12
- three/src/renderers/common/BundleGroup.d.ts +10 -0
- three/src/renderers/common/ClippingContext.d.ts +1 -1
- three/src/renderers/common/RenderBundles.d.ts +3 -3
- three/src/renderers/common/RenderContext.d.ts +2 -2
- three/src/renderers/common/RenderList.d.ts +2 -1
- three/src/renderers/common/RenderObject.d.ts +19 -1
- three/src/renderers/common/Renderer.d.ts +8 -1
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
- three/src/renderers/common/nodes/Nodes.d.ts +8 -0
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +1 -0
- three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
- three/src/renderers/webgpu/WebGPURenderer.d.ts +7 -3
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
- three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
- three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
- three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
- three/src/nodes/display/ViewportNode.d.ts +0 -38
- three/src/renderers/common/StandardRenderer.d.ts +0 -12
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BufferGeometry, Curve, DataTexture, InstancedMesh, IUniform, Material, Mesh, Vector3 } from "three";
|
|
2
|
+
|
|
3
|
+
export interface SplineUniform {
|
|
4
|
+
spineTexture: DataTexture;
|
|
5
|
+
pathOffset: number;
|
|
6
|
+
pathSegment: number;
|
|
7
|
+
spineOffset: number;
|
|
8
|
+
spineLength: number;
|
|
9
|
+
flow: number;
|
|
10
|
+
}
|
|
11
|
+
export function initSplineTexture(numberOfCurves?: number): DataTexture;
|
|
12
|
+
|
|
13
|
+
export function updateSplineTexture(texture: DataTexture, splineCurve: Curve<Vector3>, offset?: number): void;
|
|
14
|
+
|
|
15
|
+
export function getUniforms(splineTexture: DataTexture): SplineUniform;
|
|
16
|
+
|
|
17
|
+
export function modifyShader(material: Material, uniforms: SplineUniform, numberOfCurves: number): void;
|
|
18
|
+
|
|
19
|
+
export class Flow {
|
|
20
|
+
curveArray: number[];
|
|
21
|
+
curveLengthArray: number[];
|
|
22
|
+
|
|
23
|
+
object3D: Mesh;
|
|
24
|
+
splineTexure: DataTexture;
|
|
25
|
+
uniforms: SplineUniform;
|
|
26
|
+
|
|
27
|
+
constructor(mesh: Mesh, numberOfCurves?: number);
|
|
28
|
+
|
|
29
|
+
updateCurve(index: number, curve: Curve<Vector3>): void;
|
|
30
|
+
moveAlongCurve(amount: number): void;
|
|
31
|
+
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Color, Mesh, Texture } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare class Lensflare extends Mesh {
|
|
4
|
+
readonly isLensflare: true;
|
|
5
|
+
|
|
6
|
+
constructor();
|
|
7
|
+
|
|
8
|
+
addElement: (element: LensflareElement) => void;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class LensflareElement {
|
|
5
13
|
texture: Texture;
|
|
6
14
|
size: number;
|
|
7
15
|
distance: number;
|
|
8
16
|
color: Color;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class Lensflare extends Mesh {
|
|
12
|
-
constructor();
|
|
13
|
-
readonly isLensflare: true;
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
dispose(): void;
|
|
18
|
+
constructor(texture: Texture, size?: number, distance?: number, color?: Color);
|
|
17
19
|
}
|
|
20
|
+
|
|
21
|
+
export { Lensflare, LensflareElement };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Color, Mesh, Texture } from "three";
|
|
2
|
+
|
|
3
|
+
declare class LensflareMesh extends Mesh {
|
|
4
|
+
readonly isLensflare: true;
|
|
5
|
+
|
|
6
|
+
constructor();
|
|
7
|
+
|
|
8
|
+
addElement: (element: LensflareElement) => void;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class LensflareElement {
|
|
13
|
+
texture: Texture;
|
|
14
|
+
size: number;
|
|
15
|
+
distance: number;
|
|
16
|
+
color: Color;
|
|
17
|
+
|
|
18
|
+
constructor(texture: Texture, size?: number, distance?: number, color?: Color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { LensflareElement, LensflareMesh };
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import { Mesh } from "three";
|
|
1
|
+
import { BufferGeometry, Mesh } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Make the input geometry's normal attribute encoded and compressed by 3 different methods.
|
|
5
|
+
*/
|
|
6
|
+
declare function compressNormals(
|
|
7
|
+
geometry: BufferGeometry,
|
|
8
|
+
encodeMethod: "DEFAULT" | "OCT1Byte" | "OCT2Byte" | "ANGLES",
|
|
9
|
+
): void;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Make the input geometry's position attribute encoded and compressed.
|
|
13
|
+
*/
|
|
14
|
+
declare function compressPositions(geometry: BufferGeometry): void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Make the input geometry's uv attribute encoded and compressed.
|
|
18
|
+
*/
|
|
19
|
+
declare function compressUvs(geometry: BufferGeometry): void;
|
|
20
|
+
|
|
21
|
+
export { compressNormals, compressPositions, compressUvs };
|
|
@@ -12,13 +12,15 @@ export interface Position {
|
|
|
12
12
|
set: (x: number, y: number) => void;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
constructor(light: Light);
|
|
17
|
-
|
|
15
|
+
declare class ShadowMapViewer {
|
|
18
16
|
enabled: boolean;
|
|
19
17
|
size: Size;
|
|
20
18
|
position: Position;
|
|
21
|
-
render(renderer: Renderer)
|
|
22
|
-
updateForWindowResize()
|
|
23
|
-
update()
|
|
19
|
+
render: (renderer: Renderer) => void;
|
|
20
|
+
updateForWindowResize: () => void;
|
|
21
|
+
update: () => void;
|
|
22
|
+
|
|
23
|
+
constructor(light: Light);
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
export { ShadowMapViewer };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Light, WebGPURenderer } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface Size {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
set: (width: number, height: number) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Position {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
set: (x: number, y: number) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class ShadowMapViewer {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
size: Size;
|
|
18
|
+
position: Position;
|
|
19
|
+
render: (renderer: WebGPURenderer) => void;
|
|
20
|
+
updateForWindowResize: () => void;
|
|
21
|
+
update: () => void;
|
|
22
|
+
|
|
23
|
+
constructor(light: Light);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ShadowMapViewer };
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
import { AnimationClip, Object3D, Skeleton } from "three";
|
|
1
|
+
import { AnimationClip, Bone, Object3D, Skeleton, Vector3 } from "three";
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface RetargetOptions {
|
|
4
|
+
preserveBoneMatrix?: boolean | undefined;
|
|
5
|
+
preserveHipPosition?: boolean | undefined;
|
|
6
|
+
useTargetMatrix?: boolean | undefined;
|
|
7
|
+
hip?: string | undefined;
|
|
8
|
+
hipInfluence?: Vector3 | undefined;
|
|
9
|
+
scale?: number | undefined;
|
|
10
|
+
names?: { [boneName: string]: string } | undefined;
|
|
11
|
+
getBoneName?: ((bone: Bone) => string) | undefined;
|
|
12
|
+
hipPosition?: Vector3 | undefined;
|
|
13
|
+
}
|
|
4
14
|
|
|
5
|
-
|
|
15
|
+
declare function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options?: RetargetOptions): void;
|
|
6
16
|
|
|
7
|
-
export
|
|
17
|
+
export interface RetargetClipOptions extends RetargetOptions {
|
|
18
|
+
useFirstFramePosition?: boolean | undefined;
|
|
19
|
+
fps?: number | undefined;
|
|
20
|
+
trim?: [number, number] | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare function retargetClip(
|
|
8
24
|
target: Skeleton | Object3D,
|
|
9
25
|
source: Skeleton | Object3D,
|
|
10
26
|
clip: AnimationClip,
|
|
11
|
-
options
|
|
27
|
+
options?: RetargetClipOptions,
|
|
12
28
|
): AnimationClip;
|
|
29
|
+
|
|
30
|
+
declare function clone(source: Object3D): Object3D;
|
|
31
|
+
|
|
32
|
+
export { clone, retarget, retargetClip };
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.169.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"fflate": "~0.8.2",
|
|
48
48
|
"meshoptimizer": "~0.18.1"
|
|
49
49
|
},
|
|
50
|
-
"typesPublisherContentHash": "
|
|
50
|
+
"typesPublisherContentHash": "94410dccd4fa1115f439c3b57ebda48f8f1b4340eff2f774bab751513d3d3ac8",
|
|
51
51
|
"typeScriptVersion": "4.8"
|
|
52
52
|
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
export * from "./animation/AnimationAction.js";
|
|
2
|
+
export * from "./animation/AnimationClip.js";
|
|
3
|
+
export * from "./animation/AnimationMixer.js";
|
|
4
|
+
export * from "./animation/AnimationObjectGroup.js";
|
|
5
|
+
export { AnimationUtils } from "./animation/AnimationUtils.js";
|
|
6
|
+
export * from "./animation/KeyframeTrack.js";
|
|
7
|
+
export * from "./animation/PropertyBinding.js";
|
|
8
|
+
export * from "./animation/PropertyMixer.js";
|
|
9
|
+
export * from "./animation/tracks/BooleanKeyframeTrack.js";
|
|
10
|
+
export * from "./animation/tracks/ColorKeyframeTrack.js";
|
|
11
|
+
export * from "./animation/tracks/NumberKeyframeTrack.js";
|
|
12
|
+
export * from "./animation/tracks/QuaternionKeyframeTrack.js";
|
|
13
|
+
export * from "./animation/tracks/StringKeyframeTrack.js";
|
|
14
|
+
export * from "./animation/tracks/VectorKeyframeTrack.js";
|
|
15
|
+
export * from "./audio/Audio.js";
|
|
16
|
+
export * from "./audio/AudioAnalyser.js";
|
|
17
|
+
export * from "./audio/AudioContext.js";
|
|
18
|
+
export * from "./audio/AudioListener.js";
|
|
19
|
+
export * from "./audio/PositionalAudio.js";
|
|
20
|
+
export * from "./cameras/ArrayCamera.js";
|
|
21
|
+
export * from "./cameras/Camera.js";
|
|
22
|
+
export * from "./cameras/CubeCamera.js";
|
|
23
|
+
export * from "./cameras/OrthographicCamera.js";
|
|
24
|
+
export * from "./cameras/PerspectiveCamera.js";
|
|
25
|
+
export * from "./cameras/StereoCamera.js";
|
|
26
|
+
export * from "./constants.js";
|
|
27
|
+
export * from "./core/BufferAttribute.js";
|
|
28
|
+
export * from "./core/BufferGeometry.js";
|
|
29
|
+
export * from "./core/Clock.js";
|
|
30
|
+
export * from "./core/EventDispatcher.js";
|
|
31
|
+
export * from "./core/GLBufferAttribute.js";
|
|
32
|
+
export * from "./core/InstancedBufferAttribute.js";
|
|
33
|
+
export * from "./core/InstancedBufferGeometry.js";
|
|
34
|
+
export * from "./core/InstancedInterleavedBuffer.js";
|
|
35
|
+
export * from "./core/InterleavedBuffer.js";
|
|
36
|
+
export * from "./core/InterleavedBufferAttribute.js";
|
|
37
|
+
export * from "./core/Layers.js";
|
|
38
|
+
export * from "./core/Object3D.js";
|
|
39
|
+
export * from "./core/Raycaster.js";
|
|
40
|
+
export * from "./core/RenderTarget.js";
|
|
41
|
+
export * from "./core/Uniform.js";
|
|
42
|
+
export * from "./core/UniformsGroup.js";
|
|
43
|
+
export * from "./extras/Controls.js";
|
|
44
|
+
export * from "./extras/core/Curve.js";
|
|
45
|
+
export * from "./extras/core/CurvePath.js";
|
|
46
|
+
export * from "./extras/core/Path.js";
|
|
47
|
+
export * from "./extras/core/Shape.js";
|
|
48
|
+
export * from "./extras/core/ShapePath.js";
|
|
49
|
+
export * from "./extras/curves/Curves.js";
|
|
50
|
+
export { DataUtils } from "./extras/DataUtils.js";
|
|
51
|
+
export * from "./extras/ImageUtils.js";
|
|
52
|
+
// export * from "./extras/PMREMGenerator.js";
|
|
53
|
+
export * from "./extras/ShapeUtils.js";
|
|
54
|
+
export { TextureUtils } from "./extras/TextureUtils.js";
|
|
55
|
+
export * from "./geometries/Geometries.js";
|
|
56
|
+
export * from "./helpers/ArrowHelper.js";
|
|
57
|
+
export * from "./helpers/AxesHelper.js";
|
|
58
|
+
export * from "./helpers/Box3Helper.js";
|
|
59
|
+
export * from "./helpers/BoxHelper.js";
|
|
60
|
+
export * from "./helpers/CameraHelper.js";
|
|
61
|
+
export * from "./helpers/DirectionalLightHelper.js";
|
|
62
|
+
export * from "./helpers/GridHelper.js";
|
|
63
|
+
export * from "./helpers/HemisphereLightHelper.js";
|
|
64
|
+
export * from "./helpers/PlaneHelper.js";
|
|
65
|
+
export * from "./helpers/PointLightHelper.js";
|
|
66
|
+
export * from "./helpers/PolarGridHelper.js";
|
|
67
|
+
export * from "./helpers/SkeletonHelper.js";
|
|
68
|
+
export * from "./helpers/SpotLightHelper.js";
|
|
69
|
+
export * from "./lights/AmbientLight.js";
|
|
70
|
+
export * from "./lights/DirectionalLight.js";
|
|
71
|
+
export type { DirectionalLightShadow } from "./lights/DirectionalLightShadow.js";
|
|
72
|
+
export * from "./lights/HemisphereLight.js";
|
|
73
|
+
export * from "./lights/Light.js";
|
|
74
|
+
export * from "./lights/LightProbe.js";
|
|
75
|
+
export type { LightShadow, LightShadowJSON } from "./lights/LightShadow.js";
|
|
76
|
+
export * from "./lights/PointLight.js";
|
|
77
|
+
export type { PointLightShadow } from "./lights/PointLightShadow.js";
|
|
78
|
+
export * from "./lights/RectAreaLight.js";
|
|
79
|
+
export * from "./lights/SpotLight.js";
|
|
80
|
+
export type { SpotLightShadow } from "./lights/SpotLightShadow.js";
|
|
81
|
+
export * from "./loaders/AnimationLoader.js";
|
|
82
|
+
export * from "./loaders/AudioLoader.js";
|
|
83
|
+
export * from "./loaders/BufferGeometryLoader.js";
|
|
84
|
+
export * from "./loaders/Cache.js";
|
|
85
|
+
export * from "./loaders/CompressedTextureLoader.js";
|
|
86
|
+
export * from "./loaders/CubeTextureLoader.js";
|
|
87
|
+
export * from "./loaders/DataTextureLoader.js";
|
|
88
|
+
export * from "./loaders/FileLoader.js";
|
|
89
|
+
export * from "./loaders/ImageBitmapLoader.js";
|
|
90
|
+
export * from "./loaders/ImageLoader.js";
|
|
91
|
+
export * from "./loaders/Loader.js";
|
|
92
|
+
export * from "./loaders/LoaderUtils.js";
|
|
93
|
+
export * from "./loaders/LoadingManager.js";
|
|
94
|
+
export * from "./loaders/MaterialLoader.js";
|
|
95
|
+
export * from "./loaders/ObjectLoader.js";
|
|
96
|
+
export * from "./loaders/TextureLoader.js";
|
|
97
|
+
export * from "./materials/Materials.js";
|
|
98
|
+
export * from "./materials/nodes/NodeMaterials.js";
|
|
99
|
+
export * from "./math/Box2.js";
|
|
100
|
+
export * from "./math/Box3.js";
|
|
101
|
+
export * from "./math/Color.js";
|
|
102
|
+
export { ColorManagement, DefinedColorSpace, WorkingColorSpace } from "./math/ColorManagement.js";
|
|
103
|
+
export * from "./math/Cylindrical.js";
|
|
104
|
+
export * from "./math/Euler.js";
|
|
105
|
+
export * from "./math/Frustum.js";
|
|
106
|
+
export * from "./math/Interpolant.js";
|
|
107
|
+
export * from "./math/interpolants/CubicInterpolant.js";
|
|
108
|
+
export * from "./math/interpolants/DiscreteInterpolant.js";
|
|
109
|
+
export * from "./math/interpolants/LinearInterpolant.js";
|
|
110
|
+
export * from "./math/interpolants/QuaternionLinearInterpolant.js";
|
|
111
|
+
export * from "./math/Line3.js";
|
|
112
|
+
export { MathUtils } from "./math/MathUtils.js";
|
|
113
|
+
export * from "./math/Matrix2.js";
|
|
114
|
+
export * from "./math/Matrix3.js";
|
|
115
|
+
export * from "./math/Matrix4.js";
|
|
116
|
+
export * from "./math/Plane.js";
|
|
117
|
+
export * from "./math/Quaternion.js";
|
|
118
|
+
export * from "./math/Ray.js";
|
|
119
|
+
export * from "./math/Sphere.js";
|
|
120
|
+
export * from "./math/Spherical.js";
|
|
121
|
+
export * from "./math/SphericalHarmonics3.js";
|
|
122
|
+
export * from "./math/Triangle.js";
|
|
123
|
+
export * from "./math/Vector2.js";
|
|
124
|
+
export * from "./math/Vector3.js";
|
|
125
|
+
export * from "./math/Vector4.js";
|
|
126
|
+
export * from "./objects/BatchedMesh.js";
|
|
127
|
+
export * from "./objects/Bone.js";
|
|
128
|
+
export * from "./objects/Group.js";
|
|
129
|
+
export * from "./objects/InstancedMesh.js";
|
|
130
|
+
export * from "./objects/Line.js";
|
|
131
|
+
export * from "./objects/LineLoop.js";
|
|
132
|
+
export * from "./objects/LineSegments.js";
|
|
133
|
+
export * from "./objects/LOD.js";
|
|
134
|
+
export * from "./objects/Mesh.js";
|
|
135
|
+
export * from "./objects/Points.js";
|
|
136
|
+
export * from "./objects/Skeleton.js";
|
|
137
|
+
export * from "./objects/SkinnedMesh.js";
|
|
138
|
+
export * from "./objects/Sprite.js";
|
|
139
|
+
// export * from "./renderers/shaders/ShaderChunk.js";
|
|
140
|
+
// export * from "./renderers/shaders/ShaderLib.js";
|
|
141
|
+
// export * from "./renderers/shaders/UniformsLib.js";
|
|
142
|
+
// export { UniformsUtils } from './renderers/shaders/UniformsUtils.js';
|
|
143
|
+
export type { WebGLProgramParameters, WebGLProgramParametersWithUniforms } from "./renderers/webgl/WebGLPrograms.js";
|
|
144
|
+
export type { WebGLShadowMap } from "./renderers/webgl/WebGLShadowMap.js";
|
|
145
|
+
// export * from "./renderers/webgl/WebGLUtils.js";
|
|
146
|
+
export * from "./renderers/WebGL3DRenderTarget.js";
|
|
147
|
+
export * from "./renderers/WebGLArrayRenderTarget.js";
|
|
148
|
+
export * from "./renderers/WebGLCubeRenderTarget.js";
|
|
149
|
+
// export * from "./renderers/WebGLRenderer.js";
|
|
150
|
+
export * from "./renderers/WebGLRenderTarget.js";
|
|
151
|
+
export type {
|
|
152
|
+
WebXRController,
|
|
153
|
+
WebXRSpaceEventMap,
|
|
154
|
+
XRControllerEventType,
|
|
155
|
+
XRGripSpace,
|
|
156
|
+
XRHandInputState,
|
|
157
|
+
XRHandJoints,
|
|
158
|
+
XRHandSpace,
|
|
159
|
+
XRJointSpace,
|
|
160
|
+
XRTargetRaySpace,
|
|
161
|
+
} from "./renderers/webxr/WebXRController.js";
|
|
162
|
+
export type { WebXRDepthSensing } from "./renderers/webxr/WebXRDepthSensing.js";
|
|
163
|
+
export type {
|
|
164
|
+
WebXRArrayCamera,
|
|
165
|
+
WebXRCamera,
|
|
166
|
+
WebXRManager,
|
|
167
|
+
WebXRManagerEventMap,
|
|
168
|
+
} from "./renderers/webxr/WebXRManager.js";
|
|
169
|
+
export * from "./scenes/Fog.js";
|
|
170
|
+
export * from "./scenes/FogExp2.js";
|
|
171
|
+
export * from "./scenes/Scene.js";
|
|
172
|
+
export * from "./textures/CanvasTexture.js";
|
|
173
|
+
export * from "./textures/CompressedArrayTexture.js";
|
|
174
|
+
export * from "./textures/CompressedCubeTexture.js";
|
|
175
|
+
export * from "./textures/CompressedTexture.js";
|
|
176
|
+
export * from "./textures/CubeTexture.js";
|
|
177
|
+
export * from "./textures/Data3DTexture.js";
|
|
178
|
+
export * from "./textures/DataArrayTexture.js";
|
|
179
|
+
export * from "./textures/DataTexture.js";
|
|
180
|
+
export * from "./textures/DepthTexture.js";
|
|
181
|
+
export * from "./textures/FramebufferTexture.js";
|
|
182
|
+
export * from "./textures/Source.js";
|
|
183
|
+
export * from "./textures/Texture.js";
|
|
184
|
+
export * from "./textures/VideoTexture.js";
|
|
185
|
+
export * from "./Three.Legacy.js";
|
|
186
|
+
export { createCanvasElement } from "./utils.js";
|
|
187
|
+
|
|
188
|
+
export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
|
|
189
|
+
export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
190
|
+
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
191
|
+
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
192
|
+
export * from "./nodes/Nodes.js";
|
|
193
|
+
export * from "./nodes/TSL.js";
|
|
194
|
+
export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js";
|
|
195
|
+
export { default as PostProcessing } from "./renderers/common/PostProcessing.js";
|
|
196
|
+
export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
|
|
197
|
+
export type { default as Renderer } from "./renderers/common/Renderer.js";
|
|
198
|
+
export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js";
|
|
199
|
+
export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js";
|
|
200
|
+
export { default as StorageTexture } from "./renderers/common/StorageTexture.js";
|
|
201
|
+
export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nodes.js";
|
three/src/Three.WebGPU.d.ts
CHANGED
|
@@ -95,7 +95,6 @@ export * from "./loaders/MaterialLoader.js";
|
|
|
95
95
|
export * from "./loaders/ObjectLoader.js";
|
|
96
96
|
export * from "./loaders/TextureLoader.js";
|
|
97
97
|
export * from "./materials/Materials.js";
|
|
98
|
-
export * from "./materials/nodes/NodeMaterials.js";
|
|
99
98
|
export * from "./math/Box2.js";
|
|
100
99
|
export * from "./math/Box3.js";
|
|
101
100
|
export * from "./math/Color.js";
|
|
@@ -189,8 +188,10 @@ export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
|
|
|
189
188
|
export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
190
189
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
191
190
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
191
|
+
export * from "./materials/nodes/NodeMaterials.js";
|
|
192
192
|
export * from "./nodes/Nodes.js";
|
|
193
193
|
export * from "./nodes/TSL.js";
|
|
194
|
+
export { default as BundleGroup } from "./renderers/common/BundleGroup.js";
|
|
194
195
|
export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js";
|
|
195
196
|
export { default as PostProcessing } from "./renderers/common/PostProcessing.js";
|
|
196
197
|
export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
|
three/src/audio/Audio.d.ts
CHANGED
|
@@ -173,14 +173,17 @@ export class Audio<NodeType extends AudioNode = GainNode> extends Object3D {
|
|
|
173
173
|
* If {@link Audio.hasPlaybackControl | hasPlaybackControl} is true, starts playback.
|
|
174
174
|
*/
|
|
175
175
|
play(delay?: number): this;
|
|
176
|
+
|
|
176
177
|
/**
|
|
177
178
|
* If {@link Audio.hasPlaybackControl | hasPlaybackControl} is true, pauses playback.
|
|
178
179
|
*/
|
|
179
180
|
pause(): this;
|
|
181
|
+
|
|
180
182
|
/**
|
|
181
183
|
* If {@link Audio.hasPlaybackControl | hasPlaybackControl} is enabled, stops playback.
|
|
184
|
+
* @param delay (optional) - The delay, in seconds, at which the audio should start playing.
|
|
182
185
|
*/
|
|
183
|
-
stop(): this;
|
|
186
|
+
stop(delay?: number): this;
|
|
184
187
|
|
|
185
188
|
/**
|
|
186
189
|
* Called automatically when playback finished.
|
|
@@ -95,21 +95,6 @@ export class BufferAttribute {
|
|
|
95
95
|
*/
|
|
96
96
|
gpuType: AttributeGPUType;
|
|
97
97
|
|
|
98
|
-
/**
|
|
99
|
-
* This can be used to only update some components of stored vectors (for example, just the component related to color).
|
|
100
|
-
* @defaultValue `{ offset: number = 0; count: number = -1 }`
|
|
101
|
-
* @deprecated Will be removed in r169. Use "addUpdateRange()" instead.
|
|
102
|
-
*/
|
|
103
|
-
updateRange: {
|
|
104
|
-
/**
|
|
105
|
-
* Position at which to start update.
|
|
106
|
-
* @defaultValue `0`
|
|
107
|
-
*/
|
|
108
|
-
offset: number;
|
|
109
|
-
/** @defaultValue `-1`, which means don't use update ranges. */
|
|
110
|
-
count: number;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
98
|
/**
|
|
114
99
|
* This can be used to only update some components of stored vectors (for example, just the component related to
|
|
115
100
|
* color). Use the {@link .addUpdateRange} function to add ranges to this array.
|
|
@@ -42,18 +42,6 @@ export class InterleavedBuffer {
|
|
|
42
42
|
*/
|
|
43
43
|
usage: Usage;
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* Object containing offset and count.
|
|
47
|
-
* @defaultValue `{ offset: number = 0; count: number = -1 }`
|
|
48
|
-
* @deprecated Will be removed in r169. Use "addUpdateRange()" instead.
|
|
49
|
-
*/
|
|
50
|
-
updateRange: {
|
|
51
|
-
/** @defaultValue `0` */
|
|
52
|
-
offset: number;
|
|
53
|
-
/** @defaultValue `-1` */
|
|
54
|
-
count: number;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
45
|
/**
|
|
58
46
|
* This can be used to only update some components of stored data. Use the {@link .addUpdateRange} function to add
|
|
59
47
|
* ranges to this array.
|
three/src/core/Object3D.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
|
|
|
127
127
|
* Sub-classes will update this value.
|
|
128
128
|
* @defaultValue `Object3D`
|
|
129
129
|
*/
|
|
130
|
-
readonly type: string
|
|
130
|
+
readonly type: string;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Object's parent in the {@link https://en.wikipedia.org/wiki/Scene_graph | scene graph}.
|
three/src/core/Raycaster.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ export interface Intersection<TIntersected extends Object3D = Object3D> {
|
|
|
24
24
|
/** Intersected face */
|
|
25
25
|
face?: Face | null | undefined;
|
|
26
26
|
/** Index of the intersected face */
|
|
27
|
-
faceIndex?: number | undefined;
|
|
27
|
+
faceIndex?: number | null | undefined;
|
|
28
|
+
barycoord?: Vector3 | null;
|
|
28
29
|
/** The intersected object */
|
|
29
30
|
object: TIntersected;
|
|
30
31
|
uv?: Vector2 | undefined;
|
three/src/extras/Controls.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Camera } from "../cameras/Camera.js";
|
|
2
1
|
import { EventDispatcher } from "../core/EventDispatcher.js";
|
|
2
|
+
import { Object3D } from "../core/Object3D.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Abstract base class for controls.
|
|
@@ -8,7 +8,7 @@ declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TE
|
|
|
8
8
|
/**
|
|
9
9
|
* The 3D object that is managed by the controls.
|
|
10
10
|
*/
|
|
11
|
-
object:
|
|
11
|
+
object: Object3D;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The HTML element used for event listeners. If not provided via the constructor, {@link .connect} must be called
|
|
@@ -26,7 +26,7 @@ declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TE
|
|
|
26
26
|
* @param object The object the controls should manage (usually the camera).
|
|
27
27
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
28
28
|
*/
|
|
29
|
-
constructor(object:
|
|
29
|
+
constructor(object: Object3D, domElement?: HTMLElement | null);
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Connects the controls to the DOM. This method has so called "side effects" since it adds the module's event
|
|
@@ -8,9 +8,14 @@ export interface NodeLoaderResult {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default class NodeLoader extends Loader<NodeLoaderResult> {
|
|
11
|
+
textures: { [key: string]: Texture };
|
|
12
|
+
nodes: { [type: string]: Node };
|
|
13
|
+
|
|
11
14
|
constructor(manager?: LoadingManager);
|
|
12
15
|
|
|
13
16
|
parseNodes(json: unknown): NodeLoaderResult;
|
|
14
17
|
parse(json: unknown): Node;
|
|
15
18
|
setTextures(textures: { [key: string]: Texture }): this;
|
|
19
|
+
setNodes(value: { [type: string]: Node }): this;
|
|
20
|
+
createNodeFromType(type: string): Node;
|
|
16
21
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import NodeMaterial from "../../materials/nodes/NodeMaterial.js";
|
|
1
2
|
import { MaterialLoader } from "../MaterialLoader.js";
|
|
2
3
|
import { NodeLoaderResult } from "./NodeLoader.js";
|
|
3
4
|
|
|
4
5
|
export default class NodeMaterialLoader extends MaterialLoader {
|
|
5
6
|
nodes: NodeLoaderResult;
|
|
7
|
+
nodeMaterials: { [type: string]: NodeMaterial };
|
|
6
8
|
|
|
7
9
|
setNodes(value: NodeLoaderResult): this;
|
|
10
|
+
setNodeMaterials(value: { [type: string]: NodeMaterial }): this;
|
|
8
11
|
}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { Material } from "../../materials/Material.js";
|
|
2
|
+
import NodeMaterial from "../../materials/nodes/NodeMaterial.js";
|
|
3
|
+
import { Node } from "../../nodes/Nodes.js";
|
|
2
4
|
import { Texture } from "../../textures/Texture.js";
|
|
5
|
+
import { LoadingManager } from "../LoadingManager.js";
|
|
3
6
|
import { ObjectLoader } from "../ObjectLoader.js";
|
|
4
7
|
import { NodeLoaderResult } from "./NodeLoader.js";
|
|
5
8
|
|
|
6
9
|
export default class NodeObjectLoader extends ObjectLoader {
|
|
10
|
+
nodes: { [type: string]: Node };
|
|
11
|
+
nodeMaterials: { [type: string]: NodeMaterial };
|
|
12
|
+
|
|
13
|
+
constructor(manager?: LoadingManager);
|
|
14
|
+
|
|
15
|
+
setNodes(value: { [type: string]: Node }): this;
|
|
16
|
+
|
|
17
|
+
setNodeMaterials(value: { [type: string]: NodeMaterial }): this;
|
|
18
|
+
|
|
7
19
|
parseNodes(json: unknown, textures: { [key: string]: Texture }): NodeLoaderResult;
|
|
8
20
|
|
|
9
21
|
parseMaterials(json: unknown, textures: { [key: string]: Texture }): { [key: string]: Material };
|
|
@@ -35,6 +35,8 @@ export interface NodeMaterialParameters extends MaterialParameters {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
declare class NodeMaterial extends Material {
|
|
38
|
+
static get type(): string;
|
|
39
|
+
|
|
38
40
|
readonly isNodeMaterial: true;
|
|
39
41
|
|
|
40
42
|
fog: boolean;
|
|
@@ -85,7 +87,3 @@ declare class NodeMaterial extends Material {
|
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export default NodeMaterial;
|
|
88
|
-
|
|
89
|
-
export function registerNodeMaterial(type: string, nodeMaterialClass: { new(): NodeMaterial }): string;
|
|
90
|
-
|
|
91
|
-
export function createNodeMaterialFromType(type: string): NodeMaterial;
|