Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Dec 14, 2024
1 parent ce13853 commit 3eaed27
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 3 deletions.
1 change: 0 additions & 1 deletion types/three/src/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export { default as IESSpotLightNode } from "./lighting/IESSpotLightNode.js";
export { default as IrradianceNode } from "./lighting/IrradianceNode.js";
export { default as LightingContextNode } from "./lighting/LightingContextNode.js";
export { default as LightingNode } from "./lighting/LightingNode.js";
export { default as LightNode, LightNodeScope } from "./lighting/LightNode.js";
export { default as LightProbeNode } from "./lighting/LightProbeNode.js";
export { default as LightsNode } from "./lighting/LightsNode.js";
export { default as PointLightNode } from "./lighting/PointLightNode.js";
Expand Down
2 changes: 2 additions & 0 deletions types/three/src/nodes/TSL.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ export * from "./geometry/RangeNode.js";

// gpgpu
export * from "./gpgpu/AtomicFunctionNode.js";
export * from "./gpgpu/BarrierNode.js";
export * from "./gpgpu/ComputeBuiltinNode.js";
export * from "./gpgpu/ComputeNode.js";
export * from "./gpgpu/WorkgroupInfoNode.js";

// lighting
export * from "./accessors/Lights.js";
Expand Down
7 changes: 6 additions & 1 deletion types/three/src/nodes/core/StackNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ShaderNodeObject } from "../tsl/TSLCore.js";
import Node from "./Node.js";

export default class StackNode extends Node {
declare class StackNode extends Node {
isStackNode: true;
nodes: Node[];
outputNode: Node | null;
Expand All @@ -25,3 +26,7 @@ export default class StackNode extends Node {
*/
else(method: () => void): this;
}

export default StackNode;

export const stack: () => ShaderNodeObject<StackNode>;
5 changes: 5 additions & 0 deletions types/three/src/nodes/display/ScreenNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export const viewportUV: ShaderNodeObject<Node>;

// Deprecated

/**
* @deprecated "viewportResolution" is deprecated. Use "screenSize" instead.
*/
export const viewportResolution: ShaderNodeObject<ScreenNode>;

/**
* @deprecated "viewportTopLeft" is deprecated. Use "viewportUV" instead.
*/
Expand Down
12 changes: 12 additions & 0 deletions types/three/src/nodes/gpgpu/BarrierNode.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Node from "../core/Node.js";
import { ShaderNodeObject } from "../tsl/TSLCore.js";

declare class BarrierNode extends Node {
scope: string;

constructor(scope: string);
}

export const workgroupBarrier: () => ShaderNodeObject<Node>;
export const storageBarrier: () => ShaderNodeObject<Node>;
export const textureBarrier: () => ShaderNodeObject<Node>;
17 changes: 17 additions & 0 deletions types/three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Node from "../core/Node.js";
import { ShaderNodeObject } from '../tsl/TSLCore.js';

declare class WorkgroupInfoNode extends Node {
bufferType: string;
bufferCount: number;

readonly isWorkgroupInfoNode: true;

scope: string;

constructor(scope: string, bufferType: string, bufferCount?: number);
}

export default WorkgroupInfoNode;

export const workgroupArray: (type: string, count?: number) => ShaderNodeObject<WorkgroupInfoNode>;
3 changes: 3 additions & 0 deletions types/three/src/nodes/math/OperatorNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type OperatorNodeOp =
| ">>"
| "<<"
| "=="
| "!="
| "&&"
| "||"
| "^^"
Expand Down Expand Up @@ -42,6 +43,7 @@ export const mul: Operator;
export const div: Operator;
export const modInt: Operator;
export const equal: Operator;
export const notEqual: Operator;
export const lessThan: Operator;
export const greaterThan: Operator;
export const lessThanEqual: Operator;
Expand All @@ -65,6 +67,7 @@ declare module "../tsl/TSLCore.js" {
div: typeof div;
modInt: typeof modInt;
equal: typeof equal;
notEqual: typeof notEqual;
lessThan: typeof lessThan;
greaterThan: typeof greaterThan;
lessThanEqual: typeof lessThanEqual;
Expand Down
1 change: 1 addition & 0 deletions types/three/src/nodes/tsl/TSLCore.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,4 @@ export const arrayBuffer: (value: ArrayBuffer) => ShaderNodeObject<ConstNode<Arr

export const element: (node: NodeRepresentation, indexNode: NodeRepresentation) => ShaderNodeObject<Node>;
export const convert: (node: NodeRepresentation, types: string) => ShaderNodeObject<Node>;
export const split: (node: NodeRepresentation, channels?: string) => ShaderNodeObject<Node>;
2 changes: 1 addition & 1 deletion types/three/src/nodes/utils/SplitNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Node from "../core/Node.js";
import { SwizzleOption } from "../tsl/TSLCore.js";

/** swizzle node */
export default class SplitNode extends Node {
node: Node;
components: string;
Expand All @@ -11,5 +10,6 @@ export default class SplitNode extends Node {
* @param components swizzle like string, default = "x"
*/
constructor(node: Node, components?: SwizzleOption);

getVectorLength(): number;
}

0 comments on commit 3eaed27

Please sign in to comment.