Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes: IndexNode - invocationLocalIndex #1207

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>;
Loading