Skip to content

Node: Clarify Usage of Setup in Function Declaration #31535

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

Merged
merged 2 commits into from
Jul 31, 2025
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
4 changes: 2 additions & 2 deletions src/nodes/core/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ class Node extends EventDispatcher {

/**
* Represents the setup stage which is the first step of the build process, see {@link Node#build} method.
* This method is often overwritten in derived modules to prepare the node which is used as the output/result.
* The output node must be returned in the `return` statement.
* This method is often overwritten in derived modules to prepare the node which is used as a node's output/result.
* If an output node is prepared, then it must be returned in the `return` statement of the derived module's setup function.
*
* @param {NodeBuilder} builder - The current node builder.
* @return {?Node} The output node.
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/core/NodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,7 @@ class NodeBuilder {

}

// setup() -> stage 1: create possible new nodes and returns an output reference node
// setup() -> stage 1: create possible new nodes and/or return an output reference node
// analyze() -> stage 2: analyze nodes to possible optimization and validation
// generate() -> stage 3: generate shader

Expand Down