@types/three 0.177.0 → 0.178.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/capabilities/WebGL.d.ts +0 -11
- three/examples/jsm/controls/TransformControls.d.ts +16 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +2 -2
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/transpiler/AST.d.ts +77 -26
- three/examples/jsm/transpiler/TSLEncoder.d.ts +9 -3
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +4 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -2
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +20 -0
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +4 -4
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +6 -6
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/FilmNode.d.ts +4 -4
- three/examples/jsm/tsl/display/GTAONode.d.ts +3 -3
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +5 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +8 -8
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +4 -4
- three/examples/jsm/tsl/display/MotionBlur.d.ts +4 -4
- three/examples/jsm/tsl/display/OutlineNode.d.ts +3 -3
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +3 -3
- three/examples/jsm/tsl/display/SMAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/SSRNode.d.ts +5 -5
- three/examples/jsm/tsl/display/Sepia.d.ts +2 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +3 -3
- three/examples/jsm/tsl/display/TransitionNode.d.ts +4 -4
- three/examples/jsm/tsl/display/hashBlur.d.ts +5 -5
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
- three/package.json +2 -2
- three/src/Three.TSL.d.ts +9 -16
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/constants.d.ts +13 -5
- three/src/core/BufferGeometry.d.ts +6 -1
- three/src/core/GLBufferAttribute.d.ts +18 -1
- three/src/helpers/AxesHelper.d.ts +3 -1
- three/src/materials/LineBasicMaterial.d.ts +66 -34
- three/src/materials/LineDashedMaterial.d.ts +41 -21
- three/src/materials/Material.d.ts +408 -398
- three/src/materials/MeshBasicMaterial.d.ts +101 -62
- three/src/materials/MeshDepthMaterial.d.ts +71 -32
- three/src/materials/MeshDistanceMaterial.d.ts +65 -29
- three/src/materials/MeshLambertMaterial.d.ts +179 -103
- three/src/materials/MeshMatcapMaterial.d.ts +97 -55
- three/src/materials/MeshNormalMaterial.d.ts +76 -41
- three/src/materials/MeshPhongMaterial.d.ts +164 -100
- three/src/materials/MeshPhysicalMaterial.d.ts +164 -116
- three/src/materials/MeshStandardMaterial.d.ts +178 -91
- three/src/materials/MeshToonMaterial.d.ts +130 -81
- three/src/materials/PointsMaterial.d.ts +77 -30
- three/src/materials/RawShaderMaterial.d.ts +12 -7
- three/src/materials/ShaderMaterial.d.ts +186 -98
- three/src/materials/ShadowMaterial.d.ts +49 -23
- three/src/materials/SpriteMaterial.d.ts +62 -33
- three/src/materials/nodes/Line2NodeMaterial.d.ts +87 -40
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +35 -16
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +75 -20
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +49 -30
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -42
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +38 -26
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +36 -22
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +68 -48
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +240 -65
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +99 -3
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +83 -47
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +42 -36
- three/src/materials/nodes/NodeMaterial.d.ts +417 -56
- three/src/materials/nodes/NodeMaterials.d.ts +3 -2
- three/src/materials/nodes/PointsNodeMaterial.d.ts +31 -7
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +38 -11
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +68 -20
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
- three/src/math/Color.d.ts +1 -1
- three/src/nodes/Nodes.d.ts +1 -3
- three/src/nodes/TSL.d.ts +4 -3
- three/src/nodes/accessors/AccessorsUtils.d.ts +3 -3
- three/src/nodes/accessors/Bitangent.d.ts +0 -2
- three/src/nodes/accessors/CubeTextureNode.d.ts +7 -7
- three/src/nodes/accessors/Normal.d.ts +19 -5
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +1 -1
- three/src/nodes/accessors/StorageBufferNode.d.ts +3 -2
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -5
- three/src/nodes/accessors/Tangent.d.ts +0 -2
- three/src/nodes/accessors/TangentUtils.d.ts +22 -0
- three/src/nodes/accessors/Texture3DNode.d.ts +5 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +4 -2
- three/src/nodes/accessors/TextureNode.d.ts +16 -16
- three/src/nodes/accessors/TextureSizeNode.d.ts +3 -3
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -7
- three/src/nodes/code/FunctionCallNode.d.ts +3 -1
- three/src/nodes/code/FunctionNode.d.ts +2 -2
- three/src/nodes/code/ScriptableNode.d.ts +2 -2
- three/src/nodes/core/AssignNode.d.ts +2 -2
- three/src/nodes/core/AttributeNode.d.ts +1 -1
- three/src/nodes/core/BypassNode.d.ts +2 -2
- three/src/nodes/core/CacheNode.d.ts +0 -2
- three/src/nodes/core/ContextNode.d.ts +3 -3
- three/src/nodes/core/StackNode.d.ts +3 -13
- three/src/nodes/core/SubBuildNode.d.ts +15 -0
- three/src/nodes/core/VarNode.d.ts +4 -4
- three/src/nodes/core/VaryingNode.d.ts +3 -3
- three/src/nodes/display/BlendModes.d.ts +12 -12
- three/src/nodes/display/BumpMapNode.d.ts +4 -3
- three/src/nodes/display/ColorAdjustment.d.ts +17 -17
- three/src/nodes/display/ColorSpaceFunctions.d.ts +3 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +4 -4
- three/src/nodes/display/FrontFacingNode.d.ts +1 -0
- three/src/nodes/display/PosterizeNode.d.ts +3 -3
- three/src/nodes/display/RenderOutputNode.d.ts +2 -2
- three/src/nodes/display/ScreenNode.d.ts +0 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +7 -7
- three/src/nodes/display/ToneMappingNode.d.ts +6 -6
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -3
- three/src/nodes/fog/Fog.d.ts +10 -10
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +4 -4
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +2 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +4 -4
- three/src/nodes/geometry/RangeNode.d.ts +9 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +20 -20
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
- three/src/nodes/lighting/PointShadowNode.d.ts +11 -11
- three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
- three/src/nodes/materialx/MaterialXNodes.d.ts +59 -59
- three/src/nodes/materialx/lib/mx_hsv.d.ts +3 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +206 -206
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +2 -2
- three/src/nodes/math/ConditionalNode.d.ts +4 -19
- three/src/nodes/math/Hash.d.ts +2 -2
- three/src/nodes/math/MathNode.d.ts +21 -17
- three/src/nodes/math/OperatorNode.d.ts +41 -52
- three/src/nodes/math/TriNoise3D.d.ts +6 -6
- three/src/nodes/pmrem/PMREMNode.d.ts +3 -3
- three/src/nodes/pmrem/PMREMUtils.d.ts +20 -20
- three/src/nodes/procedural/Checker.d.ts +2 -2
- three/src/nodes/shapes/Shapes.d.ts +2 -2
- three/src/nodes/tsl/TSLBase.d.ts +1 -0
- three/src/nodes/tsl/TSLCore.d.ts +176 -76
- three/src/nodes/utils/CubeMapNode.d.ts +2 -2
- three/src/nodes/utils/DebugNode.d.ts +2 -2
- three/src/nodes/utils/Discard.d.ts +2 -2
- three/src/nodes/utils/EquirectUV.d.ts +4 -0
- three/src/nodes/utils/LoopNode.d.ts +2 -7
- three/src/nodes/utils/MatcapUV.d.ts +4 -0
- three/src/nodes/utils/Oscillators.d.ts +5 -5
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +9 -9
- three/src/nodes/utils/RTTNode.d.ts +3 -3
- three/src/nodes/utils/RemapNode.d.ts +9 -9
- three/src/nodes/utils/RotateNode.d.ts +3 -3
- three/src/nodes/utils/SampleNode.d.ts +16 -0
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +4 -4
- three/src/nodes/utils/SpriteUtils.d.ts +2 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +4 -3
- three/src/nodes/utils/TriplanarTextures.d.ts +20 -0
- three/src/nodes/utils/UVUtils.d.ts +8 -7
- three/src/nodes/utils/ViewportUtils.d.ts +2 -2
- three/src/objects/LOD.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +1 -1
- three/src/renderers/common/Backend.d.ts +3 -3
- three/src/renderers/common/RenderObject.d.ts +10 -2
- three/src/renderers/common/Renderer.d.ts +5 -5
- three/src/renderers/common/Storage3DTexture.d.ts +40 -0
- three/src/renderers/common/StorageArrayTexture.d.ts +29 -0
- three/src/renderers/common/Textures.d.ts +2 -2
- three/src/renderers/common/XRRenderTarget.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +4 -9
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +1 -1
- three/src/renderers/common/nodes/Nodes.d.ts +1 -1
- three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +65 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +9 -0
- three/src/nodes/utils/EquirectUVNode.d.ts +0 -8
- three/src/nodes/utils/MatcapUVNode.d.ts +0 -8
- three/src/nodes/utils/TriplanarTexturesNode.d.ts +0 -36
- three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +0 -5
|
@@ -1,16 +1,112 @@
|
|
|
1
1
|
import InputNode from "../../nodes/core/InputNode.js";
|
|
2
|
+
import { LightingModelDirectInput } from "../../nodes/core/LightingModel.js";
|
|
2
3
|
import Node from "../../nodes/core/Node.js";
|
|
3
|
-
import
|
|
4
|
+
import NodeBuilder from "../../nodes/core/NodeBuilder.js";
|
|
5
|
+
import PhysicalLightingModel from "../../nodes/functions/PhysicalLightingModel.js";
|
|
6
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
7
|
+
import { MeshPhysicalMaterialParameters, MeshPhysicalMaterialProperties } from "../MeshPhysicalMaterial.js";
|
|
8
|
+
import MeshPhysicalNodeMaterial, { MeshPhysicalNodeMaterialNodeProperties } from "./MeshPhysicalNodeMaterial.js";
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Represents the lighting model for {@link MeshSSSNodeMaterial}.
|
|
12
|
+
*/
|
|
13
|
+
declare class SSSLightingModel extends PhysicalLightingModel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a new physical lighting model.
|
|
16
|
+
*
|
|
17
|
+
* @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not.
|
|
18
|
+
* @param {boolean} [sheen=false] - Whether sheen is supported or not.
|
|
19
|
+
* @param {boolean} [iridescence=false] - Whether iridescence is supported or not.
|
|
20
|
+
* @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not.
|
|
21
|
+
* @param {boolean} [transmission=false] - Whether transmission is supported or not.
|
|
22
|
+
* @param {boolean} [dispersion=false] - Whether dispersion is supported or not.
|
|
23
|
+
* @param {boolean} [sss=false] - Whether SSS is supported or not.
|
|
24
|
+
*/
|
|
25
|
+
constructor(
|
|
26
|
+
clearcoat?: boolean,
|
|
27
|
+
sheen?: boolean,
|
|
28
|
+
iridescence?: boolean,
|
|
29
|
+
anisotropy?: boolean,
|
|
30
|
+
transmission?: boolean,
|
|
31
|
+
dispersion?: boolean,
|
|
32
|
+
sss?: boolean,
|
|
33
|
+
);
|
|
34
|
+
/**
|
|
35
|
+
* Whether the lighting model should use SSS or not.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
useSSS: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Extends the default implementation with a SSS term.
|
|
42
|
+
*
|
|
43
|
+
* Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look]{@link https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/}
|
|
44
|
+
*
|
|
45
|
+
* @param {Object} input - The input data.
|
|
46
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
47
|
+
*/
|
|
48
|
+
direct(input: LightingModelDirectInput, builder: NodeBuilder): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface MeshSSSNodeMaterialNodeProperties extends MeshPhysicalNodeMaterialNodeProperties {
|
|
52
|
+
/**
|
|
53
|
+
* Represents the thickness color.
|
|
54
|
+
*
|
|
55
|
+
* @default null
|
|
56
|
+
*/
|
|
6
57
|
thicknessColorNode: Node | null;
|
|
58
|
+
/**
|
|
59
|
+
* Represents the distortion factor.
|
|
60
|
+
*/
|
|
7
61
|
thicknessDistortionNode: InputNode<number>;
|
|
62
|
+
/**
|
|
63
|
+
* Represents the thickness ambient factor.
|
|
64
|
+
*/
|
|
8
65
|
thicknessAmbientNode: InputNode<number>;
|
|
66
|
+
/**
|
|
67
|
+
* Represents the thickness attenuation.
|
|
68
|
+
*/
|
|
9
69
|
thicknessAttenuationNode: InputNode<number>;
|
|
70
|
+
/**
|
|
71
|
+
* Represents the thickness power.
|
|
72
|
+
*/
|
|
10
73
|
thicknessPowerNode: InputNode<number>;
|
|
74
|
+
/**
|
|
75
|
+
* Represents the thickness scale.
|
|
76
|
+
*/
|
|
11
77
|
thicknessScaleNode: InputNode<number>;
|
|
78
|
+
}
|
|
12
79
|
|
|
13
|
-
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
81
|
+
export interface MeshSSSNodeMaterialParameters
|
|
82
|
+
extends
|
|
83
|
+
Partial<MapColorPropertiesToColorRepresentations<MeshSSSNodeMaterialNodeProperties>>,
|
|
84
|
+
MeshPhysicalMaterialParameters
|
|
85
|
+
{}
|
|
14
86
|
|
|
87
|
+
/**
|
|
88
|
+
* This node material is an experimental extension of {@link MeshPhysicalNodeMaterial}
|
|
89
|
+
* that implements a Subsurface scattering (SSS) term.
|
|
90
|
+
*
|
|
91
|
+
* @augments MeshPhysicalNodeMaterial
|
|
92
|
+
*/
|
|
93
|
+
declare class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
|
|
94
|
+
constructor(parameters?: MeshSSSNodeMaterialParameters);
|
|
95
|
+
/**
|
|
96
|
+
* Whether the lighting model should use SSS or not.
|
|
97
|
+
*
|
|
98
|
+
* @default true
|
|
99
|
+
*/
|
|
15
100
|
get useSSS(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Setups the lighting model.
|
|
103
|
+
*
|
|
104
|
+
* @return {SSSLightingModel} The lighting model.
|
|
105
|
+
*/
|
|
106
|
+
setupLightingModel(): SSSLightingModel;
|
|
16
107
|
}
|
|
108
|
+
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
110
|
+
interface MeshSSSNodeMaterial extends MeshSSSNodeMaterialNodeProperties, MeshPhysicalMaterialProperties {}
|
|
111
|
+
|
|
112
|
+
export default MeshSSSNodeMaterial;
|
|
@@ -1,56 +1,92 @@
|
|
|
1
|
-
import { NormalMapTypes } from "../../constants.js";
|
|
2
|
-
import { Color } from "../../math/Color.js";
|
|
3
|
-
import { Euler } from "../../math/Euler.js";
|
|
4
|
-
import { Vector2 } from "../../math/Vector2.js";
|
|
5
1
|
import Node from "../../nodes/core/Node.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
14
|
-
readonly isMeshStandardNodeMaterial: true;
|
|
2
|
+
import NodeBuilder from "../../nodes/core/NodeBuilder.js";
|
|
3
|
+
import PhysicalLightingModel from "../../nodes/functions/PhysicalLightingModel.js";
|
|
4
|
+
import EnvironmentNode from "../../nodes/lighting/EnvironmentNode.js";
|
|
5
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
6
|
+
import { MeshStandardMaterialParameters, MeshStandardMaterialProperties } from "../MeshStandardMaterial.js";
|
|
7
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
15
8
|
|
|
9
|
+
export interface MeshStandardNodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
10
|
+
/**
|
|
11
|
+
* The emissive color of standard materials is by default inferred from the `emissive`,
|
|
12
|
+
* `emissiveIntensity` and `emissiveMap` properties. This node property allows to
|
|
13
|
+
* overwrite the default and define the emissive color with a node instead.
|
|
14
|
+
*
|
|
15
|
+
* If you don't want to overwrite the emissive color but modify the existing
|
|
16
|
+
* value instead, use {@link materialEmissive}.
|
|
17
|
+
*
|
|
18
|
+
* @default null
|
|
19
|
+
*/
|
|
16
20
|
emissiveNode: Node | null;
|
|
17
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The metalness of standard materials is by default inferred from the `metalness`,
|
|
23
|
+
* and `metalnessMap` properties. This node property allows to
|
|
24
|
+
* overwrite the default and define the metalness with a node instead.
|
|
25
|
+
*
|
|
26
|
+
* If you don't want to overwrite the metalness but modify the existing
|
|
27
|
+
* value instead, use {@link materialMetalness}.
|
|
28
|
+
*
|
|
29
|
+
* @default null
|
|
30
|
+
*/
|
|
18
31
|
metalnessNode: Node | null;
|
|
32
|
+
/**
|
|
33
|
+
* The roughness of standard materials is by default inferred from the `roughness`,
|
|
34
|
+
* and `roughnessMap` properties. This node property allows to
|
|
35
|
+
* overwrite the default and define the roughness with a node instead.
|
|
36
|
+
*
|
|
37
|
+
* If you don't want to overwrite the roughness but modify the existing
|
|
38
|
+
* value instead, use {@link materialRoughness}.
|
|
39
|
+
*
|
|
40
|
+
* @default null
|
|
41
|
+
*/
|
|
19
42
|
roughnessNode: Node | null;
|
|
43
|
+
}
|
|
20
44
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
lightMap: Texture | null;
|
|
28
|
-
lightMapIntensity: number;
|
|
29
|
-
aoMap: Texture | null;
|
|
30
|
-
aoMapIntensity: number;
|
|
31
|
-
emissive: Color;
|
|
32
|
-
emissiveIntensity: number;
|
|
33
|
-
emissiveMap: Texture | null;
|
|
34
|
-
bumpMap: Texture | null;
|
|
35
|
-
bumpScale: number;
|
|
36
|
-
normalMap: Texture | null;
|
|
37
|
-
normalMapType: NormalMapTypes;
|
|
38
|
-
normalScale: Vector2;
|
|
39
|
-
displacementMap: Texture | null;
|
|
40
|
-
displacementScale: number;
|
|
41
|
-
displacementBias: number;
|
|
42
|
-
roughnessMap: Texture | null;
|
|
43
|
-
metalnessMap: Texture | null;
|
|
44
|
-
alphaMap: Texture | null;
|
|
45
|
-
envMap: Texture | null;
|
|
46
|
-
envMapRotation: Euler;
|
|
47
|
-
envMapIntensity: number;
|
|
48
|
-
wireframe: boolean;
|
|
49
|
-
wireframeLinewidth: number;
|
|
50
|
-
wireframeLinecap: string;
|
|
51
|
-
wireframeLinejoin: string;
|
|
52
|
-
flatShading: boolean;
|
|
53
|
-
fog: boolean;
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
46
|
+
export interface MeshStandardNodeMaterialParameters
|
|
47
|
+
extends
|
|
48
|
+
Partial<MapColorPropertiesToColorRepresentations<MeshStandardNodeMaterialNodeProperties>>,
|
|
49
|
+
MeshStandardMaterialParameters
|
|
50
|
+
{}
|
|
54
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Node material version of {@link MeshStandardMaterial}.
|
|
54
|
+
*/
|
|
55
|
+
declare class MeshStandardNodeMaterial extends NodeMaterial {
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a new mesh standard node material.
|
|
58
|
+
*
|
|
59
|
+
* @param {Object} [parameters] - The configuration parameter.
|
|
60
|
+
*/
|
|
55
61
|
constructor(parameters?: MeshStandardNodeMaterialParameters);
|
|
62
|
+
/**
|
|
63
|
+
* This flag can be used for type testing.
|
|
64
|
+
*
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
readonly isMeshStandardNodeMaterial: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Overwritten since this type of material uses {@link EnvironmentNode}
|
|
70
|
+
* to implement the PBR (PMREM based) environment mapping. Besides, the
|
|
71
|
+
* method honors `Scene.environment`.
|
|
72
|
+
*
|
|
73
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
74
|
+
* @return {?EnvironmentNode<vec3>} The environment node.
|
|
75
|
+
*/
|
|
76
|
+
setupEnvironment(builder: NodeBuilder): EnvironmentNode | null;
|
|
77
|
+
/**
|
|
78
|
+
* Setups the lighting model.
|
|
79
|
+
*
|
|
80
|
+
* @return {PhysicalLightingModel} The lighting model.
|
|
81
|
+
*/
|
|
82
|
+
setupLightingModel(): PhysicalLightingModel;
|
|
83
|
+
/**
|
|
84
|
+
* Setups the specular related node variables.
|
|
85
|
+
*/
|
|
86
|
+
setupSpecular(): void;
|
|
56
87
|
}
|
|
88
|
+
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
90
|
+
interface MeshStandardNodeMaterial extends MeshStandardNodeMaterialNodeProperties, MeshStandardMaterialProperties {}
|
|
91
|
+
|
|
92
|
+
export default MeshStandardNodeMaterial;
|
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { MeshToonMaterialParameters } from "../MeshToonMaterial.js";
|
|
6
|
-
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
1
|
+
import ToonLightingModel from "../../nodes/functions/ToonLightingModel.js";
|
|
2
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
3
|
+
import { MeshToonMaterialParameters, MeshToonMaterialProperties } from "../MeshToonMaterial.js";
|
|
4
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
7
|
+
export interface MeshToonNodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
gradientMap: Texture | null;
|
|
18
|
-
map: Texture | null;
|
|
19
|
-
lightMap: Texture | null;
|
|
20
|
-
lightMapIntensity: number;
|
|
21
|
-
aoMap: Texture | null;
|
|
22
|
-
aoMapIntensity: number;
|
|
23
|
-
emissive: Color;
|
|
24
|
-
emissiveIntensity: number;
|
|
25
|
-
emissiveMap: Texture | null;
|
|
26
|
-
bumpMap: Texture | null;
|
|
27
|
-
bumpScale: number;
|
|
28
|
-
normalMap: Texture | null;
|
|
29
|
-
normalMapType: NormalMapTypes;
|
|
30
|
-
normalScale: Vector2;
|
|
31
|
-
displacementMap: Texture | null;
|
|
32
|
-
displacementScale: number;
|
|
33
|
-
displacementBias: number;
|
|
34
|
-
alphaMap: Texture | null;
|
|
35
|
-
wireframe: boolean;
|
|
36
|
-
wireframeLinewidth: number;
|
|
37
|
-
wireframeLinecap: string;
|
|
38
|
-
wireframeLinejoin: string;
|
|
39
|
-
fog: boolean;
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
11
|
+
export interface MeshToonNodeMaterialParameters
|
|
12
|
+
extends
|
|
13
|
+
Partial<MapColorPropertiesToColorRepresentations<MeshToonNodeMaterialNodeProperties>>,
|
|
14
|
+
MeshToonMaterialParameters
|
|
15
|
+
{}
|
|
40
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Node material version of {@link MeshToonMaterial}.
|
|
19
|
+
*
|
|
20
|
+
* @augments NodeMaterial
|
|
21
|
+
*/
|
|
22
|
+
declare class MeshToonNodeMaterial extends NodeMaterial {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new mesh toon node material.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} [parameters] - The configuration parameter.
|
|
27
|
+
*/
|
|
41
28
|
constructor(parameters?: MeshToonNodeMaterialParameters);
|
|
29
|
+
/**
|
|
30
|
+
* This flag can be used for type testing.
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @readonly
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
readonly isMeshToonNodeMaterial: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Setups the lighting model.
|
|
39
|
+
*
|
|
40
|
+
* @return {ToonLightingModel} The lighting model.
|
|
41
|
+
*/
|
|
42
|
+
setupLightingModel(): ToonLightingModel;
|
|
42
43
|
}
|
|
44
|
+
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
46
|
+
interface MeshToonNodeMaterial extends MeshToonNodeMaterialNodeProperties, MeshToonMaterialProperties {}
|
|
47
|
+
|
|
48
|
+
export default MeshToonNodeMaterial;
|