MeshDepthMaterial.js 998 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { Material } from './Material.js';
  2. import { BasicDepthPacking } from '../constants.js';
  3. class MeshDepthMaterial extends Material {
  4. constructor( parameters ) {
  5. super();
  6. this.type = 'MeshDepthMaterial';
  7. this.depthPacking = BasicDepthPacking;
  8. this.map = null;
  9. this.alphaMap = null;
  10. this.displacementMap = null;
  11. this.displacementScale = 1;
  12. this.displacementBias = 0;
  13. this.wireframe = false;
  14. this.wireframeLinewidth = 1;
  15. this.setValues( parameters );
  16. }
  17. copy( source ) {
  18. super.copy( source );
  19. this.depthPacking = source.depthPacking;
  20. this.map = source.map;
  21. this.alphaMap = source.alphaMap;
  22. this.displacementMap = source.displacementMap;
  23. this.displacementScale = source.displacementScale;
  24. this.displacementBias = source.displacementBias;
  25. this.wireframe = source.wireframe;
  26. this.wireframeLinewidth = source.wireframeLinewidth;
  27. return this;
  28. }
  29. }
  30. MeshDepthMaterial.prototype.isMeshDepthMaterial = true;
  31. export { MeshDepthMaterial };