MeshStandardNodeMaterial.js 1.2 KB

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