@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
30 lines (29 loc) • 978 B
JavaScript
;
import { TypedLightObjNode } from "./_BaseLight";
import { NodeParamsConfig } from "../utils/params/ParamsConfig";
import { AmbientLightParamConfig } from "../../../core/lights/AmbientLight";
import { AmbientLightSopOperation } from "../../operations/sop/AmbientLight";
class AmbientLightObjParamsConfig extends AmbientLightParamConfig(NodeParamsConfig) {
}
const ParamsConfig = new AmbientLightObjParamsConfig();
export class AmbientLightObjNode extends TypedLightObjNode {
constructor() {
super(...arguments);
this.paramsConfig = ParamsConfig;
}
static type() {
return "ambientLight";
}
initializeNode() {
this.io.inputs.setCount(0, 1);
}
_operation() {
return this.__operation__ = this.__operation__ || new AmbientLightSopOperation(this._scene, this.states, this);
}
createLight() {
return this._operation().createLight();
}
updateLightParams() {
this._operation().updateLightParams(this.light, this.pv);
}
}