UNPKG

@polygonjs/polygonjs

Version:

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

28 lines (27 loc) 1.11 kB
"use strict"; import { TypedSopNode } from "./_Base"; import { CameraFrameModeSopOperation } from "../../operations/sop/CameraFrameMode"; import { HierarchyParamConfigAll } from "../utils/params/ParamsConfig"; import { CameraSopNodeType } from "../../poly/NodeContext"; import { CoreCameraFrameParamConfig } from "../../../core/camera/CoreCameraFrameMode"; class CameraFrameModeSopParamsConfig extends CoreCameraFrameParamConfig(HierarchyParamConfigAll) { } const ParamsConfig = new CameraFrameModeSopParamsConfig(); export class CameraFrameModeSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return CameraSopNodeType.FRAME_MODE; } initializeNode() { this.io.inputs.setCount(1); this.io.inputs.initInputsClonedState(CameraFrameModeSopOperation.INPUT_CLONED_STATE); } cook(inputCoreGroups) { this._operation = this._operation || new CameraFrameModeSopOperation(this._scene, this.states, this); const coreGroup = this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }