MeshDepthMaterial.js 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.clone = function () {
  26. var material = new THREE.MeshDepthMaterial();
  27. THREE.Material.prototype.clone.call( this, material );
  28. material.wireframe = this.wireframe;
  29. material.wireframeLinewidth = this.wireframeLinewidth;
  30. return material;
  31. };