File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -474,8 +474,9 @@ class Node extends EventDispatcher {
474
474
475
475
}
476
476
477
- // return a outputNode if exists
478
- return null ;
477
+ // return a outputNode if exists or null
478
+
479
+ return nodeProperties . outputNode || null ;
479
480
480
481
}
481
482
@@ -609,17 +610,19 @@ class Node extends EventDispatcher {
609
610
610
611
if ( properties . initialized !== true ) {
611
612
612
- const stackNodesBeforeSetup = builder . stack . nodes . length ;
613
+ // const stackNodesBeforeSetup = builder.stack.nodes.length;
613
614
614
615
properties . initialized = true ;
615
- properties . outputNode = this . setup ( builder ) ;
616
616
617
- if ( properties . outputNode !== null && builder . stack . nodes . length !== stackNodesBeforeSetup ) {
617
+ const outputNode = this . setup ( builder ) ; // return a node or null
618
+ const isNodeOutput = outputNode && outputNode . isNode === true ;
619
+
620
+ /*if ( isNodeOutput && builder.stack.nodes.length !== stackNodesBeforeSetup ) {
618
621
619
622
// !! no outputNode !!
620
- //properties. outputNode = builder.stack;
623
+ //outputNode = builder.stack;
621
624
622
- }
625
+ }*/
623
626
624
627
for ( const childNode of Object . values ( properties ) ) {
625
628
@@ -631,6 +634,14 @@ class Node extends EventDispatcher {
631
634
632
635
}
633
636
637
+ if ( isNodeOutput ) {
638
+
639
+ outputNode . build ( builder ) ;
640
+
641
+ }
642
+
643
+ properties . outputNode = outputNode ;
644
+
634
645
}
635
646
636
647
} else if ( buildStage === 'analyze' ) {
Original file line number Diff line number Diff line change @@ -678,6 +678,7 @@ class NodeBuilder {
678
678
/**
679
679
* It is used to add Nodes that will be used as FRAME and RENDER events,
680
680
* and need to follow a certain sequence in the calls to work correctly.
681
+ * This function should be called after 'setup()' in the 'build()' process to ensure that the child nodes are processed first.
681
682
*
682
683
* @param {Node } node - The node to add.
683
684
*/
You can’t perform that action at this time.
0 commit comments