MeshStandardNodeMaterial.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import NodeMaterial from './NodeMaterial.js';
  2. import { MeshStandardMaterial } from 'three';
  3. const defaultValues = new MeshStandardMaterial();
  4. export default class MeshStandardNodeMaterial extends NodeMaterial {
  5. constructor( parameters ) {
  6. super();
  7. this.colorNode = null;
  8. this.opacityNode = null;
  9. this.alphaTestNode = null;
  10. this.normalNode = null;
  11. this.emissiveNode = null;
  12. this.metalnessNode = null;
  13. this.roughnessNode = null;
  14. this.clearcoatNode = null;
  15. this.clearcoatRoughnessNode = null;
  16. this.envNode = null;
  17. this.lightNode = null;
  18. this.positionNode = null;
  19. this.setDefaultValues( defaultValues );
  20. this.setValues( parameters );
  21. }
  22. copy( source ) {
  23. this.colorNode = source.colorNode;
  24. this.opacityNode = source.opacityNode;
  25. this.alphaTestNode = source.alphaTestNode;
  26. this.normalNode = source.normalNode;
  27. this.emissiveNode = source.emissiveNode;
  28. this.metalnessNode = source.metalnessNode;
  29. this.roughnessNode = source.roughnessNode;
  30. this.clearcoatNode = source.clearcoatNode;
  31. this.clearcoatRoughnessNode = source.clearcoatRoughnessNode;
  32. this.envNode = source.envNode;
  33. this.lightNode = source.lightNode;
  34. this.positionNode = source.positionNode;
  35. return super.copy( source );
  36. }
  37. }
  38. MeshStandardNodeMaterial.prototype.isNodeMaterial = true;