MeshPhysicalNodeMaterial.js 985 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.sheenNode = null;
  12. this.sheenRoughnessNode = null;
  13. this.sheen = 0;
  14. this.clearcoat = 0;
  15. this.iridescence = 0;
  16. this.transmission = 0;
  17. this.setDefaultValues( defaultValues );
  18. this.setValues( parameters );
  19. }
  20. copy( source ) {
  21. this.clearcoatNode = source.clearcoatNode;
  22. this.clearcoatRoughnessNode = source.clearcoatRoughnessNode;
  23. this.clearcoatNormalNode = source.clearcoatNormalNode;
  24. this.sheenNode = source.sheenNode;
  25. this.sheenRoughnessNode = source.sheenRoughnessNode;
  26. return super.copy( source );
  27. }
  28. }