UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

26 lines (25 loc) 896 B
"use strict"; import { TypedSopNode } from "./_Base"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; import { LightProbeParamConfig } from "../../../core/lights/LightProbe"; import { LightProbeSopOperation } from "../../operations/sop/LightProbe"; class LightProbeSopParamsConfig extends LightProbeParamConfig(NodeParamsConfig) { } const ParamsConfig = new LightProbeSopParamsConfig(); export class LightProbeSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return "lightProbe"; } initializeNode() { this.io.inputs.setCount(0); } async cook(inputCoreGroups) { this._operation = this._operation || new LightProbeSopOperation(this._scene, this.states, this); const coreGroup = await this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }