@types/three 0.171.0 → 0.172.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 +0 -5
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/OrbitControls.d.ts +5 -0
- three/examples/jsm/csm/CSMShadowNode.d.ts +2 -3
- three/examples/jsm/geometries/InstancedPointsGeometry.d.ts +13 -0
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
- three/examples/jsm/lines/LineSegments2.d.ts +3 -1
- three/examples/jsm/modifiers/CurveModifier.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +1 -1
- three/examples/jsm/objects/InstancedPoints.d.ts +10 -0
- three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +1 -1
- three/examples/jsm/utils/ShadowMapViewer.d.ts +2 -2
- three/package.json +2 -2
- three/src/Three.Core.d.ts +2 -1
- three/src/Three.TSL.d.ts +9 -4
- three/src/Three.WebGPU.Nodes.d.ts +2 -2
- three/src/Three.WebGPU.d.ts +2 -2
- three/src/cameras/CubeCamera.d.ts +19 -2
- three/src/core/RenderTarget.d.ts +3 -5
- three/src/core/RenderTarget3D.d.ts +9 -0
- three/src/core/RenderTargetArray.d.ts +9 -0
- three/src/materials/Material.d.ts +3 -1
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +6 -6
- three/src/materials/nodes/NodeMaterial.d.ts +3 -0
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +56 -0
- three/src/nodes/Nodes.d.ts +1 -6
- three/src/nodes/TSL.d.ts +2 -3
- three/src/nodes/accessors/Arrays.d.ts +3 -2
- three/src/nodes/accessors/BufferAttributeNode.d.ts +117 -0
- three/src/nodes/accessors/BufferNode.d.ts +4 -4
- three/src/nodes/accessors/MaterialNode.d.ts +3 -3
- three/src/nodes/accessors/ModelNode.d.ts +10 -2
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +2 -6
- three/src/nodes/accessors/StorageBufferNode.d.ts +5 -1
- three/src/nodes/accessors/TextureNode.d.ts +5 -0
- three/src/nodes/accessors/UniformArrayNode.d.ts +3 -2
- three/src/nodes/core/Node.d.ts +237 -0
- three/src/nodes/core/NodeAttribute.d.ts +13 -0
- three/src/nodes/core/NodeBuilder.d.ts +1 -2
- three/src/nodes/core/NodeCache.d.ts +21 -0
- three/src/nodes/core/NodeParser.d.ts +11 -0
- three/src/nodes/core/NodeUniform.d.ts +28 -0
- three/src/nodes/core/NodeVar.d.ts +12 -0
- three/src/nodes/core/NodeVarying.d.ts +14 -0
- three/src/nodes/core/StructTypeNode.d.ts +19 -1
- three/src/nodes/core/UniformNode.d.ts +44 -0
- three/src/nodes/core/VaryingNode.d.ts +3 -0
- three/src/nodes/core/constants.d.ts +35 -0
- three/src/nodes/display/PassNode.d.ts +1 -1
- three/src/nodes/fog/Fog.d.ts +26 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +6 -1
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +2 -0
- three/src/nodes/lighting/ShadowBaseNode.d.ts +15 -0
- three/src/nodes/lighting/ShadowNode.d.ts +2 -1
- three/src/nodes/math/MathNode.d.ts +13 -4
- three/src/nodes/tsl/TSLCore.d.ts +48 -16
- three/src/nodes/utils/EquirectUVNode.d.ts +2 -2
- three/src/nodes/utils/LoopNode.d.ts +23 -2
- three/src/objects/ClippingGroup.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +8 -8
- three/src/renderers/common/Animation.d.ts +30 -0
- three/src/renderers/common/Attributes.d.ts +31 -0
- three/src/renderers/common/Backend.d.ts +11 -0
- three/src/renderers/common/Background.d.ts +22 -0
- three/src/renderers/common/BindGroup.d.ts +15 -0
- three/src/renderers/common/Binding.d.ts +24 -0
- three/src/renderers/common/Bindings.d.ts +54 -0
- three/src/renderers/common/Buffer.d.ts +31 -0
- three/src/renderers/common/BufferUtils.d.ts +26 -0
- three/src/renderers/common/BundleGroup.d.ts +22 -0
- three/src/renderers/common/ChainMap.d.ts +31 -1
- three/src/renderers/common/ClippingContext.d.ts +45 -0
- three/src/renderers/common/Color4.d.ts +36 -0
- three/src/renderers/common/ComputePipeline.d.ts +12 -0
- three/src/renderers/common/CubeRenderTarget.d.ts +13 -0
- three/src/renderers/common/DataMap.d.ts +30 -0
- three/src/renderers/common/Geometries.d.ts +52 -0
- three/src/renderers/common/Info.d.ts +27 -0
- three/src/renderers/common/Pipeline.d.ts +11 -0
- three/src/renderers/common/Pipelines.d.ts +104 -0
- three/src/renderers/common/ProgrammableStage.d.ts +19 -1
- three/src/renderers/common/RenderBundle.d.ts +15 -4
- three/src/renderers/common/RenderBundles.d.ts +20 -2
- three/src/renderers/common/RenderContext.d.ts +22 -0
- three/src/renderers/common/RenderContexts.d.ts +42 -3
- three/src/renderers/common/RenderList.d.ts +85 -0
- three/src/renderers/common/RenderLists.d.ts +21 -0
- three/src/renderers/common/RenderObject.d.ts +152 -1
- three/src/renderers/common/RenderObjects.d.ts +53 -0
- three/src/renderers/common/RenderPipeline.d.ts +13 -0
- three/src/renderers/common/Renderer.d.ts +583 -6
- three/src/renderers/common/{PostProcessingUtils.d.ts → RendererUtils.d.ts} +16 -4
- three/src/renderers/common/StorageBufferAttribute.d.ts +1 -1
- three/src/renderers/common/Textures.d.ts +66 -0
- three/src/renderers/common/Uniform.d.ts +106 -0
- three/src/renderers/common/UniformBuffer.d.ts +12 -0
- three/src/renderers/common/UniformsGroup.d.ts +103 -0
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +30 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +71 -0
- three/src/renderers/common/nodes/NodeUniform.d.ts +154 -0
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +14 -2
- three/src/renderers/common/nodes/Nodes.d.ts +185 -11
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +10 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +11 -0
- three/src/textures/DataTexture.d.ts +2 -2
- three/src/textures/Texture.d.ts +3 -0
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +0 -99
- three/examples/jsm/animation/MMDPhysics.d.ts +0 -128
- three/examples/jsm/exporters/MMDExporter.d.ts +0 -11
- three/examples/jsm/loaders/MMDLoader.d.ts +0 -60
- three/examples/jsm/shaders/MMDToonShader.d.ts +0 -15
- three/src/Three.Legacy.d.ts +0 -20
- three/src/nodes/core/UniformGroup.d.ts +0 -7
- three/src/nodes/fog/FogExp2Node.d.ts +0 -14
- three/src/nodes/fog/FogNode.d.ts +0 -20
- three/src/nodes/fog/FogRangeNode.d.ts +0 -19
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: Mon, 06 Jan 2025 09:02:31 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
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * from "./animation/AnimationClipCreator.js";
|
|
2
2
|
export * from "./animation/CCDIKSolver.js";
|
|
3
|
-
export * from "./animation/MMDAnimationHelper.js";
|
|
4
|
-
export * from "./animation/MMDPhysics.js";
|
|
5
3
|
|
|
6
4
|
export { default as WebGL } from "./capabilities/WebGL.js";
|
|
7
5
|
|
|
@@ -40,7 +38,6 @@ export * from "./exporters/DRACOExporter.js";
|
|
|
40
38
|
export * from "./exporters/EXRExporter.js";
|
|
41
39
|
export * from "./exporters/GLTFExporter.js";
|
|
42
40
|
export * from "./exporters/KTX2Exporter.js";
|
|
43
|
-
export * from "./exporters/MMDExporter.js";
|
|
44
41
|
export * from "./exporters/OBJExporter.js";
|
|
45
42
|
export * from "./exporters/PLYExporter.js";
|
|
46
43
|
export * from "./exporters/STLExporter.js";
|
|
@@ -104,7 +101,6 @@ export * from "./loaders/LUTCubeLoader.js";
|
|
|
104
101
|
export * from "./loaders/LWOLoader.js";
|
|
105
102
|
export * from "./loaders/MD2Loader.js";
|
|
106
103
|
export * from "./loaders/MDDLoader.js";
|
|
107
|
-
export * from "./loaders/MMDLoader.js";
|
|
108
104
|
export * from "./loaders/MTLLoader.js";
|
|
109
105
|
export * from "./loaders/NRRDLoader.js";
|
|
110
106
|
export * from "./loaders/OBJLoader.js";
|
|
@@ -241,7 +237,6 @@ export * from "./shaders/KaleidoShader.js";
|
|
|
241
237
|
export * from "./shaders/LuminosityHighPassShader.js";
|
|
242
238
|
export * from "./shaders/LuminosityShader.js";
|
|
243
239
|
export * from "./shaders/MirrorShader.js";
|
|
244
|
-
export * from "./shaders/MMDToonShader.js";
|
|
245
240
|
export * from "./shaders/NormalMapShader.js";
|
|
246
241
|
export * from "./shaders/OutputShader.js";
|
|
247
242
|
export * from "./shaders/RGBShiftShader.js";
|
|
@@ -168,7 +168,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
|
|
|
168
168
|
setGizmosVisible(value: boolean): void;
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* Update the `radiusFactor` value, redraw the gizmo and send a `changeEvent` to
|
|
171
|
+
* Update the `radiusFactor` value, redraw the gizmo and send a `changeEvent` to visualize the changes.
|
|
172
172
|
*/
|
|
173
173
|
setTbRadius(value: number): void;
|
|
174
174
|
|
|
@@ -121,6 +121,11 @@ declare class OrbitControls extends Controls<OrbitControlsEventMap> {
|
|
|
121
121
|
*/
|
|
122
122
|
rotateSpeed: number;
|
|
123
123
|
|
|
124
|
+
/**
|
|
125
|
+
* How fast to rotate the camera when the keyboard is used. Default is 1.
|
|
126
|
+
*/
|
|
127
|
+
keyRotateSpeed: number;
|
|
128
|
+
|
|
124
129
|
/**
|
|
125
130
|
* Enable or disable camera panning. Default is true.
|
|
126
131
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Camera, DirectionalLightShadow, Light,
|
|
1
|
+
import { Camera, DirectionalLightShadow, Light, Object3D, ShadowBaseNode } from "three/webgpu";
|
|
2
2
|
import { CSMFrustum } from "./CSMFrustum.js";
|
|
3
3
|
|
|
4
4
|
export type CSMShadowNodeMode = "uniform" | "logarithmic" | "practical" | "custom";
|
|
@@ -20,8 +20,7 @@ declare class LwLight extends Object3D {
|
|
|
20
20
|
constructor();
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
declare class CSMShadowNode extends
|
|
24
|
-
light: Light;
|
|
23
|
+
declare class CSMShadowNode extends ShadowBaseNode {
|
|
25
24
|
camera: Camera | null;
|
|
26
25
|
cascades: number;
|
|
27
26
|
maxFar: number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InstancedBufferGeometry } from "three";
|
|
2
|
+
|
|
3
|
+
declare class InstancedPointsGeometry extends InstancedBufferGeometry {
|
|
4
|
+
readonly isInstancedPointsGeometry: true;
|
|
5
|
+
|
|
6
|
+
constructor();
|
|
7
|
+
|
|
8
|
+
setPositions(array: Float32Array | ArrayLike<number>): this;
|
|
9
|
+
|
|
10
|
+
setColors(array: Float32Array | ArrayLike<number>): this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default InstancedPointsGeometry;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mesh, WebGLRenderer } from "three";
|
|
1
|
+
import { Mesh, Vector2, WebGLRenderer } from "three";
|
|
2
2
|
|
|
3
3
|
import { LineMaterial } from "./LineMaterial.js";
|
|
4
4
|
import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
|
|
@@ -18,6 +18,8 @@ export class LineSegments2 extends Mesh {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly isLineSegments2: true;
|
|
20
20
|
|
|
21
|
+
resolution: Vector2;
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* @param geometry (optional) Pair(s) of vertices representing each line segment.
|
|
23
25
|
* @param material (optional) Material for the line. Default is a {@link LineMaterial} with random color.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InstancedPointsNodeMaterial, Mesh } from "three/webgpu";
|
|
2
|
+
import InstancedPointsGeometry from "../geometries/InstancedPointsGeometry.js";
|
|
3
|
+
|
|
4
|
+
declare class InstancedPoints extends Mesh<InstancedPointsGeometry, InstancedPointsNodeMaterial> {
|
|
5
|
+
readonly isInstancedPoints: true;
|
|
6
|
+
|
|
7
|
+
constructor(geometry?: InstancedPointsGeometry, material?: InstancedPointsNodeMaterial);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default InstancedPoints;
|
|
@@ -59,6 +59,6 @@ export class OutlinePass extends Pass {
|
|
|
59
59
|
updateTextureMatrix(): void;
|
|
60
60
|
getPrepareMaskMaterial(): ShaderMaterial;
|
|
61
61
|
getEdgeDetectionMaterial(): ShaderMaterial;
|
|
62
|
-
|
|
62
|
+
getSeparableBlurMaterial(): ShaderMaterial;
|
|
63
63
|
getOverlayMaterial(): ShaderMaterial;
|
|
64
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Light,
|
|
1
|
+
import { Light, WebGLRenderer } from "three";
|
|
2
2
|
|
|
3
3
|
export interface Size {
|
|
4
4
|
width: number;
|
|
@@ -16,7 +16,7 @@ declare class ShadowMapViewer {
|
|
|
16
16
|
enabled: boolean;
|
|
17
17
|
size: Size;
|
|
18
18
|
position: Position;
|
|
19
|
-
render: (renderer:
|
|
19
|
+
render: (renderer: WebGLRenderer) => void;
|
|
20
20
|
updateForWindowResize: () => void;
|
|
21
21
|
update: () => void;
|
|
22
22
|
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.172.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
"meshoptimizer": "~0.18.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {},
|
|
51
|
-
"typesPublisherContentHash": "
|
|
51
|
+
"typesPublisherContentHash": "5a0a6eed488cac2cce6e55921ed12957eedbfbfc3847d24e7762d3d686ecaeac",
|
|
52
52
|
"typeScriptVersion": "5.0"
|
|
53
53
|
}
|
three/src/Three.Core.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export * from "./core/Layers.js";
|
|
|
38
38
|
export * from "./core/Object3D.js";
|
|
39
39
|
export * from "./core/Raycaster.js";
|
|
40
40
|
export * from "./core/RenderTarget.js";
|
|
41
|
+
export * from "./core/RenderTarget3D.js";
|
|
42
|
+
export * from "./core/RenderTargetArray.js";
|
|
41
43
|
export * from "./core/Uniform.js";
|
|
42
44
|
export * from "./core/UniformsGroup.js";
|
|
43
45
|
export * from "./extras/Controls.js";
|
|
@@ -154,5 +156,4 @@ export * from "./textures/FramebufferTexture.js";
|
|
|
154
156
|
export * from "./textures/Source.js";
|
|
155
157
|
export * from "./textures/Texture.js";
|
|
156
158
|
export * from "./textures/VideoTexture.js";
|
|
157
|
-
export * from "./Three.Legacy.js";
|
|
158
159
|
export { createCanvasElement } from "./utils.js";
|
three/src/Three.TSL.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ export const abs: typeof TSL.abs;
|
|
|
33
33
|
export const acesFilmicToneMapping: typeof TSL.acesFilmicToneMapping;
|
|
34
34
|
export const acos: typeof TSL.acos;
|
|
35
35
|
export const add: typeof TSL.add;
|
|
36
|
-
export const addMethodChaining: typeof TSL.addMethodChaining;
|
|
37
36
|
export const addNodeElement: typeof TSL.addNodeElement;
|
|
38
37
|
export const agxToneMapping: typeof TSL.agxToneMapping;
|
|
39
38
|
export const all: typeof TSL.all;
|
|
@@ -131,6 +130,7 @@ export const defined: typeof TSL.defined;
|
|
|
131
130
|
export const degrees: typeof TSL.degrees;
|
|
132
131
|
export const deltaTime: typeof TSL.deltaTime;
|
|
133
132
|
export const densityFog: typeof TSL.densityFog;
|
|
133
|
+
export const densityFogFactor: typeof TSL.densityFogFactor;
|
|
134
134
|
export const depth: typeof TSL.depth;
|
|
135
135
|
export const depthPass: typeof TSL.depthPass;
|
|
136
136
|
export const difference: typeof TSL.difference;
|
|
@@ -154,6 +154,7 @@ export const exp2: typeof TSL.exp2;
|
|
|
154
154
|
export const expression: typeof TSL.expression;
|
|
155
155
|
export const faceDirection: typeof TSL.faceDirection;
|
|
156
156
|
export const faceForward: typeof TSL.faceForward;
|
|
157
|
+
export const faceforward: typeof TSL.faceforward;
|
|
157
158
|
export const float: typeof TSL.float;
|
|
158
159
|
export const floor: typeof TSL.floor;
|
|
159
160
|
export const fog: typeof TSL.fog;
|
|
@@ -182,8 +183,8 @@ export const grayscale: typeof TSL.grayscale;
|
|
|
182
183
|
export const greaterThan: typeof TSL.greaterThan;
|
|
183
184
|
export const greaterThanEqual: typeof TSL.greaterThanEqual;
|
|
184
185
|
export const hash: typeof TSL.hash;
|
|
185
|
-
export const
|
|
186
|
-
export const highPrecisionModelViewMatrix: typeof TSL.
|
|
186
|
+
export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
|
|
187
|
+
export const highPrecisionModelViewMatrix: typeof TSL.highpModelViewMatrix;
|
|
187
188
|
export const hue: typeof TSL.hue;
|
|
188
189
|
export const instance: typeof TSL.instance;
|
|
189
190
|
export const instanceIndex: typeof TSL.instanceIndex;
|
|
@@ -193,6 +194,7 @@ export const instancedDynamicBufferAttribute: typeof TSL.instancedDynamicBufferA
|
|
|
193
194
|
export const instancedMesh: typeof TSL.instancedMesh;
|
|
194
195
|
export const int: typeof TSL.int;
|
|
195
196
|
export const inverseSqrt: typeof TSL.inverseSqrt;
|
|
197
|
+
export const inversesqrt: typeof TSL.inversesqrt;
|
|
196
198
|
export const invocationLocalIndex: typeof TSL.invocationLocalIndex;
|
|
197
199
|
export const invocationSubgroupIndex: typeof TSL.invocationSubgroupIndex;
|
|
198
200
|
export const ior: typeof TSL.ior;
|
|
@@ -222,11 +224,12 @@ export const log2: typeof TSL.log2;
|
|
|
222
224
|
export const logarithmicDepthToViewZ: typeof TSL.logarithmicDepthToViewZ;
|
|
223
225
|
export const loop: typeof TSL.loop;
|
|
224
226
|
export const luminance: typeof TSL.luminance;
|
|
227
|
+
export const mediumpModelViewMatrix: typeof TSL.mediumpModelViewMatrix;
|
|
225
228
|
export const mat2: typeof TSL.mat2;
|
|
226
229
|
export const mat3: typeof TSL.mat3;
|
|
227
230
|
export const mat4: typeof TSL.mat4;
|
|
228
231
|
export const matcapUV: typeof TSL.matcapUV;
|
|
229
|
-
export const
|
|
232
|
+
export const materialAO: typeof TSL.materialAO;
|
|
230
233
|
export const materialAlphaTest: typeof TSL.materialAlphaTest;
|
|
231
234
|
export const materialAnisotropy: typeof TSL.materialAnisotropy;
|
|
232
235
|
export const materialAnisotropyVector: typeof TSL.materialAnisotropyVector;
|
|
@@ -370,6 +373,7 @@ export const radians: typeof TSL.radians;
|
|
|
370
373
|
export const rand: typeof TSL.rand;
|
|
371
374
|
export const range: typeof TSL.range;
|
|
372
375
|
export const rangeFog: typeof TSL.rangeFog;
|
|
376
|
+
export const rangeFogFactor: typeof TSL.rangeFogFactor;
|
|
373
377
|
export const reciprocal: typeof TSL.reciprocal;
|
|
374
378
|
export const reference: typeof TSL.reference;
|
|
375
379
|
export const referenceBuffer: typeof TSL.referenceBuffer;
|
|
@@ -407,6 +411,7 @@ export const select: typeof TSL.select;
|
|
|
407
411
|
export const setCurrentStack: typeof TSL.setCurrentStack;
|
|
408
412
|
export const shaderStages: typeof TSL.shaderStages;
|
|
409
413
|
export const shadow: typeof TSL.shadow;
|
|
414
|
+
export const shadowPositionWorld: typeof TSL.shadowPositionWorld;
|
|
410
415
|
export const sharedUniformGroup: typeof TSL.sharedUniformGroup;
|
|
411
416
|
export const sheen: typeof TSL.sheen;
|
|
412
417
|
export const sheenRoughness: typeof TSL.sheenRoughness;
|
|
@@ -8,8 +8,8 @@ export { default as PostProcessing } from "./renderers/common/PostProcessing.js"
|
|
|
8
8
|
export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
|
|
9
9
|
export type { default as Renderer } from "./renderers/common/Renderer.js";
|
|
10
10
|
export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nodes.js";
|
|
11
|
-
import * as
|
|
12
|
-
export {
|
|
11
|
+
import * as RendererUtils from "./renderers/common/RendererUtils.js";
|
|
12
|
+
export { RendererUtils };
|
|
13
13
|
export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
|
|
14
14
|
export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
15
15
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
three/src/Three.WebGPU.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export { default as PostProcessing } from "./renderers/common/PostProcessing.js"
|
|
|
8
8
|
export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
|
|
9
9
|
export type { default as Renderer } from "./renderers/common/Renderer.js";
|
|
10
10
|
export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.js";
|
|
11
|
-
import * as
|
|
12
|
-
export {
|
|
11
|
+
import * as RendererUtils from "./renderers/common/RendererUtils.js";
|
|
12
|
+
export { RendererUtils };
|
|
13
13
|
export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js";
|
|
14
14
|
export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
15
15
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { CoordinateSystem } from "../constants.js";
|
|
2
2
|
import { Object3D } from "../core/Object3D.js";
|
|
3
|
+
import { RenderTarget } from "../core/RenderTarget.js";
|
|
3
4
|
import { WebGLCubeRenderTarget } from "../renderers/WebGLCubeRenderTarget.js";
|
|
4
|
-
import {
|
|
5
|
+
import { Camera } from "./Camera.js";
|
|
6
|
+
|
|
7
|
+
export interface CubeCameraRenderer {
|
|
8
|
+
coordinateSystem: CoordinateSystem;
|
|
9
|
+
getRenderTarget(): RenderTarget | null;
|
|
10
|
+
getActiveCubeFace(): number;
|
|
11
|
+
getActiveMipmapLevel(): number;
|
|
12
|
+
xr: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
};
|
|
15
|
+
setRenderTarget(
|
|
16
|
+
renderTarget: WebGLCubeRenderTarget | null,
|
|
17
|
+
activeCubeFace?: number,
|
|
18
|
+
activeMipmapLevel?: number,
|
|
19
|
+
): void;
|
|
20
|
+
render(scene: Object3D, camera: Camera): void;
|
|
21
|
+
}
|
|
5
22
|
|
|
6
23
|
/**
|
|
7
24
|
* Creates **6** {@link THREE.PerspectiveCamera | cameras} that render to a {@link THREE.WebGLCubeRenderTarget | WebGLCubeRenderTarget}.
|
|
@@ -64,5 +81,5 @@ export class CubeCamera extends Object3D {
|
|
|
64
81
|
* @param renderer The current WebGL renderer
|
|
65
82
|
* @param scene The current scene
|
|
66
83
|
*/
|
|
67
|
-
update(renderer:
|
|
84
|
+
update(renderer: CubeCameraRenderer, scene: Object3D): void;
|
|
68
85
|
}
|
three/src/core/RenderTarget.d.ts
CHANGED
|
@@ -72,11 +72,6 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
|
|
|
72
72
|
*/
|
|
73
73
|
resolveStencilBuffer: boolean;
|
|
74
74
|
|
|
75
|
-
/**
|
|
76
|
-
* @default null
|
|
77
|
-
*/
|
|
78
|
-
depthTexture: DepthTexture | null;
|
|
79
|
-
|
|
80
75
|
/**
|
|
81
76
|
* Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
|
|
82
77
|
* @default 0
|
|
@@ -88,6 +83,9 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
|
|
|
88
83
|
get texture(): TTexture;
|
|
89
84
|
set texture(value: TTexture);
|
|
90
85
|
|
|
86
|
+
set depthTexture(current: DepthTexture | null);
|
|
87
|
+
get depthTexture(): DepthTexture | null;
|
|
88
|
+
|
|
91
89
|
setSize(width: number, height: number, depth?: number): void;
|
|
92
90
|
clone(): this;
|
|
93
91
|
copy(source: RenderTarget): this;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js";
|
|
2
|
+
|
|
3
|
+
declare class RenderTarget3D extends RenderTarget {
|
|
4
|
+
readonly isRenderTarget3D: true;
|
|
5
|
+
|
|
6
|
+
constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { RenderTarget3D };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js";
|
|
2
|
+
|
|
3
|
+
declare class RenderTargetArray extends RenderTarget {
|
|
4
|
+
readonly isRenderTargetArray: true;
|
|
5
|
+
|
|
6
|
+
constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { RenderTargetArray };
|
|
@@ -573,7 +573,9 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
573
573
|
/**
|
|
574
574
|
* An optional callback that is executed immediately before the shader program is compiled.
|
|
575
575
|
* This function is called with the shader source code as a parameter.
|
|
576
|
-
* Useful for the modification of built-in materials
|
|
576
|
+
* Useful for the modification of built-in materials, but the recommended approach moving forward is to use
|
|
577
|
+
* `WebGPURenderer` with the new Node Material system and
|
|
578
|
+
* [TSL]{@link https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language}.
|
|
577
579
|
* Unlike properties, the callback is not supported by {@link .clone()}, {@link .copy()} and {@link .toJSON()}.
|
|
578
580
|
* This callback is only supported in `WebGLRenderer` (not `WebGPURenderer`).
|
|
579
581
|
* @param parameters WebGL program parameters
|
|
@@ -5,6 +5,7 @@ import { LineDashedMaterialParameters } from "../LineDashedMaterial.js";
|
|
|
5
5
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
6
6
|
|
|
7
7
|
export interface Line2NodeMaterialParameters extends NodeMaterialParameters, LineDashedMaterialParameters {
|
|
8
|
+
worldUnits?: boolean | undefined;
|
|
8
9
|
dashed?: boolean | undefined;
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import InputNode from "../../nodes/core/InputNode.js";
|
|
2
2
|
import Node from "../../nodes/core/Node.js";
|
|
3
3
|
import MeshPhysicalNodeMaterial, { MeshPhysicalNodeMaterialParameters } from "./MeshPhysicalNodeMaterial.js";
|
|
4
4
|
|
|
5
5
|
export default class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
|
|
6
6
|
thicknessColorNode: Node | null;
|
|
7
|
-
thicknessDistortionNode:
|
|
8
|
-
thicknessAmbientNode:
|
|
9
|
-
thicknessAttenuationNode:
|
|
10
|
-
thicknessPowerNode:
|
|
11
|
-
thicknessScaleNode:
|
|
7
|
+
thicknessDistortionNode: InputNode<number>;
|
|
8
|
+
thicknessAmbientNode: InputNode<number>;
|
|
9
|
+
thicknessAttenuationNode: InputNode<number>;
|
|
10
|
+
thicknessPowerNode: InputNode<number>;
|
|
11
|
+
thicknessScaleNode: InputNode<number>;
|
|
12
12
|
|
|
13
13
|
constructor(parameters?: MeshPhysicalNodeMaterialParameters);
|
|
14
14
|
|
|
@@ -76,6 +76,9 @@ declare class NodeMaterial extends Material {
|
|
|
76
76
|
setupClipping(builder: NodeBuilder): ClippingNode | null;
|
|
77
77
|
setupHardwareClipping(builder: NodeBuilder): void;
|
|
78
78
|
setupDepth(builder: NodeBuilder): void;
|
|
79
|
+
setupPositionView(): Node;
|
|
80
|
+
setupModelViewProjection(): Node;
|
|
81
|
+
setupVertex(builder: NodeBuilder): Node;
|
|
79
82
|
setupPosition(builder: NodeBuilder): Node;
|
|
80
83
|
setupDiffuseColor(builder: NodeBuilder): void;
|
|
81
84
|
setupVariants(builder: NodeBuilder): void;
|
|
@@ -78,19 +78,75 @@ interface RenderObjectData {
|
|
|
78
78
|
worldMatrix: Matrix4;
|
|
79
79
|
version?: number;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* This class is used by {@link WebGPURenderer} as management component.
|
|
83
|
+
* It's primary purpose is to determine whether render objects require a
|
|
84
|
+
* refresh right before they are going to be rendered or not.
|
|
85
|
+
*/
|
|
81
86
|
declare class NodeMaterialObserver {
|
|
82
87
|
renderObjects: WeakMap<RenderObject, RenderObjectData>;
|
|
83
88
|
hasNode: boolean;
|
|
84
89
|
hasAnimation: boolean;
|
|
85
90
|
refreshUniforms: readonly RefreshUniform[];
|
|
86
91
|
renderId: number;
|
|
92
|
+
/**
|
|
93
|
+
* Constructs a new node material observer.
|
|
94
|
+
*
|
|
95
|
+
* @param {NodeBuilder} builder - The node builder.
|
|
96
|
+
*/
|
|
87
97
|
constructor(builder: NodeBuilder);
|
|
98
|
+
/**
|
|
99
|
+
* Returns `true` if the given render object is verified for the first time of this observer.
|
|
100
|
+
*
|
|
101
|
+
* @param {RenderObject} renderObject - The render object.
|
|
102
|
+
* @return {Boolean} Whether the given render object is verified for the first time of this observer.
|
|
103
|
+
*/
|
|
88
104
|
firstInitialization(renderObject: RenderObject): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Returns monitoring data for the given render object.
|
|
107
|
+
*
|
|
108
|
+
* @param {RenderObject} renderObject - The render object.
|
|
109
|
+
* @return {Object} The monitoring data.
|
|
110
|
+
*/
|
|
89
111
|
getRenderObjectData(renderObject: RenderObject): RenderObjectData;
|
|
112
|
+
/**
|
|
113
|
+
* Returns an attribute data structure holding the attributes versions for
|
|
114
|
+
* monitoring.
|
|
115
|
+
*
|
|
116
|
+
* @param {Object} attributes - The geometry attributes.
|
|
117
|
+
* @return {Object} An object for monitoring the versions of attributes.
|
|
118
|
+
*/
|
|
90
119
|
getAttributesData(attributes: Record<string, BufferAttribute>): AttributesData;
|
|
120
|
+
/**
|
|
121
|
+
* Returns `true` if the node builder's material uses
|
|
122
|
+
* node properties.
|
|
123
|
+
*
|
|
124
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
125
|
+
* @return {Boolean} Whether the node builder's material uses node properties or not.
|
|
126
|
+
*/
|
|
91
127
|
containsNode(builder: NodeBuilder): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Returns a material data structure holding the material property values for
|
|
130
|
+
* monitoring.
|
|
131
|
+
*
|
|
132
|
+
* @param {Material} material - The material.
|
|
133
|
+
* @return {Object} An object for monitoring material properties.
|
|
134
|
+
*/
|
|
92
135
|
getMaterialData(material: Material): MaterialData;
|
|
136
|
+
/**
|
|
137
|
+
* Returns `true` if the given render object has not changed its state.
|
|
138
|
+
*
|
|
139
|
+
* @param {RenderObject} renderObject - The render object.
|
|
140
|
+
* @return {Boolean} Whether the given render object has changed its state or not.
|
|
141
|
+
*/
|
|
93
142
|
equals(renderObject: RenderObject): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Checks if the given render object requires a refresh.
|
|
145
|
+
*
|
|
146
|
+
* @param {RenderObject} renderObject - The render object.
|
|
147
|
+
* @param {NodeFrame} nodeFrame - The current node frame.
|
|
148
|
+
* @return {Boolean} Whether the given render object requires a refresh or not.
|
|
149
|
+
*/
|
|
94
150
|
needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean;
|
|
95
151
|
}
|
|
96
152
|
export default NodeMaterialObserver;
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -75,7 +75,6 @@ export { default as InstanceNode } from "./accessors/InstanceNode.js";
|
|
|
75
75
|
export { default as MaterialNode, MaterialNodeScope } from "./accessors/MaterialNode.js";
|
|
76
76
|
export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js";
|
|
77
77
|
export { default as ModelNode } from "./accessors/ModelNode.js";
|
|
78
|
-
export { default as ModelViewProjectionNode } from "./accessors/ModelViewProjectionNode.js";
|
|
79
78
|
export { default as MorphNode } from "./accessors/MorphNode.js";
|
|
80
79
|
export { default as Object3DNode } from "./accessors/Object3DNode.js";
|
|
81
80
|
export { default as PointUVNode } from "./accessors/PointUVNode.js";
|
|
@@ -115,11 +114,6 @@ export { default as FunctionNode } from "./code/FunctionNode.js";
|
|
|
115
114
|
export { default as ScriptableNode } from "./code/ScriptableNode.js";
|
|
116
115
|
export { default as ScriptableValueNode } from "./code/ScriptableValueNode.js";
|
|
117
116
|
|
|
118
|
-
// fog
|
|
119
|
-
export { default as FogExp2Node } from "./fog/FogExp2Node.js";
|
|
120
|
-
export { default as FogNode } from "./fog/FogNode.js";
|
|
121
|
-
export { default as FogRangeNode } from "./fog/FogRangeNode.js";
|
|
122
|
-
|
|
123
117
|
// geometry
|
|
124
118
|
export { default as RangeNode, RangeModeBound } from "./geometry/RangeNode.js";
|
|
125
119
|
|
|
@@ -142,6 +136,7 @@ export { default as LightProbeNode } from "./lighting/LightProbeNode.js";
|
|
|
142
136
|
export { default as LightsNode } from "./lighting/LightsNode.js";
|
|
143
137
|
export { default as PointLightNode } from "./lighting/PointLightNode.js";
|
|
144
138
|
export { default as RectAreaLightNode, RectAreaLightTexturesLib } from "./lighting/RectAreaLightNode.js";
|
|
139
|
+
export { default as ShadowBaseNode } from "./lighting/ShadowBaseNode.js";
|
|
145
140
|
export { default as ShadowNode } from "./lighting/ShadowNode.js";
|
|
146
141
|
export { default as SpotLightNode } from "./lighting/SpotLightNode.js";
|
|
147
142
|
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -115,9 +115,7 @@ export * from "./code/ScriptableNode.js";
|
|
|
115
115
|
export * from "./code/ScriptableValueNode.js";
|
|
116
116
|
|
|
117
117
|
// fog
|
|
118
|
-
export * from "./fog/
|
|
119
|
-
export * from "./fog/FogNode.js";
|
|
120
|
-
export * from "./fog/FogRangeNode.js";
|
|
118
|
+
export * from "./fog/Fog.js";
|
|
121
119
|
|
|
122
120
|
// geometry
|
|
123
121
|
export * from "./geometry/RangeNode.js";
|
|
@@ -134,6 +132,7 @@ export * from "./accessors/Lights.js";
|
|
|
134
132
|
export * from "./lighting/LightingContextNode.js";
|
|
135
133
|
export * from "./lighting/LightsNode.js";
|
|
136
134
|
export * from "./lighting/PointLightNode.js";
|
|
135
|
+
export * from "./lighting/ShadowBaseNode.js";
|
|
137
136
|
export * from "./lighting/ShadowNode.js";
|
|
138
137
|
|
|
139
138
|
// pmrem
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { TypedArray } from "../../core/BufferAttribute.js";
|
|
1
2
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
3
|
import StorageBufferNode from "./StorageBufferNode.js";
|
|
3
4
|
|
|
4
|
-
export const attributeArray: (count: number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
5
|
+
export const attributeArray: (count: TypedArray | number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
5
6
|
|
|
6
|
-
export const instancedArray: (count: number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
7
|
+
export const instancedArray: (count: TypedArray | number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|