You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
519 B
28 lines
519 B
6 months ago
|
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 );
|