@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,10 +1,10 @@
|
|
|
1
1
|
import Node from "../../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
4
|
declare const Schlick_to_F0: (
|
|
5
|
-
f:
|
|
6
|
-
f90:
|
|
7
|
-
dotVH:
|
|
5
|
+
f: Node,
|
|
6
|
+
f90: Node,
|
|
7
|
+
dotVH: Node,
|
|
8
8
|
) => ShaderNodeObject<Node>;
|
|
9
9
|
|
|
10
10
|
export default Schlick_to_F0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
declare const getAlphaHashThreshold: (position:
|
|
4
|
+
declare const getAlphaHashThreshold: (position: Node) => ShaderNodeObject<Node>;
|
|
5
5
|
|
|
6
6
|
export default getAlphaHashThreshold;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Node from "../../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
4
|
declare const getParallaxCorrectNormal: (
|
|
5
|
-
normal:
|
|
6
|
-
cubeSize:
|
|
7
|
-
cubePos:
|
|
5
|
+
normal: Node,
|
|
6
|
+
cubeSize: Node,
|
|
7
|
+
cubePos: Node,
|
|
8
8
|
) => ShaderNodeObject<Node>;
|
|
9
9
|
|
|
10
10
|
export default getParallaxCorrectNormal;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { Color } from "../../math/Color.js";
|
|
2
|
+
import { Vector2 } from "../../math/Vector2.js";
|
|
3
|
+
import { Vector3 } from "../../math/Vector3.js";
|
|
4
|
+
import { Vector4 } from "../../math/Vector4.js";
|
|
1
5
|
import Node from "../core/Node.js";
|
|
2
6
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
3
|
-
import {
|
|
7
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
8
|
|
|
5
9
|
export default class RangeNode extends Node {
|
|
6
10
|
minNode: Node;
|
|
@@ -11,4 +15,7 @@ export default class RangeNode extends Node {
|
|
|
11
15
|
getVectorLength(builder: NodeBuilder): number;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
export const range: (
|
|
18
|
+
export const range: (
|
|
19
|
+
minNode: Node | number | Color | Vector2 | Vector3 | Vector4,
|
|
20
|
+
maxNode: Node | number | Color | Vector2 | Vector3 | Vector4,
|
|
21
|
+
) => ShaderNodeObject<RangeNode>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
4
|
export type AtomicMethod =
|
|
5
5
|
| typeof AtomicFunctionNode.ATOMIC_LOAD
|
|
@@ -33,50 +33,50 @@ declare class AtomicFunctionNode extends Node {
|
|
|
33
33
|
|
|
34
34
|
export const atomicFunc: (
|
|
35
35
|
method: AtomicMethod,
|
|
36
|
-
pointerNode:
|
|
37
|
-
valueNode:
|
|
36
|
+
pointerNode: Node,
|
|
37
|
+
valueNode: Node,
|
|
38
38
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
39
39
|
|
|
40
40
|
export const atomicLoad: (
|
|
41
|
-
pointerNode:
|
|
41
|
+
pointerNode: Node,
|
|
42
42
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
43
43
|
|
|
44
44
|
export const atomicStore: (
|
|
45
|
-
pointerNode:
|
|
46
|
-
valueNode:
|
|
45
|
+
pointerNode: Node,
|
|
46
|
+
valueNode: Node | number,
|
|
47
47
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
48
48
|
|
|
49
49
|
export const atomicAdd: (
|
|
50
|
-
pointerNode:
|
|
51
|
-
valueNode:
|
|
50
|
+
pointerNode: Node,
|
|
51
|
+
valueNode: Node | number,
|
|
52
52
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
53
53
|
|
|
54
54
|
export const atomicSub: (
|
|
55
|
-
pointerNode:
|
|
56
|
-
valueNode:
|
|
55
|
+
pointerNode: Node,
|
|
56
|
+
valueNode: Node | number,
|
|
57
57
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
58
58
|
|
|
59
59
|
export const atomicMax: (
|
|
60
|
-
pointerNode:
|
|
61
|
-
valueNode:
|
|
60
|
+
pointerNode: Node,
|
|
61
|
+
valueNode: Node,
|
|
62
62
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
63
63
|
|
|
64
64
|
export const atomicMin: (
|
|
65
|
-
pointerNode:
|
|
66
|
-
valueNode:
|
|
65
|
+
pointerNode: Node,
|
|
66
|
+
valueNode: Node,
|
|
67
67
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
68
68
|
|
|
69
69
|
export const atomicAnd: (
|
|
70
|
-
pointerNode:
|
|
71
|
-
valueNode:
|
|
70
|
+
pointerNode: Node,
|
|
71
|
+
valueNode: Node,
|
|
72
72
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
73
73
|
|
|
74
74
|
export const atomicOr: (
|
|
75
|
-
pointerNode:
|
|
76
|
-
valueNode:
|
|
75
|
+
pointerNode: Node,
|
|
76
|
+
valueNode: Node,
|
|
77
77
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
78
78
|
|
|
79
79
|
export const atomicXor: (
|
|
80
|
-
pointerNode:
|
|
81
|
-
valueNode:
|
|
80
|
+
pointerNode: Node,
|
|
81
|
+
valueNode: Node,
|
|
82
82
|
) => ShaderNodeObject<AtomicFunctionNode>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Renderer from "../../renderers/common/Renderer.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
|
|
5
5
|
export default class ComputeNode extends Node {
|
|
6
6
|
isComputeNode: true;
|
|
@@ -22,7 +22,7 @@ export default class ComputeNode extends Node {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const compute: (
|
|
25
|
-
node:
|
|
25
|
+
node: Node,
|
|
26
26
|
count: number,
|
|
27
27
|
workgroupSize?: number[],
|
|
28
28
|
) => ShaderNodeObject<ComputeNode>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Light } from "../../lights/Light.js";
|
|
2
2
|
import { LightShadow } from "../../lights/LightShadow.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
import ShadowNode from "./ShadowNode.js";
|
|
6
6
|
|
|
7
|
-
export const cubeToUV: (pos:
|
|
7
|
+
export const cubeToUV: (pos: Node, texelSizeY: Node) => ShaderNodeObject<Node>;
|
|
8
8
|
|
|
9
9
|
export const BasicPointShadowFilter: (
|
|
10
|
-
depthTexture:
|
|
11
|
-
bd3D:
|
|
12
|
-
dp:
|
|
13
|
-
texelSize:
|
|
10
|
+
depthTexture: Node,
|
|
11
|
+
bd3D: Node,
|
|
12
|
+
dp: Node,
|
|
13
|
+
texelSize: Node,
|
|
14
14
|
) => ShaderNodeObject<Node>;
|
|
15
15
|
|
|
16
16
|
export const PointShadowFilter: (
|
|
17
|
-
depthTexture:
|
|
18
|
-
bd3D:
|
|
19
|
-
dp:
|
|
20
|
-
texelSize:
|
|
21
|
-
shadow:
|
|
17
|
+
depthTexture: Node,
|
|
18
|
+
bd3D: Node,
|
|
19
|
+
dp: Node,
|
|
20
|
+
texelSize: Node,
|
|
21
|
+
shadow: Node,
|
|
22
22
|
) => ShaderNodeObject<Node>;
|
|
23
23
|
|
|
24
24
|
declare class PointShadowNode extends ShadowNode {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { Light } from "../../lights/Light.js";
|
|
2
2
|
import NodeMaterial from "../../materials/nodes/NodeMaterial.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
|
|
6
6
|
export const BasicShadowFilter: (
|
|
7
|
-
depthTexture:
|
|
8
|
-
shadowCoord:
|
|
7
|
+
depthTexture: Node,
|
|
8
|
+
shadowCoord: Node,
|
|
9
9
|
) => ShaderNodeObject<Node>;
|
|
10
10
|
|
|
11
11
|
export const PCFShadowFilter: (
|
|
12
|
-
depthTexture:
|
|
13
|
-
shadowCoord:
|
|
14
|
-
shadow:
|
|
12
|
+
depthTexture: Node,
|
|
13
|
+
shadowCoord: Node,
|
|
14
|
+
shadow: Node,
|
|
15
15
|
) => ShaderNodeObject<Node>;
|
|
16
16
|
|
|
17
17
|
export const PCFSoftShadowFilter: (
|
|
18
|
-
depthTexture:
|
|
19
|
-
shadowCoord:
|
|
20
|
-
shadow:
|
|
18
|
+
depthTexture: Node,
|
|
19
|
+
shadowCoord: Node,
|
|
20
|
+
shadow: Node,
|
|
21
21
|
) => ShaderNodeObject<Node>;
|
|
22
22
|
|
|
23
23
|
export const VSMShadowFilter: (
|
|
24
|
-
depthTexture:
|
|
25
|
-
shadowCoord:
|
|
24
|
+
depthTexture: Node,
|
|
25
|
+
shadowCoord: Node,
|
|
26
26
|
) => ShaderNodeObject<Node>;
|
|
27
27
|
|
|
28
28
|
export const getShadowMaterial: (light: Light) => NodeMaterial;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SpotLight } from "../../lights/SpotLight.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
+
import NodeBuilder from "../core/NodeBuilder.js";
|
|
4
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
5
|
import AnalyticLightNode from "./AnalyticLightNode.js";
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
declare class SpotLightNode extends AnalyticLightNode<SpotLight> {
|
|
6
8
|
directionNode: Node;
|
|
7
9
|
|
|
8
10
|
coneCosNode: Node;
|
|
@@ -11,5 +13,17 @@ export default class PointLightNode extends AnalyticLightNode<SpotLight> {
|
|
|
11
13
|
cutoffDistanceNode: Node;
|
|
12
14
|
decayExponentNode: Node;
|
|
13
15
|
|
|
16
|
+
colorNode: Node;
|
|
17
|
+
|
|
14
18
|
constructor(light?: SpotLight | null);
|
|
19
|
+
|
|
20
|
+
getLightCoord(builder: NodeBuilder): ShaderNodeObject<Node>;
|
|
15
21
|
}
|
|
22
|
+
|
|
23
|
+
declare module "three" {
|
|
24
|
+
export interface SpotLight {
|
|
25
|
+
attenuationNode?: ((lightNode: SpotLightNode) => Node) | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default SpotLightNode;
|
|
@@ -1,107 +1,107 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import MathNode from "../math/MathNode.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
import { mx_hsvtorgb, mx_rgbtohsv } from "./lib/mx_hsv.js";
|
|
5
5
|
import { mx_srgb_texture_to_lin_rec709 } from "./lib/mx_transform_color.js";
|
|
6
6
|
|
|
7
|
-
export function mx_aastep(threshold:
|
|
7
|
+
export function mx_aastep(threshold: Node | number, value: Node | number): ShaderNodeObject<MathNode>;
|
|
8
8
|
|
|
9
9
|
export function mx_ramplr(
|
|
10
|
-
valuel:
|
|
11
|
-
valuer:
|
|
12
|
-
texcoord?:
|
|
10
|
+
valuel: Node | number,
|
|
11
|
+
valuer: Node | number,
|
|
12
|
+
texcoord?: Node,
|
|
13
13
|
): ShaderNodeObject<MathNode>;
|
|
14
14
|
export function mx_ramptb(
|
|
15
|
-
valuet:
|
|
16
|
-
valueb:
|
|
17
|
-
texcoord?:
|
|
15
|
+
valuet: Node | number,
|
|
16
|
+
valueb: Node | number,
|
|
17
|
+
texcoord?: Node,
|
|
18
18
|
): ShaderNodeObject<MathNode>;
|
|
19
19
|
|
|
20
20
|
export function mx_splitlr(
|
|
21
|
-
valuel:
|
|
22
|
-
valuer:
|
|
23
|
-
center:
|
|
24
|
-
texcoord?:
|
|
21
|
+
valuel: Node | number,
|
|
22
|
+
valuer: Node | number,
|
|
23
|
+
center: Node | number,
|
|
24
|
+
texcoord?: Node,
|
|
25
25
|
): ShaderNodeObject<MathNode>;
|
|
26
26
|
export function mx_splittb(
|
|
27
|
-
valuet:
|
|
28
|
-
valueb:
|
|
29
|
-
center:
|
|
30
|
-
texcoord?:
|
|
27
|
+
valuet: Node | number,
|
|
28
|
+
valueb: Node | number,
|
|
29
|
+
center: Node | number,
|
|
30
|
+
texcoord?: Node,
|
|
31
31
|
): ShaderNodeObject<MathNode>;
|
|
32
32
|
|
|
33
33
|
export function mx_transform_uv(
|
|
34
|
-
uv_scale?:
|
|
35
|
-
uv_offset?:
|
|
36
|
-
uv_geo?:
|
|
34
|
+
uv_scale?: Node | number,
|
|
35
|
+
uv_offset?: Node | number,
|
|
36
|
+
uv_geo?: Node,
|
|
37
37
|
): ShaderNodeObject<Node>;
|
|
38
38
|
|
|
39
|
-
export function mx_safepower(in1:
|
|
39
|
+
export function mx_safepower(in1: Node | number, in2?: Node | number): ShaderNodeObject<Node>;
|
|
40
40
|
|
|
41
41
|
export function mx_contrast(
|
|
42
|
-
input:
|
|
43
|
-
amount?:
|
|
44
|
-
pivot?:
|
|
42
|
+
input: Node | number,
|
|
43
|
+
amount?: Node | number,
|
|
44
|
+
pivot?: Node | number,
|
|
45
45
|
): ShaderNodeObject<Node>;
|
|
46
46
|
|
|
47
47
|
export function mx_noise_float(
|
|
48
|
-
texcoord?:
|
|
49
|
-
amplitude?:
|
|
50
|
-
pivot?:
|
|
48
|
+
texcoord?: Node,
|
|
49
|
+
amplitude?: Node | number,
|
|
50
|
+
pivot?: Node | number,
|
|
51
51
|
): ShaderNodeObject<Node>;
|
|
52
52
|
export function mx_noise_vec3(
|
|
53
|
-
texcoord?:
|
|
54
|
-
amplitude?:
|
|
55
|
-
pivot?:
|
|
53
|
+
texcoord?: Node,
|
|
54
|
+
amplitude?: Node | number,
|
|
55
|
+
pivot?: Node | number,
|
|
56
56
|
): ShaderNodeObject<Node>;
|
|
57
57
|
export function mx_noise_vec4(
|
|
58
|
-
texcoord?:
|
|
59
|
-
amplitude?:
|
|
60
|
-
pivot?:
|
|
58
|
+
texcoord?: Node,
|
|
59
|
+
amplitude?: Node | number,
|
|
60
|
+
pivot?: Node | number,
|
|
61
61
|
): ShaderNodeObject<Node>;
|
|
62
62
|
|
|
63
63
|
export function mx_worley_noise_float(
|
|
64
|
-
texcoord?:
|
|
65
|
-
jitter?:
|
|
64
|
+
texcoord?: Node,
|
|
65
|
+
jitter?: Node | number,
|
|
66
66
|
): ShaderNodeObject<Node>;
|
|
67
67
|
export function mx_worley_noise_vec2(
|
|
68
|
-
texcoord?:
|
|
69
|
-
jitter?:
|
|
68
|
+
texcoord?: Node,
|
|
69
|
+
jitter?: Node | number,
|
|
70
70
|
): ShaderNodeObject<Node>;
|
|
71
71
|
export function mx_worley_noise_vec3(
|
|
72
|
-
texcoord?:
|
|
73
|
-
jitter?:
|
|
72
|
+
texcoord?: Node,
|
|
73
|
+
jitter?: Node | number,
|
|
74
74
|
): ShaderNodeObject<Node>;
|
|
75
75
|
|
|
76
|
-
export function mx_cell_noise_float(texcoord?:
|
|
76
|
+
export function mx_cell_noise_float(texcoord?: Node): ShaderNodeObject<Node>;
|
|
77
77
|
|
|
78
78
|
export function mx_fractal_noise_float(
|
|
79
|
-
position?:
|
|
80
|
-
octaves?:
|
|
81
|
-
lacunarity?:
|
|
82
|
-
diminish?:
|
|
83
|
-
amplitude?:
|
|
79
|
+
position?: Node,
|
|
80
|
+
octaves?: Node | number,
|
|
81
|
+
lacunarity?: Node | number,
|
|
82
|
+
diminish?: Node | number,
|
|
83
|
+
amplitude?: Node | number,
|
|
84
84
|
): ShaderNodeObject<Node>;
|
|
85
85
|
export function mx_fractal_noise_vec2(
|
|
86
|
-
position?:
|
|
87
|
-
octaves?:
|
|
88
|
-
lacunarity?:
|
|
89
|
-
diminish?:
|
|
90
|
-
amplitude?:
|
|
86
|
+
position?: Node,
|
|
87
|
+
octaves?: Node | number,
|
|
88
|
+
lacunarity?: Node | number,
|
|
89
|
+
diminish?: Node | number,
|
|
90
|
+
amplitude?: Node | number,
|
|
91
91
|
): ShaderNodeObject<Node>;
|
|
92
92
|
export function mx_fractal_noise_vec3(
|
|
93
|
-
position?:
|
|
94
|
-
octaves?:
|
|
95
|
-
lacunarity?:
|
|
96
|
-
diminish?:
|
|
97
|
-
amplitude?:
|
|
93
|
+
position?: Node,
|
|
94
|
+
octaves?: Node | number,
|
|
95
|
+
lacunarity?: Node | number,
|
|
96
|
+
diminish?: Node | number,
|
|
97
|
+
amplitude?: Node | number,
|
|
98
98
|
): ShaderNodeObject<Node>;
|
|
99
99
|
export function mx_fractal_noise_vec4(
|
|
100
|
-
position?:
|
|
101
|
-
octaves?:
|
|
102
|
-
lacunarity?:
|
|
103
|
-
diminish?:
|
|
104
|
-
amplitude?:
|
|
100
|
+
position?: Node,
|
|
101
|
+
octaves?: Node | number,
|
|
102
|
+
lacunarity?: Node | number,
|
|
103
|
+
diminish?: Node | number,
|
|
104
|
+
amplitude?: Node | number,
|
|
105
105
|
): ShaderNodeObject<Node>;
|
|
106
106
|
|
|
107
107
|
export { mx_hsvtorgb, mx_rgbtohsv, mx_srgb_texture_to_lin_rec709 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const mx_hsvtorgb: (hsv:
|
|
4
|
+
export const mx_hsvtorgb: (hsv: Node) => ShaderNodeObject<Node>;
|
|
5
5
|
|
|
6
|
-
export const mx_rgbtohsv: (c_immutable:
|
|
6
|
+
export const mx_rgbtohsv: (c_immutable: Node) => ShaderNodeObject<Node>;
|