AmbientLightNode.js 503 B

123456789101112131415161718192021222324252627
  1. import AnalyticLightNode from './AnalyticLightNode.js';
  2. import { addLightNode } from './LightsNode.js';
  3. import { addNodeClass } from '../core/Node.js';
  4. import { AmbientLight } from 'three';
  5. class AmbientLightNode extends AnalyticLightNode {
  6. constructor( light = null ) {
  7. super( light );
  8. }
  9. construct( { context } ) {
  10. context.irradiance.addAssign( this.colorNode );
  11. }
  12. }
  13. export default AmbientLightNode;
  14. addLightNode( AmbientLight, AmbientLightNode );
  15. addNodeClass( AmbientLightNode );