You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
707 B
35 lines
707 B
import NodeMaterial, { addNodeMaterial } from './NodeMaterial.js';
|
|
import PhongLightingModel from '../functions/PhongLightingModel.js';
|
|
|
|
import { MeshLambertMaterial } from 'three';
|
|
|
|
const defaultValues = new MeshLambertMaterial();
|
|
|
|
class MeshLambertNodeMaterial extends NodeMaterial {
|
|
|
|
constructor( parameters ) {
|
|
|
|
super();
|
|
|
|
this.isMeshLambertNodeMaterial = true;
|
|
|
|
this.lights = true;
|
|
|
|
this.setDefaultValues( defaultValues );
|
|
|
|
this.setValues( parameters );
|
|
|
|
}
|
|
|
|
setupLightingModel( /*builder*/ ) {
|
|
|
|
return new PhongLightingModel( false ); // ( specular ) -> force lambert
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default MeshLambertNodeMaterial;
|
|
|
|
addNodeMaterial( 'MeshLambertNodeMaterial', MeshLambertNodeMaterial );
|