node-ejs-renderer/node_modules/three/examples/jsm/nodes/lighting/AmbientLightNode.js

28 lines
519 B
JavaScript
Raw Permalink Normal View History

2024-06-09 13:55:01 -04:00
import AnalyticLightNode from './AnalyticLightNode.js';
import { addLightNode } from './LightsNode.js';
import { addNodeClass } from '../core/Node.js';
import { AmbientLight } from 'three';
class AmbientLightNode extends AnalyticLightNode {
constructor( light = null ) {
super( light );
}
setup( { context } ) {
context.irradiance.addAssign( this.colorNode );
}
}
export default AmbientLightNode;
addNodeClass( 'AmbientLightNode', AmbientLightNode );
addLightNode( AmbientLight, AmbientLightNode );