node-ejs-renderer/node_modules/three/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js
2024-06-09 13:55:01 -04:00

35 lines
707 B
JavaScript

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 );