mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-06 16:31:03 +00:00
28 lines
503 B
JavaScript
28 lines
503 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 );
|
|
|
|
}
|
|
|
|
construct( { context } ) {
|
|
|
|
context.irradiance.addAssign( this.colorNode );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default AmbientLightNode;
|
|
|
|
addLightNode( AmbientLight, AmbientLightNode );
|
|
|
|
addNodeClass( AmbientLightNode );
|