MeshDepthMaterial.js 952 字节
Newer Older
M
Mr.doob 已提交
1 2
/**
 * @author mr.doob / http://mrdoob.com/
3
 * @author alteredq / http://alteredqualia.com/
M
Mr.doob 已提交
4 5
 *
 * parameters = {
6
 *  opacity: <float>,
7 8
 
 *  blending: THREE.NormalBlending,
9
 *  depthTest: <bool>,
10 11
 
 *  wireframe: <boolean>,
12
 *  wireframeLinewidth: <float>
M
Mr.doob 已提交
13 14 15 16 17
 * } 
 */

THREE.MeshDepthMaterial = function ( parameters ) {

18
	THREE.Material.call( this, parameters );
19

20
	parameters = parameters || {};
21

22
	this.shading = parameters.shading !== undefined ? parameters.shading : THREE.SmoothShading; // doesn't really apply here, normals are not used
23

24 25
	this.wireframe = parameters.wireframe !== undefined ? parameters.wireframe : false;
	this.wireframeLinewidth = parameters.wireframeLinewidth !== undefined ? parameters.wireframeLinewidth : 1;
M
Mr.doob 已提交
26

M
Mr.doob 已提交
27
};
28

29
THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype );
L
libra guest 已提交
30 31 32 33 34

THREE.MeshDepthMaterial.prototype.clone = function(){ 
	var returnValue = new THREE.MeshDepthMaterial(this);
	return returnValue;
};