MeshDepthMaterial.js 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. * @author alteredq / http://alteredqualia.com/
  4. *
  5. * parameters = {
  6. * opacity: <float>,
  7. *
  8. * blending: THREE.NormalBlending,
  9. * depthTest: <bool>,
  10. * depthWrite: <bool>,
  11. *
  12. * wireframe: <boolean>,
  13. * wireframeLinewidth: <float>
  14. * }
  15. */
  16. THREE.MeshDepthMaterial = function ( parameters ) {
  17. THREE.Material.call( this );
  18. this.type = 'MeshDepthMaterial';
  19. this.morphTargets = false;
  20. this.wireframe = false;
  21. this.wireframeLinewidth = 1;
  22. this.setValues( parameters );
  23. };
  24. THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype );
  25. THREE.MeshDepthMaterial.prototype.constructor = THREE.MeshDepthMaterial;
  26. THREE.MeshDepthMaterial.prototype.clone = function () {
  27. var material = new THREE.MeshDepthMaterial();
  28. material.copy( this );
  29. material.wireframe = this.wireframe;
  30. material.wireframeLinewidth = this.wireframeLinewidth;
  31. return material;
  32. };