@types/three 0.164.1 → 0.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +8 -6
- three/examples/jsm/exporters/GLTFExporter.d.ts +6 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +4 -2
- three/examples/jsm/geometries/TeapotGeometry.d.ts +24 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +8 -6
- three/examples/jsm/lines/LineMaterial.d.ts +2 -4
- three/examples/jsm/loaders/DDSLoader.d.ts +8 -2
- three/examples/jsm/loaders/FontLoader.d.ts +1 -1
- three/examples/jsm/loaders/GLTFLoader.d.ts +12 -7
- three/examples/jsm/loaders/KTXLoader.d.ts +8 -2
- three/examples/jsm/loaders/LDrawLoader.d.ts +1 -1
- three/examples/jsm/loaders/PVRLoader.d.ts +2 -2
- three/examples/jsm/modifiers/EdgeSplitModifier.d.ts +17 -10
- three/examples/jsm/nodes/Nodes.d.ts +21 -57
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +4 -22
- three/examples/jsm/nodes/accessors/BufferAttributeNode.d.ts +50 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +3 -4
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +11 -20
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +1 -1
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +1 -2
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +9 -17
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +6 -26
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +3 -4
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -8
- three/examples/jsm/nodes/accessors/RendererReferenceNode.d.ts +2 -3
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +16 -4
- three/examples/jsm/nodes/accessors/StorageTextureNode.d.ts +40 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +8 -23
- three/examples/jsm/nodes/accessors/Texture3DNode.d.ts +16 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +1 -1
- three/examples/jsm/nodes/accessors/UVNode.d.ts +1 -8
- three/examples/jsm/nodes/accessors/UniformsNode.d.ts +0 -2
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +4 -3
- three/examples/jsm/nodes/code/CodeNode.d.ts +0 -1
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +2 -3
- three/examples/jsm/nodes/core/AttributeNode.d.ts +11 -4
- three/examples/jsm/nodes/core/CacheNode.d.ts +4 -5
- three/examples/jsm/nodes/core/ConstNode.d.ts +1 -2
- three/examples/jsm/nodes/core/InputNode.d.ts +1 -2
- three/examples/jsm/nodes/core/LightingModel.d.ts +11 -0
- three/examples/jsm/nodes/core/Node.d.ts +102 -42
- three/examples/jsm/nodes/core/NodeAttribute.d.ts +7 -4
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +30 -26
- three/examples/jsm/nodes/core/NodeCache.d.ts +48 -6
- three/examples/jsm/nodes/core/NodeFunction.d.ts +2 -2
- three/examples/jsm/nodes/core/NodeKeywords.d.ts +10 -7
- three/examples/jsm/nodes/core/NodeParser.d.ts +4 -4
- three/examples/jsm/nodes/core/NodeUniform.d.ts +8 -11
- three/examples/jsm/nodes/core/NodeVar.d.ts +5 -4
- three/examples/jsm/nodes/core/NodeVarying.d.ts +5 -6
- three/examples/jsm/nodes/core/PropertyNode.d.ts +4 -4
- three/examples/jsm/nodes/core/StackNode.d.ts +7 -1
- three/examples/jsm/nodes/core/StructTypeNode.d.ts +8 -0
- three/examples/jsm/nodes/core/TempNode.d.ts +1 -2
- three/examples/jsm/nodes/core/UniformGroup.d.ts +7 -0
- three/examples/jsm/nodes/core/UniformGroupNode.d.ts +21 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +16 -11
- three/examples/jsm/nodes/core/VarNode.d.ts +2 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +4 -0
- three/examples/jsm/nodes/core/constants.d.ts +27 -79
- three/examples/jsm/nodes/display/DepthOfFieldNode.d.ts +30 -0
- three/examples/jsm/nodes/display/DotScreenNode.d.ts +32 -0
- three/examples/jsm/nodes/display/PassNode.d.ts +1 -1
- three/examples/jsm/nodes/display/RGBShiftNode.d.ts +24 -0
- three/examples/jsm/nodes/display/SobelOperatorNode.d.ts +17 -0
- three/examples/jsm/nodes/display/ViewportDepthNode.d.ts +4 -6
- three/examples/jsm/nodes/functions/BSDF/LTC.d.ts +9 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +2 -0
- three/examples/jsm/nodes/functions/ToonLightingModel.d.ts +4 -0
- three/examples/jsm/nodes/lighting/RectAreaLightNode.d.ts +10 -0
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +3 -3
- three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +2 -3
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +2 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +3 -0
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +5 -1
- three/examples/jsm/nodes/materials/MeshMatcapNodeMaterial.d.ts +28 -0
- three/examples/jsm/nodes/materials/MeshNormalNodeMaterial.d.ts +2 -0
- three/examples/jsm/nodes/materials/MeshPhongNodeMaterial.d.ts +7 -4
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +24 -17
- three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +6 -7
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +8 -5
- three/examples/jsm/nodes/materials/MeshToonNodeMaterial.d.ts +38 -0
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +41 -37
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +1 -0
- three/examples/jsm/nodes/materials/ShadowNodeMaterial.d.ts +1 -0
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +3 -3
- three/examples/jsm/nodes/materials/VolumeNodeMaterial.d.ts +10 -0
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +1 -0
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +230 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +5 -1
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +58 -36
- three/examples/jsm/nodes/utils/ConvertNode.d.ts +2 -3
- three/examples/jsm/nodes/utils/DiscardNode.d.ts +1 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/SplitNode.d.ts +1 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +4 -5
- three/examples/jsm/objects/Sky.d.ts +18 -0
- three/examples/jsm/renderers/common/Animation.d.ts +14 -0
- three/examples/jsm/renderers/common/Attributes.d.ts +20 -0
- three/examples/jsm/renderers/common/Background.d.ts +22 -0
- three/examples/jsm/renderers/common/BindGroup.d.ts +9 -0
- three/examples/jsm/renderers/common/Binding.d.ts +8 -0
- three/examples/jsm/renderers/common/Bindings.d.ts +42 -0
- three/examples/jsm/renderers/common/Buffer.d.ts +11 -0
- three/examples/jsm/renderers/common/BufferUtils.d.ts +4 -0
- three/examples/jsm/renderers/common/ChainMap.d.ts +9 -0
- three/examples/jsm/renderers/common/ClippingContext.d.ts +18 -0
- three/examples/jsm/renderers/common/Color4.d.ts +6 -5
- three/examples/jsm/renderers/common/ComputePipeline.d.ts +8 -0
- three/examples/jsm/renderers/common/Constants.d.ts +9 -0
- three/examples/jsm/renderers/common/CubeRenderTarget.d.ts +7 -0
- three/examples/jsm/renderers/common/DataMap.d.ts +20 -0
- three/examples/jsm/renderers/common/Geometries.d.ts +28 -0
- three/examples/jsm/renderers/common/Info.d.ts +25 -13
- three/examples/jsm/renderers/common/Pipeline.d.ts +6 -0
- three/examples/jsm/renderers/common/Pipelines.d.ts +68 -0
- three/examples/jsm/renderers/common/PostProcessing.d.ts +2 -0
- three/examples/jsm/renderers/common/ProgrammableStage.d.ts +15 -0
- three/examples/jsm/renderers/common/RenderBundle.d.ts +8 -0
- three/examples/jsm/renderers/common/RenderBundles.d.ts +10 -0
- three/examples/jsm/renderers/common/RenderContext.d.ts +38 -0
- three/examples/jsm/renderers/common/RenderContexts.d.ts +13 -0
- three/examples/jsm/renderers/common/RenderList.d.ts +62 -0
- three/examples/jsm/renderers/common/RenderLists.d.ts +10 -0
- three/examples/jsm/renderers/common/RenderObject.d.ts +73 -0
- three/examples/jsm/renderers/common/RenderObjects.d.ts +59 -0
- three/examples/jsm/renderers/common/RenderPipeline.d.ts +8 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +186 -208
- three/examples/jsm/renderers/common/SampledTexture.d.ts +27 -0
- three/examples/jsm/renderers/common/Sampler.d.ts +11 -0
- three/examples/jsm/renderers/common/StorageBufferAttribute.d.ts +7 -0
- three/examples/jsm/renderers/common/StorageInstancedBufferAttribute.d.ts +7 -0
- three/examples/jsm/renderers/common/Textures.d.ts +64 -0
- three/examples/jsm/renderers/common/Uniform.d.ts +40 -0
- three/examples/jsm/renderers/common/UniformBuffer.d.ts +6 -0
- three/examples/jsm/renderers/common/UniformsGroup.d.ts +32 -0
- three/examples/jsm/renderers/common/nodes/NodeBuilderState.d.ts +30 -0
- three/examples/jsm/renderers/common/nodes/NodeSampledTexture.d.ts +29 -0
- three/examples/jsm/renderers/common/nodes/NodeSampler.d.ts +12 -0
- three/examples/jsm/renderers/common/nodes/NodeUniform.d.ts +63 -0
- three/examples/jsm/renderers/common/nodes/NodeUniformsGroup.d.ts +11 -0
- three/examples/jsm/renderers/common/nodes/Nodes.d.ts +95 -0
- three/examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +123 -0
- three/examples/jsm/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +6 -0
- three/examples/jsm/renderers/webgpu/nodes/WGSLNodeParser.d.ts +6 -0
- three/examples/jsm/renderers/webgpu/utils/WebGPUConstants.d.ts +328 -0
- three/examples/jsm/utils/SceneUtils.d.ts +9 -3
- three/package.json +4 -4
- three/src/Three.d.ts +1 -0
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -2
- three/src/constants.d.ts +6 -0
- three/src/core/BufferGeometry.d.ts +19 -17
- three/src/core/InterleavedBuffer.d.ts +2 -0
- three/src/extras/ShapeUtils.d.ts +5 -8
- three/src/extras/TextureUtils.d.ts +42 -0
- three/src/lights/LightShadow.d.ts +5 -0
- three/src/loaders/LoaderUtils.d.ts +9 -6
- three/src/materials/Material.d.ts +21 -12
- three/src/math/Color.d.ts +1 -1
- three/src/math/Matrix3.d.ts +2 -0
- three/src/math/Matrix4.d.ts +2 -0
- three/src/math/Vector4.d.ts +6 -0
- three/src/objects/BatchedMesh.d.ts +66 -47
- three/src/objects/InstancedMesh.d.ts +3 -3
- three/src/renderers/WebGLRenderer.d.ts +41 -19
- three/src/renderers/shaders/UniformsLib.d.ts +3 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +1 -1
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +3 -1
- three/src/renderers/webxr/WebXRManager.d.ts +33 -23
- three/src/textures/CompressedArrayTexture.d.ts +36 -19
- three/src/textures/CompressedTexture.d.ts +16 -8
- three/src/textures/DataArrayTexture.d.ts +37 -20
- three/src/textures/FramebufferTexture.d.ts +1 -1
- three/src/textures/Texture.d.ts +3 -1
- three/src/utils.d.ts +2 -0
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +0 -17
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +0 -37
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +0 -3
|
@@ -10,14 +10,12 @@ export default class ViewportDepthNode extends Node {
|
|
|
10
10
|
constructor(scope: ViewportDepthNodeScope, valueNode?: Node | null);
|
|
11
11
|
|
|
12
12
|
static DEPTH: "depth";
|
|
13
|
-
static
|
|
14
|
-
static DEPTH_PIXEL: "depthPixel";
|
|
13
|
+
static LINEAR_DEPTH: "linearDepth";
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export type ViewportDepthNodeScope =
|
|
18
17
|
| typeof ViewportDepthNode.DEPTH
|
|
19
|
-
| typeof ViewportDepthNode.
|
|
20
|
-
| typeof ViewportDepthNode.DEPTH_PIXEL;
|
|
18
|
+
| typeof ViewportDepthNode.LINEAR_DEPTH;
|
|
21
19
|
|
|
22
20
|
export const viewZToOrthographicDepth: (viewZ: Node, near: Node, far: Node) => Node;
|
|
23
21
|
|
|
@@ -28,5 +26,5 @@ export const viewZToPerspectiveDepth: (viewZ: Node, near: Node, far: Node) => No
|
|
|
28
26
|
export const perspectiveDepthToViewZ: (depth: Node, near: Node, far: Node) => Node;
|
|
29
27
|
|
|
30
28
|
export const depth: ShaderNodeObject<ViewportDepthNode>;
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
29
|
+
export const linearDepth: (valueNode?: Node | null) => ShaderNodeObject<ViewportDepthNode>;
|
|
30
|
+
export const viewportLinearDepth: ShaderNodeObject<ViewportDepthNode>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Node from "../../core/Node.js";
|
|
2
|
+
|
|
3
|
+
declare const LTC_Uv: (args: { N: Node; V: Node; roughness: Node }) => Node;
|
|
4
|
+
|
|
5
|
+
declare const LTC_Evaluate: (
|
|
6
|
+
args: { N: Node; V: Node; P: Node; mInv: Node; p0: Node; p1: Node; p2: Node; p3: Node },
|
|
7
|
+
) => Node;
|
|
8
|
+
|
|
9
|
+
export { LTC_Evaluate, LTC_Uv };
|
|
@@ -7,6 +7,7 @@ export default class PhysicalLightingModel extends LightingModel {
|
|
|
7
7
|
iridescence: boolean;
|
|
8
8
|
anisotropy: boolean;
|
|
9
9
|
transmission: boolean;
|
|
10
|
+
dispersion: boolean;
|
|
10
11
|
|
|
11
12
|
clearcoatRadiance: Node | null;
|
|
12
13
|
clearcoatSpecularDirect: Node | null;
|
|
@@ -22,6 +23,7 @@ export default class PhysicalLightingModel extends LightingModel {
|
|
|
22
23
|
iridescence?: boolean,
|
|
23
24
|
anisotropy?: boolean,
|
|
24
25
|
transmission?: boolean,
|
|
26
|
+
dispersion?: boolean,
|
|
25
27
|
);
|
|
26
28
|
|
|
27
29
|
computeMultiscattering(singleScatter: Node, multiScatter: Node, specularF90: Node): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RectAreaLight } from "three";
|
|
2
|
+
import Node from "../core/Node.js";
|
|
3
|
+
import AnalyticLightNode from "./AnalyticLightNode.js";
|
|
4
|
+
|
|
5
|
+
export default class RectAreaLightNode extends AnalyticLightNode<RectAreaLight> {
|
|
6
|
+
halfHeight: Node;
|
|
7
|
+
halfWidth: Node;
|
|
8
|
+
|
|
9
|
+
constructor(light?: RectAreaLight | null);
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Loader, LoadingManager, Texture } from "three";
|
|
2
|
-
import {
|
|
2
|
+
import { Node } from "../Nodes.js";
|
|
3
3
|
|
|
4
4
|
export interface NodeLoaderResult {
|
|
5
5
|
[hash: string]: Node;
|
|
@@ -8,7 +8,7 @@ export interface NodeLoaderResult {
|
|
|
8
8
|
export default class NodeLoader extends Loader<NodeLoaderResult> {
|
|
9
9
|
constructor(manager?: LoadingManager);
|
|
10
10
|
|
|
11
|
-
parseNodes(json:
|
|
12
|
-
parse(json:
|
|
11
|
+
parseNodes(json: unknown): NodeLoaderResult;
|
|
12
|
+
parse(json: unknown): Node;
|
|
13
13
|
setTextures(textures: { [key: string]: Texture }): this;
|
|
14
14
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Material, ObjectLoader, Texture } from "three";
|
|
2
|
-
import { AnyJson } from "../core/constants.js";
|
|
3
2
|
import { NodeLoaderResult } from "./NodeLoader.js";
|
|
4
3
|
|
|
5
4
|
export default class NodeObjectLoader extends ObjectLoader {
|
|
6
|
-
parseNodes(json:
|
|
5
|
+
parseNodes(json: unknown, textures: { [key: string]: Texture }): NodeLoaderResult;
|
|
7
6
|
|
|
8
|
-
parseMaterials(json:
|
|
7
|
+
parseMaterials(json: unknown, textures: { [key: string]: Texture }): { [key: string]: Material };
|
|
9
8
|
}
|
|
@@ -10,6 +10,8 @@ export default class LineBasicNodeMaterial extends NodeMaterial {
|
|
|
10
10
|
// Properties from LineBasicMaterial
|
|
11
11
|
readonly isLineBasicMaterial: true;
|
|
12
12
|
color: Color;
|
|
13
|
+
fog: boolean;
|
|
14
|
+
linewidth: number;
|
|
13
15
|
linecap: string;
|
|
14
16
|
linejoin: string;
|
|
15
17
|
map: Texture | null;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export { default as LineBasicNodeMaterial } from "./LineBasicNodeMaterial.js";
|
|
2
2
|
export { default as MeshBasicNodeMaterial } from "./MeshBasicNodeMaterial.js";
|
|
3
|
+
export { default as MeshMatcapNodeMaterial } from "./MeshMatcapNodeMaterial.js";
|
|
3
4
|
export { default as MeshNormalNodeMaterial } from "./MeshNormalNodeMaterial.js";
|
|
4
5
|
export { default as MeshPhongNodeMaterial } from "./MeshPhongNodeMaterial.js";
|
|
5
6
|
export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.js";
|
|
6
7
|
export { default as MeshSSSPhysicalNodeMaterial } from "./MeshSSSNodeMaterial.js";
|
|
7
8
|
export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js";
|
|
9
|
+
export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js";
|
|
8
10
|
export { default as NodeMaterial } from "./NodeMaterial.js";
|
|
9
11
|
export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js";
|
|
10
12
|
export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js";
|
|
11
13
|
export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js";
|
|
14
|
+
export { default as VolumeNodeMaterial } from "./VolumeNodeMaterial.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, Combine, MeshBasicMaterialParameters, Texture } from "three";
|
|
1
|
+
import { Color, Combine, Euler, MeshBasicMaterialParameters, Texture } from "three";
|
|
2
2
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
3
3
|
|
|
4
4
|
export interface MeshBasicNodeMaterialParameters extends NodeMaterialParameters, MeshBasicMaterialParameters {
|
|
@@ -18,11 +18,15 @@ export default class MeshBasicNodeMaterial extends NodeMaterial {
|
|
|
18
18
|
specularMap: Texture | null;
|
|
19
19
|
alphaMap: Texture | null;
|
|
20
20
|
envMap: Texture | null;
|
|
21
|
+
envMapRotation: Euler;
|
|
21
22
|
combine: Combine;
|
|
22
23
|
reflectivity: number;
|
|
23
24
|
refractionRatio: number;
|
|
25
|
+
wireframe: boolean;
|
|
26
|
+
wireframeLinewidth: number;
|
|
24
27
|
wireframeLinecap: string;
|
|
25
28
|
wireframeLinejoin: string;
|
|
29
|
+
fog: boolean;
|
|
26
30
|
|
|
27
31
|
constructor(parameters?: MeshBasicNodeMaterialParameters);
|
|
28
32
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Color, MeshMatcapMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
2
|
+
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
3
|
+
|
|
4
|
+
export interface MeshMatcapNodeMaterialParameters extends NodeMaterialParameters, MeshMatcapMaterialParameters {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default class MeshMatcapNodeMaterial extends NodeMaterial {
|
|
8
|
+
readonly isMeshMatcapNodeMaterial: true;
|
|
9
|
+
|
|
10
|
+
// Properties from MeshMatcapMaterial
|
|
11
|
+
readonly isMeshMatcapMaterial: true;
|
|
12
|
+
color: Color;
|
|
13
|
+
matcap: Texture | null;
|
|
14
|
+
map: Texture | null;
|
|
15
|
+
bumpMap: Texture | null;
|
|
16
|
+
bumpScale: number;
|
|
17
|
+
normalMap: Texture | null;
|
|
18
|
+
normalMapType: NormalMapTypes;
|
|
19
|
+
normalScale: Vector2;
|
|
20
|
+
displacementMap: Texture | null;
|
|
21
|
+
displacementScale: number;
|
|
22
|
+
displacementBias: number;
|
|
23
|
+
alphaMap: Texture | null;
|
|
24
|
+
flatShading: boolean;
|
|
25
|
+
fog: boolean;
|
|
26
|
+
|
|
27
|
+
constructor(paramters: MeshMatcapNodeMaterialParameters);
|
|
28
|
+
}
|
|
@@ -17,6 +17,8 @@ export default class MeshNormalNodeMaterial extends NodeMaterial {
|
|
|
17
17
|
displacementMap: Texture | null;
|
|
18
18
|
displacementScale: number;
|
|
19
19
|
displacementBias: number;
|
|
20
|
+
wireframe: boolean;
|
|
21
|
+
wireframeLinewidth: number;
|
|
20
22
|
flatShading: boolean;
|
|
21
23
|
|
|
22
24
|
constructor(parameters?: MeshBasicNodeMaterialParameters);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Color, Combine, MeshPhongMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
1
|
+
import { Color, Combine, Euler, MeshPhongMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
3
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
5
4
|
|
|
6
5
|
export interface MeshPhongNodeMaterialParameters extends NodeMaterialParameters, MeshPhongMaterialParameters {
|
|
@@ -9,8 +8,8 @@ export interface MeshPhongNodeMaterialParameters extends NodeMaterialParameters,
|
|
|
9
8
|
export default class MeshPhongNodeMaterial extends NodeMaterial {
|
|
10
9
|
readonly isMeshPhongNodeMaterial: true;
|
|
11
10
|
|
|
12
|
-
shininessNode:
|
|
13
|
-
specularNode:
|
|
11
|
+
shininessNode: Node | null;
|
|
12
|
+
specularNode: Node | null;
|
|
14
13
|
|
|
15
14
|
// Properties from MeshPhongMaterial
|
|
16
15
|
readonly isMeshPhongMaterial: true;
|
|
@@ -36,13 +35,17 @@ export default class MeshPhongNodeMaterial extends NodeMaterial {
|
|
|
36
35
|
specularMap: Texture | null;
|
|
37
36
|
alphaMap: Texture | null;
|
|
38
37
|
envMap: Texture | null;
|
|
38
|
+
envMapRotation: Euler;
|
|
39
39
|
combine: Combine;
|
|
40
40
|
reflectivity: number;
|
|
41
41
|
refractionRatio: number;
|
|
42
|
+
wireframe: boolean;
|
|
43
|
+
wireframeLinewidth: number;
|
|
42
44
|
wireframeLinecap: string;
|
|
43
45
|
wireframeLinejoin: string;
|
|
44
46
|
flatShading: boolean;
|
|
45
47
|
metal: boolean;
|
|
48
|
+
fog: boolean;
|
|
46
49
|
|
|
47
50
|
constructor(parameters?: MeshPhongNodeMaterialParameters);
|
|
48
51
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Color, MeshPhysicalMaterialParameters, Texture, Vector2 } from "three";
|
|
2
2
|
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
5
4
|
import MeshStandardNodeMaterial, { MeshStandardNodeMaterialParameters } from "./MeshStandardNodeMaterial.js";
|
|
6
5
|
|
|
7
6
|
export interface MeshPhysicalNodeMaterialParameters
|
|
@@ -12,28 +11,29 @@ export interface MeshPhysicalNodeMaterialParameters
|
|
|
12
11
|
export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
13
12
|
readonly isMeshPhysicalNodeMaterial: true;
|
|
14
13
|
|
|
15
|
-
clearcoatNode:
|
|
16
|
-
clearcoatRoughnessNode:
|
|
17
|
-
clearcoatNormalNode:
|
|
14
|
+
clearcoatNode: Node | null;
|
|
15
|
+
clearcoatRoughnessNode: Node | null;
|
|
16
|
+
clearcoatNormalNode: Node | null;
|
|
18
17
|
|
|
19
|
-
sheenNode:
|
|
20
|
-
sheenRoughnessNode:
|
|
18
|
+
sheenNode: Node | null;
|
|
19
|
+
sheenRoughnessNode: Node | null;
|
|
21
20
|
|
|
22
|
-
iridescenceNode:
|
|
23
|
-
iridescenceIORNode:
|
|
24
|
-
iridescenceThicknessNode:
|
|
21
|
+
iridescenceNode: Node | null;
|
|
22
|
+
iridescenceIORNode: Node | null;
|
|
23
|
+
iridescenceThicknessNode: Node | null;
|
|
25
24
|
|
|
26
|
-
iorNode:
|
|
25
|
+
iorNode: Node | null;
|
|
27
26
|
|
|
28
|
-
specularIntensityNode:
|
|
29
|
-
specularColorNode:
|
|
27
|
+
specularIntensityNode: Node | null;
|
|
28
|
+
specularColorNode: Node | null;
|
|
30
29
|
|
|
31
|
-
transmissionNode:
|
|
32
|
-
thicknessNode:
|
|
33
|
-
attenuationDistanceNode:
|
|
34
|
-
attenuationColorNode:
|
|
30
|
+
transmissionNode: Node | null;
|
|
31
|
+
thicknessNode: Node | null;
|
|
32
|
+
attenuationDistanceNode: Node | null;
|
|
33
|
+
attenuationColorNode: Node | null;
|
|
34
|
+
dispersionNode: Node | null;
|
|
35
35
|
|
|
36
|
-
anisotropyNode:
|
|
36
|
+
anisotropyNode: Node | null;
|
|
37
37
|
|
|
38
38
|
// Properties from MeshPhysicalMaterial
|
|
39
39
|
readonly isMeshPhysicalMaterial: true;
|
|
@@ -78,4 +78,11 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
78
78
|
set transmission(value: number);
|
|
79
79
|
|
|
80
80
|
constructor(parameters?: MeshPhysicalNodeMaterialParameters);
|
|
81
|
+
|
|
82
|
+
get useClearcoat(): boolean;
|
|
83
|
+
get useIridescence(): boolean;
|
|
84
|
+
get useSheen(): boolean;
|
|
85
|
+
get useAnisotropy(): boolean;
|
|
86
|
+
get useTransmission(): boolean;
|
|
87
|
+
get useDispersion(): boolean;
|
|
81
88
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import ConstNode from "../core/ConstNode.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
3
|
import MeshPhysicalNodeMaterial, { MeshPhysicalNodeMaterialParameters } from "./MeshPhysicalNodeMaterial.js";
|
|
5
4
|
|
|
6
5
|
export default class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
|
|
7
|
-
thicknessColorNode:
|
|
8
|
-
thicknessDistortionNode:
|
|
9
|
-
thicknessAmbientNode:
|
|
10
|
-
thicknessAttenuationNode:
|
|
11
|
-
thicknessPowerNode:
|
|
12
|
-
thicknessScaleNode:
|
|
6
|
+
thicknessColorNode: Node | null;
|
|
7
|
+
thicknessDistortionNode: ConstNode<number>;
|
|
8
|
+
thicknessAmbientNode: ConstNode<number>;
|
|
9
|
+
thicknessAttenuationNode: ConstNode<number>;
|
|
10
|
+
thicknessPowerNode: ConstNode<number>;
|
|
11
|
+
thicknessScaleNode: ConstNode<number>;
|
|
13
12
|
|
|
14
13
|
constructor(parameters?: MeshPhysicalNodeMaterialParameters);
|
|
15
14
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Color, MeshStandardMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
1
|
+
import { Color, Euler, MeshStandardMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
3
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
5
4
|
|
|
6
5
|
export interface MeshStandardNodeMaterialParameters extends NodeMaterialParameters, MeshStandardMaterialParameters {
|
|
@@ -9,10 +8,10 @@ export interface MeshStandardNodeMaterialParameters extends NodeMaterialParamete
|
|
|
9
8
|
export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
10
9
|
readonly isMeshStandardNodeMaterial: true;
|
|
11
10
|
|
|
12
|
-
emissiveNode:
|
|
11
|
+
emissiveNode: Node | null;
|
|
13
12
|
|
|
14
|
-
metalnessNode:
|
|
15
|
-
roughnessNode:
|
|
13
|
+
metalnessNode: Node | null;
|
|
14
|
+
roughnessNode: Node | null;
|
|
16
15
|
|
|
17
16
|
// Properties from MeshStandardMaterial
|
|
18
17
|
readonly isMeshStandardMaterial: true;
|
|
@@ -39,10 +38,14 @@ export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
|
39
38
|
metalnessMap: Texture | null;
|
|
40
39
|
alphaMap: Texture | null;
|
|
41
40
|
envMap: Texture | null;
|
|
41
|
+
envMapRotation: Euler;
|
|
42
42
|
envMapIntensity: number;
|
|
43
|
+
wireframe: boolean;
|
|
44
|
+
wireframeLinewidth: number;
|
|
43
45
|
wireframeLinecap: string;
|
|
44
46
|
wireframeLinejoin: string;
|
|
45
47
|
flatShading: boolean;
|
|
48
|
+
fog: boolean;
|
|
46
49
|
|
|
47
50
|
constructor(paramters?: MeshStandardNodeMaterialParameters);
|
|
48
51
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Color, MeshToonMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
2
|
+
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
3
|
+
|
|
4
|
+
export interface MeshToonNodeMaterialParameters extends NodeMaterialParameters, MeshToonMaterialParameters {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default class MeshToonNodeMaterial extends NodeMaterial {
|
|
8
|
+
readonly isMeshToonNodeMaterial: true;
|
|
9
|
+
|
|
10
|
+
// Properties from MeshToonMaterial
|
|
11
|
+
readonly isMeshToonMaterial: true;
|
|
12
|
+
color: Color;
|
|
13
|
+
gradientMap: Texture | null;
|
|
14
|
+
map: Texture | null;
|
|
15
|
+
lightMap: Texture | null;
|
|
16
|
+
lightMapIntensity: number;
|
|
17
|
+
aoMap: Texture | null;
|
|
18
|
+
aoMapIntensity: number;
|
|
19
|
+
emissive: Color;
|
|
20
|
+
emissiveIntensity: number;
|
|
21
|
+
emissiveMap: Texture | null;
|
|
22
|
+
bumpMap: Texture | null;
|
|
23
|
+
bumpScale: number;
|
|
24
|
+
normalMap: Texture | null;
|
|
25
|
+
normalMapType: NormalMapTypes;
|
|
26
|
+
normalScale: Vector2;
|
|
27
|
+
displacementMap: Texture | null;
|
|
28
|
+
displacementScale: number;
|
|
29
|
+
displacementBias: number;
|
|
30
|
+
alphaMap: Texture | null;
|
|
31
|
+
wireframe: boolean;
|
|
32
|
+
wireframeLinewidth: number;
|
|
33
|
+
wireframeLinecap: string;
|
|
34
|
+
wireframeLinejoin: string;
|
|
35
|
+
fog: boolean;
|
|
36
|
+
|
|
37
|
+
constructor(paramters: MeshToonNodeMaterialParameters);
|
|
38
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LineBasicMaterial,
|
|
3
3
|
Material,
|
|
4
|
+
MaterialParameters,
|
|
4
5
|
MeshBasicMaterial,
|
|
6
|
+
MeshMatcapMaterial,
|
|
5
7
|
MeshNormalMaterial,
|
|
6
8
|
MeshPhongMaterial,
|
|
7
9
|
MeshPhysicalMaterial,
|
|
8
10
|
MeshStandardMaterial,
|
|
11
|
+
MeshToonMaterial,
|
|
9
12
|
PointsMaterial,
|
|
10
|
-
ShaderMaterial,
|
|
11
|
-
ShaderMaterialParameters,
|
|
12
13
|
ShadowMaterial,
|
|
13
14
|
SpriteMaterial,
|
|
14
15
|
} from "three";
|
|
@@ -17,76 +18,77 @@ import LightingModel from "../core/LightingModel.js";
|
|
|
17
18
|
import Node from "../core/Node.js";
|
|
18
19
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
19
20
|
import LightsNode from "../lighting/LightsNode.js";
|
|
20
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
21
21
|
import LineBasicNodeMaterial from "./LineBasicNodeMaterial.js";
|
|
22
22
|
import MeshBasicNodeMaterial from "./MeshBasicNodeMaterial.js";
|
|
23
|
+
import MeshMatcapNodeMaterial from "./MeshMatcapNodeMaterial.js";
|
|
23
24
|
import MeshNormalNodeMaterial from "./MeshNormalNodeMaterial.js";
|
|
24
25
|
import MeshPhongNodeMaterial from "./MeshPhongNodeMaterial.js";
|
|
25
26
|
import MeshPhysicalNodeMaterial from "./MeshPhysicalNodeMaterial.js";
|
|
26
27
|
import MeshStandardNodeMaterial from "./MeshStandardNodeMaterial.js";
|
|
28
|
+
import MeshToonNodeMaterial from "./MeshToonNodeMaterial.js";
|
|
27
29
|
import PointsNodeMaterial from "./PointsNodeMaterial.js";
|
|
28
30
|
import ShadowNodeMaterial from "./ShadowNodeMaterial.js";
|
|
29
31
|
import SpriteNodeMaterial from "./SpriteNodeMaterial.js";
|
|
30
32
|
|
|
31
|
-
export interface NodeMaterialParameters extends
|
|
33
|
+
export interface NodeMaterialParameters extends MaterialParameters {
|
|
32
34
|
normals?: boolean | undefined;
|
|
33
35
|
|
|
34
36
|
colorSpaced?: boolean | undefined;
|
|
35
37
|
|
|
36
|
-
lightsNode?:
|
|
37
|
-
envNode?:
|
|
38
|
-
aoNode?:
|
|
38
|
+
lightsNode?: LightsNode | null | undefined;
|
|
39
|
+
envNode?: Node | null | undefined;
|
|
40
|
+
aoNode?: Node | null | undefined;
|
|
39
41
|
|
|
40
|
-
colorNode?:
|
|
41
|
-
normalNode?:
|
|
42
|
-
opacityNode?:
|
|
43
|
-
backdropNode?:
|
|
44
|
-
backdropAlphaNode?:
|
|
45
|
-
alphaTestNode?:
|
|
42
|
+
colorNode?: Node | null | undefined;
|
|
43
|
+
normalNode?: Node | null | undefined;
|
|
44
|
+
opacityNode?: Node | null | undefined;
|
|
45
|
+
backdropNode?: Node | null | undefined;
|
|
46
|
+
backdropAlphaNode?: Node | null | undefined;
|
|
47
|
+
alphaTestNode?: Node | null | undefined;
|
|
46
48
|
|
|
47
|
-
positionNode?:
|
|
49
|
+
positionNode?: Node | null | undefined;
|
|
48
50
|
|
|
49
|
-
depthNode?:
|
|
50
|
-
shadowNode?:
|
|
51
|
+
depthNode?: Node | null | undefined;
|
|
52
|
+
shadowNode?: Node | null | undefined;
|
|
51
53
|
|
|
52
|
-
outputNode?:
|
|
54
|
+
outputNode?: Node | null | undefined;
|
|
53
55
|
|
|
54
|
-
fragmentNode?:
|
|
55
|
-
vertexNode?:
|
|
56
|
+
fragmentNode?: Node | null | undefined;
|
|
57
|
+
vertexNode?: Node | null | undefined;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
export default class NodeMaterial extends
|
|
60
|
+
export default class NodeMaterial extends Material {
|
|
59
61
|
readonly isNodeMaterial: true;
|
|
60
62
|
|
|
61
63
|
normals: boolean;
|
|
62
64
|
|
|
63
|
-
lightsNode:
|
|
64
|
-
envNode:
|
|
65
|
-
aoNode:
|
|
65
|
+
lightsNode: LightsNode | null;
|
|
66
|
+
envNode: Node | null;
|
|
67
|
+
aoNode: Node | null;
|
|
66
68
|
|
|
67
|
-
colorNode:
|
|
68
|
-
normalNode:
|
|
69
|
-
opacityNode:
|
|
70
|
-
backdropNode:
|
|
71
|
-
backdropAlphaNode:
|
|
72
|
-
alphaTestNode:
|
|
69
|
+
colorNode: Node | null;
|
|
70
|
+
normalNode: Node | null;
|
|
71
|
+
opacityNode: Node | null;
|
|
72
|
+
backdropNode: Node | null;
|
|
73
|
+
backdropAlphaNode: Node | null;
|
|
74
|
+
alphaTestNode: Node | null;
|
|
73
75
|
|
|
74
|
-
positionNode:
|
|
76
|
+
positionNode: Node | null;
|
|
75
77
|
|
|
76
|
-
depthNode:
|
|
77
|
-
shadowNode:
|
|
78
|
-
shadowPositionNode:
|
|
78
|
+
depthNode: Node | null;
|
|
79
|
+
shadowNode: Node | null;
|
|
80
|
+
shadowPositionNode: Node | null;
|
|
79
81
|
|
|
80
|
-
outputNode:
|
|
82
|
+
outputNode: Node | null;
|
|
81
83
|
|
|
82
|
-
fragmentNode:
|
|
83
|
-
vertexNode:
|
|
84
|
+
fragmentNode: Node | null;
|
|
85
|
+
vertexNode: Node | null;
|
|
84
86
|
|
|
85
87
|
constructor();
|
|
86
88
|
|
|
87
89
|
build(builder: NodeBuilder): void;
|
|
88
90
|
setup(builder: NodeBuilder): void;
|
|
89
|
-
setupClipping(builder: NodeBuilder):
|
|
91
|
+
setupClipping(builder: NodeBuilder): ClippingNode | null;
|
|
90
92
|
setupDepth(builder: NodeBuilder): void;
|
|
91
93
|
setupPosition(builder: NodeBuilder): Node;
|
|
92
94
|
setupDiffuseColor(builder: NodeBuilder): void;
|
|
@@ -102,10 +104,12 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
102
104
|
|
|
103
105
|
static fromMaterial(material: LineBasicMaterial): LineBasicNodeMaterial;
|
|
104
106
|
static fromMaterial(material: MeshBasicMaterial): MeshBasicNodeMaterial;
|
|
107
|
+
static fromMaterial(material: MeshMatcapMaterial): MeshMatcapNodeMaterial;
|
|
105
108
|
static fromMaterial(material: MeshNormalMaterial): MeshNormalNodeMaterial;
|
|
106
109
|
static fromMaterial(material: MeshPhongMaterial): MeshPhongNodeMaterial;
|
|
107
110
|
static fromMaterial(material: MeshPhysicalMaterial): MeshPhysicalNodeMaterial;
|
|
108
111
|
static fromMaterial(material: MeshStandardMaterial): MeshStandardNodeMaterial;
|
|
112
|
+
static fromMaterial(material: MeshToonMaterial): MeshToonNodeMaterial;
|
|
109
113
|
static fromMaterial(material: PointsMaterial): PointsNodeMaterial;
|
|
110
114
|
static fromMaterial(material: ShadowMaterial): ShadowNodeMaterial;
|
|
111
115
|
static fromMaterial(material: SpriteMaterial): SpriteNodeMaterial;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Color, SpriteMaterialParameters, Texture } from "three";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
3
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
5
4
|
|
|
6
5
|
export interface SpriteNodeMaterialParameters extends NodeMaterialParameters, SpriteMaterialParameters {
|
|
@@ -9,8 +8,8 @@ export interface SpriteNodeMaterialParameters extends NodeMaterialParameters, Sp
|
|
|
9
8
|
export default class SpriteNodeMaterial extends NodeMaterial {
|
|
10
9
|
isSpriteNodeMaterial: true;
|
|
11
10
|
|
|
12
|
-
rotationNode:
|
|
13
|
-
scaleNode:
|
|
11
|
+
rotationNode: Node | null;
|
|
12
|
+
scaleNode: Node | null;
|
|
14
13
|
|
|
15
14
|
// Properties from SpriteMaterial
|
|
16
15
|
readonly isSpriteMaterial: true;
|
|
@@ -19,6 +18,7 @@ export default class SpriteNodeMaterial extends NodeMaterial {
|
|
|
19
18
|
alphaMap: Texture | null;
|
|
20
19
|
rotation: number;
|
|
21
20
|
sizeAttenuation: boolean;
|
|
21
|
+
fog: boolean;
|
|
22
22
|
|
|
23
23
|
constructor(parameters?: SpriteNodeMaterialParameters);
|
|
24
24
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
3
|
+
|
|
4
|
+
export default class VolumeNodeMaterial extends NodeMaterial {
|
|
5
|
+
lights: boolean;
|
|
6
|
+
readonly isVolumeNodeMaterial: true;
|
|
7
|
+
testNode: Node | null;
|
|
8
|
+
|
|
9
|
+
constructor(parameters?: NodeMaterialParameters);
|
|
10
|
+
}
|
|
@@ -2,4 +2,5 @@ import Node from "../../core/Node.js";
|
|
|
2
2
|
import { NodeRepresentation, ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
3
3
|
|
|
4
4
|
export const mx_hsvtorgb: (hsv_immutable: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
5
|
+
|
|
5
6
|
export const mx_rgbtohsv: (c_immutable: NodeRepresentation) => ShaderNodeObject<Node>;
|