45 lines
962 B
JavaScript
45 lines
962 B
JavaScript
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author alteredq / http://alteredqualia.com/
|
|
*
|
|
* parameters = {
|
|
* opacity: <float>,
|
|
*
|
|
* blending: THREE.NormalBlending,
|
|
* depthTest: <bool>,
|
|
* depthWrite: <bool>,
|
|
*
|
|
* wireframe: <boolean>,
|
|
* wireframeLinewidth: <float>
|
|
* }
|
|
*/
|
|
|
|
THREE.MeshDepthMaterial = function ( parameters ) {
|
|
|
|
THREE.Material.call( this );
|
|
|
|
this.type = 'MeshDepthMaterial';
|
|
|
|
this.morphTargets = false;
|
|
this.wireframe = false;
|
|
this.wireframeLinewidth = 1;
|
|
|
|
this.setValues( parameters );
|
|
|
|
};
|
|
|
|
THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype );
|
|
THREE.MeshDepthMaterial.prototype.constructor = THREE.MeshDepthMaterial;
|
|
|
|
THREE.MeshDepthMaterial.prototype.clone = function () {
|
|
|
|
var material = new THREE.MeshDepthMaterial();
|
|
|
|
THREE.Material.prototype.clone.call( this, material );
|
|
|
|
material.wireframe = this.wireframe;
|
|
material.wireframeLinewidth = this.wireframeLinewidth;
|
|
|
|
return material;
|
|
|
|
};
|