MeshDepthMaterial.js 818 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @author mr.doob / 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, parameters );
  15. parameters = parameters || {};
  16. this.shading = parameters.shading !== undefined ? parameters.shading : THREE.SmoothShading; // doesn't really apply here, normals are not used
  17. this.wireframe = parameters.wireframe !== undefined ? parameters.wireframe : false;
  18. this.wireframeLinewidth = parameters.wireframeLinewidth !== undefined ? parameters.wireframeLinewidth : 1;
  19. };
  20. THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype );