@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
28 lines (27 loc) • 981 B
JavaScript
;
import { TypedLightObjNode } from "./_BaseLight";
import { NodeParamsConfig } from "../utils/params/ParamsConfig";
import { LightType } from "../../poly/registers/nodes/types/Light";
import { LightProbeParamConfig } from "../../../core/lights/LightProbe";
import { LightProbeSopOperation } from "../../operations/sop/LightProbe";
class LightProbeObjParamsConfig extends LightProbeParamConfig(NodeParamsConfig) {
}
const ParamsConfig = new LightProbeObjParamsConfig();
export class LightProbeObjNode extends TypedLightObjNode {
constructor() {
super(...arguments);
this.paramsConfig = ParamsConfig;
}
static type() {
return LightType.PROBE;
}
_operation() {
return this.__operation__ = this.__operation__ || new LightProbeSopOperation(this._scene, this.states, this);
}
createLight() {
return this._operation().createLight();
}
async updateLightParams() {
await this._operation().updateLightParams(this.light, this.pv);
}
}