three
Version:
JavaScript 3D library
31 lines (16 loc) • 497 B
JavaScript
import LightingNode from './LightingNode.js';
import { cubeMapNode } from '../utils/CubeMapNode.js';
class BasicEnvironmentNode extends LightingNode {
static get type() {
return 'BasicEnvironmentNode';
}
constructor( envNode = null ) {
super();
this.envNode = envNode;
}
setup( builder ) {
// environment property is used in the finish() method of BasicLightingModel
builder.context.environment = cubeMapNode( this.envNode );
}
}
export default BasicEnvironmentNode;