@types/three 0.176.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/Addons.d.ts +0 -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/LDrawLoader.d.ts +8 -3
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
- three/examples/jsm/math/Octree.d.ts +3 -0
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/postprocessing/AfterimagePass.d.ts +13 -10
- three/examples/jsm/postprocessing/FXAAPass.d.ts +7 -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 +10 -4
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
- three/package.json +3 -3
- three/src/Three.Core.d.ts +0 -2
- three/src/Three.TSL.d.ts +11 -18
- three/src/Three.WebGPU.Nodes.d.ts +1 -0
- three/src/Three.WebGPU.d.ts +3 -0
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
- three/src/constants.d.ts +13 -5
- three/src/core/BufferGeometry.d.ts +11 -2
- three/src/core/GLBufferAttribute.d.ts +18 -1
- three/src/core/RenderTarget.d.ts +3 -20
- three/src/extras/DataUtils.d.ts +4 -4
- three/src/geometries/CapsuleGeometry.d.ts +1 -0
- three/src/helpers/AxesHelper.d.ts +3 -1
- three/src/lights/SpotLightShadow.d.ts +2 -0
- three/src/lights/webgpu/ProjectorLight.d.ts +17 -0
- 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 +418 -55
- 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 -18
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +4 -0
- three/src/math/Box3.d.ts +8 -0
- three/src/math/Color.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +12 -2
- three/src/math/Sphere.d.ts +8 -0
- three/src/math/Triangle.d.ts +3 -3
- three/src/nodes/Nodes.d.ts +2 -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 +16 -5
- 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 +24 -19
- 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 +7 -3
- 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 +1 -0
- three/src/nodes/core/ContextNode.d.ts +3 -3
- three/src/nodes/core/Node.d.ts +5 -4
- three/src/nodes/core/NodeUtils.d.ts +4 -0
- 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 +14 -10
- 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 +6 -16
- 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/ProjectorLightNode.d.ts +5 -0
- three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
- three/src/nodes/lighting/SpotLightNode.d.ts +15 -1
- 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 +186 -81
- 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/ReflectorNode.d.ts +1 -0
- 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/objects/Mesh.d.ts +8 -0
- three/src/objects/Sprite.d.ts +8 -0
- three/src/renderers/WebGLRenderer.d.ts +3 -3
- 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 +10 -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/XRManager.d.ts +45 -0
- 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/nodes/WGSLNodeBuilder.d.ts +1 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +10 -1
- three/src/textures/DepthTexture.d.ts +4 -2
- three/src/textures/Source.d.ts +20 -16
- three/src/textures/Texture.d.ts +69 -2
- three/examples/jsm/effects/PeppersGhostEffect.d.ts +0 -10
- three/src/core/RenderTargetArray.d.ts +0 -9
- 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
- three/src/textures/DepthArrayTexture.d.ts +0 -14
|
@@ -1,61 +1,90 @@
|
|
|
1
|
-
import { Color
|
|
1
|
+
import { Color } from "../math/Color.js";
|
|
2
2
|
import { Texture } from "../textures/Texture.js";
|
|
3
|
-
import { Material,
|
|
4
|
-
|
|
5
|
-
export interface SpriteMaterialParameters extends MaterialParameters {
|
|
6
|
-
color?: ColorRepresentation | undefined;
|
|
7
|
-
map?: Texture | null | undefined;
|
|
8
|
-
alphaMap?: Texture | null | undefined;
|
|
9
|
-
rotation?: number | undefined;
|
|
10
|
-
sizeAttenuation?: boolean | undefined;
|
|
11
|
-
fog?: boolean | undefined;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export class SpriteMaterial extends Material {
|
|
15
|
-
constructor(parameters?: SpriteMaterialParameters);
|
|
16
|
-
/**
|
|
17
|
-
* Read-only flag to check if a given object is of type {@link SpriteMaterial}.
|
|
18
|
-
* @remarks This is a _constant_ value
|
|
19
|
-
* @defaultValue `true`
|
|
20
|
-
*/
|
|
21
|
-
readonly isSpriteMaterial: true;
|
|
3
|
+
import { MapColorPropertiesToColorRepresentations, Material, MaterialProperties } from "./Material.js";
|
|
22
4
|
|
|
5
|
+
export interface SpriteMaterialProperties extends MaterialProperties {
|
|
23
6
|
/**
|
|
24
|
-
*
|
|
7
|
+
* Color of the material.
|
|
8
|
+
*
|
|
9
|
+
* @default (1,1,1)
|
|
25
10
|
*/
|
|
26
11
|
color: Color;
|
|
27
|
-
|
|
28
12
|
/**
|
|
13
|
+
* The color map. May optionally include an alpha channel, typically combined
|
|
14
|
+
* with {@link Material#transparent} or {@link Material#alphaTest}. The texture map
|
|
15
|
+
* color is modulated by the diffuse `color`.
|
|
16
|
+
*
|
|
29
17
|
* @default null
|
|
30
18
|
*/
|
|
31
19
|
map: Texture | null;
|
|
32
|
-
|
|
33
20
|
/**
|
|
21
|
+
* The alpha map is a grayscale texture that controls the opacity across the
|
|
22
|
+
* surface (black: fully transparent; white: fully opaque).
|
|
23
|
+
*
|
|
24
|
+
* Only the color of the texture is used, ignoring the alpha channel if one
|
|
25
|
+
* exists. For RGB and RGBA textures, the renderer will use the green channel
|
|
26
|
+
* when sampling this texture due to the extra bit of precision provided for
|
|
27
|
+
* green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
|
|
28
|
+
* luminance/alpha textures will also still work as expected.
|
|
29
|
+
*
|
|
34
30
|
* @default null
|
|
35
31
|
*/
|
|
36
32
|
alphaMap: Texture | null;
|
|
37
|
-
|
|
38
33
|
/**
|
|
34
|
+
* The rotation of the sprite in radians.
|
|
35
|
+
*
|
|
39
36
|
* @default 0
|
|
40
37
|
*/
|
|
41
38
|
rotation: number;
|
|
42
|
-
|
|
43
39
|
/**
|
|
40
|
+
* Specifies whether size of the sprite is attenuated by the camera depth (perspective camera only).
|
|
41
|
+
*
|
|
44
42
|
* @default true
|
|
45
43
|
*/
|
|
46
44
|
sizeAttenuation: boolean;
|
|
47
|
-
|
|
48
45
|
/**
|
|
46
|
+
* Whether the material is affected by fog or not.
|
|
47
|
+
*
|
|
49
48
|
* @default true
|
|
50
49
|
*/
|
|
51
|
-
|
|
50
|
+
fog: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
54
|
+
export interface SpriteMaterialParameters
|
|
55
|
+
extends Partial<MapColorPropertiesToColorRepresentations<SpriteMaterialProperties>>
|
|
56
|
+
{}
|
|
52
57
|
|
|
58
|
+
/**
|
|
59
|
+
* A material for rendering instances of {@link Sprite}.
|
|
60
|
+
*
|
|
61
|
+
* ```js
|
|
62
|
+
* const map = new THREE.TextureLoader().load( 'textures/sprite.png' );
|
|
63
|
+
* const material = new THREE.SpriteMaterial( { map: map, color: 0xffffff } );
|
|
64
|
+
*
|
|
65
|
+
* const sprite = new THREE.Sprite( material );
|
|
66
|
+
* sprite.scale.set(200, 200, 1)
|
|
67
|
+
* scene.add( sprite );
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export class SpriteMaterial extends Material {
|
|
53
71
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
72
|
+
* Constructs a new sprite material.
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} [parameters] - An object with one or more properties
|
|
75
|
+
* defining the material's appearance. Any property of the material
|
|
76
|
+
* (including any property from inherited materials) can be passed
|
|
77
|
+
* in here. Color values can be passed any type of value accepted
|
|
78
|
+
* by {@link Color#set}.
|
|
56
79
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
constructor(parameters?: SpriteMaterialParameters);
|
|
81
|
+
/**
|
|
82
|
+
* This flag can be used for type testing.
|
|
83
|
+
*
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
|
+
readonly isSpriteMaterial: boolean;
|
|
61
87
|
}
|
|
88
|
+
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
90
|
+
export interface SpriteMaterial extends SpriteMaterialProperties {}
|
|
@@ -1,54 +1,101 @@
|
|
|
1
|
-
import { Color } from "../../math/Color.js";
|
|
2
1
|
import Node from "../../nodes/core/Node.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import NodeMaterial, {
|
|
2
|
+
import { LineDashedMaterialParameters, LineDashedMaterialProperties } from "../LineDashedMaterial.js";
|
|
3
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
4
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
6
5
|
|
|
7
|
-
export interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
lights: boolean;
|
|
14
|
-
|
|
15
|
-
// Properties from LineDashedMaterial
|
|
16
|
-
readonly isLineDashedMaterial: true;
|
|
17
|
-
scale: number;
|
|
18
|
-
dashSize: number;
|
|
19
|
-
gapSize: number;
|
|
20
|
-
|
|
21
|
-
// Properties from LineBasicMaterial
|
|
22
|
-
readonly isLineBasicMaterial: true;
|
|
23
|
-
color: Color;
|
|
24
|
-
fog: boolean;
|
|
25
|
-
linewidth: number;
|
|
26
|
-
linecap: string;
|
|
27
|
-
linejoin: string;
|
|
28
|
-
map: Texture | null;
|
|
29
|
-
|
|
30
|
-
useAlphaToCoverage: boolean;
|
|
6
|
+
export interface Line2NodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
7
|
+
/**
|
|
8
|
+
* Whether vertex colors should be used or not.
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
31
12
|
useColor: boolean;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The dash offset.
|
|
15
|
+
*
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
35
18
|
dashOffset: number;
|
|
19
|
+
/**
|
|
20
|
+
* The line width.
|
|
21
|
+
*
|
|
22
|
+
* @default 0
|
|
23
|
+
*/
|
|
36
24
|
lineWidth: number;
|
|
37
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Defines the lines color.
|
|
27
|
+
*
|
|
28
|
+
* @default null
|
|
29
|
+
*/
|
|
38
30
|
lineColorNode: Node | null;
|
|
39
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Defines the offset.
|
|
33
|
+
*
|
|
34
|
+
* @default null
|
|
35
|
+
*/
|
|
40
36
|
offsetNode: Node | null;
|
|
37
|
+
/**
|
|
38
|
+
* Defines the dash scale.
|
|
39
|
+
*
|
|
40
|
+
* @default null
|
|
41
|
+
*/
|
|
41
42
|
dashScaleNode: Node | null;
|
|
43
|
+
/**
|
|
44
|
+
* Defines the dash size.
|
|
45
|
+
*
|
|
46
|
+
* @default null
|
|
47
|
+
*/
|
|
42
48
|
dashSizeNode: Node | null;
|
|
49
|
+
/**
|
|
50
|
+
* Defines the gap size.
|
|
51
|
+
*
|
|
52
|
+
* @default null
|
|
53
|
+
*/
|
|
43
54
|
gapSizeNode: Node | null;
|
|
55
|
+
set worldUnits(value: boolean);
|
|
56
|
+
/**
|
|
57
|
+
* Whether the lines should sized in world units or not.
|
|
58
|
+
* When set to `false` the unit is pixel.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
get worldUnits(): boolean;
|
|
63
|
+
set dashed(value: boolean);
|
|
64
|
+
/**
|
|
65
|
+
* Whether the lines should be dashed or not.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
get dashed(): boolean;
|
|
70
|
+
}
|
|
44
71
|
|
|
45
|
-
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
73
|
+
export interface Line2NodeMaterialParameters
|
|
74
|
+
extends
|
|
75
|
+
Partial<MapColorPropertiesToColorRepresentations<Line2NodeMaterialNodeProperties>>,
|
|
76
|
+
LineDashedMaterialParameters
|
|
77
|
+
{}
|
|
46
78
|
|
|
47
|
-
|
|
79
|
+
/**
|
|
80
|
+
* This node material can be used to render lines with a size larger than one
|
|
81
|
+
* by representing them as instanced meshes.
|
|
82
|
+
*/
|
|
83
|
+
declare class Line2NodeMaterial extends NodeMaterial {
|
|
84
|
+
/**
|
|
85
|
+
* Constructs a new node material for wide line rendering.
|
|
86
|
+
*
|
|
87
|
+
* @param {Object} [parameters={}] - The configuration parameter.
|
|
88
|
+
*/
|
|
89
|
+
constructor(parameters?: Line2NodeMaterialParameters);
|
|
90
|
+
/**
|
|
91
|
+
* This flag can be used for type testing.
|
|
92
|
+
*
|
|
93
|
+
* @default true
|
|
94
|
+
*/
|
|
95
|
+
readonly isLine2NodeMaterial: boolean;
|
|
96
|
+
}
|
|
48
97
|
|
|
49
|
-
|
|
50
|
-
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
99
|
+
interface Line2NodeMaterial extends Line2NodeMaterialNodeProperties, LineDashedMaterialProperties {}
|
|
51
100
|
|
|
52
|
-
|
|
53
|
-
set dashed(value: boolean);
|
|
54
|
-
}
|
|
101
|
+
export default Line2NodeMaterial;
|
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
1
|
+
import { LineBasicMaterialParameters, LineBasicMaterialProperties } from "../LineBasicMaterial.js";
|
|
2
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
3
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
6
|
+
export interface LineBasicNodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
fog: boolean;
|
|
16
|
-
linewidth: number;
|
|
17
|
-
linecap: string;
|
|
18
|
-
linejoin: string;
|
|
19
|
-
map: Texture | null;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
10
|
+
export interface LineBasicNodeMaterialParameters
|
|
11
|
+
extends
|
|
12
|
+
Partial<MapColorPropertiesToColorRepresentations<LineBasicNodeMaterialNodeProperties>>,
|
|
13
|
+
LineBasicMaterialParameters
|
|
14
|
+
{}
|
|
20
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Node material version of {@link LineBasicMaterial}.
|
|
18
|
+
*
|
|
19
|
+
* @augments NodeMaterial
|
|
20
|
+
*/
|
|
21
|
+
declare class LineBasicNodeMaterial extends NodeMaterial {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new line basic node material.
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} [parameters] - The configuration parameter.
|
|
26
|
+
*/
|
|
21
27
|
constructor(parameters?: LineBasicNodeMaterialParameters);
|
|
28
|
+
/**
|
|
29
|
+
* This flag can be used for type testing.
|
|
30
|
+
*
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
* @readonly
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
readonly isLineBasicNodeMaterial: boolean;
|
|
22
36
|
}
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
39
|
+
interface LineBasicNodeMaterial extends LineBasicNodeMaterialNodeProperties, LineBasicMaterialProperties {}
|
|
40
|
+
|
|
41
|
+
export default LineBasicNodeMaterial;
|
|
@@ -1,32 +1,87 @@
|
|
|
1
1
|
import Node from "../../nodes/core/Node.js";
|
|
2
|
-
import { LineDashedMaterialParameters } from "../LineDashedMaterial.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export interface LineDashedNodeMaterialParameters extends NodeMaterialParameters, LineDashedMaterialParameters {
|
|
6
|
-
dashOffset?: number | undefined;
|
|
7
|
-
offsetNode?: Node | null | undefined;
|
|
8
|
-
dashScaleNode?: Node | null | undefined;
|
|
9
|
-
dashSizeNode?: Node | null | undefined;
|
|
10
|
-
gapSizeNode?: Node | null | undefined;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare class LineDashedNodeMaterial extends NodeMaterial {
|
|
14
|
-
readonly isLineDashedNodeMaterial: true;
|
|
2
|
+
import { LineDashedMaterialParameters, LineDashedMaterialProperties } from "../LineDashedMaterial.js";
|
|
3
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
4
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
15
5
|
|
|
6
|
+
export interface LineDashedNodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
7
|
+
/**
|
|
8
|
+
* The dash offset.
|
|
9
|
+
*
|
|
10
|
+
* @default 0
|
|
11
|
+
*/
|
|
16
12
|
dashOffset: number;
|
|
17
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The offset of dash materials is by default inferred from the `dashOffset`
|
|
15
|
+
* property. This node property allows to overwrite the default
|
|
16
|
+
* and define the offset with a node instead.
|
|
17
|
+
*
|
|
18
|
+
* If you don't want to overwrite the offset but modify the existing
|
|
19
|
+
* value instead, use {@link materialLineDashOffset}.
|
|
20
|
+
*
|
|
21
|
+
* @default null
|
|
22
|
+
*/
|
|
18
23
|
offsetNode: Node | null;
|
|
24
|
+
/**
|
|
25
|
+
* The scale of dash materials is by default inferred from the `scale`
|
|
26
|
+
* property. This node property allows to overwrite the default
|
|
27
|
+
* and define the scale with a node instead.
|
|
28
|
+
*
|
|
29
|
+
* If you don't want to overwrite the scale but modify the existing
|
|
30
|
+
* value instead, use {@link materialLineScale}.
|
|
31
|
+
*
|
|
32
|
+
* @default null
|
|
33
|
+
*/
|
|
19
34
|
dashScaleNode: Node | null;
|
|
35
|
+
/**
|
|
36
|
+
* The dash size of dash materials is by default inferred from the `dashSize`
|
|
37
|
+
* property. This node property allows to overwrite the default
|
|
38
|
+
* and define the dash size with a node instead.
|
|
39
|
+
*
|
|
40
|
+
* If you don't want to overwrite the dash size but modify the existing
|
|
41
|
+
* value instead, use {@link materialLineDashSize}.
|
|
42
|
+
*
|
|
43
|
+
* @default null
|
|
44
|
+
*/
|
|
20
45
|
dashSizeNode: Node | null;
|
|
46
|
+
/**
|
|
47
|
+
* The gap size of dash materials is by default inferred from the `gapSize`
|
|
48
|
+
* property. This node property allows to overwrite the default
|
|
49
|
+
* and define the gap size with a node instead.
|
|
50
|
+
*
|
|
51
|
+
* If you don't want to overwrite the gap size but modify the existing
|
|
52
|
+
* value instead, use {@link materialLineGapSize}.
|
|
53
|
+
*
|
|
54
|
+
* @default null
|
|
55
|
+
*/
|
|
21
56
|
gapSizeNode: Node | null;
|
|
57
|
+
}
|
|
22
58
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
60
|
+
export interface LineDashedNodeMaterialParameters
|
|
61
|
+
extends
|
|
62
|
+
Partial<MapColorPropertiesToColorRepresentations<LineDashedNodeMaterialNodeProperties>>,
|
|
63
|
+
LineDashedMaterialParameters
|
|
64
|
+
{}
|
|
28
65
|
|
|
29
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Node material version of {@link LineDashedMaterial}.
|
|
68
|
+
*/
|
|
69
|
+
declare class LineDashedNodeMaterial extends NodeMaterial {
|
|
70
|
+
/**
|
|
71
|
+
* Constructs a new line dashed node material.
|
|
72
|
+
*
|
|
73
|
+
* @param {Object} [parameters] - The configuration parameter.
|
|
74
|
+
*/
|
|
75
|
+
constructor(parameters?: LineDashedNodeMaterialParameters);
|
|
76
|
+
/**
|
|
77
|
+
* This flag can be used for type testing.
|
|
78
|
+
*
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
readonly isLineDashedNodeMaterial: boolean;
|
|
30
82
|
}
|
|
31
83
|
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
85
|
+
interface LineDashedNodeMaterial extends LineDashedNodeMaterialNodeProperties, LineDashedMaterialProperties {}
|
|
86
|
+
|
|
32
87
|
export default LineDashedNodeMaterial;
|
|
@@ -1,36 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { MeshBasicMaterialParameters } from "../MeshBasicMaterial.js";
|
|
6
|
-
import NodeMaterial, {
|
|
1
|
+
import NodeBuilder from "../../nodes/core/NodeBuilder.js";
|
|
2
|
+
import BasicLightingModel from "../../nodes/functions/BasicLightingModel.js";
|
|
3
|
+
import BasicEnvironmentNode from "../../nodes/lighting/BasicEnvironmentNode.js";
|
|
4
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
5
|
+
import { MeshBasicMaterialParameters, MeshBasicMaterialProperties } from "../MeshBasicMaterial.js";
|
|
6
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
7
7
|
|
|
8
|
-
export interface
|
|
8
|
+
export interface MeshBasicNodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
map: Texture | null;
|
|
18
|
-
lightMap: Texture | null;
|
|
19
|
-
lightMapIntensity: number;
|
|
20
|
-
aoMap: Texture | null;
|
|
21
|
-
aoMapIntensity: number;
|
|
22
|
-
specularMap: Texture | null;
|
|
23
|
-
alphaMap: Texture | null;
|
|
24
|
-
envMap: Texture | null;
|
|
25
|
-
envMapRotation: Euler;
|
|
26
|
-
combine: Combine;
|
|
27
|
-
reflectivity: number;
|
|
28
|
-
refractionRatio: number;
|
|
29
|
-
wireframe: boolean;
|
|
30
|
-
wireframeLinewidth: number;
|
|
31
|
-
wireframeLinecap: string;
|
|
32
|
-
wireframeLinejoin: string;
|
|
33
|
-
fog: boolean;
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
12
|
+
export interface MeshBasicNodeMaterialParameters
|
|
13
|
+
extends
|
|
14
|
+
Partial<MapColorPropertiesToColorRepresentations<MeshBasicNodeMaterialNodeProperties>>,
|
|
15
|
+
MeshBasicMaterialParameters
|
|
16
|
+
{}
|
|
34
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Node material version of {@link MeshBasicMaterial}.
|
|
20
|
+
*/
|
|
21
|
+
declare class MeshBasicNodeMaterial extends NodeMaterial {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new mesh basic node material.
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} [parameters] - The configuration parameter.
|
|
26
|
+
*/
|
|
35
27
|
constructor(parameters?: MeshBasicNodeMaterialParameters);
|
|
28
|
+
/**
|
|
29
|
+
* This flag can be used for type testing.
|
|
30
|
+
*
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
* @readonly
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
readonly isMeshBasicNodeMaterial: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Overwritten since this type of material uses {@link BasicEnvironmentNode}
|
|
38
|
+
* to implement the default environment mapping.
|
|
39
|
+
*
|
|
40
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
41
|
+
* @return {?BasicEnvironmentNode<vec3>} The environment node.
|
|
42
|
+
*/
|
|
43
|
+
setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null;
|
|
44
|
+
/**
|
|
45
|
+
* Setups the lighting model.
|
|
46
|
+
*
|
|
47
|
+
* @return {BasicLightingModel} The lighting model.
|
|
48
|
+
*/
|
|
49
|
+
setupLightingModel(): BasicLightingModel;
|
|
36
50
|
}
|
|
51
|
+
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
53
|
+
interface MeshBasicNodeMaterial extends MeshBasicNodeMaterialNodeProperties, MeshBasicMaterialProperties {}
|
|
54
|
+
|
|
55
|
+
export default MeshBasicNodeMaterial;
|
|
@@ -1,49 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
1
|
+
import NodeBuilder from "../../nodes/core/NodeBuilder.js";
|
|
2
|
+
import PhongLightingModel from "../../nodes/functions/PhongLightingModel.js";
|
|
3
|
+
import BasicEnvironmentNode from "../../nodes/lighting/BasicEnvironmentNode.js";
|
|
4
|
+
import { MapColorPropertiesToColorRepresentations } from "../Material.js";
|
|
5
|
+
import { MeshLambertMaterialParameters, MeshLambertMaterialProperties } from "../MeshLambertMaterial.js";
|
|
6
|
+
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
readonly isMeshLambertNodeMaterial: true;
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
9
|
+
export interface MeshLambertNodeMaterialNodeProperties extends NodeMaterialNodeProperties {
|
|
10
|
+
}
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
displacementScale: number;
|
|
21
|
-
displacementBias: number;
|
|
22
|
-
emissive: Color;
|
|
23
|
-
emissiveIntensity: number;
|
|
24
|
-
emissiveMap: Texture | null;
|
|
25
|
-
flatShading: boolean;
|
|
26
|
-
map: Texture | null;
|
|
27
|
-
lightMap: Texture | null;
|
|
28
|
-
lightMapIntensity: number;
|
|
29
|
-
normalMap: Texture | null;
|
|
30
|
-
normalMapType: NormalMapTypes;
|
|
31
|
-
normalScale: Vector2;
|
|
32
|
-
aoMap: Texture | null;
|
|
33
|
-
aoMapIntensity: number;
|
|
34
|
-
specularMap: Texture | null;
|
|
35
|
-
alphaMap: Texture | null;
|
|
36
|
-
envMap: Texture | null;
|
|
37
|
-
envMapRotation: Euler;
|
|
38
|
-
combine: Combine;
|
|
39
|
-
reflectivity: number;
|
|
40
|
-
refractionRatio: number;
|
|
41
|
-
wireframe: boolean;
|
|
42
|
-
wireframeLinewidth: number;
|
|
43
|
-
wireframeLinecap: string;
|
|
44
|
-
wireframeLinejoin: string;
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
export interface MeshLambertNodeMaterialParameters
|
|
14
|
+
extends
|
|
15
|
+
Partial<MapColorPropertiesToColorRepresentations<MeshLambertNodeMaterialNodeProperties>>,
|
|
16
|
+
MeshLambertMaterialParameters
|
|
17
|
+
{}
|
|
45
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Node material version of {@link MeshLambertMaterial}.
|
|
21
|
+
*/
|
|
22
|
+
declare class MeshLambertNodeMaterial extends NodeMaterial {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new mesh lambert node material.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} [parameters] - The configuration parameter.
|
|
27
|
+
*/
|
|
46
28
|
constructor(parameters?: MeshLambertNodeMaterialParameters);
|
|
29
|
+
/**
|
|
30
|
+
* This flag can be used for type testing.
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @readonly
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
readonly isMeshLambertNodeMaterial: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Overwritten since this type of material uses {@link BasicEnvironmentNode}
|
|
39
|
+
* to implement the default environment mapping.
|
|
40
|
+
*
|
|
41
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
42
|
+
* @return {?BasicEnvironmentNode<vec3>} The environment node.
|
|
43
|
+
*/
|
|
44
|
+
setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null;
|
|
45
|
+
/**
|
|
46
|
+
* Setups the lighting model.
|
|
47
|
+
*
|
|
48
|
+
* @return {PhongLightingModel} The lighting model.
|
|
49
|
+
*/
|
|
50
|
+
setupLightingModel(): PhongLightingModel;
|
|
47
51
|
}
|
|
48
52
|
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
54
|
+
interface MeshLambertNodeMaterial extends MeshLambertNodeMaterialNodeProperties, MeshLambertMaterialProperties {}
|
|
55
|
+
|
|
49
56
|
export default MeshLambertNodeMaterial;
|