@types/three 0.169.0 → 0.170.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 +3 -3
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +44 -0
- three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
- three/examples/jsm/csm/CSMHelper.d.ts +2 -1
- three/examples/jsm/csm/CSMShadowNode.d.ts +46 -0
- three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
- three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
- three/examples/jsm/geometries/DecalGeometry.d.ts +9 -3
- three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
- three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
- three/examples/jsm/lines/Wireframe.d.ts +5 -2
- three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
- three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
- three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
- three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
- three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
- three/examples/jsm/math/ColorSpaces.d.ts +11 -0
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
- three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
- three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
- three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +2 -8
- three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
- three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
- three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +1 -4
- three/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
- three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
- three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +3 -0
- three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
- three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +1 -5
- three/examples/jsm/tsl/display/hashBlur.d.ts +7 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +22 -0
- three/package.json +4 -3
- three/src/Three.WebGPU.Nodes.d.ts +5 -1
- three/src/Three.WebGPU.d.ts +5 -1
- three/src/Three.d.ts +2 -7
- three/src/constants.d.ts +1 -9
- three/src/core/BufferGeometry.d.ts +13 -2
- three/src/core/RenderTarget.d.ts +1 -2
- three/src/loaders/FileLoader.d.ts +3 -3
- three/src/materials/LineBasicMaterial.d.ts +0 -5
- three/src/materials/LineDashedMaterial.d.ts +0 -5
- three/src/materials/Material.d.ts +4 -6
- three/src/materials/MeshBasicMaterial.d.ts +0 -5
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/MeshLambertMaterial.d.ts +0 -5
- three/src/materials/MeshMatcapMaterial.d.ts +0 -5
- three/src/materials/MeshNormalMaterial.d.ts +0 -5
- three/src/materials/MeshPhongMaterial.d.ts +0 -5
- three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
- three/src/materials/MeshStandardMaterial.d.ts +0 -5
- three/src/materials/MeshToonMaterial.d.ts +0 -5
- three/src/materials/PointsMaterial.d.ts +0 -5
- three/src/materials/RawShaderMaterial.d.ts +0 -2
- three/src/materials/ShaderMaterial.d.ts +0 -5
- three/src/materials/ShadowMaterial.d.ts +0 -5
- three/src/materials/SpriteMaterial.d.ts +0 -5
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/NodeMaterial.d.ts +2 -0
- three/src/materials/nodes/NodeMaterials.d.ts +19 -16
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +15 -0
- three/src/math/Color.d.ts +39 -22
- three/src/math/ColorManagement.d.ts +24 -24
- three/src/math/Vector4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +1 -21
- three/src/nodes/TSL.d.ts +6 -24
- three/src/nodes/accessors/Camera.d.ts +0 -1
- three/src/nodes/accessors/SceneNode.d.ts +2 -0
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
- three/src/nodes/accessors/VelocityNode.d.ts +4 -0
- three/src/nodes/code/ScriptableNode.d.ts +1 -1
- three/src/nodes/core/StackNode.d.ts +4 -4
- three/src/nodes/core/VarNode.d.ts +12 -1
- three/src/nodes/display/ColorAdjustment.d.ts +29 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
- three/src/nodes/display/ColorSpaceNode.d.ts +14 -8
- three/src/nodes/display/RenderOutputNode.d.ts +4 -4
- three/src/nodes/display/ViewportDepthNode.d.ts +2 -0
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
- three/src/nodes/lighting/LightsNode.d.ts +7 -2
- three/src/nodes/lighting/PointLightNode.d.ts +11 -1
- three/src/nodes/lighting/ShadowNode.d.ts +12 -0
- three/src/nodes/utils/Discard.d.ts +1 -1
- three/src/nodes/utils/Oscillators.d.ts +7 -0
- three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
- three/src/nodes/utils/ReflectorNode.d.ts +17 -4
- three/src/nodes/utils/Timer.d.ts +21 -0
- three/src/objects/BatchedMesh.d.ts +47 -2
- three/src/renderers/WebGLRenderer.d.ts +22 -11
- three/src/renderers/common/Constants.d.ts +2 -1
- three/src/renderers/common/Geometries.d.ts +1 -0
- three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
- three/src/renderers/common/Lighting.d.ts +15 -0
- three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
- three/src/renderers/common/RenderList.d.ts +5 -2
- three/src/renderers/common/RenderLists.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +1 -0
- three/src/renderers/common/Renderer.d.ts +35 -9
- three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
- three/src/renderers/webgl/WebGLPrograms.d.ts +3 -10
- three/src/renderers/webgl/WebGLState.d.ts +13 -10
- three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
- three/src/textures/CompressedTexture.d.ts +1 -2
- three/src/textures/CubeTexture.d.ts +1 -2
- three/src/textures/DataTexture.d.ts +1 -2
- three/src/textures/Texture.d.ts +3 -4
- three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
- three/src/nodes/display/BleachBypass.d.ts +0 -4
- three/src/nodes/display/Sepia.d.ts +0 -4
- three/src/nodes/utils/OscNode.d.ts +0 -25
- three/src/nodes/utils/TimerNode.d.ts +0 -25
- /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
- /three/examples/jsm/utils/{TextureUtilsGPU.d.ts → WebGPUTextureUtils.d.ts} +0 -0
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:
|
|
11
|
+
* Last updated: Tue, 12 Nov 2024 10:02:27 GMT
|
|
12
12
|
* Dependencies: [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
|
13
13
|
|
|
14
14
|
# Credits
|
three/examples/jsm/Addons.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ export * from "./animation/CCDIKSolver.js";
|
|
|
3
3
|
export * from "./animation/MMDAnimationHelper.js";
|
|
4
4
|
export * from "./animation/MMDPhysics.js";
|
|
5
5
|
|
|
6
|
-
export * from "./cameras/CinematicCamera.js";
|
|
7
|
-
|
|
8
6
|
export { default as WebGL } from "./capabilities/WebGL.js";
|
|
9
7
|
|
|
10
8
|
export * from "./controls/ArcballControls.js";
|
|
@@ -129,7 +127,9 @@ export * from "./loaders/VRMLLoader.js";
|
|
|
129
127
|
export * from "./loaders/VTKLoader.js";
|
|
130
128
|
export * from "./loaders/XYZLoader.js";
|
|
131
129
|
|
|
130
|
+
export * from "./materials/LDrawConditionalLineMaterial.js";
|
|
132
131
|
export * from "./materials/MeshGouraudMaterial.js";
|
|
132
|
+
export * from "./materials/MeshPostProcessingMaterial.js";
|
|
133
133
|
|
|
134
134
|
export * from "./math/Capsule.js";
|
|
135
135
|
export * from "./math/ColorConverter.js";
|
|
@@ -274,8 +274,8 @@ export * as SceneUtils from "./utils/SceneUtils.js";
|
|
|
274
274
|
export * from "./utils/ShadowMapViewer.js";
|
|
275
275
|
export * as SkeletonUtils from "./utils/SkeletonUtils.js";
|
|
276
276
|
export * as SortUtils from "./utils/SortUtils.js";
|
|
277
|
-
export * from "./utils/TextureUtils.js";
|
|
278
277
|
export * from "./utils/UVsDebug.js";
|
|
278
|
+
export * from "./utils/WebGLTextureUtils.js";
|
|
279
279
|
export * from "./utils/WorkerPool.js";
|
|
280
280
|
|
|
281
281
|
export * from "./webxr/ARButton.js";
|
|
@@ -35,6 +35,10 @@ export interface MMDAnimationHelperMixer {
|
|
|
35
35
|
duration?: number | undefined;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated The module has been deprecated and will be removed with r172. Please migrate to
|
|
40
|
+
* https://github.com/takahirox/three-mmd-loader instead.
|
|
41
|
+
*/
|
|
38
42
|
export class MMDAnimationHelper {
|
|
39
43
|
constructor(params?: MMDAnimationHelperParameter);
|
|
40
44
|
meshes: SkinnedMesh[];
|
|
@@ -6,6 +6,10 @@ export interface MMDPhysicsParameter {
|
|
|
6
6
|
gravity?: Vector3 | undefined;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated The module has been deprecated and will be removed with r172. Please migrate to
|
|
11
|
+
* https://github.com/takahirox/three-mmd-loader instead.
|
|
12
|
+
*/
|
|
9
13
|
export class MMDPhysics {
|
|
10
14
|
constructor(
|
|
11
15
|
mesh: SkinnedMesh,
|
|
@@ -44,7 +44,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
|
|
|
44
44
|
focusAnimationTime: number;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* If true, camera's near and far values will be adjusted every time zoom is performed trying to
|
|
47
|
+
* If true, camera's near and far values will be adjusted every time zoom is performed trying to maintain the same
|
|
48
48
|
* visible portion given by initial near and far values ( {@link PerspectiveCamera} only ). Default is false.
|
|
49
49
|
*/
|
|
50
50
|
adjustNearFar: boolean;
|
|
@@ -38,6 +38,12 @@ export interface TransformControlsEventMap {
|
|
|
38
38
|
"showX-changed": { value: unknown };
|
|
39
39
|
"showY-changed": { value: unknown };
|
|
40
40
|
"showZ-changed": { value: unknown };
|
|
41
|
+
"minX-changed": { value: unknown };
|
|
42
|
+
"maxX-changed": { value: unknown };
|
|
43
|
+
"minY-changed": { value: unknown };
|
|
44
|
+
"maxY-changed": { value: unknown };
|
|
45
|
+
"minZ-changed": { value: unknown };
|
|
46
|
+
"maxZ-changed": { value: unknown };
|
|
41
47
|
"worldPosition-changed": { value: unknown };
|
|
42
48
|
"worldPositionStart-changed": { value: unknown };
|
|
43
49
|
"worldQuaternion-changed": { value: unknown };
|
|
@@ -85,6 +91,12 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
|
|
|
85
91
|
*/
|
|
86
92
|
rotationSnap: number | null;
|
|
87
93
|
|
|
94
|
+
/**
|
|
95
|
+
* By default, 3D objects are continuously scaled. If you set this property to a numeric value, you can define in
|
|
96
|
+
* which steps the 3D object should be scaled. Default is `null`.
|
|
97
|
+
*/
|
|
98
|
+
scaleSnap: number | null;
|
|
99
|
+
|
|
88
100
|
/**
|
|
89
101
|
* Defines in which coordinate space transformations should be performed. Possible values are "world" and "local".
|
|
90
102
|
* Default is `world`.
|
|
@@ -116,6 +128,36 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
|
|
|
116
128
|
*/
|
|
117
129
|
showZ: boolean;
|
|
118
130
|
|
|
131
|
+
/**
|
|
132
|
+
* The minimum allowed X position during translation. Default is `-Infinity`.
|
|
133
|
+
*/
|
|
134
|
+
minx: number;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The maximum allowed X position during translation. Default is `Infinity`.
|
|
138
|
+
*/
|
|
139
|
+
maxX: number;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The minimum allowed Y position during translation. Default is `-Infinity`.
|
|
143
|
+
*/
|
|
144
|
+
minY: number;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The maximum allowed Y position during translation. Default is `Infinity`.
|
|
148
|
+
*/
|
|
149
|
+
maxY: number;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The minimum allowed Z position during translation. Default is `-Infinity`.
|
|
153
|
+
*/
|
|
154
|
+
minZ: number;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The maximum allowed Z position during translation. Default is `Infinity`.
|
|
158
|
+
*/
|
|
159
|
+
maxZ: number;
|
|
160
|
+
|
|
119
161
|
/**
|
|
120
162
|
* Creates a new instance of TransformControls.
|
|
121
163
|
* @param camera The camera of the rendered scene.
|
|
@@ -206,6 +248,8 @@ declare class TransformControlsRoot extends Object3D {
|
|
|
206
248
|
controls: TransformControls;
|
|
207
249
|
|
|
208
250
|
constructor(controls: TransformControls);
|
|
251
|
+
|
|
252
|
+
dispose(): void;
|
|
209
253
|
}
|
|
210
254
|
|
|
211
255
|
declare class TransformControlsGizmo extends Object3D {
|
|
@@ -6,14 +6,20 @@ export interface CSMFrustumVerticies {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export interface CSMFrustumParameters {
|
|
9
|
+
webGL?: boolean;
|
|
9
10
|
projectionMatrix?: Matrix4;
|
|
10
11
|
maxFar?: number;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
declare class CSMFrustum {
|
|
15
|
+
zNear: number;
|
|
15
16
|
vertices: CSMFrustumVerticies;
|
|
17
|
+
|
|
18
|
+
constructor(data?: CSMFrustumParameters);
|
|
19
|
+
|
|
16
20
|
setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): CSMFrustumVerticies;
|
|
17
21
|
split(breaks: number[], target: CSMFrustum[]): void;
|
|
18
22
|
toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void;
|
|
19
23
|
}
|
|
24
|
+
|
|
25
|
+
export { CSMFrustum };
|
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
} from "three";
|
|
11
11
|
|
|
12
12
|
import { CSM } from "./CSM.js";
|
|
13
|
+
import { CSMShadowNode } from "./CSMShadowNode.js";
|
|
13
14
|
|
|
14
|
-
export class CSMHelper<TCSM extends CSM = CSM> extends Group {
|
|
15
|
+
export class CSMHelper<TCSM extends CSM | CSMShadowNode = CSM | CSMShadowNode> extends Group {
|
|
15
16
|
constructor(csm: TCSM);
|
|
16
17
|
csm: TCSM;
|
|
17
18
|
displayFrustum: boolean;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Camera, DirectionalLightShadow, Light, Object3D } from "three";
|
|
2
|
+
import { Node } from "three/tsl";
|
|
3
|
+
import { CSMFrustum } from "./CSMFrustum.js";
|
|
4
|
+
|
|
5
|
+
export type CSMShadowNodeMode = "uniform" | "logarithmic" | "practical" | "custom";
|
|
6
|
+
|
|
7
|
+
export interface CSMShadowNodeData {
|
|
8
|
+
cascades?: number | undefined;
|
|
9
|
+
maxFar?: number | undefined;
|
|
10
|
+
mode?: CSMShadowNodeMode | undefined;
|
|
11
|
+
lightMargin?: number | undefined;
|
|
12
|
+
customSplitsCallback?:
|
|
13
|
+
| ((cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void)
|
|
14
|
+
| undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class LwLight extends Object3D {
|
|
18
|
+
target: Object3D;
|
|
19
|
+
shadow?: DirectionalLightShadow;
|
|
20
|
+
|
|
21
|
+
constructor();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class CSMShadowNode extends Node {
|
|
25
|
+
light: Light;
|
|
26
|
+
camera: Camera | null;
|
|
27
|
+
cascades: number;
|
|
28
|
+
maxFar: number;
|
|
29
|
+
mode: CSMShadowNodeMode;
|
|
30
|
+
lightMargin: number;
|
|
31
|
+
customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
|
32
|
+
|
|
33
|
+
fade: boolean;
|
|
34
|
+
|
|
35
|
+
breaks: number[];
|
|
36
|
+
mainFrustum: CSMFrustum | null;
|
|
37
|
+
frustums: CSMFrustum[];
|
|
38
|
+
|
|
39
|
+
lights: LwLight[];
|
|
40
|
+
|
|
41
|
+
constructor(light: Light, data?: CSMShadowNodeData);
|
|
42
|
+
|
|
43
|
+
updateFrustums(): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { CSMShadowNode };
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { Curve, Vector2, Vector3, Vector4 } from "three";
|
|
1
|
+
import { Curve, CurveJSON, Vector2, Vector3, Vector4 } from "three";
|
|
2
|
+
|
|
3
|
+
export interface NURBSCurveJSON extends CurveJSON {
|
|
4
|
+
degree: number;
|
|
5
|
+
knots: number[];
|
|
6
|
+
controlPoints: number[][];
|
|
7
|
+
startKnot: number;
|
|
8
|
+
endKnot: number;
|
|
9
|
+
}
|
|
2
10
|
|
|
3
11
|
export class NURBSCurve extends Curve<Vector3> {
|
|
4
12
|
degree: number;
|
|
@@ -14,4 +22,7 @@ export class NURBSCurve extends Curve<Vector3> {
|
|
|
14
22
|
startKnot?: number,
|
|
15
23
|
endKnot?: number,
|
|
16
24
|
);
|
|
25
|
+
|
|
26
|
+
toJSON(): NURBSCurveJSON;
|
|
27
|
+
fromJSON(json: NURBSCurveJSON): this;
|
|
17
28
|
}
|
|
@@ -47,12 +47,22 @@ export interface GLTFExporterOptions {
|
|
|
47
47
|
includeCustomExtensions?: boolean;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
type TextureUtils = {
|
|
51
|
+
decompress:
|
|
52
|
+
| ((texture: Texture, maxTextureSize?: number) => Promise<void>)
|
|
53
|
+
| ((texture: Texture, maxTextureSize?: number) => void);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare class GLTFExporter {
|
|
57
|
+
textureUtils: TextureUtils | null;
|
|
58
|
+
|
|
51
59
|
constructor();
|
|
52
60
|
|
|
53
61
|
register(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
|
54
62
|
unregister(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
|
55
63
|
|
|
64
|
+
setTextureUtils(utils: TextureUtils | null): this;
|
|
65
|
+
|
|
56
66
|
/**
|
|
57
67
|
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
|
|
58
68
|
*
|
|
@@ -94,11 +104,15 @@ export class GLTFExporter {
|
|
|
94
104
|
): Promise<ArrayBuffer | { [key: string]: any }>;
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
|
|
107
|
+
declare class GLTFWriter {
|
|
108
|
+
textureUtils: TextureUtils | null;
|
|
109
|
+
|
|
98
110
|
constructor();
|
|
99
111
|
|
|
100
112
|
setPlugins(plugins: GLTFExporterPlugin[]): void;
|
|
101
113
|
|
|
114
|
+
setTextureUtils(utils: TextureUtils | null): this;
|
|
115
|
+
|
|
102
116
|
/**
|
|
103
117
|
* Parse scenes and generate GLTF output
|
|
104
118
|
*
|
|
@@ -106,7 +120,7 @@ export class GLTFWriter {
|
|
|
106
120
|
* @param onDone Callback on completed
|
|
107
121
|
* @param options options
|
|
108
122
|
*/
|
|
109
|
-
|
|
123
|
+
writeAsync(
|
|
110
124
|
input: Object3D | Object3D[],
|
|
111
125
|
onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void,
|
|
112
126
|
options?: GLTFExporterOptions,
|
|
@@ -121,3 +135,6 @@ export interface GLTFExporterPlugin {
|
|
|
121
135
|
beforeParse?: (input: Object3D | Object3D[]) => void;
|
|
122
136
|
afterParse?: (input: Object3D | Object3D[]) => void;
|
|
123
137
|
}
|
|
138
|
+
|
|
139
|
+
export { GLTFExporter };
|
|
140
|
+
export type { GLTFWriter };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Object3D } from "three";
|
|
2
|
+
import * as WebGLTextureUtils from "../utils/WebGLTextureUtils.js";
|
|
3
|
+
import * as WebGPUTextureUtils from "../utils/WebGPUTextureUtils.js";
|
|
2
4
|
|
|
3
5
|
export interface USDZExporterOptions {
|
|
4
6
|
ar?: { anchoring: { type: "plane" }; planeAnchoring: { alignment: "horizontal" | "vertical" | "any" } } | undefined;
|
|
@@ -8,6 +10,8 @@ export interface USDZExporterOptions {
|
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
export class USDZExporter {
|
|
13
|
+
textureUtils: typeof WebGLTextureUtils | typeof WebGPUTextureUtils | null;
|
|
14
|
+
|
|
11
15
|
constructor();
|
|
12
16
|
|
|
13
17
|
parse(
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { BufferGeometry, Euler, Mesh, Vector3 } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
declare class DecalGeometry extends BufferGeometry {
|
|
4
4
|
constructor(mesh: Mesh, position: Vector3, orientation: Euler, size: Vector3);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
declare class DecalVertex {
|
|
8
|
+
position: Vector3;
|
|
9
|
+
normal: Vector3 | null;
|
|
10
|
+
|
|
11
|
+
constructor(position: Vector3, normal?: Vector3 | null);
|
|
12
|
+
|
|
9
13
|
clone(): this;
|
|
10
14
|
}
|
|
15
|
+
|
|
16
|
+
export { DecalGeometry, DecalVertex };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BufferGeometry } from "three";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* TeapotGeometry tessellates the famous Utah teapot database by Martin Newell.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* TeapotGeometry is an add-on, and must be imported explicitly. See
|
|
7
7
|
* [Installation / Addons]{@link https://threejs.org/docs/#manual/en/introduction/Installation}.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Lighting } from "three/webgpu";
|
|
3
|
+
import { Light } from "../../../src/lights/Light.js";
|
|
4
|
+
import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
|
|
5
|
+
|
|
6
|
+
export class TiledLighting extends Lighting {
|
|
7
|
+
constructor();
|
|
8
|
+
|
|
9
|
+
createNode(lights?: Light[]): ShaderNodeObject<TiledLightsNode>;
|
|
10
|
+
}
|
|
@@ -3,9 +3,12 @@ import { Mesh } from "three";
|
|
|
3
3
|
import { LineMaterial } from "./LineMaterial.js";
|
|
4
4
|
import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
|
|
6
|
+
declare class Wireframe extends Mesh {
|
|
8
7
|
readonly isWireframe: true;
|
|
9
8
|
|
|
9
|
+
constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
|
|
10
|
+
|
|
10
11
|
computeLineDistances(): this;
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export { Wireframe };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Line2NodeMaterial, Mesh } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
import { WireframeGeometry2 } from "../WireframeGeometry2.js";
|
|
4
|
+
|
|
5
|
+
declare class Wireframe extends Mesh {
|
|
6
|
+
readonly isWireframe: true;
|
|
7
|
+
|
|
8
|
+
constructor(geometry?: WireframeGeometry2, material?: Line2NodeMaterial);
|
|
9
|
+
|
|
10
|
+
computeLineDistances(): this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Wireframe };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
|
|
2
2
|
|
|
3
3
|
export interface EXR {
|
|
4
4
|
header: object;
|
|
@@ -6,7 +6,7 @@ export interface EXR {
|
|
|
6
6
|
height: number;
|
|
7
7
|
data: Float32Array | Uint16Array;
|
|
8
8
|
format: PixelFormat;
|
|
9
|
-
colorSpace:
|
|
9
|
+
colorSpace: string;
|
|
10
10
|
type: TextureDataType;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
BufferAttribute,
|
|
4
4
|
BufferGeometry,
|
|
5
5
|
Camera,
|
|
6
|
-
ColorSpace,
|
|
7
6
|
FileLoader,
|
|
8
7
|
Group,
|
|
9
8
|
ImageBitmapLoader,
|
|
@@ -113,7 +112,7 @@ export class GLTFParser {
|
|
|
113
112
|
texCoord?: number | undefined;
|
|
114
113
|
extensions?: any;
|
|
115
114
|
},
|
|
116
|
-
colorSpace?:
|
|
115
|
+
colorSpace?: string | undefined,
|
|
117
116
|
) => Promise<Texture | null>;
|
|
118
117
|
assignFinalMaterial: (object: Mesh) => void;
|
|
119
118
|
getMaterialType: () => typeof MeshStandardMaterial;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { Group, Loader, LoadingManager, Material } from "three";
|
|
2
|
+
import { LDrawConditionalLineMaterial } from "../materials/LDrawConditionalLineMaterial.js";
|
|
3
|
+
import { LDrawConditionalLineMaterial as LDrawConditionalLineNodeMaterial } from "../materials/LDrawConditionalLineNodeMaterial.js";
|
|
2
4
|
|
|
3
5
|
export class LDrawLoader extends Loader<Group> {
|
|
4
6
|
materials: Material[];
|
|
5
7
|
materialsLibrary: Record<string, Material>;
|
|
8
|
+
|
|
6
9
|
fileMap: Record<string, string>;
|
|
10
|
+
|
|
7
11
|
smoothNormals: boolean;
|
|
8
12
|
|
|
13
|
+
ConditionalLineMaterial: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial | null;
|
|
14
|
+
|
|
9
15
|
constructor(manager?: LoadingManager);
|
|
10
16
|
|
|
17
|
+
setConditionalLineMaterial(
|
|
18
|
+
type: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial,
|
|
19
|
+
): this;
|
|
20
|
+
|
|
11
21
|
preloadMaterials(url: string): Promise<void>;
|
|
12
22
|
setFileMap(fileMap: Record<string, string>): void;
|
|
13
23
|
setMaterials(materials: Material[]): void;
|
|
@@ -5,6 +5,10 @@ export interface MMDLoaderAnimationObject {
|
|
|
5
5
|
mesh: SkinnedMesh;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated The module has been deprecated and will be removed with r172. Please migrate to
|
|
10
|
+
* https://github.com/takahirox/three-mmd-loader instead.
|
|
11
|
+
*/
|
|
8
12
|
export class MMDLoader extends Loader<SkinnedMesh> {
|
|
9
13
|
constructor(manager?: LoadingManager);
|
|
10
14
|
animationBuilder: object;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShaderMaterial, ShaderMaterialParameters } from "three";
|
|
2
|
+
|
|
3
|
+
declare class LDrawConditionalLineMaterial extends ShaderMaterial {
|
|
4
|
+
readonly isLDrawConditionalLineMaterial: true;
|
|
5
|
+
|
|
6
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { LDrawConditionalLineMaterial };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NodeMaterial, NodeMaterialParameters } from "three/tsl";
|
|
2
|
+
|
|
3
|
+
declare class LDrawConditionalLineMaterial extends NodeMaterial {
|
|
4
|
+
readonly isLDrawConditionalLineMaterial: true;
|
|
5
|
+
|
|
6
|
+
constructor(parameters?: NodeMaterialParameters);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { LDrawConditionalLineMaterial };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColorSpaceDefinition } from "three";
|
|
2
|
+
|
|
3
|
+
export const DisplayP3ColorSpace: "display-p3";
|
|
4
|
+
export const LinearDisplayP3ColorSpace: "display-p3-linear";
|
|
5
|
+
|
|
6
|
+
export const DisplayP3ColorSpaceImpl: ColorSpaceDefinition;
|
|
7
|
+
export const LinearDisplayP3ColorSpaceImpl: ColorSpaceDefinition;
|
|
8
|
+
|
|
9
|
+
export const LinearRec2020ColorSpace: "rec2020-linear";
|
|
10
|
+
|
|
11
|
+
export const LinearRec2020ColorSpaceImpl: ColorSpaceDefinition;
|
|
@@ -24,29 +24,23 @@ export interface LightMapContainers {
|
|
|
24
24
|
object: Object3D;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
declare class ProgressiveLightMap {
|
|
28
28
|
renderer: WebGLRenderer;
|
|
29
29
|
res: number;
|
|
30
30
|
lightMapContainers: LightMapContainers[];
|
|
31
|
-
compiled: boolean;
|
|
32
31
|
scene: Scene;
|
|
33
|
-
tinyTarget: WebGLRenderTarget;
|
|
34
32
|
buffer1Active: boolean;
|
|
35
33
|
firstUpdate: boolean;
|
|
36
34
|
warned: boolean;
|
|
35
|
+
labelMesh: Mesh<PlaneGeometry, MeshBasicMaterial> | null;
|
|
36
|
+
blurringPlane: Mesh<PlaneGeometry, MeshBasicMaterial> | null;
|
|
37
37
|
|
|
38
38
|
progressiveLightMap1: WebGLRenderTarget;
|
|
39
39
|
progressiveLightMap2: WebGLRenderTarget;
|
|
40
40
|
|
|
41
41
|
uvMat: MeshPhongMaterial;
|
|
42
42
|
|
|
43
|
-
uv_boxes
|
|
44
|
-
|
|
45
|
-
blurringPlane: Mesh<PlaneGeometry, MeshBasicMaterial>;
|
|
46
|
-
|
|
47
|
-
labelMaterial: MeshBasicMaterial;
|
|
48
|
-
labelPlane: PlaneGeometry;
|
|
49
|
-
labelMesh: Mesh<PlaneGeometry, MeshBasicMaterial>;
|
|
43
|
+
uv_boxes?: UVBoxes[];
|
|
50
44
|
|
|
51
45
|
constructor(renderer: WebGLRenderer, res?: number);
|
|
52
46
|
|
|
@@ -57,4 +51,8 @@ export class ProgressiveLightMap {
|
|
|
57
51
|
showDebugLightmap(visible: boolean, position?: Vector3): void;
|
|
58
52
|
|
|
59
53
|
private _initializeBlurPlane(res: number, lightMap?: Texture | null): void;
|
|
54
|
+
|
|
55
|
+
dispose(): void;
|
|
60
56
|
}
|
|
57
|
+
|
|
58
|
+
export { ProgressiveLightMap };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Camera, Material, Object3D, Vector3, WebGPURenderer } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface UVBoxes {
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface LightMapContainers {
|
|
10
|
+
basicMat: Material | Material[];
|
|
11
|
+
object: Object3D;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class ProgressiveLightMap {
|
|
15
|
+
renderer: WebGPURenderer;
|
|
16
|
+
resolution: number;
|
|
17
|
+
|
|
18
|
+
constructor(renderer: WebGPURenderer, resolution?: number);
|
|
19
|
+
|
|
20
|
+
addObjectsToLightMap(objects: Object3D[]): void;
|
|
21
|
+
|
|
22
|
+
update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void;
|
|
23
|
+
|
|
24
|
+
showDebugLightmap(visible: boolean, position?: Vector3 | null): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { ProgressiveLightMap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Camera, Color,
|
|
1
|
+
import { Camera, Color, Object3D, Scene } from "three";
|
|
2
2
|
|
|
3
3
|
export class SVGObject extends Object3D {
|
|
4
4
|
constructor(node: SVGElement);
|
|
@@ -12,7 +12,7 @@ export class SVGRenderer {
|
|
|
12
12
|
sortObjects: boolean;
|
|
13
13
|
sortElements: boolean;
|
|
14
14
|
overdraw: number;
|
|
15
|
-
outputColorSpace:
|
|
15
|
+
outputColorSpace: string;
|
|
16
16
|
info: { render: { vertices: number; faces: number } };
|
|
17
17
|
|
|
18
18
|
getSize(): { width: number; height: number };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import TextureNode from "
|
|
2
|
-
import Node from "../core/Node.js";
|
|
3
|
-
import TempNode from "../core/TempNode.js";
|
|
4
|
-
import UniformNode from "../core/UniformNode.js";
|
|
5
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
1
|
+
import { Node, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
|
|
6
2
|
|
|
7
3
|
export default class AfterImageNode extends TempNode {
|
|
8
4
|
textureNode: TextureNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Camera } from "
|
|
2
|
-
import {
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
1
|
+
import { Camera, Scene } from "three";
|
|
2
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
4
3
|
import StereoCompositePassNode from "./StereoCompositePassNode.js";
|
|
5
4
|
|
|
6
5
|
declare class AnaglyphPassNode extends StereoCompositePassNode {
|