diff --git a/types/three/src/Three.TSL.d.ts b/types/three/src/Three.TSL.d.ts index e33538f62..1bed071ce 100644 --- a/types/three/src/Three.TSL.d.ts +++ b/types/three/src/Three.TSL.d.ts @@ -114,6 +114,7 @@ export const colorSpaceToWorking: typeof TSL.colorSpaceToWorking; export const colorToDirection: typeof TSL.colorToDirection; export const compute: typeof TSL.compute; export const cond: typeof TSL.cond; +export const Const: typeof TSL.Const; export const context: typeof TSL.context; export const convert: typeof TSL.convert; export const convertColorSpace: typeof TSL.convertColorSpace; @@ -219,6 +220,7 @@ export const lights: typeof TSL.lights; export const linearDepth: typeof TSL.linearDepth; export const linearToneMapping: typeof TSL.linearToneMapping; export const localId: typeof TSL.localId; +export const globalId: typeof TSL.globalId; export const log: typeof TSL.log; export const log2: typeof TSL.log2; export const logarithmicDepthToViewZ: typeof TSL.logarithmicDepthToViewZ; @@ -496,6 +498,7 @@ export const uv: typeof TSL.uv; export const uvec2: typeof TSL.uvec2; export const uvec3: typeof TSL.uvec3; export const uvec4: typeof TSL.uvec4; +export const Var: typeof TSL.Var; export const varying: typeof TSL.varying; export const varyingProperty: typeof TSL.varyingProperty; export const vec2: typeof TSL.vec2; diff --git a/types/three/src/nodes/core/VarNode.d.ts b/types/three/src/nodes/core/VarNode.d.ts index 327df482a..9acaa5046 100644 --- a/types/three/src/nodes/core/VarNode.d.ts +++ b/types/three/src/nodes/core/VarNode.d.ts @@ -7,12 +7,19 @@ export default class VarNode extends Node { readonly isVarNode: true; - constructor(node: Node, name?: string | null); + readOnly: boolean; + + constructor(node: Node, name?: string | null, readOnly?: boolean); } +export const Var: (node: Node, name?: string | null) => ShaderNodeObject; + +export const Const: (node: Node, name?: string | null) => ShaderNodeObject; + declare module "../tsl/TSLCore.js" { interface NodeElements { toVar: (node: NodeRepresentation, name?: string | null) => ShaderNodeObject; + toConst: (node: NodeRepresentation, name?: string | null) => ShaderNodeObject; } } diff --git a/types/three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts b/types/three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts index cf65d4b26..50884f665 100644 --- a/types/three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +++ b/types/three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts @@ -9,5 +9,6 @@ export default ComputeBuiltinNode; export const numWorkgroups: ShaderNodeObject; export const workgroupId: ShaderNodeObject; +export const globalId: ShaderNodeObject; export const localId: ShaderNodeObject; export const subgroupSize: ShaderNodeObject; diff --git a/types/three/src/nodes/math/MathNode.d.ts b/types/three/src/nodes/math/MathNode.d.ts index 4bf669825..e85d75610 100644 --- a/types/three/src/nodes/math/MathNode.d.ts +++ b/types/three/src/nodes/math/MathNode.d.ts @@ -122,6 +122,8 @@ export default class MathNode extends TempNode { bNode: Node | null; cNode: Node | null; + readonly isMathNode: true; + constructor(method: MathNodeMethod1, aNode: Node); constructor(method: MathNodeMethod2, aNode: Node, bNode: Node); constructor(method: MathNodeMethod3, aNode: Node, bNode: Node, cNode: Node); diff --git a/types/three/src/nodes/math/OperatorNode.d.ts b/types/three/src/nodes/math/OperatorNode.d.ts index 0a4ca096f..076b6ff2a 100644 --- a/types/three/src/nodes/math/OperatorNode.d.ts +++ b/types/three/src/nodes/math/OperatorNode.d.ts @@ -28,6 +28,8 @@ export default class OperatorNode extends TempNode { bNode: Node; op: OperatorNodeOp; + readonly isOperatorNode: true; + constructor(op: OperatorNodeOp, ...params: [Node, Node, ...Node[]]); }