MeshPhysicalNodeMaterial.js 832 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
  2. import { MeshPhysicalMaterial } from 'three';
  3. const defaultValues = new MeshPhysicalMaterial();
  4. export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
  5. constructor( parameters ) {
  6. super();
  7. this.isMeshPhysicalNodeMaterial = true;
  8. this.clearcoatNode = null;
  9. this.clearcoatRoughnessNode = null;
  10. this.clearcoatNormalNode = null;
  11. this.sheen = 0;
  12. this.clearcoat = 0;
  13. this.iridescence = 0;
  14. this.transmission = 0;
  15. this.setDefaultValues( defaultValues );
  16. this.setValues( parameters );
  17. }
  18. copy( source ) {
  19. this.clearcoatNode = source.clearcoatNode;
  20. this.clearcoatRoughnessNode = source.clearcoatRoughnessNode;
  21. this.clearcoatNormalNode = source.clearcoatNormalNode;
  22. return super.copy( source );
  23. }
  24. }