Skip to content

Commit 5588622

Browse files
authored
Node: Clarify Usage of Setup in Function Declaration (#31535)
* clarify usage of setup * modify NodeBuilder text
1 parent 698dfcd commit 5588622

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/nodes/core/Node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ class Node extends EventDispatcher {
494494

495495
/**
496496
* Represents the setup stage which is the first step of the build process, see {@link Node#build} method.
497-
* This method is often overwritten in derived modules to prepare the node which is used as the output/result.
498-
* The output node must be returned in the `return` statement.
497+
* This method is often overwritten in derived modules to prepare the node which is used as a node's output/result.
498+
* If an output node is prepared, then it must be returned in the `return` statement of the derived module's setup function.
499499
*
500500
* @param {NodeBuilder} builder - The current node builder.
501501
* @return {?Node} The output node.

src/nodes/core/NodeBuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2748,7 +2748,7 @@ class NodeBuilder {
27482748

27492749
}
27502750

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

0 commit comments

Comments
 (0)