MeshBasicNodeMaterial.js 816 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import NodeMaterial from './NodeMaterial.js';
  2. import { MeshBasicMaterial } from 'three';
  3. const defaultValues = new MeshBasicMaterial();
  4. class MeshBasicNodeMaterial extends NodeMaterial {
  5. constructor( parameters ) {
  6. super();
  7. this.isMeshBasicNodeMaterial = true;
  8. this.lights = true;
  9. this.colorNode = null;
  10. this.opacityNode = null;
  11. this.alphaTestNode = null;
  12. this.lightNode = null;
  13. this.positionNode = null;
  14. this.setDefaultValues( defaultValues );
  15. this.setValues( parameters );
  16. }
  17. copy( source ) {
  18. this.colorNode = source.colorNode;
  19. this.opacityNode = source.opacityNode;
  20. this.alphaTestNode = source.alphaTestNode;
  21. this.lightNode = source.lightNode;
  22. this.positionNode = source.positionNode;
  23. return super.copy( source );
  24. }
  25. }
  26. export default MeshBasicNodeMaterial;