UNPKG

@polygonjs/polygonjs

Version:

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

26 lines (25 loc) 934 B
"use strict"; import { TypedSopNode } from "./_Base"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; import { HemisphereLightParamConfig } from "../../../core/lights/HemisphereLight"; import { HemisphereLightSopOperation } from "../../operations/sop/HemisphereLight"; class HemisphereLightSopParamsConfig extends HemisphereLightParamConfig(NodeParamsConfig) { } const ParamsConfig = new HemisphereLightSopParamsConfig(); export class HemisphereLightSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return "hemisphereLight"; } initializeNode() { this.io.inputs.setCount(0); } cook(inputCoreGroups) { this._operation = this._operation || new HemisphereLightSopOperation(this._scene, this.states, this); const coreGroup = this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }