@types/three 0.162.0 → 0.164.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/animation/CCDIKSolver.d.ts +19 -6
- three/examples/jsm/controls/OrbitControls.d.ts +1 -1
- three/examples/jsm/exporters/USDZExporter.d.ts +8 -1
- three/examples/jsm/geometries/TextGeometry.d.ts +8 -0
- three/examples/jsm/interactive/SelectionBox.d.ts +1 -0
- three/examples/jsm/loaders/FontLoader.d.ts +18 -4
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +1 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +1 -2
- three/examples/jsm/loaders/RGBMLoader.d.ts +5 -0
- three/examples/jsm/loaders/TTFLoader.d.ts +5 -3
- three/examples/jsm/math/Octree.d.ts +2 -1
- three/examples/jsm/nodes/Nodes.d.ts +33 -5
- three/examples/jsm/nodes/accessors/AccessorsUtils.d.ts +2 -0
- three/examples/jsm/nodes/accessors/BatchNode.d.ts +14 -0
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +2 -1
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +84 -1
- three/examples/jsm/nodes/accessors/RendererReferenceNode.d.ts +16 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +11 -1
- three/examples/jsm/nodes/code/CodeNode.d.ts +7 -2
- three/examples/jsm/nodes/code/FunctionNode.d.ts +10 -4
- three/examples/jsm/nodes/core/LightingModel.d.ts +1 -0
- three/examples/jsm/nodes/core/Node.d.ts +7 -3
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -1
- three/examples/jsm/nodes/core/NodeUtils.d.ts +1 -1
- three/examples/jsm/nodes/core/OutputStructNode.d.ts +12 -0
- three/examples/jsm/nodes/core/PropertyNode.d.ts +10 -0
- three/examples/jsm/nodes/display/PassNode.d.ts +2 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +12 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +10 -5
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -5
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +3 -1
- three/examples/jsm/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +7 -2
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +16 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +10 -2
- three/examples/jsm/nodes/functions/ShadowMaskModel.d.ts +9 -0
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +3 -2
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +3 -2
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +0 -2
- three/examples/jsm/nodes/lighting/IrradianceNode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/LightUtils.d.ts +7 -2
- three/examples/jsm/nodes/materials/Materials.d.ts +2 -0
- three/examples/jsm/nodes/materials/MeshNormalNodeMaterial.d.ts +23 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +24 -14
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +9 -2
- three/examples/jsm/nodes/materials/ShadowNodeMaterial.d.ts +15 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +36 -32
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +3 -4
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +127 -6
- three/examples/jsm/nodes/materialx/lib/mx_transform_color.d.ts +4 -0
- three/examples/jsm/nodes/pmrem/PMREMNode.d.ts +20 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +6 -3
- three/examples/jsm/objects/QuadMesh.d.ts +5 -8
- three/examples/jsm/physics/JoltPhysics.d.ts +10 -0
- three/examples/jsm/postprocessing/RenderTransitionPass.d.ts +33 -0
- three/examples/jsm/renderers/common/Info.d.ts +3 -7
- three/examples/jsm/renderers/common/PostProcessing.d.ts +3 -1
- three/examples/jsm/renderers/common/Renderer.d.ts +11 -5
- three/examples/jsm/renderers/common/extras/PMREMGenerator.d.ts +8 -0
- three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +4 -0
- three/examples/jsm/utils/SceneUtils.d.ts +18 -0
- three/examples/jsm/webxr/OculusHandModel.d.ts +5 -2
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +8 -2
- three/index.d.ts +1 -1
- three/package.json +4 -4
- three/src/Three.d.ts +0 -1
- three/src/cameras/Camera.d.ts +3 -0
- three/src/constants.d.ts +10 -40
- three/src/core/Object3D.d.ts +6 -5
- three/src/core/RenderTarget.d.ts +25 -10
- three/src/materials/Material.d.ts +46 -23
- three/src/materials/MeshPhysicalMaterial.d.ts +65 -51
- three/src/materials/ShaderMaterial.d.ts +2 -17
- three/src/objects/BatchedMesh.d.ts +11 -1
- three/src/objects/InstancedMesh.d.ts +1 -1
- three/src/objects/SkinnedMesh.d.ts +0 -2
- three/src/renderers/WebGLRenderer.d.ts +2 -2
- three/src/renderers/shaders/ShaderChunk.d.ts +0 -1
- three/src/renderers/webgl/WebGLAttributes.d.ts +1 -2
- three/src/renderers/webgl/WebGLBindingStates.d.ts +1 -8
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +6 -3
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -6
- three/src/renderers/webgl/WebGLExtensions.d.ts +1 -3
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +7 -1
- three/src/renderers/webgl/WebGLLights.d.ts +1 -2
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -9
- three/src/renderers/webgl/WebGLState.d.ts +1 -3
- three/src/renderers/webgl/WebGLUtils.d.ts +0 -2
- three/src/scenes/Scene.d.ts +6 -0
- three/src/textures/Data3DTexture.d.ts +0 -1
- three/src/textures/DataArrayTexture.d.ts +0 -1
- three/src/textures/DepthTexture.d.ts +0 -3
- three/src/textures/Texture.d.ts +13 -7
- three/src/textures/types.d.ts +4 -4
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +0 -12
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +0 -3
- three/src/renderers/WebGL1Renderer.d.ts +0 -6
|
@@ -24,9 +24,19 @@ export const sheenRoughness: ShaderNodeObject<PropertyNode>;
|
|
|
24
24
|
export const iridescence: ShaderNodeObject<PropertyNode>;
|
|
25
25
|
export const iridescenceIOR: ShaderNodeObject<PropertyNode>;
|
|
26
26
|
export const iridescenceThickness: ShaderNodeObject<PropertyNode>;
|
|
27
|
+
export const alphaT: ShaderNodeObject<PropertyNode>;
|
|
28
|
+
export const anisotropy: ShaderNodeObject<PropertyNode>;
|
|
29
|
+
export const anisotropyT: ShaderNodeObject<PropertyNode>;
|
|
30
|
+
export const anisotropyB: ShaderNodeObject<PropertyNode>;
|
|
27
31
|
export const specularColor: ShaderNodeObject<PropertyNode>;
|
|
32
|
+
export const specularF90: ShaderNodeObject<PropertyNode>;
|
|
28
33
|
export const shininess: ShaderNodeObject<PropertyNode>;
|
|
29
34
|
export const output: ShaderNodeObject<PropertyNode>;
|
|
30
35
|
export const dashSize: ShaderNodeObject<PropertyNode>;
|
|
31
36
|
export const gapSize: ShaderNodeObject<PropertyNode>;
|
|
32
37
|
export const pointWidth: ShaderNodeObject<PropertyNode>;
|
|
38
|
+
export const ior: ShaderNodeObject<PropertyNode>;
|
|
39
|
+
export const transmission: ShaderNodeObject<PropertyNode>;
|
|
40
|
+
export const thickness: ShaderNodeObject<PropertyNode>;
|
|
41
|
+
export const attenuationDistance: ShaderNodeObject<PropertyNode>;
|
|
42
|
+
export const attenuationColor: ShaderNodeObject<PropertyNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ToneMapping } from "three";
|
|
2
|
+
import RendererReferenceNode from "../accessors/RendererReferenceNode.js";
|
|
2
3
|
import Node from "../core/Node.js";
|
|
3
4
|
import TempNode from "../core/TempNode.js";
|
|
4
5
|
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
@@ -19,3 +20,14 @@ export const toneMapping: (
|
|
|
19
20
|
exposure: NodeRepresentation,
|
|
20
21
|
color?: NodeRepresentation,
|
|
21
22
|
) => ShaderNodeObject<ToneMappingNode>;
|
|
23
|
+
export const toneMappingExposure: ShaderNodeObject<RendererReferenceNode>;
|
|
24
|
+
|
|
25
|
+
declare module "../shadernode/ShaderNode.js" {
|
|
26
|
+
interface NodeElements {
|
|
27
|
+
toneMapping: (
|
|
28
|
+
color: NodeRepresentation,
|
|
29
|
+
mapping?: NodeRepresentation,
|
|
30
|
+
exposure?: NodeRepresentation,
|
|
31
|
+
) => ShaderNodeObject<ToneMappingNode>;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
+
import NodeBuilder from "../core/NodeBuilder.js";
|
|
2
3
|
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
4
|
|
|
4
5
|
export default class FogNode extends Node {
|
|
5
6
|
isFogNode: true;
|
|
6
|
-
colorNode: Node;
|
|
7
|
-
factorNode: Node;
|
|
7
|
+
colorNode: Node | null;
|
|
8
|
+
factorNode: Node | null;
|
|
8
9
|
|
|
9
|
-
constructor(colorNode: Node, factorNode: Node);
|
|
10
|
-
|
|
10
|
+
constructor(colorNode: Node | null, factorNode: Node | null);
|
|
11
|
+
|
|
12
|
+
getViewZNode(builder: NodeBuilder): Node;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
export const fog: (
|
|
15
|
+
export const fog: (
|
|
16
|
+
colorNode: NodeRepresentation | null,
|
|
17
|
+
factorNode: NodeRepresentation | null,
|
|
18
|
+
) => ShaderNodeObject<FogNode>;
|
|
14
19
|
|
|
15
20
|
declare module "../shadernode/ShaderNode.js" {
|
|
16
21
|
interface NodeElements {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
3
|
import FogNode from "./FogNode.js";
|
|
4
4
|
|
|
5
5
|
export default class FogRangeNode extends FogNode {
|
|
6
6
|
isFogRangeNode: true;
|
|
7
|
-
nearNode: Node;
|
|
8
|
-
farNode: Node;
|
|
7
|
+
nearNode: Node | null;
|
|
8
|
+
farNode: Node | null;
|
|
9
9
|
|
|
10
|
-
constructor(colorNode: Node, nearNode: Node, farNode: Node);
|
|
10
|
+
constructor(colorNode: Node | null, nearNode: Node | null, farNode: Node | null);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const rangeFog: (
|
|
13
|
+
export const rangeFog: (
|
|
14
|
+
colorNode: NodeRepresentation | null,
|
|
15
|
+
nearNode: NodeRepresentation | null,
|
|
16
|
+
farNode: NodeRepresentation | null,
|
|
17
|
+
) => ShaderNodeObject<FogRangeNode>;
|
|
14
18
|
|
|
15
19
|
declare module "../shadernode/ShaderNode.js" {
|
|
16
20
|
interface NodeElements {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Node from "../../core/Node.js";
|
|
2
|
+
import OperatorNode from "../../math/OperatorNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
4
|
+
|
|
5
|
+
// https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf
|
|
6
|
+
declare const D_GGX_Anisotropic: (
|
|
7
|
+
args: { alphaT: Node; alphaB: Node; dotNH: Node; dotTH: Node; dotBH: Node },
|
|
8
|
+
) => ShaderNodeObject<OperatorNode>;
|
|
9
|
+
|
|
10
|
+
export default D_GGX_Anisotropic;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import Node from "../../core/Node.js";
|
|
2
|
-
import
|
|
2
|
+
import OperatorNode from "../../math/OperatorNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
3
4
|
|
|
4
|
-
declare const V_GGX_SmithCorrelated:
|
|
5
|
+
declare const V_GGX_SmithCorrelated: (inputs: {
|
|
6
|
+
alpha: Node;
|
|
7
|
+
dotNL: Node;
|
|
8
|
+
dotNV: Node;
|
|
9
|
+
}) => ShaderNodeObject<OperatorNode>;
|
|
5
10
|
|
|
6
11
|
export default V_GGX_SmithCorrelated;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Node from "../../core/Node.js";
|
|
2
|
+
import MathNode from "../../math/MathNode";
|
|
3
|
+
import { ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
4
|
+
|
|
5
|
+
declare const V_GGX_SmithCorrelated: (inputs: {
|
|
6
|
+
alphaT: Node;
|
|
7
|
+
alphaB: Node;
|
|
8
|
+
dotTV: Node;
|
|
9
|
+
dotBV: Node;
|
|
10
|
+
dotTL: Node;
|
|
11
|
+
dotBL: Node;
|
|
12
|
+
dotNV: Node;
|
|
13
|
+
dotNL: Node;
|
|
14
|
+
}) => ShaderNodeObject<MathNode>;
|
|
15
|
+
|
|
16
|
+
export default V_GGX_SmithCorrelated;
|
|
@@ -5,6 +5,8 @@ export default class PhysicalLightingModel extends LightingModel {
|
|
|
5
5
|
clearcoat: boolean;
|
|
6
6
|
sheen: boolean;
|
|
7
7
|
iridescence: boolean;
|
|
8
|
+
anisotropy: boolean;
|
|
9
|
+
transmission: boolean;
|
|
8
10
|
|
|
9
11
|
clearcoatRadiance: Node | null;
|
|
10
12
|
clearcoatSpecularDirect: Node | null;
|
|
@@ -14,7 +16,13 @@ export default class PhysicalLightingModel extends LightingModel {
|
|
|
14
16
|
iridescenceFresnel: Node | null;
|
|
15
17
|
iridescenceF0: Node | null;
|
|
16
18
|
|
|
17
|
-
constructor(
|
|
19
|
+
constructor(
|
|
20
|
+
clearcoat?: boolean,
|
|
21
|
+
sheen?: boolean,
|
|
22
|
+
iridescence?: boolean,
|
|
23
|
+
anisotropy?: boolean,
|
|
24
|
+
transmission?: boolean,
|
|
25
|
+
);
|
|
18
26
|
|
|
19
|
-
computeMultiscattering(singleScatter: Node, multiScatter: Node, specularF90
|
|
27
|
+
computeMultiscattering(singleScatter: Node, multiScatter: Node, specularF90: Node): void;
|
|
20
28
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import LightingModel from "../core/LightingModel.js";
|
|
2
|
+
import VarNode from "../core/VarNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
|
+
|
|
5
|
+
export default class ShadowMaskModel extends LightingModel {
|
|
6
|
+
shadowNode: ShaderNodeObject<VarNode>;
|
|
7
|
+
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import MathNode from "../../math/MathNode.js";
|
|
2
|
+
import { ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
2
3
|
|
|
3
|
-
declare const getGeometryRoughness:
|
|
4
|
+
declare const getGeometryRoughness: () => ShaderNodeObject<MathNode>;
|
|
4
5
|
|
|
5
6
|
export default getGeometryRoughness;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Node from "../../core/Node.js";
|
|
2
|
-
import
|
|
2
|
+
import MathNode from "../../math/MathNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
3
4
|
|
|
4
|
-
declare const getRoughness:
|
|
5
|
+
declare const getRoughness: (args: { roughness: Node }) => ShaderNodeObject<MathNode>;
|
|
5
6
|
|
|
6
7
|
export default getRoughness;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Light } from "three";
|
|
2
|
-
import Node from "../core/Node.js";
|
|
3
2
|
import LightingNode from "./LightingNode.js";
|
|
4
3
|
|
|
5
4
|
export default class AnalyticLightNode<T extends Light> extends LightingNode {
|
|
6
5
|
light: T | null;
|
|
7
|
-
colorNode: Node;
|
|
8
6
|
|
|
9
7
|
constructor(light?: T | null);
|
|
10
8
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import
|
|
2
|
+
import CondNode from "../math/CondNode.js";
|
|
3
|
+
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
4
|
|
|
4
|
-
export const getDistanceAttenuation:
|
|
5
|
+
export const getDistanceAttenuation: (args: {
|
|
6
|
+
lightDistance: Node;
|
|
7
|
+
cutoffDistance: Node;
|
|
8
|
+
decayExponent: Node;
|
|
9
|
+
}) => ShaderNodeObject<CondNode>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { default as LineBasicNodeMaterial } from "./LineBasicNodeMaterial.js";
|
|
2
2
|
export { default as MeshBasicNodeMaterial } from "./MeshBasicNodeMaterial.js";
|
|
3
|
+
export { default as MeshNormalNodeMaterial } from "./MeshNormalNodeMaterial.js";
|
|
3
4
|
export { default as MeshPhongNodeMaterial } from "./MeshPhongNodeMaterial.js";
|
|
4
5
|
export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.js";
|
|
5
6
|
export { default as MeshSSSPhysicalNodeMaterial } from "./MeshSSSNodeMaterial.js";
|
|
6
7
|
export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js";
|
|
7
8
|
export { default as NodeMaterial } from "./NodeMaterial.js";
|
|
8
9
|
export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js";
|
|
10
|
+
export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js";
|
|
9
11
|
export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MeshNormalMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three";
|
|
2
|
+
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
3
|
+
|
|
4
|
+
export interface MeshBasicNodeMaterialParameters extends NodeMaterialParameters, MeshNormalMaterialParameters {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default class MeshNormalNodeMaterial extends NodeMaterial {
|
|
8
|
+
readonly isMeshNormalNodeMaterial: true;
|
|
9
|
+
|
|
10
|
+
// Properties from MeshNormalMaterial
|
|
11
|
+
readonly isMeshNormalMaterial: true;
|
|
12
|
+
bumpMap: Texture | null;
|
|
13
|
+
bumpScale: number;
|
|
14
|
+
normalMap: Texture | null;
|
|
15
|
+
normalMapType: NormalMapTypes;
|
|
16
|
+
normalScale: Vector2;
|
|
17
|
+
displacementMap: Texture | null;
|
|
18
|
+
displacementScale: number;
|
|
19
|
+
displacementBias: number;
|
|
20
|
+
flatShading: boolean;
|
|
21
|
+
|
|
22
|
+
constructor(parameters?: MeshBasicNodeMaterialParameters);
|
|
23
|
+
}
|
|
@@ -23,7 +23,7 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
23
23
|
iridescenceIORNode: ShaderNodeObject<Node> | null;
|
|
24
24
|
iridescenceThicknessNode: ShaderNodeObject<Node> | null;
|
|
25
25
|
|
|
26
|
-
iorNode
|
|
26
|
+
iorNode: ShaderNodeObject<Node> | null;
|
|
27
27
|
|
|
28
28
|
specularIntensityNode: ShaderNodeObject<Node> | null;
|
|
29
29
|
specularColorNode: ShaderNodeObject<Node> | null;
|
|
@@ -33,39 +33,49 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
33
33
|
attenuationDistanceNode: ShaderNodeObject<Node> | null;
|
|
34
34
|
attenuationColorNode: ShaderNodeObject<Node> | null;
|
|
35
35
|
|
|
36
|
+
anisotropyNode: ShaderNodeObject<Node> | null;
|
|
37
|
+
|
|
36
38
|
// Properties from MeshPhysicalMaterial
|
|
37
39
|
readonly isMeshPhysicalMaterial: true;
|
|
38
|
-
|
|
40
|
+
anisotropyRotation: number;
|
|
41
|
+
anisotropyMap: Texture | null;
|
|
39
42
|
clearcoatMap: Texture | null;
|
|
40
43
|
clearcoatRoughness: number;
|
|
41
44
|
clearcoatRoughnessMap: Texture | null;
|
|
42
45
|
clearcoatNormalScale: Vector2;
|
|
43
46
|
clearcoatNormalMap: Texture | null;
|
|
44
|
-
reflectivity: number;
|
|
45
47
|
ior: number;
|
|
46
|
-
|
|
48
|
+
get reflectivity(): number;
|
|
49
|
+
set reflectivity(reflectivity: number);
|
|
50
|
+
iridescenceMap: Texture | null;
|
|
51
|
+
iridescenceIOR: number;
|
|
52
|
+
iridescenceThicknessRange: [number, number];
|
|
53
|
+
iridescenceThicknessMap: Texture | null;
|
|
47
54
|
sheenColor: Color;
|
|
48
55
|
sheenColorMap: Texture | null;
|
|
49
56
|
sheenRoughness: number;
|
|
50
57
|
sheenRoughnessMap: Texture | null;
|
|
51
|
-
transmission: number;
|
|
52
58
|
transmissionMap: Texture | null;
|
|
53
59
|
thickness: number;
|
|
54
60
|
thicknessMap: Texture | null;
|
|
55
61
|
attenuationDistance: number;
|
|
56
62
|
attenuationColor: Color;
|
|
57
63
|
specularIntensity: number;
|
|
58
|
-
specularColor: Color;
|
|
59
64
|
specularIntensityMap: Texture | null;
|
|
65
|
+
specularColor: Color;
|
|
60
66
|
specularColorMap: Texture | null;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
get anisotropy(): number;
|
|
68
|
+
set anisotropy(value: number);
|
|
69
|
+
get clearcoat(): number;
|
|
70
|
+
set clearcoat(value: number);
|
|
71
|
+
get iridescence(): number;
|
|
72
|
+
set iridescence(value: number);
|
|
73
|
+
get dispersion(): number;
|
|
74
|
+
set dispersion(value: number);
|
|
75
|
+
get sheen(): number;
|
|
76
|
+
set sheen(value: number);
|
|
77
|
+
get transmission(): number;
|
|
78
|
+
set transmission(value: number);
|
|
69
79
|
|
|
70
80
|
constructor(parameters?: MeshPhysicalNodeMaterialParameters);
|
|
71
81
|
}
|
|
@@ -2,12 +2,14 @@ import {
|
|
|
2
2
|
LineBasicMaterial,
|
|
3
3
|
Material,
|
|
4
4
|
MeshBasicMaterial,
|
|
5
|
+
MeshNormalMaterial,
|
|
5
6
|
MeshPhongMaterial,
|
|
6
7
|
MeshPhysicalMaterial,
|
|
7
8
|
MeshStandardMaterial,
|
|
8
9
|
PointsMaterial,
|
|
9
10
|
ShaderMaterial,
|
|
10
11
|
ShaderMaterialParameters,
|
|
12
|
+
ShadowMaterial,
|
|
11
13
|
SpriteMaterial,
|
|
12
14
|
} from "three";
|
|
13
15
|
import ClippingNode from "../accessors/ClippingNode.js";
|
|
@@ -18,10 +20,12 @@ import LightsNode from "../lighting/LightsNode.js";
|
|
|
18
20
|
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
19
21
|
import LineBasicNodeMaterial from "./LineBasicNodeMaterial.js";
|
|
20
22
|
import MeshBasicNodeMaterial from "./MeshBasicNodeMaterial.js";
|
|
23
|
+
import MeshNormalNodeMaterial from "./MeshNormalNodeMaterial.js";
|
|
21
24
|
import MeshPhongNodeMaterial from "./MeshPhongNodeMaterial.js";
|
|
22
25
|
import MeshPhysicalNodeMaterial from "./MeshPhysicalNodeMaterial.js";
|
|
23
26
|
import MeshStandardNodeMaterial from "./MeshStandardNodeMaterial.js";
|
|
24
27
|
import PointsNodeMaterial from "./PointsNodeMaterial.js";
|
|
28
|
+
import ShadowNodeMaterial from "./ShadowNodeMaterial.js";
|
|
25
29
|
import SpriteNodeMaterial from "./SpriteNodeMaterial.js";
|
|
26
30
|
|
|
27
31
|
export interface NodeMaterialParameters extends ShaderMaterialParameters {
|
|
@@ -31,6 +35,7 @@ export interface NodeMaterialParameters extends ShaderMaterialParameters {
|
|
|
31
35
|
|
|
32
36
|
lightsNode?: ShaderNodeObject<LightsNode> | null | undefined;
|
|
33
37
|
envNode?: ShaderNodeObject<Node> | null | undefined;
|
|
38
|
+
aoNode?: ShaderNodeObject<Node> | null | undefined;
|
|
34
39
|
|
|
35
40
|
colorNode?: ShaderNodeObject<Node> | null | undefined;
|
|
36
41
|
normalNode?: ShaderNodeObject<Node> | null | undefined;
|
|
@@ -55,10 +60,9 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
55
60
|
|
|
56
61
|
normals: boolean;
|
|
57
62
|
|
|
58
|
-
colorSpaced: boolean;
|
|
59
|
-
|
|
60
63
|
lightsNode: ShaderNodeObject<LightsNode> | null;
|
|
61
64
|
envNode: ShaderNodeObject<Node> | null;
|
|
65
|
+
aoNode: ShaderNodeObject<Node> | null;
|
|
62
66
|
|
|
63
67
|
colorNode: ShaderNodeObject<Node> | null;
|
|
64
68
|
normalNode: ShaderNodeObject<Node> | null;
|
|
@@ -71,6 +75,7 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
71
75
|
|
|
72
76
|
depthNode: ShaderNodeObject<Node> | null;
|
|
73
77
|
shadowNode: ShaderNodeObject<Node> | null;
|
|
78
|
+
shadowPositionNode: ShaderNodeObject<Node> | null;
|
|
74
79
|
|
|
75
80
|
outputNode: ShaderNodeObject<Node> | null;
|
|
76
81
|
|
|
@@ -97,10 +102,12 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
97
102
|
|
|
98
103
|
static fromMaterial(material: LineBasicMaterial): LineBasicNodeMaterial;
|
|
99
104
|
static fromMaterial(material: MeshBasicMaterial): MeshBasicNodeMaterial;
|
|
105
|
+
static fromMaterial(material: MeshNormalMaterial): MeshNormalNodeMaterial;
|
|
100
106
|
static fromMaterial(material: MeshPhongMaterial): MeshPhongNodeMaterial;
|
|
101
107
|
static fromMaterial(material: MeshPhysicalMaterial): MeshPhysicalNodeMaterial;
|
|
102
108
|
static fromMaterial(material: MeshStandardMaterial): MeshStandardNodeMaterial;
|
|
103
109
|
static fromMaterial(material: PointsMaterial): PointsNodeMaterial;
|
|
110
|
+
static fromMaterial(material: ShadowMaterial): ShadowNodeMaterial;
|
|
104
111
|
static fromMaterial(material: SpriteMaterial): SpriteNodeMaterial;
|
|
105
112
|
static fromMaterial(material: NodeMaterial): NodeMaterial;
|
|
106
113
|
static fromMaterial(material: Material): NodeMaterial;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Color, ShadowMaterialParameters } from "three";
|
|
2
|
+
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
3
|
+
|
|
4
|
+
export interface ShadowNodeMaterialParameters extends NodeMaterialParameters, ShadowMaterialParameters {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default class ShadowNodeMaterial extends NodeMaterial {
|
|
8
|
+
readonly isShadowNodeMaterial: true;
|
|
9
|
+
|
|
10
|
+
// Properties from ShadowMaterial
|
|
11
|
+
readonly isShadowMaterial: true;
|
|
12
|
+
color: Color;
|
|
13
|
+
|
|
14
|
+
constructor(parameters?: ShadowNodeMaterialParameters);
|
|
15
|
+
}
|
|
@@ -2,102 +2,106 @@ import Node from "../core/Node.js";
|
|
|
2
2
|
import MathNode from "../math/MathNode.js";
|
|
3
3
|
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
4
|
import { mx_hsvtorgb, mx_rgbtohsv } from "./lib/mx_hsv.js";
|
|
5
|
+
import { mx_srgb_texture_to_lin_rec709 } from "./lib/mx_transform_color.js";
|
|
5
6
|
|
|
6
|
-
export function mx_aastep(threshold
|
|
7
|
+
export function mx_aastep(threshold: NodeRepresentation, value: NodeRepresentation): ShaderNodeObject<MathNode>;
|
|
7
8
|
|
|
8
9
|
export function mx_ramplr(
|
|
9
|
-
valuel
|
|
10
|
-
valuer
|
|
11
|
-
texcoord?:
|
|
10
|
+
valuel: NodeRepresentation,
|
|
11
|
+
valuer: NodeRepresentation,
|
|
12
|
+
texcoord?: NodeRepresentation,
|
|
12
13
|
): ShaderNodeObject<MathNode>;
|
|
13
14
|
export function mx_ramptb(
|
|
14
|
-
valuet
|
|
15
|
-
valueb
|
|
16
|
-
texcoord?:
|
|
15
|
+
valuet: NodeRepresentation,
|
|
16
|
+
valueb: NodeRepresentation,
|
|
17
|
+
texcoord?: NodeRepresentation,
|
|
17
18
|
): ShaderNodeObject<MathNode>;
|
|
18
19
|
|
|
19
20
|
export function mx_splitlr(
|
|
20
|
-
valuel
|
|
21
|
-
valuer
|
|
22
|
-
center
|
|
23
|
-
texcoord?:
|
|
21
|
+
valuel: NodeRepresentation,
|
|
22
|
+
valuer: NodeRepresentation,
|
|
23
|
+
center: NodeRepresentation,
|
|
24
|
+
texcoord?: NodeRepresentation,
|
|
24
25
|
): ShaderNodeObject<MathNode>;
|
|
25
26
|
export function mx_splittb(
|
|
26
|
-
valuet
|
|
27
|
-
valueb
|
|
28
|
-
center
|
|
29
|
-
texcoord?:
|
|
27
|
+
valuet: NodeRepresentation,
|
|
28
|
+
valueb: NodeRepresentation,
|
|
29
|
+
center: NodeRepresentation,
|
|
30
|
+
texcoord?: NodeRepresentation,
|
|
30
31
|
): ShaderNodeObject<MathNode>;
|
|
31
32
|
|
|
32
33
|
export function mx_transform_uv(
|
|
33
34
|
uv_scale?: NodeRepresentation,
|
|
34
35
|
uv_offset?: NodeRepresentation,
|
|
35
|
-
uv_geo?:
|
|
36
|
+
uv_geo?: NodeRepresentation,
|
|
36
37
|
): ShaderNodeObject<Node>;
|
|
37
38
|
|
|
38
|
-
export function
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
export function mx_safepower(in1: NodeRepresentation, in2?: NodeRepresentation): ShaderNodeObject<Node>;
|
|
40
|
+
|
|
41
|
+
export function mx_contrast(
|
|
42
|
+
input: NodeRepresentation,
|
|
43
|
+
amount?: NodeRepresentation,
|
|
41
44
|
pivot?: NodeRepresentation,
|
|
42
45
|
): ShaderNodeObject<Node>;
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
|
|
47
|
+
export function mx_noise_float(
|
|
48
|
+
texcoord?: NodeRepresentation,
|
|
45
49
|
amplitude?: NodeRepresentation,
|
|
46
50
|
pivot?: NodeRepresentation,
|
|
47
51
|
): ShaderNodeObject<Node>;
|
|
48
52
|
export function mx_noise_vec3(
|
|
49
|
-
texcoord?:
|
|
53
|
+
texcoord?: NodeRepresentation,
|
|
50
54
|
amplitude?: NodeRepresentation,
|
|
51
55
|
pivot?: NodeRepresentation,
|
|
52
56
|
): ShaderNodeObject<Node>;
|
|
53
57
|
export function mx_noise_vec4(
|
|
54
|
-
texcoord?:
|
|
58
|
+
texcoord?: NodeRepresentation,
|
|
55
59
|
amplitude?: NodeRepresentation,
|
|
56
60
|
pivot?: NodeRepresentation,
|
|
57
61
|
): ShaderNodeObject<Node>;
|
|
58
62
|
|
|
59
63
|
export function mx_worley_noise_float(
|
|
60
|
-
texcoord?:
|
|
64
|
+
texcoord?: NodeRepresentation,
|
|
61
65
|
jitter?: NodeRepresentation,
|
|
62
66
|
): ShaderNodeObject<Node>;
|
|
63
67
|
export function mx_worley_noise_vec2(
|
|
64
|
-
texcoord?:
|
|
68
|
+
texcoord?: NodeRepresentation,
|
|
65
69
|
jitter?: NodeRepresentation,
|
|
66
70
|
): ShaderNodeObject<Node>;
|
|
67
71
|
export function mx_worley_noise_vec3(
|
|
68
|
-
texcoord?:
|
|
72
|
+
texcoord?: NodeRepresentation,
|
|
69
73
|
jitter?: NodeRepresentation,
|
|
70
74
|
): ShaderNodeObject<Node>;
|
|
71
75
|
|
|
72
|
-
export function mx_cell_noise_float(texcoord?:
|
|
76
|
+
export function mx_cell_noise_float(texcoord?: NodeRepresentation): ShaderNodeObject<Node>;
|
|
73
77
|
|
|
74
78
|
export function mx_fractal_noise_float(
|
|
75
|
-
position?:
|
|
79
|
+
position?: NodeRepresentation,
|
|
76
80
|
octaves?: NodeRepresentation,
|
|
77
81
|
lacunarity?: NodeRepresentation,
|
|
78
82
|
diminish?: NodeRepresentation,
|
|
79
83
|
amplitude?: NodeRepresentation,
|
|
80
84
|
): ShaderNodeObject<Node>;
|
|
81
85
|
export function mx_fractal_noise_vec2(
|
|
82
|
-
position?:
|
|
86
|
+
position?: NodeRepresentation,
|
|
83
87
|
octaves?: NodeRepresentation,
|
|
84
88
|
lacunarity?: NodeRepresentation,
|
|
85
89
|
diminish?: NodeRepresentation,
|
|
86
90
|
amplitude?: NodeRepresentation,
|
|
87
91
|
): ShaderNodeObject<Node>;
|
|
88
92
|
export function mx_fractal_noise_vec3(
|
|
89
|
-
position?:
|
|
93
|
+
position?: NodeRepresentation,
|
|
90
94
|
octaves?: NodeRepresentation,
|
|
91
95
|
lacunarity?: NodeRepresentation,
|
|
92
96
|
diminish?: NodeRepresentation,
|
|
93
97
|
amplitude?: NodeRepresentation,
|
|
94
98
|
): ShaderNodeObject<Node>;
|
|
95
99
|
export function mx_fractal_noise_vec4(
|
|
96
|
-
position?:
|
|
100
|
+
position?: NodeRepresentation,
|
|
97
101
|
octaves?: NodeRepresentation,
|
|
98
102
|
lacunarity?: NodeRepresentation,
|
|
99
103
|
diminish?: NodeRepresentation,
|
|
100
104
|
amplitude?: NodeRepresentation,
|
|
101
105
|
): ShaderNodeObject<Node>;
|
|
102
106
|
|
|
103
|
-
export { mx_hsvtorgb, mx_rgbtohsv };
|
|
107
|
+
export { mx_hsvtorgb, mx_rgbtohsv, mx_srgb_texture_to_lin_rec709 };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Fn } from "../../code/FunctionNode.js";
|
|
2
1
|
import Node from "../../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../../shadernode/ShaderNode.js";
|
|
4
3
|
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export const mx_hsvtorgb: (hsv_immutable: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
5
|
+
export const mx_rgbtohsv: (c_immutable: NodeRepresentation) => ShaderNodeObject<Node>;
|