Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/flo-bit/shapecraft. flo-bit.dev/shapecraft
Something went wrong. Try again.
497 B · 30 lines
JavaScript
at commit da69385e
12345678910111213141516171819202122232425262728293031import 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;