@types/three 0.177.0 → 0.178.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/capabilities/WebGL.d.ts +0 -11
- three/examples/jsm/controls/TransformControls.d.ts +16 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +2 -2
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/transpiler/AST.d.ts +77 -26
- three/examples/jsm/transpiler/TSLEncoder.d.ts +9 -3
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +4 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -2
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +20 -0
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +4 -4
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +6 -6
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/FilmNode.d.ts +4 -4
- three/examples/jsm/tsl/display/GTAONode.d.ts +3 -3
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +5 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +8 -8
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +4 -4
- three/examples/jsm/tsl/display/MotionBlur.d.ts +4 -4
- three/examples/jsm/tsl/display/OutlineNode.d.ts +3 -3
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +3 -3
- three/examples/jsm/tsl/display/SMAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/SSRNode.d.ts +5 -5
- three/examples/jsm/tsl/display/Sepia.d.ts +2 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +3 -3
- three/examples/jsm/tsl/display/TransitionNode.d.ts +4 -4
- three/examples/jsm/tsl/display/hashBlur.d.ts +5 -5
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
- three/package.json +2 -2
- three/src/Three.TSL.d.ts +9 -16
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/constants.d.ts +13 -5
- three/src/core/BufferGeometry.d.ts +6 -1
- three/src/core/GLBufferAttribute.d.ts +18 -1
- three/src/helpers/AxesHelper.d.ts +3 -1
- three/src/materials/LineBasicMaterial.d.ts +66 -34
- three/src/materials/LineDashedMaterial.d.ts +41 -21
- three/src/materials/Material.d.ts +408 -398
- three/src/materials/MeshBasicMaterial.d.ts +101 -62
- three/src/materials/MeshDepthMaterial.d.ts +71 -32
- three/src/materials/MeshDistanceMaterial.d.ts +65 -29
- three/src/materials/MeshLambertMaterial.d.ts +179 -103
- three/src/materials/MeshMatcapMaterial.d.ts +97 -55
- three/src/materials/MeshNormalMaterial.d.ts +76 -41
- three/src/materials/MeshPhongMaterial.d.ts +164 -100
- three/src/materials/MeshPhysicalMaterial.d.ts +164 -116
- three/src/materials/MeshStandardMaterial.d.ts +178 -91
- three/src/materials/MeshToonMaterial.d.ts +130 -81
- three/src/materials/PointsMaterial.d.ts +77 -30
- three/src/materials/RawShaderMaterial.d.ts +12 -7
- three/src/materials/ShaderMaterial.d.ts +186 -98
- three/src/materials/ShadowMaterial.d.ts +49 -23
- three/src/materials/SpriteMaterial.d.ts +62 -33
- three/src/materials/nodes/Line2NodeMaterial.d.ts +87 -40
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +35 -16
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +75 -20
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +49 -30
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -42
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +38 -26
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +36 -22
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +68 -48
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +240 -65
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +99 -3
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +83 -47
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +42 -36
- three/src/materials/nodes/NodeMaterial.d.ts +417 -56
- three/src/materials/nodes/NodeMaterials.d.ts +3 -2
- three/src/materials/nodes/PointsNodeMaterial.d.ts +31 -7
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +38 -11
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +68 -20
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
- three/src/math/Color.d.ts +1 -1
- three/src/nodes/Nodes.d.ts +1 -3
- three/src/nodes/TSL.d.ts +4 -3
- three/src/nodes/accessors/AccessorsUtils.d.ts +3 -3
- three/src/nodes/accessors/Bitangent.d.ts +0 -2
- three/src/nodes/accessors/CubeTextureNode.d.ts +7 -7
- three/src/nodes/accessors/Normal.d.ts +19 -5
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +1 -1
- three/src/nodes/accessors/StorageBufferNode.d.ts +3 -2
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -5
- three/src/nodes/accessors/Tangent.d.ts +0 -2
- three/src/nodes/accessors/TangentUtils.d.ts +22 -0
- three/src/nodes/accessors/Texture3DNode.d.ts +5 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +4 -2
- three/src/nodes/accessors/TextureNode.d.ts +16 -16
- three/src/nodes/accessors/TextureSizeNode.d.ts +3 -3
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -7
- three/src/nodes/code/FunctionCallNode.d.ts +3 -1
- three/src/nodes/code/FunctionNode.d.ts +2 -2
- three/src/nodes/code/ScriptableNode.d.ts +2 -2
- three/src/nodes/core/AssignNode.d.ts +2 -2
- three/src/nodes/core/AttributeNode.d.ts +1 -1
- three/src/nodes/core/BypassNode.d.ts +2 -2
- three/src/nodes/core/CacheNode.d.ts +0 -2
- three/src/nodes/core/ContextNode.d.ts +3 -3
- three/src/nodes/core/StackNode.d.ts +3 -13
- three/src/nodes/core/SubBuildNode.d.ts +15 -0
- three/src/nodes/core/VarNode.d.ts +4 -4
- three/src/nodes/core/VaryingNode.d.ts +3 -3
- three/src/nodes/display/BlendModes.d.ts +12 -12
- three/src/nodes/display/BumpMapNode.d.ts +4 -3
- three/src/nodes/display/ColorAdjustment.d.ts +17 -17
- three/src/nodes/display/ColorSpaceFunctions.d.ts +3 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +4 -4
- three/src/nodes/display/FrontFacingNode.d.ts +1 -0
- three/src/nodes/display/PosterizeNode.d.ts +3 -3
- three/src/nodes/display/RenderOutputNode.d.ts +2 -2
- three/src/nodes/display/ScreenNode.d.ts +0 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +7 -7
- three/src/nodes/display/ToneMappingNode.d.ts +6 -6
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -3
- three/src/nodes/fog/Fog.d.ts +10 -10
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +4 -4
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +2 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +4 -4
- three/src/nodes/geometry/RangeNode.d.ts +9 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +20 -20
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
- three/src/nodes/lighting/PointShadowNode.d.ts +11 -11
- three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
- three/src/nodes/materialx/MaterialXNodes.d.ts +59 -59
- three/src/nodes/materialx/lib/mx_hsv.d.ts +3 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +206 -206
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +2 -2
- three/src/nodes/math/ConditionalNode.d.ts +4 -19
- three/src/nodes/math/Hash.d.ts +2 -2
- three/src/nodes/math/MathNode.d.ts +21 -17
- three/src/nodes/math/OperatorNode.d.ts +41 -52
- three/src/nodes/math/TriNoise3D.d.ts +6 -6
- three/src/nodes/pmrem/PMREMNode.d.ts +3 -3
- three/src/nodes/pmrem/PMREMUtils.d.ts +20 -20
- three/src/nodes/procedural/Checker.d.ts +2 -2
- three/src/nodes/shapes/Shapes.d.ts +2 -2
- three/src/nodes/tsl/TSLBase.d.ts +1 -0
- three/src/nodes/tsl/TSLCore.d.ts +176 -76
- three/src/nodes/utils/CubeMapNode.d.ts +2 -2
- three/src/nodes/utils/DebugNode.d.ts +2 -2
- three/src/nodes/utils/Discard.d.ts +2 -2
- three/src/nodes/utils/EquirectUV.d.ts +4 -0
- three/src/nodes/utils/LoopNode.d.ts +2 -7
- three/src/nodes/utils/MatcapUV.d.ts +4 -0
- three/src/nodes/utils/Oscillators.d.ts +5 -5
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +9 -9
- three/src/nodes/utils/RTTNode.d.ts +3 -3
- three/src/nodes/utils/RemapNode.d.ts +9 -9
- three/src/nodes/utils/RotateNode.d.ts +3 -3
- three/src/nodes/utils/SampleNode.d.ts +16 -0
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +4 -4
- three/src/nodes/utils/SpriteUtils.d.ts +2 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +4 -3
- three/src/nodes/utils/TriplanarTextures.d.ts +20 -0
- three/src/nodes/utils/UVUtils.d.ts +8 -7
- three/src/nodes/utils/ViewportUtils.d.ts +2 -2
- three/src/objects/LOD.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +1 -1
- three/src/renderers/common/Backend.d.ts +3 -3
- three/src/renderers/common/RenderObject.d.ts +10 -2
- three/src/renderers/common/Renderer.d.ts +5 -5
- three/src/renderers/common/Storage3DTexture.d.ts +40 -0
- three/src/renderers/common/StorageArrayTexture.d.ts +29 -0
- three/src/renderers/common/Textures.d.ts +2 -2
- three/src/renderers/common/XRRenderTarget.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +4 -9
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +1 -1
- three/src/renderers/common/nodes/Nodes.d.ts +1 -1
- three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +65 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +9 -0
- three/src/nodes/utils/EquirectUVNode.d.ts +0 -8
- three/src/nodes/utils/MatcapUVNode.d.ts +0 -8
- three/src/nodes/utils/TriplanarTexturesNode.d.ts +0 -36
- three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +0 -5
three/src/nodes/tsl/TSLCore.d.ts
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
import { Color
|
|
1
|
+
import { Color } from "../../math/Color.js";
|
|
2
|
+
import { Matrix2 } from "../../math/Matrix2.js";
|
|
3
|
+
import { Matrix3 } from "../../math/Matrix3.js";
|
|
4
|
+
import { Matrix4 } from "../../math/Matrix4.js";
|
|
5
|
+
import { Vector2 } from "../../math/Vector2.js";
|
|
2
6
|
import { Vector3 } from "../../math/Vector3.js";
|
|
7
|
+
import { Vector4 } from "../../math/Vector4.js";
|
|
3
8
|
import ConstNode from "../core/ConstNode.js";
|
|
4
9
|
import Node from "../core/Node.js";
|
|
5
10
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
6
11
|
import StackNode from "../core/StackNode.js";
|
|
7
|
-
import
|
|
12
|
+
import JoinNode from "../utils/JoinNode.js";
|
|
8
13
|
|
|
9
14
|
export interface NodeElements {
|
|
10
15
|
toStack: typeof Stack;
|
|
11
16
|
|
|
12
|
-
toColor:
|
|
13
|
-
toFloat:
|
|
14
|
-
toInt:
|
|
15
|
-
toUint:
|
|
16
|
-
toBool:
|
|
17
|
-
toVec2:
|
|
18
|
-
toIvec2:
|
|
19
|
-
toUvec2:
|
|
20
|
-
toBvec2:
|
|
21
|
-
toVec3:
|
|
22
|
-
toIvec3:
|
|
23
|
-
toUvec3:
|
|
24
|
-
toBvec3:
|
|
25
|
-
toVec4:
|
|
26
|
-
toIvec4:
|
|
27
|
-
toUvec4:
|
|
28
|
-
toBvec4:
|
|
29
|
-
toMat2:
|
|
30
|
-
toMat3:
|
|
31
|
-
toMat4:
|
|
17
|
+
toColor: (node: Node) => ShaderNodeObject<Node>;
|
|
18
|
+
toFloat: (node: Node) => ShaderNodeObject<Node>;
|
|
19
|
+
toInt: (node: Node) => ShaderNodeObject<Node>;
|
|
20
|
+
toUint: (node: Node) => ShaderNodeObject<Node>;
|
|
21
|
+
toBool: (node: Node) => ShaderNodeObject<Node>;
|
|
22
|
+
toVec2: (node: Node) => ShaderNodeObject<Node>;
|
|
23
|
+
toIvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
24
|
+
toUvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
25
|
+
toBvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
26
|
+
toVec3: (node: Node) => ShaderNodeObject<Node>;
|
|
27
|
+
toIvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
28
|
+
toUvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
29
|
+
toBvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
30
|
+
toVec4: (node: Node) => ShaderNodeObject<Node>;
|
|
31
|
+
toIvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
32
|
+
toUvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
33
|
+
toBvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
34
|
+
toMat2: (node: Node) => ShaderNodeObject<Node>;
|
|
35
|
+
toMat3: (node: Node) => ShaderNodeObject<Node>;
|
|
36
|
+
toMat4: (node: Node) => ShaderNodeObject<Node>;
|
|
32
37
|
|
|
33
38
|
element: typeof element;
|
|
34
39
|
convert: typeof convert;
|
|
@@ -89,11 +94,8 @@ export type ShaderNodeObject<T extends Node> =
|
|
|
89
94
|
}
|
|
90
95
|
& Swizzable<T>;
|
|
91
96
|
|
|
92
|
-
/** anything that can be passed to {@link nodeObject} and returns a proxy */
|
|
93
|
-
export type NodeRepresentation<T extends Node = Node> = number | boolean | Vector3 | Node | ShaderNodeObject<T>;
|
|
94
|
-
|
|
95
97
|
/** anything that can be passed to {@link nodeObject} */
|
|
96
|
-
export type NodeObjectOption =
|
|
98
|
+
export type NodeObjectOption = Node | number | string;
|
|
97
99
|
|
|
98
100
|
// same logic as in ShaderNodeObject: number,boolean,node->ShaderNodeObject, otherwise do nothing
|
|
99
101
|
export type NodeObject<T> = T extends Node ? ShaderNodeObject<T>
|
|
@@ -101,7 +103,7 @@ export type NodeObject<T> = T extends Node ? ShaderNodeObject<T>
|
|
|
101
103
|
: T;
|
|
102
104
|
|
|
103
105
|
// opposite of NodeObject: node -> node|ShaderNodeObject|boolean|number, otherwise do nothing
|
|
104
|
-
type Proxied<T> = T extends Node ?
|
|
106
|
+
type Proxied<T> = T extends Node | number ? Node | number : T;
|
|
105
107
|
// https://github.com/microsoft/TypeScript/issues/42435#issuecomment-765557874
|
|
106
108
|
export type ProxiedTuple<T extends readonly [...unknown[]]> = [...{ [index in keyof T]: Proxied<T[index]> }];
|
|
107
109
|
export type ProxiedObject<T> = { [index in keyof T]: Proxied<T[index]> };
|
|
@@ -152,7 +154,7 @@ type OverloadedConstructorsOf<T> = T extends {
|
|
|
152
154
|
type AnyConstructors = Constructors<any, any, any, any>;
|
|
153
155
|
|
|
154
156
|
/**
|
|
155
|
-
* Returns all constructors where the first
|
|
157
|
+
* Returns all constructors where the first parameter is assignable to given "scope"
|
|
156
158
|
*/
|
|
157
159
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
158
160
|
type FilterConstructorsByScope<T extends AnyConstructors, S> = {
|
|
@@ -171,7 +173,7 @@ type ConstructorUnion<T extends AnyConstructors> =
|
|
|
171
173
|
| Exclude<T["d"], undefined>;
|
|
172
174
|
|
|
173
175
|
/**
|
|
174
|
-
* Extract list of possible scopes - union of the first
|
|
176
|
+
* Extract list of possible scopes - union of the first parameter
|
|
175
177
|
* of all constructors, should it be string
|
|
176
178
|
*/
|
|
177
179
|
type ExtractScopes<T extends AnyConstructors> =
|
|
@@ -184,8 +186,6 @@ type GetConstructorsByScope<T, S> = ConstructorUnion<FilterConstructorsByScope<O
|
|
|
184
186
|
type GetConstructors<T> = ConstructorUnion<OverloadedConstructorsOf<T>>;
|
|
185
187
|
type GetPossibleScopes<T> = ExtractScopes<OverloadedConstructorsOf<T>>;
|
|
186
188
|
|
|
187
|
-
export type ConvertType = (...params: unknown[]) => ShaderNodeObject<Node>;
|
|
188
|
-
|
|
189
189
|
type NodeArray<T extends NodeObjectOption[]> = { [index in keyof T]: NodeObject<T[index]> };
|
|
190
190
|
type NodeObjects<T> = { [key in keyof T]: T[key] extends NodeObjectOption ? NodeObject<T[key]> : T[key] };
|
|
191
191
|
type ConstructedNode<T> = T extends new(...args: any[]) => infer R ? (R extends Node ? R : never) : never;
|
|
@@ -202,9 +202,9 @@ export const defined: (v: unknown) => unknown;
|
|
|
202
202
|
export const getConstNodeType: (value: NodeOrType) => string | null;
|
|
203
203
|
|
|
204
204
|
export class ShaderNode<T = {}, R extends Node = Node> {
|
|
205
|
-
constructor(jsFunc: (inputs: NodeObjects<T>, builder: NodeBuilder) =>
|
|
205
|
+
constructor(jsFunc: (inputs: NodeObjects<T>, builder: NodeBuilder) => Node);
|
|
206
206
|
call: (
|
|
207
|
-
inputs: { [key in keyof T]: T[key] extends
|
|
207
|
+
inputs: { [key in keyof T]: T[key] extends Node ? ShaderNodeObject<Node> | Node : T[key] },
|
|
208
208
|
builder?: NodeBuilder,
|
|
209
209
|
) => ShaderNodeObject<R>;
|
|
210
210
|
}
|
|
@@ -255,7 +255,7 @@ interface ShaderNodeFn<Args extends readonly unknown[]> {
|
|
|
255
255
|
|
|
256
256
|
setLayout: (layout: Layout) => this;
|
|
257
257
|
|
|
258
|
-
once: (
|
|
258
|
+
once: (subBuilds?: string[] | null) => this;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
export function Fn(jsFunc: (builder: NodeBuilder) => void): ShaderNodeFn<[]>;
|
|
@@ -271,67 +271,167 @@ export const setCurrentStack: (stack: StackNode | null) => void;
|
|
|
271
271
|
export const getCurrentStack: () => StackNode | null;
|
|
272
272
|
|
|
273
273
|
export const If: (boolNode: Node, method: () => void) => StackNode;
|
|
274
|
-
export const Switch: (expression:
|
|
274
|
+
export const Switch: (expression: Node) => StackNode;
|
|
275
275
|
|
|
276
276
|
export function Stack(node: Node): Node;
|
|
277
277
|
|
|
278
278
|
interface ColorFunction {
|
|
279
|
-
|
|
279
|
+
// The first branch in `ConvertType` will forward the parameters to the `Color` constructor if there are no
|
|
280
|
+
// parameters or all the parameters are non-objects
|
|
281
|
+
(color?: string | number): ShaderNodeObject<ConstNode<Color>>;
|
|
280
282
|
(r: number, g: number, b: number): ShaderNodeObject<ConstNode<Color>>;
|
|
281
|
-
|
|
283
|
+
|
|
284
|
+
// The second branch does not apply because `cacheMap` is `null`
|
|
285
|
+
|
|
286
|
+
// The third branch will be triggered if there is a single parameter.
|
|
287
|
+
(color: Color): ShaderNodeObject<ConstNode<Color>>;
|
|
288
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
289
|
+
|
|
290
|
+
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
291
|
+
// object. Not sure which cases are worth considering here.
|
|
282
292
|
}
|
|
283
293
|
|
|
284
294
|
export const color: ColorFunction;
|
|
285
295
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
296
|
+
interface NumberFunction {
|
|
297
|
+
(value?: number): ShaderNodeObject<ConstNode<number>>;
|
|
298
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export const float: NumberFunction;
|
|
302
|
+
export const int: NumberFunction;
|
|
303
|
+
export const uint: NumberFunction;
|
|
304
|
+
|
|
305
|
+
interface BooleanFunction {
|
|
306
|
+
(value?: boolean): ShaderNodeObject<ConstNode<boolean>>;
|
|
307
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export const bool: BooleanFunction;
|
|
311
|
+
|
|
312
|
+
interface Vector2Function {
|
|
313
|
+
// The first branch in `ConvertType` will forward the parameters to the `Vector2` constructor if there are no
|
|
314
|
+
// parameters or all the parameters are non-objects
|
|
315
|
+
(x?: number, y?: number): ShaderNodeObject<ConstNode<Vector2>>;
|
|
316
|
+
|
|
317
|
+
// The second branch does not apply because `cacheMap` is `null`
|
|
318
|
+
|
|
319
|
+
// The third branch will be triggered if there is a single parameter.
|
|
320
|
+
(value: Vector2): ShaderNodeObject<ConstNode<Vector2>>;
|
|
321
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
322
|
+
|
|
323
|
+
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
324
|
+
// object.
|
|
325
|
+
(x: Node | number, y: Node | number): ShaderNodeObject<JoinNode>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export const vec2: Vector2Function;
|
|
329
|
+
export const ivec2: Vector2Function;
|
|
330
|
+
export const uvec2: Vector2Function;
|
|
331
|
+
export const bvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
332
|
+
|
|
333
|
+
interface Vector3Function {
|
|
334
|
+
// The first branch in `ConvertType` will forward the parameters to the `Vector3` constructor if there are no
|
|
335
|
+
// parameters or all the parameters are non-objects
|
|
336
|
+
(x?: number, y?: number, z?: number): ShaderNodeObject<ConstNode<Vector3>>;
|
|
337
|
+
|
|
338
|
+
// The second branch does not apply because `cacheMap` is `null`
|
|
339
|
+
|
|
340
|
+
// The third branch will be triggered if there is a single parameter.
|
|
341
|
+
(value: Vector3): ShaderNodeObject<ConstNode<Vector3>>;
|
|
342
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
290
343
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
344
|
+
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
345
|
+
// object.
|
|
346
|
+
(x: Node | number, y: Node | number, z?: Node | number): ShaderNodeObject<JoinNode>;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export const vec3: Vector3Function;
|
|
350
|
+
export const ivec3: Vector3Function;
|
|
351
|
+
export const uvec3: Vector3Function;
|
|
352
|
+
export const bvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
353
|
+
|
|
354
|
+
interface Vector4Function {
|
|
355
|
+
// The first branch in `ConvertType` will forward the parameters to the `Vector4` constructor if there are no
|
|
356
|
+
// parameters or all the parameters are non-objects
|
|
357
|
+
(x?: number, y?: number, z?: number, w?: number): ShaderNodeObject<ConstNode<Vector4>>;
|
|
358
|
+
|
|
359
|
+
// The second branch does not apply because `cacheMap` is `null`
|
|
360
|
+
|
|
361
|
+
// The third branch will be triggered if there is a single parameter.
|
|
362
|
+
(value: Vector4): ShaderNodeObject<ConstNode<Vector4>>;
|
|
363
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
295
364
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
365
|
+
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
366
|
+
// object.
|
|
367
|
+
(x: Node | number, y: Node | number, z?: Node | number, w?: Node | number): ShaderNodeObject<JoinNode>;
|
|
368
|
+
}
|
|
300
369
|
|
|
301
|
-
export const vec4:
|
|
302
|
-
export const ivec4:
|
|
303
|
-
export const uvec4:
|
|
304
|
-
export const bvec4:
|
|
370
|
+
export const vec4: Vector4Function;
|
|
371
|
+
export const ivec4: Vector4Function;
|
|
372
|
+
export const uvec4: Vector4Function;
|
|
373
|
+
export const bvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
305
374
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
375
|
+
interface Matrix2Function {
|
|
376
|
+
(value: Matrix2): ShaderNodeObject<ConstNode<Matrix2>>;
|
|
377
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export const mat2: Matrix2Function;
|
|
381
|
+
|
|
382
|
+
interface Matrix3Function {
|
|
383
|
+
(value: Matrix3): ShaderNodeObject<ConstNode<Matrix3>>;
|
|
384
|
+
(
|
|
385
|
+
n11: number,
|
|
386
|
+
n12: number,
|
|
387
|
+
n13: number,
|
|
388
|
+
n21: number,
|
|
389
|
+
n22: number,
|
|
390
|
+
n23: number,
|
|
391
|
+
n31: number,
|
|
392
|
+
n32: number,
|
|
393
|
+
n33: number,
|
|
394
|
+
): ShaderNodeObject<ConstNode<Matrix3>>;
|
|
395
|
+
(): ShaderNodeObject<ConstNode<Matrix3>>;
|
|
396
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export const mat3: Matrix3Function;
|
|
400
|
+
|
|
401
|
+
interface Matrix4Function {
|
|
402
|
+
(value: Matrix4): ShaderNodeObject<ConstNode<Matrix4>>;
|
|
403
|
+
(
|
|
404
|
+
n11: number,
|
|
405
|
+
n12: number,
|
|
406
|
+
n13: number,
|
|
407
|
+
n14: number,
|
|
408
|
+
n21: number,
|
|
409
|
+
n22: number,
|
|
410
|
+
n23: number,
|
|
411
|
+
n24: number,
|
|
412
|
+
n31: number,
|
|
413
|
+
n32: number,
|
|
414
|
+
n33: number,
|
|
415
|
+
n34: number,
|
|
416
|
+
n41: number,
|
|
417
|
+
n42: number,
|
|
418
|
+
n43: number,
|
|
419
|
+
n44: number,
|
|
420
|
+
): ShaderNodeObject<ConstNode<Matrix4>>;
|
|
421
|
+
(): ShaderNodeObject<ConstNode<Matrix4>>;
|
|
422
|
+
(node: Node): ShaderNodeObject<Node>;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export const mat4: Matrix4Function;
|
|
309
426
|
|
|
310
427
|
export const string: (value?: string) => ShaderNodeObject<ConstNode<string>>;
|
|
311
428
|
export const arrayBuffer: (value: ArrayBuffer) => ShaderNodeObject<ConstNode<ArrayBuffer>>;
|
|
312
429
|
|
|
313
|
-
export const element: (node:
|
|
314
|
-
export const convert: (node:
|
|
315
|
-
export const split: (node:
|
|
430
|
+
export const element: (node: Node, indexNode: Node) => ShaderNodeObject<Node>;
|
|
431
|
+
export const convert: (node: Node, types: string) => ShaderNodeObject<Node>;
|
|
432
|
+
export const split: (node: Node, channels?: string) => ShaderNodeObject<Node>;
|
|
316
433
|
|
|
317
434
|
/**
|
|
318
435
|
* @deprecated append() has been renamed to Stack().
|
|
319
436
|
*/
|
|
320
437
|
export const append: (node: Node) => Node;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* @deprecated tslFn() has been renamed to Fn()
|
|
324
|
-
*/
|
|
325
|
-
export function tslFn<R extends Node = ShaderNodeObject<Node>>(jsFunc: () => R): () => R;
|
|
326
|
-
/**
|
|
327
|
-
* @deprecated tslFn() has been renamed to Fn()
|
|
328
|
-
*/
|
|
329
|
-
export function tslFn<T extends any[], R extends Node = ShaderNodeObject<Node>>(
|
|
330
|
-
jsFunc: (args: T) => R,
|
|
331
|
-
): (...args: ProxiedTuple<T>) => R;
|
|
332
|
-
/**
|
|
333
|
-
* @deprecated tslFn() has been renamed to Fn()
|
|
334
|
-
*/
|
|
335
|
-
export function tslFn<T extends { [key: string]: unknown }, R extends Node = ShaderNodeObject<Node>>(
|
|
336
|
-
jsFunc: (args: T) => R,
|
|
337
|
-
): (args: ProxiedObject<T>) => R;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import TempNode from "../core/TempNode.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
|
|
5
5
|
declare class CubeMapNode extends TempNode {
|
|
6
6
|
envNode: Node;
|
|
@@ -10,4 +10,4 @@ declare class CubeMapNode extends TempNode {
|
|
|
10
10
|
|
|
11
11
|
export default CubeMapNode;
|
|
12
12
|
|
|
13
|
-
export const cubeMapNode: (envNode:
|
|
13
|
+
export const cubeMapNode: (envNode: Node) => ShaderNodeObject<CubeMapNode>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
3
3
|
import TempNode from "../core/TempNode.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
|
|
6
6
|
declare class DebugNode extends TempNode {
|
|
7
7
|
constructor(node: Node, callback?: ((code: string) => void) | null);
|
|
@@ -10,7 +10,7 @@ declare class DebugNode extends TempNode {
|
|
|
10
10
|
export default DebugNode;
|
|
11
11
|
|
|
12
12
|
export const debug: (
|
|
13
|
-
node:
|
|
13
|
+
node: Node,
|
|
14
14
|
callback?: ((node: NodeBuilder, code: string) => void) | null,
|
|
15
15
|
) => ShaderNodeObject<DebugNode>;
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const Discard: (conditional?:
|
|
4
|
+
export const Discard: (conditional?: Node) => ShaderNodeObject<Node>;
|
|
5
5
|
export const Return: () => ShaderNodeObject<Node>;
|
|
6
6
|
|
|
7
7
|
declare module "../tsl/TSLCore.js" {
|
|
@@ -4,12 +4,12 @@ import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
|
4
4
|
|
|
5
5
|
interface LoopNodeObjectParameter {
|
|
6
6
|
// TODO Expand to other types and update loop function types appropriately
|
|
7
|
-
type?: "int" | "uint";
|
|
7
|
+
type?: "int" | "uint" | "float";
|
|
8
8
|
// TODO The variable name should affect the type of the loop function
|
|
9
9
|
// name?: string;
|
|
10
10
|
start: number | Node;
|
|
11
11
|
end: number | Node;
|
|
12
|
-
condition
|
|
12
|
+
condition?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
type LoopNodeParameter = Node | number | LoopNodeObjectParameter;
|
|
@@ -36,8 +36,3 @@ interface Loop {
|
|
|
36
36
|
export const Loop: Loop;
|
|
37
37
|
export const Continue: () => ShaderNodeObject<Node>;
|
|
38
38
|
export const Break: () => ShaderNodeObject<Node>;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @deprecated loop() has been renamed to Loop()
|
|
42
|
-
*/
|
|
43
|
-
export const loop: (...params: unknown[]) => ShaderNodeObject<Node>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const oscSine: (timeNode?:
|
|
5
|
-
export const oscSquare: (timeNode?:
|
|
6
|
-
export const oscTriangle: (timeNode?:
|
|
7
|
-
export const oscSawtooth: (timeNode?:
|
|
4
|
+
export const oscSine: (timeNode?: Node) => ShaderNodeObject<Node>;
|
|
5
|
+
export const oscSquare: (timeNode?: Node) => ShaderNodeObject<Node>;
|
|
6
|
+
export const oscTriangle: (timeNode?: Node) => ShaderNodeObject<Node>;
|
|
7
|
+
export const oscSawtooth: (timeNode?: Node) => ShaderNodeObject<Node>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const directionToColor: (node:
|
|
5
|
-
export const colorToDirection: (node:
|
|
4
|
+
export const directionToColor: (node: Node) => ShaderNodeObject<Node>;
|
|
5
|
+
export const colorToDirection: (node: Node) => ShaderNodeObject<Node>;
|
|
@@ -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
|
/**
|
|
5
5
|
* Computes a position in view space based on a fragment's screen position expressed as uv coordinates, the fragments
|
|
@@ -11,9 +11,9 @@ import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
|
11
11
|
* @return {vec3} The fragments position in view space.
|
|
12
12
|
*/
|
|
13
13
|
export const getViewPosition: (
|
|
14
|
-
screenPosition:
|
|
15
|
-
depth:
|
|
16
|
-
projectionMatrixInverse:
|
|
14
|
+
screenPosition: Node,
|
|
15
|
+
depth: Node,
|
|
16
|
+
projectionMatrixInverse: Node,
|
|
17
17
|
) => ShaderNodeObject<Node>;
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -25,8 +25,8 @@ export const getViewPosition: (
|
|
|
25
25
|
* @return {vec2} The fragment's screen position expressed as uv coordinates.
|
|
26
26
|
*/
|
|
27
27
|
export const getScreenPosition: (
|
|
28
|
-
viewPosition:
|
|
29
|
-
projectionMatrix:
|
|
28
|
+
viewPosition: Node,
|
|
29
|
+
projectionMatrix: Node,
|
|
30
30
|
) => ShaderNodeObject<Node>;
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -39,7 +39,7 @@ export const getScreenPosition: (
|
|
|
39
39
|
* @return {vec3} The computed normal vector.
|
|
40
40
|
*/
|
|
41
41
|
export const getNormalFromDepth: (
|
|
42
|
-
uv:
|
|
43
|
-
depthTexture:
|
|
44
|
-
projectionMatrixInverse:
|
|
42
|
+
uv: Node,
|
|
43
|
+
depthTexture: Node,
|
|
44
|
+
projectionMatrixInverse: Node,
|
|
45
45
|
) => ShaderNodeObject<Node>;
|
|
@@ -2,7 +2,7 @@ import { TextureDataType } from "../../constants.js";
|
|
|
2
2
|
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
3
3
|
import TextureNode from "../accessors/TextureNode.js";
|
|
4
4
|
import Node from "../core/Node.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
|
|
7
7
|
export interface RTTNodeOptions {
|
|
8
8
|
type: TextureDataType;
|
|
@@ -22,7 +22,7 @@ declare class RTTNode extends TextureNode {
|
|
|
22
22
|
|
|
23
23
|
constructor(node: Node, width?: number | null, height?: number | null, options?: RTTNodeOptions);
|
|
24
24
|
|
|
25
|
-
get
|
|
25
|
+
get autoResize(): boolean;
|
|
26
26
|
|
|
27
27
|
setSize(width: number | null, height: number | null): void;
|
|
28
28
|
|
|
@@ -32,7 +32,7 @@ declare class RTTNode extends TextureNode {
|
|
|
32
32
|
export default RTTNode;
|
|
33
33
|
|
|
34
34
|
export const rtt: (
|
|
35
|
-
node:
|
|
35
|
+
node: Node,
|
|
36
36
|
width?: number | null,
|
|
37
37
|
height?: number | null,
|
|
38
38
|
options?: RTTNodeOptions,
|
|
@@ -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 RemapNode extends Node {
|
|
5
5
|
node: Node;
|
|
@@ -15,17 +15,17 @@ export default class RemapNode extends Node {
|
|
|
15
15
|
|
|
16
16
|
export const remap: (
|
|
17
17
|
node: Node,
|
|
18
|
-
inLowNode:
|
|
19
|
-
inHighNode:
|
|
20
|
-
outLowNode?:
|
|
21
|
-
outHighNode?:
|
|
18
|
+
inLowNode: Node | number,
|
|
19
|
+
inHighNode: Node | number,
|
|
20
|
+
outLowNode?: Node | number,
|
|
21
|
+
outHighNode?: Node | number,
|
|
22
22
|
) => ShaderNodeObject<RemapNode>;
|
|
23
23
|
export const remapClamp: (
|
|
24
24
|
node: Node,
|
|
25
|
-
inLowNode:
|
|
26
|
-
inHighNode:
|
|
27
|
-
outLowNode?:
|
|
28
|
-
outHighNode?:
|
|
25
|
+
inLowNode: Node | number,
|
|
26
|
+
inHighNode: Node | number,
|
|
27
|
+
outLowNode?: Node | number,
|
|
28
|
+
outHighNode?: Node | number,
|
|
29
29
|
) => ShaderNodeObject<RemapNode>;
|
|
30
30
|
|
|
31
31
|
declare module "../tsl/TSLCore.js" {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import TempNode from "../core/TempNode.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
|
|
5
5
|
export default class RotateNode extends TempNode {
|
|
6
6
|
positionNode: Node;
|
|
@@ -10,6 +10,6 @@ export default class RotateNode extends TempNode {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const rotate: (
|
|
13
|
-
positionNode:
|
|
14
|
-
rotationNode:
|
|
13
|
+
positionNode: Node,
|
|
14
|
+
rotationNode: Node | number,
|
|
15
15
|
) => ShaderNodeObject<RotateNode>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
|
|
4
|
+
declare class SampleNode extends Node {
|
|
5
|
+
callback: (uv: Node) => Node;
|
|
6
|
+
|
|
7
|
+
readonly isSampleNode: true;
|
|
8
|
+
|
|
9
|
+
constructor(callback: (uv: Node) => Node);
|
|
10
|
+
|
|
11
|
+
sample(uv: Node): Node;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default SampleNode;
|
|
15
|
+
|
|
16
|
+
export const sample: (callback: (uv: Node) => Node) => ShaderNodeObject<SampleNode>;
|
|
@@ -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 SpriteSheetUVNode extends Node {
|
|
5
5
|
countNode: Node;
|
|
@@ -10,7 +10,7 @@ export default class SpriteSheetUVNode extends Node {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const spritesheetUV: (
|
|
13
|
-
countNode:
|
|
14
|
-
uvNode:
|
|
15
|
-
frameNode:
|
|
13
|
+
countNode: Node,
|
|
14
|
+
uvNode: Node | null,
|
|
15
|
+
frameNode: Node | null,
|
|
16
16
|
) => ShaderNodeObject<SpriteSheetUVNode>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
4
|
export const billboarding: (
|
|
5
|
-
args?: { position?:
|
|
5
|
+
args?: { position?: Node | null; horizontal?: boolean; vertical?: boolean },
|
|
6
6
|
) => ShaderNodeObject<Node>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import StorageBufferNode from "../accessors/StorageBufferNode.js";
|
|
2
|
-
import
|
|
2
|
+
import Node from "../core/Node.js";
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
4
|
import ArrayElementNode from "./ArrayElementNode.js";
|
|
4
5
|
|
|
5
6
|
export default class StorageArrayElementNode extends ArrayElementNode {
|
|
@@ -14,6 +15,6 @@ export default class StorageArrayElementNode extends ArrayElementNode {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const storageElement: (
|
|
17
|
-
storageBufferNode:
|
|
18
|
-
indexNode:
|
|
18
|
+
storageBufferNode: Node,
|
|
19
|
+
indexNode: Node,
|
|
19
20
|
) => ShaderNodeObject<StorageArrayElementNode>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
|
|
4
|
+
export const triplanarTextures: (
|
|
5
|
+
textureXNode: Node,
|
|
6
|
+
textureYNode?: Node | null,
|
|
7
|
+
textureZNode?: Node | null,
|
|
8
|
+
scaleNode?: Node,
|
|
9
|
+
positionNode?: Node,
|
|
10
|
+
normalNode?: Node,
|
|
11
|
+
) => ShaderNodeObject<Node>;
|
|
12
|
+
|
|
13
|
+
export const triplanarTexture: (
|
|
14
|
+
textureXNode: Node,
|
|
15
|
+
textureYNode?: Node | null,
|
|
16
|
+
textureZNode?: Node | null,
|
|
17
|
+
scaleNode?: Node,
|
|
18
|
+
positionNode?: Node,
|
|
19
|
+
normalNode?: Node,
|
|
20
|
+
) => ShaderNodeObject<Node>;
|