@types/three 0.164.1 → 0.165.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/USDZExporter.d.ts +4 -2
- three/examples/jsm/loaders/FontLoader.d.ts +1 -1
- three/examples/jsm/loaders/GLTFLoader.d.ts +9 -6
- three/examples/jsm/loaders/LDrawLoader.d.ts +1 -1
- three/examples/jsm/modifiers/EdgeSplitModifier.d.ts +17 -10
- three/examples/jsm/nodes/Nodes.d.ts +11 -54
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +4 -22
- three/examples/jsm/nodes/accessors/BufferAttributeNode.d.ts +49 -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 +9 -4
- 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/ConstNode.d.ts +1 -2
- three/examples/jsm/nodes/core/InputNode.d.ts +1 -2
- three/examples/jsm/nodes/core/Node.d.ts +99 -42
- three/examples/jsm/nodes/core/NodeAttribute.d.ts +7 -4
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +24 -24
- three/examples/jsm/nodes/core/NodeCache.d.ts +38 -4
- 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 +14 -11
- three/examples/jsm/nodes/core/VaryingNode.d.ts +4 -0
- three/examples/jsm/nodes/core/constants.d.ts +27 -79
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +2 -0
- three/examples/jsm/nodes/functions/ToonLightingModel.d.ts +4 -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 +5 -1
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +8 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +5 -1
- three/examples/jsm/nodes/materials/MeshToonNodeMaterial.d.ts +38 -0
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +9 -4
- 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 +1 -0
- three/examples/jsm/nodes/materials/VolumeNodeMaterial.d.ts +10 -0
- 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/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/Binding.d.ts +8 -0
- three/examples/jsm/renderers/common/Bindings.d.ts +45 -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 +20 -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/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 +175 -208
- 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 +30 -0
- three/examples/jsm/renderers/common/nodes/NodeBuilderState.d.ts +26 -0
- three/examples/jsm/renderers/common/nodes/NodeUniform.d.ts +63 -0
- three/examples/jsm/renderers/common/nodes/NodeUniformsGroup.d.ts +12 -0
- three/examples/jsm/renderers/common/nodes/Nodes.d.ts +94 -0
- three/examples/jsm/utils/SceneUtils.d.ts +9 -3
- three/package.json +2 -2
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -2
- three/src/core/BufferGeometry.d.ts +19 -17
- three/src/core/InterleavedBuffer.d.ts +2 -0
- three/src/loaders/LoaderUtils.d.ts +9 -6
- 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/objects/BatchedMesh.d.ts +15 -0
- three/src/objects/InstancedMesh.d.ts +3 -3
- three/src/renderers/WebGLRenderer.d.ts +41 -19
- three/src/renderers/webgl/WebGLPrograms.d.ts +1 -1
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +1 -1
- three/src/textures/CompressedArrayTexture.d.ts +32 -15
- three/src/textures/DataArrayTexture.d.ts +37 -20
- three/src/textures/FramebufferTexture.d.ts +1 -1
- three/src/utils.d.ts +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Node from "./Node.js";
|
|
2
|
+
|
|
3
|
+
export default class UniformGroupNode extends Node {
|
|
4
|
+
name: string;
|
|
5
|
+
version: number;
|
|
6
|
+
|
|
7
|
+
shared: boolean;
|
|
8
|
+
|
|
9
|
+
readonly isUniformGroup: true;
|
|
10
|
+
|
|
11
|
+
constructor(name: string, shared?: boolean);
|
|
12
|
+
|
|
13
|
+
set needsUpdate(value: boolean);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const uniformGroup: (name: string) => UniformGroupNode;
|
|
17
|
+
export const sharedUniformGroup: (name: string) => UniformGroupNode;
|
|
18
|
+
|
|
19
|
+
export const frameGroup: UniformGroupNode;
|
|
20
|
+
export const renderGroup: UniformGroupNode;
|
|
21
|
+
export const objectGroup: UniformGroupNode;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NodeTypeOption } from "./constants.js";
|
|
1
|
+
import { NodeUpdateType } from "./constants.js";
|
|
3
2
|
import InputNode from "./InputNode.js";
|
|
4
3
|
import Node from "./Node.js";
|
|
5
4
|
import NodeBuilder from "./NodeBuilder.js";
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import NodeFrame from "./NodeFrame.js";
|
|
6
|
+
import UniformGroupNode from "./UniformGroupNode.js";
|
|
7
|
+
declare class UniformNode<TValue> extends InputNode<TValue> {
|
|
8
8
|
readonly isUniformNode: true;
|
|
9
|
-
|
|
10
|
-
constructor(value:
|
|
11
|
-
|
|
9
|
+
groupNode: UniformGroupNode;
|
|
10
|
+
constructor(value: TValue, nodeType?: string | null);
|
|
11
|
+
setGroup(group: UniformGroupNode): this;
|
|
12
|
+
getGroup(): UniformGroupNode;
|
|
12
13
|
getUniformHash(builder: NodeBuilder): string;
|
|
14
|
+
onUpdate(callback: (frame: NodeFrame, self: this) => TValue | undefined, updateType: NodeUpdateType): this;
|
|
15
|
+
generate(builder: NodeBuilder, output: string | null): string;
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
export const uniform: <
|
|
16
|
-
arg1: InputNode<
|
|
17
|
+
export default UniformNode;
|
|
18
|
+
export declare const uniform: <TValue>(
|
|
19
|
+
arg1: InputNode<TValue> | TValue,
|
|
17
20
|
arg2?: Node | string,
|
|
18
|
-
) => ShaderNodeObject<UniformNode<
|
|
21
|
+
) => import("../shadernode/ShaderNode.js").ShaderNodeObject<UniformNode<TValue>>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
|
+
import NodeBuilder from "./NodeBuilder.js";
|
|
4
|
+
import NodeVarying from "./NodeVarying.js";
|
|
3
5
|
|
|
4
6
|
export default class VaryingNode extends Node {
|
|
5
7
|
node: Node;
|
|
6
8
|
name: string | null;
|
|
7
9
|
|
|
8
10
|
constructor(node: Node, name?: string | null);
|
|
11
|
+
|
|
12
|
+
setupVarying(builder: NodeBuilder): NodeVarying;
|
|
9
13
|
}
|
|
10
14
|
|
|
11
15
|
export const varying: (node: NodeRepresentation, name?: string) => ShaderNodeObject<VaryingNode>;
|
|
@@ -1,79 +1,27 @@
|
|
|
1
|
-
export
|
|
2
|
-
VERTEX
|
|
3
|
-
FRAGMENT
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| "float"
|
|
29
|
-
| "vec2"
|
|
30
|
-
| "vec3"
|
|
31
|
-
| "vec4"
|
|
32
|
-
| "mat2"
|
|
33
|
-
| "mat3"
|
|
34
|
-
| "mat4"
|
|
35
|
-
| "code" /* CodeNode */
|
|
36
|
-
| "color" /* NodeUtis.getValueType */
|
|
37
|
-
| "uint"
|
|
38
|
-
| "int" /* NodeBuilder.getComponentType */
|
|
39
|
-
| "void"
|
|
40
|
-
| "property"
|
|
41
|
-
| "sampler"
|
|
42
|
-
| "texture"
|
|
43
|
-
| "cubeTexture" /* NodeBuilder.isReference */
|
|
44
|
-
| "ivec2"
|
|
45
|
-
| "uvec2"
|
|
46
|
-
| "bvec2" /* ShaderNodeBaseElements */
|
|
47
|
-
| "ivec3"
|
|
48
|
-
| "uvec3"
|
|
49
|
-
| "bvec3"
|
|
50
|
-
| "ivec4"
|
|
51
|
-
| "uvec4"
|
|
52
|
-
| "bvec4"
|
|
53
|
-
| "imat3"
|
|
54
|
-
| "umat3"
|
|
55
|
-
| "bmat3"
|
|
56
|
-
| "imat4"
|
|
57
|
-
| "umat4"
|
|
58
|
-
| "bmat4";
|
|
59
|
-
|
|
60
|
-
export type SwizzleCharacter = "x" | "y" | "z" | "w" | "r" | "g" | "b" | "a" | "s" | "t" | "p" | "q";
|
|
61
|
-
|
|
62
|
-
export type SwizzleOption = Exclude<
|
|
63
|
-
| `${SwizzleCharacter}`
|
|
64
|
-
| `${SwizzleCharacter}${SwizzleCharacter}`
|
|
65
|
-
| `${SwizzleCharacter}${SwizzleCharacter}${SwizzleCharacter}`
|
|
66
|
-
| `${SwizzleCharacter}${SwizzleCharacter}${SwizzleCharacter}${SwizzleCharacter}`,
|
|
67
|
-
"abs" | "sqrt"
|
|
68
|
-
>;
|
|
69
|
-
|
|
70
|
-
/** Should be the same type as Object3D.userData */
|
|
71
|
-
export type NodeUserData = Record<string, any>;
|
|
72
|
-
|
|
73
|
-
/** generic key value type,curretly used by nodes */
|
|
74
|
-
export interface AnyObject {
|
|
75
|
-
[key: string]: any;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/** a generic JSON type, used by nodes only */
|
|
79
|
-
export type AnyJson = any;
|
|
1
|
+
export declare const NodeShaderStage: {
|
|
2
|
+
readonly VERTEX: "vertex";
|
|
3
|
+
readonly FRAGMENT: "fragment";
|
|
4
|
+
};
|
|
5
|
+
export declare const NodeUpdateType: {
|
|
6
|
+
readonly NONE: "none";
|
|
7
|
+
readonly FRAME: "frame";
|
|
8
|
+
readonly RENDER: "render";
|
|
9
|
+
readonly OBJECT: "object";
|
|
10
|
+
};
|
|
11
|
+
export declare const NodeType: {
|
|
12
|
+
readonly BOOLEAN: "bool";
|
|
13
|
+
readonly INTEGER: "int";
|
|
14
|
+
readonly FLOAT: "float";
|
|
15
|
+
readonly VECTOR2: "vec2";
|
|
16
|
+
readonly VECTOR3: "vec3";
|
|
17
|
+
readonly VECTOR4: "vec4";
|
|
18
|
+
readonly MATRIX2: "mat2";
|
|
19
|
+
readonly MATRIX3: "mat3";
|
|
20
|
+
readonly MATRIX4: "mat4";
|
|
21
|
+
};
|
|
22
|
+
export type NodeShaderStage = "vertex" | "fragment" | "compute";
|
|
23
|
+
export type NodeUpdateType = "none" | "frame" | "render" | "object";
|
|
24
|
+
export declare const defaultShaderStages: NodeShaderStage[];
|
|
25
|
+
export declare const defaultBuildStages: string[];
|
|
26
|
+
export declare const shaderStages: NodeShaderStage[];
|
|
27
|
+
export declare const vectorComponents: string[];
|
|
@@ -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;
|
|
@@ -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,4 +1,4 @@
|
|
|
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
3
|
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
4
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
@@ -36,13 +36,17 @@ export default class MeshPhongNodeMaterial extends NodeMaterial {
|
|
|
36
36
|
specularMap: Texture | null;
|
|
37
37
|
alphaMap: Texture | null;
|
|
38
38
|
envMap: Texture | null;
|
|
39
|
+
envMapRotation: Euler;
|
|
39
40
|
combine: Combine;
|
|
40
41
|
reflectivity: number;
|
|
41
42
|
refractionRatio: number;
|
|
43
|
+
wireframe: boolean;
|
|
44
|
+
wireframeLinewidth: number;
|
|
42
45
|
wireframeLinecap: string;
|
|
43
46
|
wireframeLinejoin: string;
|
|
44
47
|
flatShading: boolean;
|
|
45
48
|
metal: boolean;
|
|
49
|
+
fog: boolean;
|
|
46
50
|
|
|
47
51
|
constructor(parameters?: MeshPhongNodeMaterialParameters);
|
|
48
52
|
}
|
|
@@ -32,6 +32,7 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
32
32
|
thicknessNode: ShaderNodeObject<Node> | null;
|
|
33
33
|
attenuationDistanceNode: ShaderNodeObject<Node> | null;
|
|
34
34
|
attenuationColorNode: ShaderNodeObject<Node> | null;
|
|
35
|
+
dispersionNode: ShaderNodeObject<Node> | null;
|
|
35
36
|
|
|
36
37
|
anisotropyNode: ShaderNodeObject<Node> | null;
|
|
37
38
|
|
|
@@ -78,4 +79,11 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
78
79
|
set transmission(value: number);
|
|
79
80
|
|
|
80
81
|
constructor(parameters?: MeshPhysicalNodeMaterialParameters);
|
|
82
|
+
|
|
83
|
+
get useClearcoat(): boolean;
|
|
84
|
+
get useIridescence(): boolean;
|
|
85
|
+
get useSheen(): boolean;
|
|
86
|
+
get useAnisotropy(): boolean;
|
|
87
|
+
get useTransmission(): boolean;
|
|
88
|
+
get useDispersion(): boolean;
|
|
81
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
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
3
|
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
4
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
@@ -39,10 +39,14 @@ export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
|
39
39
|
metalnessMap: Texture | null;
|
|
40
40
|
alphaMap: Texture | null;
|
|
41
41
|
envMap: Texture | null;
|
|
42
|
+
envMapRotation: Euler;
|
|
42
43
|
envMapIntensity: number;
|
|
44
|
+
wireframe: boolean;
|
|
45
|
+
wireframeLinewidth: number;
|
|
43
46
|
wireframeLinecap: string;
|
|
44
47
|
wireframeLinejoin: string;
|
|
45
48
|
flatShading: boolean;
|
|
49
|
+
fog: boolean;
|
|
46
50
|
|
|
47
51
|
constructor(paramters?: MeshStandardNodeMaterialParameters);
|
|
48
52
|
}
|
|
@@ -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";
|
|
@@ -20,15 +21,17 @@ import LightsNode from "../lighting/LightsNode.js";
|
|
|
20
21
|
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
21
22
|
import LineBasicNodeMaterial from "./LineBasicNodeMaterial.js";
|
|
22
23
|
import MeshBasicNodeMaterial from "./MeshBasicNodeMaterial.js";
|
|
24
|
+
import MeshMatcapNodeMaterial from "./MeshMatcapNodeMaterial.js";
|
|
23
25
|
import MeshNormalNodeMaterial from "./MeshNormalNodeMaterial.js";
|
|
24
26
|
import MeshPhongNodeMaterial from "./MeshPhongNodeMaterial.js";
|
|
25
27
|
import MeshPhysicalNodeMaterial from "./MeshPhysicalNodeMaterial.js";
|
|
26
28
|
import MeshStandardNodeMaterial from "./MeshStandardNodeMaterial.js";
|
|
29
|
+
import MeshToonNodeMaterial from "./MeshToonNodeMaterial.js";
|
|
27
30
|
import PointsNodeMaterial from "./PointsNodeMaterial.js";
|
|
28
31
|
import ShadowNodeMaterial from "./ShadowNodeMaterial.js";
|
|
29
32
|
import SpriteNodeMaterial from "./SpriteNodeMaterial.js";
|
|
30
33
|
|
|
31
|
-
export interface NodeMaterialParameters extends
|
|
34
|
+
export interface NodeMaterialParameters extends MaterialParameters {
|
|
32
35
|
normals?: boolean | undefined;
|
|
33
36
|
|
|
34
37
|
colorSpaced?: boolean | undefined;
|
|
@@ -55,7 +58,7 @@ export interface NodeMaterialParameters extends ShaderMaterialParameters {
|
|
|
55
58
|
vertexNode?: ShaderNodeObject<Node> | null | undefined;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
export default class NodeMaterial extends
|
|
61
|
+
export default class NodeMaterial extends Material {
|
|
59
62
|
readonly isNodeMaterial: true;
|
|
60
63
|
|
|
61
64
|
normals: boolean;
|
|
@@ -102,10 +105,12 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
102
105
|
|
|
103
106
|
static fromMaterial(material: LineBasicMaterial): LineBasicNodeMaterial;
|
|
104
107
|
static fromMaterial(material: MeshBasicMaterial): MeshBasicNodeMaterial;
|
|
108
|
+
static fromMaterial(material: MeshMatcapMaterial): MeshMatcapNodeMaterial;
|
|
105
109
|
static fromMaterial(material: MeshNormalMaterial): MeshNormalNodeMaterial;
|
|
106
110
|
static fromMaterial(material: MeshPhongMaterial): MeshPhongNodeMaterial;
|
|
107
111
|
static fromMaterial(material: MeshPhysicalMaterial): MeshPhysicalNodeMaterial;
|
|
108
112
|
static fromMaterial(material: MeshStandardMaterial): MeshStandardNodeMaterial;
|
|
113
|
+
static fromMaterial(material: MeshToonMaterial): MeshToonNodeMaterial;
|
|
109
114
|
static fromMaterial(material: PointsMaterial): PointsNodeMaterial;
|
|
110
115
|
static fromMaterial(material: ShadowMaterial): ShadowNodeMaterial;
|
|
111
116
|
static fromMaterial(material: SpriteMaterial): SpriteNodeMaterial;
|
|
@@ -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
|
+
}
|