|
|
@@ -995,27 +995,24 @@ class NodeBuilder {
|
|
|
|
|
|
const layout = shaderNode.layout;
|
|
|
|
|
|
- let inputs;
|
|
|
-
|
|
|
- if ( shaderNode.isArrayInput ) {
|
|
|
-
|
|
|
- inputs = [];
|
|
|
-
|
|
|
- for ( const input of layout.inputs ) {
|
|
|
-
|
|
|
- inputs.push( new ParameterNode( input.type, input.name ) );
|
|
|
+ const inputs = {
|
|
|
+ [ Symbol.iterator ]() {
|
|
|
+
|
|
|
+ let index = 0;
|
|
|
+ const values = Object.values( this );
|
|
|
+ return {
|
|
|
+ next: () => ( {
|
|
|
+ value: values[ index ],
|
|
|
+ done: index ++ >= values.length
|
|
|
+ } )
|
|
|
+ };
|
|
|
|
|
|
}
|
|
|
+ };
|
|
|
|
|
|
- } else {
|
|
|
-
|
|
|
- inputs = {};
|
|
|
-
|
|
|
- for ( const input of layout.inputs ) {
|
|
|
-
|
|
|
- inputs[ input.name ] = new ParameterNode( input.type, input.name );
|
|
|
+ for ( const input of layout.inputs ) {
|
|
|
|
|
|
- }
|
|
|
+ inputs[ input.name ] = new ParameterNode( input.type, input.name );
|
|
|
|
|
|
}
|
|
|
|