Accueil / npm / three@0.152.1 / examples / jsm / nodes / lighting / AmbientLightNode.js

AmbientLightNode.js

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 );

	}

	construct( { context } ) {

		context.irradiance.addAssign( this.colorNode );

	}

}

export default AmbientLightNode;

addLightNode( AmbientLight, AmbientLightNode );

addNodeClass( AmbientLightNode );