UNPKG

@polygonjs/polygonjs

Version:

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

28 lines (27 loc) 1.05 kB
"use strict"; import { TypedSopNode } from "./_Base"; import { CameraFPSSopOperation } from "../../operations/sop/CameraFPS"; import { HierarchyParamConfigAll } from "../utils/params/ParamsConfig"; import { CameraSopNodeType } from "../../poly/NodeContext"; import { CoreCameraFPSParamConfig } from "../../../core/camera/CoreCameraFPS"; class CameraFPSSopParamsConfig extends CoreCameraFPSParamConfig(HierarchyParamConfigAll) { } const ParamsConfig = new CameraFPSSopParamsConfig(); export class CameraFPSSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return CameraSopNodeType.FPS; } initializeNode() { this.io.inputs.setCount(1); this.io.inputs.initInputsClonedState(CameraFPSSopOperation.INPUT_CLONED_STATE); } cook(inputCoreGroups) { this._operation = this._operation || new CameraFPSSopOperation(this._scene, this.states, this); const coreGroup = this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }