@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
26 lines (25 loc) • 904 B
JavaScript
;
import { TypedSopNode } from "./_Base";
import { NodeParamsConfig } from "../utils/params/ParamsConfig";
import { AmbientLightParamConfig } from "../../../core/lights/AmbientLight";
import { AmbientLightSopOperation } from "../../operations/sop/AmbientLight";
class AmbientLightSopParamsConfig extends AmbientLightParamConfig(NodeParamsConfig) {
}
const ParamsConfig = new AmbientLightSopParamsConfig();
export class AmbientLightSopNode extends TypedSopNode {
constructor() {
super(...arguments);
this.paramsConfig = ParamsConfig;
}
static type() {
return "ambientLight";
}
initializeNode() {
this.io.inputs.setCount(0);
}
cook(input_contents) {
this._operation = this._operation || new AmbientLightSopOperation(this._scene, this.states, this);
const core_group = this._operation.cook(input_contents, this.pv);
this.setCoreGroup(core_group);
}
}