You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/nodes/core/Node.js
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -586,12 +586,14 @@ class Node extends EventDispatcher {
586
586
}
587
587
588
588
/**
589
-
* This method performs the build of a node. The behavior of this method as well as its return value depend
590
-
* on the current build stage (setup, analyze or generate).
589
+
* This method performs the build of a node. The behavior and return value depend on the current build stage:
590
+
* - **setup**: Prepares the node and its children for the build process. This process can also create new nodes. Returns the node itself or a variant.
591
+
* - **analyze**: Analyzes the node hierarchy for optimizations in the code generation stage. Returns `null`.
592
+
* - **generate**: Generates the shader code for the node. Returns the generated shader string.
591
593
*
592
594
* @param {NodeBuilder} builder - The current node builder.
593
-
* @param {?string} output - Can be used to define the output type.
594
-
* @return {?string} When this method is executed in the setup or analyze stage, `null` is returned. In the generate stage, the generated shader string.
595
+
* @param {?string} [output=null] - Can be used to define the output type.
596
+
* @return {Node|string|null} The result of the build process, depending on the build stage.
595
597
*/
596
598
build(builder,output=null){
597
599
@@ -657,6 +659,8 @@ class Node extends EventDispatcher {
0 commit comments