MeshDepthMaterial.js 826 B

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