@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
28 lines (27 loc) • 1.02 kB
JavaScript
;
import { TypedLightObjNode } from "./_BaseLight";
import { NodeParamsConfig } from "../utils/params/ParamsConfig";
import { LightType } from "../../poly/registers/nodes/types/Light";
import { HemisphereLightParamConfig } from "../../../core/lights/HemisphereLight";
import { HemisphereLightSopOperation } from "../../operations/sop/HemisphereLight";
class HemisphereLightObjParamsConfig extends HemisphereLightParamConfig(NodeParamsConfig) {
}
const ParamsConfig = new HemisphereLightObjParamsConfig();
export class HemisphereLightObjNode extends TypedLightObjNode {
constructor() {
super(...arguments);
this.paramsConfig = ParamsConfig;
}
static type() {
return LightType.HEMISPHERE;
}
_operation() {
return this.__operation__ = this.__operation__ || new HemisphereLightSopOperation(this._scene, this.states, this);
}
createLight() {
return this._operation().createLight();
}
updateLightParams() {
this._operation().updateLightParams(this.light, this.pv);
}
}