28 lines
519 B
JavaScript
28 lines
519 B
JavaScript
|
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 );
|