Spaces:
Running
Running
File size: 1,094 Bytes
6cd9596 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
import { MeshStandardMaterial } from './MeshStandardMaterial.js';
/**
* @author WestLangley / http://github.com/WestLangley
*
* parameters = {
* reflectivity: <float>
* clearCoat: <float>
* clearCoatRoughness: <float>
* }
*/
function MeshPhysicalMaterial( parameters ) {
MeshStandardMaterial.call( this );
this.defines = { 'PHYSICAL': '' };
this.type = 'MeshPhysicalMaterial';
this.reflectivity = 0.5; // maps to F0 = 0.04
this.clearCoat = 0.0;
this.clearCoatRoughness = 0.0;
this.setValues( parameters );
}
MeshPhysicalMaterial.prototype = Object.create( MeshStandardMaterial.prototype );
MeshPhysicalMaterial.prototype.constructor = MeshPhysicalMaterial;
MeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true;
MeshPhysicalMaterial.prototype.copy = function ( source ) {
MeshStandardMaterial.prototype.copy.call( this, source );
this.defines = { 'PHYSICAL': '' };
this.reflectivity = source.reflectivity;
this.clearCoat = source.clearCoat;
this.clearCoatRoughness = source.clearCoatRoughness;
return this;
};
export { MeshPhysicalMaterial };
|