MeshDepthMaterial.js 801 B

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