MeshDepthMaterial.js 870 B

123456789101112131415161718192021222324252627282930
  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 = new THREE.Material();
  21. THREE.MeshDepthMaterial.prototype.constructor = THREE.MeshDepthMaterial;