NodeBuilderState.js 646 B

1234567891011121314151617181920212223242526272829303132333435
  1. class NodeBuilderState {
  2. constructor( vertexShader, fragmentShader, computeShader, nodeAttributes, bindings, updateNodes, updateBeforeNodes ) {
  3. this.vertexShader = vertexShader;
  4. this.fragmentShader = fragmentShader;
  5. this.computeShader = computeShader;
  6. this.nodeAttributes = nodeAttributes;
  7. this.bindings = bindings;
  8. this.updateNodes = updateNodes;
  9. this.updateBeforeNodes = updateBeforeNodes;
  10. this.usedTimes = 0;
  11. }
  12. createBindings() {
  13. const bindingsArray = [];
  14. for ( const binding of this.bindings ) {
  15. bindingsArray.push( binding.clone() );
  16. }
  17. return bindingsArray;
  18. }
  19. }
  20. export default NodeBuilderState;