@types/three 0.177.0 → 0.178.1
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 +171 -111
- 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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
import { NodeBuilderContext } from "./NodeBuilder.js";
|
|
4
4
|
|
|
@@ -13,8 +13,8 @@ declare class ContextNode extends Node {
|
|
|
13
13
|
|
|
14
14
|
export default ContextNode;
|
|
15
15
|
|
|
16
|
-
export const context: (node:
|
|
17
|
-
export const label: (node:
|
|
16
|
+
export const context: (node: Node, context?: NodeBuilderContext) => ShaderNodeObject<ContextNode>;
|
|
17
|
+
export const label: (node: Node, label: string) => ShaderNodeObject<ContextNode>;
|
|
18
18
|
|
|
19
19
|
declare module "../tsl/TSLCore.js" {
|
|
20
20
|
interface NodeElements {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
|
|
4
4
|
declare class StackNode extends Node {
|
|
@@ -16,21 +16,11 @@ declare class StackNode extends Node {
|
|
|
16
16
|
|
|
17
17
|
Else(method: () => void): this;
|
|
18
18
|
|
|
19
|
-
Switch(expression:
|
|
19
|
+
Switch(expression: Node): this;
|
|
20
20
|
|
|
21
|
-
Case(...params:
|
|
21
|
+
Case(...params: Node[]): this;
|
|
22
22
|
|
|
23
23
|
Default(method: () => void): this;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use {@link StackNode#ElseIf Else()} instead.
|
|
27
|
-
*/
|
|
28
|
-
elseif(boolNode: Node, method: () => void): this;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use {@link StackNode#Else Else()} instead.
|
|
32
|
-
*/
|
|
33
|
-
else(method: () => void): this;
|
|
34
24
|
}
|
|
35
25
|
|
|
36
26
|
export default StackNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
|
+
import Node from "./Node.js";
|
|
3
|
+
|
|
4
|
+
declare class SubBuildNode extends Node {
|
|
5
|
+
node: Node;
|
|
6
|
+
name: string;
|
|
7
|
+
|
|
8
|
+
readonly isSubBuildNode: true;
|
|
9
|
+
|
|
10
|
+
constructor(node: Node, name: string, nodeType?: string | null);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default SubBuildNode;
|
|
14
|
+
|
|
15
|
+
export const subBuild: (node: Node, name: string, type?: string | null) => ShaderNodeObject<SubBuildNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
|
|
4
4
|
export default class VarNode extends Node {
|
|
@@ -18,15 +18,15 @@ export const Const: (node: Node, name?: string | null) => ShaderNodeObject<VarNo
|
|
|
18
18
|
|
|
19
19
|
declare module "../tsl/TSLCore.js" {
|
|
20
20
|
interface NodeElements {
|
|
21
|
-
toVar: (node:
|
|
22
|
-
toConst: (node:
|
|
21
|
+
toVar: (node: Node, name?: string | null) => ShaderNodeObject<VarNode>;
|
|
22
|
+
toConst: (node: Node, name?: string | null) => ShaderNodeObject<VarNode>;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* @deprecated Use ".toVar()" instead.
|
|
28
28
|
*/
|
|
29
|
-
export const temp: (node:
|
|
29
|
+
export const temp: (node: Node, name?: string | null) => ShaderNodeObject<VarNode>;
|
|
30
30
|
|
|
31
31
|
declare module "../tsl/TSLCore.js" {
|
|
32
32
|
interface NodeElements {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InterpolationSamplingMode, InterpolationSamplingType } from "../../constants.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
import Node from "./Node.js";
|
|
4
4
|
import NodeBuilder from "./NodeBuilder.js";
|
|
5
5
|
import NodeVarying from "./NodeVarying.js";
|
|
@@ -18,9 +18,9 @@ export default class VaryingNode extends Node {
|
|
|
18
18
|
setupVarying(builder: NodeBuilder): NodeVarying;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export const varying: (node:
|
|
21
|
+
export const varying: (node: Node, name?: string) => ShaderNodeObject<VaryingNode>;
|
|
22
22
|
|
|
23
|
-
export const vertexStage: (node:
|
|
23
|
+
export const vertexStage: (node: Node) => ShaderNodeObject<VaryingNode>;
|
|
24
24
|
|
|
25
25
|
declare module "../tsl/TSLCore.js" {
|
|
26
26
|
interface NodeElements {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const blendBurn: (base:
|
|
4
|
+
export const blendBurn: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
5
5
|
|
|
6
|
-
export const blendDodge: (base:
|
|
6
|
+
export const blendDodge: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
7
7
|
|
|
8
|
-
export const blendScreen: (base:
|
|
8
|
+
export const blendScreen: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
9
9
|
|
|
10
|
-
export const blendOverlay: (base:
|
|
10
|
+
export const blendOverlay: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
11
11
|
|
|
12
|
-
export const blendColor: (base:
|
|
12
|
+
export const blendColor: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const premultiplyAlpha: (color: Node) => ShaderNodeObject<Node>;
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const unpremultiplyAlpha: (color: Node) => ShaderNodeObject<Node>;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated
|
|
20
20
|
*/
|
|
21
|
-
export const burn: (base:
|
|
21
|
+
export const burn: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated
|
|
25
25
|
*/
|
|
26
|
-
export const dodge: (base:
|
|
26
|
+
export const dodge: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @deprecated
|
|
30
30
|
*/
|
|
31
|
-
export const screen: (base:
|
|
31
|
+
export const screen: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @deprecated
|
|
35
35
|
*/
|
|
36
|
-
export const overlay: (base:
|
|
36
|
+
export const overlay: (base: Node, blend: Node) => ShaderNodeObject<Node>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
1
2
|
import TempNode from "../core/TempNode.js";
|
|
2
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
4
|
|
|
4
5
|
declare class BumpMapNode extends TempNode {
|
|
5
6
|
textureNode: Node;
|
|
@@ -11,6 +12,6 @@ declare class BumpMapNode extends TempNode {
|
|
|
11
12
|
export default BumpMapNode;
|
|
12
13
|
|
|
13
14
|
export const bumpMap: (
|
|
14
|
-
textureNode:
|
|
15
|
-
scaleNode?:
|
|
15
|
+
textureNode: Node,
|
|
16
|
+
scaleNode?: Node | null,
|
|
16
17
|
) => ShaderNodeObject<BumpMapNode>;
|
|
@@ -1,30 +1,30 @@
|
|
|
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
|
|
|
5
|
-
export const grayscale: (color:
|
|
5
|
+
export const grayscale: (color: Node) => ShaderNodeObject<Node>;
|
|
6
6
|
|
|
7
7
|
export const saturation: (
|
|
8
|
-
color:
|
|
9
|
-
adjustment?:
|
|
8
|
+
color: Node,
|
|
9
|
+
adjustment?: Node | number,
|
|
10
10
|
) => ShaderNodeObject<Node>;
|
|
11
11
|
|
|
12
12
|
export const vibrance: (
|
|
13
|
-
color:
|
|
14
|
-
adjustment?:
|
|
13
|
+
color: Node,
|
|
14
|
+
adjustment?: Node | number,
|
|
15
15
|
) => ShaderNodeObject<Node>;
|
|
16
16
|
|
|
17
17
|
export const hue: (
|
|
18
|
-
color:
|
|
19
|
-
adjustment?:
|
|
18
|
+
color: Node,
|
|
19
|
+
adjustment?: Node | number,
|
|
20
20
|
) => ShaderNodeObject<Node>;
|
|
21
21
|
|
|
22
22
|
export const luminance: (
|
|
23
|
-
color:
|
|
24
|
-
luminanceCoefficients?:
|
|
23
|
+
color: Node,
|
|
24
|
+
luminanceCoefficients?: Node,
|
|
25
25
|
) => ShaderNodeObject<MathNode>;
|
|
26
26
|
|
|
27
|
-
export const threshold: (color:
|
|
27
|
+
export const threshold: (color: Node, thershold: Node) => ShaderNodeObject<MathNode>;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Color Decision List (CDL) v1.2
|
|
@@ -47,10 +47,10 @@ export const threshold: (color: NodeRepresentation, thershold: NodeRepresentatio
|
|
|
47
47
|
* @return Output, -Infinity < output < +Infinity
|
|
48
48
|
*/
|
|
49
49
|
export const cdl: (
|
|
50
|
-
color:
|
|
51
|
-
slope?:
|
|
52
|
-
offset?:
|
|
53
|
-
power?:
|
|
54
|
-
saturation?:
|
|
55
|
-
luminanceCoefficients?:
|
|
50
|
+
color: Node,
|
|
51
|
+
slope?: Node,
|
|
52
|
+
offset?: Node,
|
|
53
|
+
power?: Node,
|
|
54
|
+
saturation?: Node,
|
|
55
|
+
luminanceCoefficients?: Node,
|
|
56
56
|
) => ShaderNodeObject<Node>;
|
|
@@ -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 sRGBTransferEOTF: (color:
|
|
4
|
+
export const sRGBTransferEOTF: (color: Node) => ShaderNodeObject<Node>;
|
|
5
5
|
|
|
6
|
-
export const sRGBTransferOETF: (color:
|
|
6
|
+
export const sRGBTransferOETF: (color: Node) => ShaderNodeObject<Node>;
|
|
@@ -2,7 +2,7 @@ import { LinearSRGBColorSpace, SRGBColorSpace } from "../../constants.js";
|
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
3
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
4
4
|
import TempNode from "../core/TempNode.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
|
|
7
7
|
export type WorkingOrOutputColorSpace = "WorkingColorSpace" | "OutputColorSpace";
|
|
8
8
|
|
|
@@ -28,16 +28,16 @@ export default class ColorSpaceNode extends TempNode {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export const workingToColorSpace: (
|
|
31
|
-
node:
|
|
31
|
+
node: Node,
|
|
32
32
|
targetColorSpace: string,
|
|
33
33
|
) => ShaderNodeObject<ColorSpaceNode>;
|
|
34
34
|
export const colorSpaceToWorking: (
|
|
35
|
-
node:
|
|
35
|
+
node: Node,
|
|
36
36
|
sourceColorSpace: string,
|
|
37
37
|
) => ShaderNodeObject<ColorSpaceNode>;
|
|
38
38
|
|
|
39
39
|
export const convertColorSpace: (
|
|
40
|
-
node:
|
|
40
|
+
node: Node,
|
|
41
41
|
sourceColorSpace: string,
|
|
42
42
|
targetColorSpace: string,
|
|
43
43
|
) => ShaderNodeObject<ColorSpaceNode>;
|
|
@@ -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 default class PosterizeNode extends Node {
|
|
5
5
|
sourceNode: Node;
|
|
@@ -9,6 +9,6 @@ export default class PosterizeNode extends Node {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const posterize: (
|
|
12
|
-
sourceNode:
|
|
13
|
-
stepsNode:
|
|
12
|
+
sourceNode: Node,
|
|
13
|
+
stepsNode: Node | number,
|
|
14
14
|
) => ShaderNodeObject<PosterizeNode>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToneMapping } from "../../constants.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
3
|
import TempNode from "../core/TempNode.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
|
|
6
6
|
declare class RenderOutputNode extends TempNode {
|
|
7
7
|
colorNode: Node;
|
|
@@ -16,7 +16,7 @@ declare class RenderOutputNode extends TempNode {
|
|
|
16
16
|
export default RenderOutputNode;
|
|
17
17
|
|
|
18
18
|
export const renderOutput: (
|
|
19
|
-
color:
|
|
19
|
+
color: Node,
|
|
20
20
|
toneMapping?: ToneMapping | null,
|
|
21
21
|
outputColorSpace?: string | null,
|
|
22
22
|
) => ShaderNodeObject<RenderOutputNode>;
|
|
@@ -41,13 +41,3 @@ export const viewportUV: ShaderNodeObject<Node>;
|
|
|
41
41
|
* @deprecated "viewportResolution" is deprecated. Use "screenSize" instead.
|
|
42
42
|
*/
|
|
43
43
|
export const viewportResolution: ShaderNodeObject<ScreenNode>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated "viewportTopLeft" is deprecated. Use "viewportUV" instead.
|
|
47
|
-
*/
|
|
48
|
-
export const viewportTopLeft: ShaderNodeObject<ScreenNode>;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated "viewportBottomLeft" is deprecated. Use "viewportUV.flipY()" instead.
|
|
52
|
-
*/
|
|
53
|
-
export const viewportBottomLeft: ShaderNodeObject<ScreenNode>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const linearToneMapping: (color:
|
|
4
|
+
export const linearToneMapping: (color: Node, exposure: Node) => ShaderNodeObject<Node>;
|
|
5
5
|
|
|
6
|
-
export const reinhardToneMapping: (color:
|
|
6
|
+
export const reinhardToneMapping: (color: Node, exposure: Node) => ShaderNodeObject<Node>;
|
|
7
7
|
|
|
8
|
-
export const cineonToneMapping: (color:
|
|
8
|
+
export const cineonToneMapping: (color: Node, exposure: Node) => ShaderNodeObject<Node>;
|
|
9
9
|
|
|
10
|
-
export const acesFilmicToneMapping: (color:
|
|
10
|
+
export const acesFilmicToneMapping: (color: Node, exposure: Node) => ShaderNodeObject<Node>;
|
|
11
11
|
|
|
12
|
-
export const agxToneMapping: (color:
|
|
12
|
+
export const agxToneMapping: (color: Node, exposure: Node) => ShaderNodeObject<Node>;
|
|
13
13
|
|
|
14
|
-
export const neutralToneMapping: (color:
|
|
14
|
+
export const neutralToneMapping: (color: Node, exposure: Node) => ShaderNodeObject<Node>;
|
|
@@ -2,7 +2,7 @@ import { ToneMapping } from "../../constants.js";
|
|
|
2
2
|
import RendererReferenceNode from "../accessors/RendererReferenceNode.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
4
|
import TempNode from "../core/TempNode.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
|
|
7
7
|
declare class ToneMappingNode extends TempNode {
|
|
8
8
|
toneMapping: ToneMapping;
|
|
@@ -16,17 +16,17 @@ export default ToneMappingNode;
|
|
|
16
16
|
|
|
17
17
|
export const toneMapping: (
|
|
18
18
|
mapping: ToneMapping,
|
|
19
|
-
exposure:
|
|
20
|
-
color?:
|
|
19
|
+
exposure: Node,
|
|
20
|
+
color?: Node,
|
|
21
21
|
) => ShaderNodeObject<ToneMappingNode>;
|
|
22
22
|
export const toneMappingExposure: ShaderNodeObject<RendererReferenceNode>;
|
|
23
23
|
|
|
24
24
|
declare module "../tsl/TSLCore.js" {
|
|
25
25
|
interface NodeElements {
|
|
26
26
|
toneMapping: (
|
|
27
|
-
color:
|
|
28
|
-
mapping?:
|
|
29
|
-
exposure?:
|
|
27
|
+
color: Node,
|
|
28
|
+
mapping?: ToneMapping,
|
|
29
|
+
exposure?: Node,
|
|
30
30
|
) => ShaderNodeObject<ToneMappingNode>;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
import ViewportTextureNode from "./ViewportTextureNode.js";
|
|
4
4
|
|
|
5
5
|
declare class ViewportDepthTextureNode extends ViewportTextureNode {
|
|
@@ -9,6 +9,6 @@ declare class ViewportDepthTextureNode extends ViewportTextureNode {
|
|
|
9
9
|
export default ViewportDepthTextureNode;
|
|
10
10
|
|
|
11
11
|
export const viewportDepthTexture: (
|
|
12
|
-
uvNode?:
|
|
13
|
-
levelNode?:
|
|
12
|
+
uvNode?: Node,
|
|
13
|
+
levelNode?: Node,
|
|
14
14
|
) => ShaderNodeObject<ViewportDepthTextureNode>;
|
three/src/nodes/fog/Fog.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const rangeFogFactor: (near:
|
|
4
|
+
export const rangeFogFactor: (near: Node | number, far: Node | number) => ShaderNodeObject<Node>;
|
|
5
5
|
|
|
6
|
-
export const densityFogFactor: (density:
|
|
6
|
+
export const densityFogFactor: (density: Node) => ShaderNodeObject<Node>;
|
|
7
7
|
|
|
8
|
-
export const fog: (color:
|
|
8
|
+
export const fog: (color: Node, factor: Node) => ShaderNodeObject<Node>;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated
|
|
12
12
|
*/
|
|
13
13
|
export function rangeFog(
|
|
14
|
-
color:
|
|
15
|
-
near:
|
|
16
|
-
far:
|
|
14
|
+
color: Node,
|
|
15
|
+
near: Node,
|
|
16
|
+
far: Node,
|
|
17
17
|
): ShaderNodeObject<Node>;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @deprecated
|
|
21
21
|
*/
|
|
22
22
|
export function densityFog(
|
|
23
|
-
color:
|
|
24
|
-
near:
|
|
25
|
-
far:
|
|
23
|
+
color: Node,
|
|
24
|
+
near: Node,
|
|
25
|
+
far: Node,
|
|
26
26
|
): ShaderNodeObject<Node>;
|
|
@@ -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 {
|