mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-28 06:15:57 +10:00
31 lines
870 B
JavaScript
31 lines
870 B
JavaScript
/**
|
|
* @author mr.doob / http://mrdoob.com/
|
|
* @author alteredq / http://alteredqualia.com/
|
|
*
|
|
* parameters = {
|
|
* opacity: <float>,
|
|
|
|
* blending: THREE.NormalBlending,
|
|
* depthTest: <bool>,
|
|
|
|
* wireframe: <boolean>,
|
|
* wireframeLinewidth: <float>
|
|
* }
|
|
*/
|
|
|
|
THREE.MeshDepthMaterial = function ( parameters ) {
|
|
|
|
THREE.Material.call( this, parameters );
|
|
|
|
parameters = parameters || {};
|
|
|
|
this.shading = parameters.shading !== undefined ? parameters.shading : THREE.SmoothShading; // doesn't really apply here, normals are not used
|
|
|
|
this.wireframe = parameters.wireframe !== undefined ? parameters.wireframe : false;
|
|
this.wireframeLinewidth = parameters.wireframeLinewidth !== undefined ? parameters.wireframeLinewidth : 1;
|
|
|
|
};
|
|
|
|
THREE.MeshDepthMaterial.prototype = new THREE.Material();
|
|
THREE.MeshDepthMaterial.prototype.constructor = THREE.MeshDepthMaterial;
|