UNPKG

three

Version:

JavaScript 3D library

79 lines (55 loc) 1.78 kB
/** * @author mrdoob / http://mrdoob.com/ * @author alteredq / http://alteredqualia.com/ * @author bhouston / https://clara.io * @author WestLangley / http://github.com/WestLangley * * parameters = { * * opacity: <float>, * * map: new THREE.Texture( <Image> ), * * alphaMap: new THREE.Texture( <Image> ), * * displacementMap: new THREE.Texture( <Image> ), * displacementScale: <float>, * displacementBias: <float>, * * wireframe: <boolean>, * wireframeLinewidth: <float> * } */ THREE.MeshDepthMaterial = function ( parameters ) { THREE.Material.call( this ); this.type = 'MeshDepthMaterial'; this.depthPacking = THREE.BasicDepthPacking; this.skinning = false; this.morphTargets = false; this.map = null; this.alphaMap = null; this.displacementMap = null; this.displacementScale = 1; this.displacementBias = 0; this.wireframe = false; this.wireframeLinewidth = 1; this.fog = false; this.lights = false; this.setValues( parameters ); }; THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype ); THREE.MeshDepthMaterial.prototype.constructor = THREE.MeshDepthMaterial; THREE.MeshDepthMaterial.prototype.copy = function ( source ) { THREE.Material.prototype.copy.call( this, source ); this.depthPacking = source.depthPacking; this.skinning = source.skinning; this.morphTargets = source.morphTargets; this.map = source.map; this.alphaMap = source.alphaMap; this.displacementMap = source.displacementMap; this.displacementScale = source.displacementScale; this.displacementBias = source.displacementBias; this.wireframe = source.wireframe; this.wireframeLinewidth = source.wireframeLinewidth; return this; };