Skip to content

Commit

Permalink
Nodes: IndexNode - invocationLocalIndex (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Aug 26, 2024
1 parent 462f06a commit e916f03
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
9 changes: 8 additions & 1 deletion types/three/src/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ export { bypass, default as BypassNode } from "./core/BypassNode.js";
export { cache, default as CacheNode } from "./core/CacheNode.js";
export { default as ConstNode } from "./core/ConstNode.js";
export { context, default as ContextNode, label } from "./core/ContextNode.js";
export { default as IndexNode, drawIndex, IndexNodeScope, instanceIndex, vertexIndex } from "./core/IndexNode.js";
export {
default as IndexNode,
drawIndex,
IndexNodeScope,
instanceIndex,
invocationLocalIndex,
vertexIndex,
} from "./core/IndexNode.js";
export {
default as LightingModel,
LightingModelDirectInput,
Expand Down
12 changes: 10 additions & 2 deletions types/three/src/nodes/core/IndexNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
import Node from "./Node.js";

export type IndexNodeScope = typeof IndexNode.VERTEX | typeof IndexNode.INSTANCE | typeof IndexNode.DRAW;
export type IndexNodeScope =
| typeof IndexNode.VERTEX
| typeof IndexNode.INSTANCE
| typeof IndexNode.INVOCATION_LOCAL
| typeof IndexNode.DRAW;

export default class IndexNode extends Node {
declare class IndexNode extends Node {
scope: IndexNodeScope;

readonly isInstanceNode: true;
Expand All @@ -12,9 +16,13 @@ export default class IndexNode extends Node {

static VERTEX: "vertex";
static INSTANCE: "instance";
static INVOCATION_LOCAL: "invocationLocal";
static DRAW: "draw";
}

export default IndexNode;

export const vertexIndex: ShaderNodeObject<IndexNode>;
export const instanceIndex: ShaderNodeObject<IndexNode>;
export const invocationLocalIndex: ShaderNodeObject<IndexNode>;
export const drawIndex: ShaderNodeObject<IndexNode>;

0 comments on commit e916f03

Please sign in to comment.