MaterialReferenceNode.js 399 B

1234567891011121314151617181920212223
  1. import ReferenceNode from './ReferenceNode.js';
  2. class MaterialReferenceNode extends ReferenceNode {
  3. constructor( property, inputType, material = null ) {
  4. super( property, inputType, material );
  5. this.material = material;
  6. }
  7. update( frame ) {
  8. this.object = this.material !== null ? this.material : frame.material;
  9. super.update( frame );
  10. }
  11. }
  12. export default MaterialReferenceNode;