MeshDepthMaterial.js 854 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.morphTargets = false;
  19. this.wireframe = false;
  20. this.wireframeLinewidth = 1;
  21. this.setValues( parameters );
  22. };
  23. THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype );
  24. THREE.MeshDepthMaterial.prototype.clone = function () {
  25. var material = new THREE.MeshDepthMaterial();
  26. THREE.Material.prototype.clone.call( this, material );
  27. material.wireframe = this.wireframe;
  28. material.wireframeLinewidth = this.wireframeLinewidth;
  29. return material;
  30. };