MeshDepthMaterial.js 977 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.isMeshDepthMaterial = true;
  7. this.type = 'MeshDepthMaterial';
  8. this.depthPacking = BasicDepthPacking;
  9. this.map = null;
  10. this.alphaMap = null;
  11. this.displacementMap = null;
  12. this.displacementScale = 1;
  13. this.displacementBias = 0;
  14. this.wireframe = false;
  15. this.wireframeLinewidth = 1;
  16. this.setValues( parameters );
  17. }
  18. copy( source ) {
  19. super.copy( source );
  20. this.depthPacking = source.depthPacking;
  21. this.map = source.map;
  22. this.alphaMap = source.alphaMap;
  23. this.displacementMap = source.displacementMap;
  24. this.displacementScale = source.displacementScale;
  25. this.displacementBias = source.displacementBias;
  26. this.wireframe = source.wireframe;
  27. this.wireframeLinewidth = source.wireframeLinewidth;
  28. return this;
  29. }
  30. }
  31. export { MeshDepthMaterial };
粤ICP备19079148号