| import { Material } from './Material.js'; |
| import { Vector3 } from '../math/Vector3.js'; |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| function MeshDistanceMaterial( parameters ) { |
|
|
| Material.call( this ); |
|
|
| this.type = 'MeshDistanceMaterial'; |
|
|
| this.referencePosition = new Vector3(); |
| this.nearDistance = 1; |
| this.farDistance = 1000; |
|
|
| this.skinning = false; |
| this.morphTargets = false; |
|
|
| this.map = null; |
|
|
| this.alphaMap = null; |
|
|
| this.displacementMap = null; |
| this.displacementScale = 1; |
| this.displacementBias = 0; |
|
|
| this.fog = false; |
| this.lights = false; |
|
|
| this.setValues( parameters ); |
|
|
| } |
|
|
| MeshDistanceMaterial.prototype = Object.create( Material.prototype ); |
| MeshDistanceMaterial.prototype.constructor = MeshDistanceMaterial; |
|
|
| MeshDistanceMaterial.prototype.isMeshDistanceMaterial = true; |
|
|
| MeshDistanceMaterial.prototype.copy = function ( source ) { |
|
|
| Material.prototype.copy.call( this, source ); |
|
|
| this.referencePosition.copy( source.referencePosition ); |
| this.nearDistance = source.nearDistance; |
| this.farDistance = source.farDistance; |
|
|
| 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; |
|
|
| return this; |
|
|
| }; |
|
|
|
|
| export { MeshDistanceMaterial }; |
|
|