UNPKG

@polygonjs/polygonjs

Version:

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

28 lines (27 loc) 1.1 kB
"use strict"; import { TypedSopNode } from "./_Base"; import { CameraWebXRVRSopOperation } from "../../operations/sop/CameraWebXRVR"; import { HierarchyParamConfigAll } from "../utils/params/ParamsConfig"; import { CameraSopNodeType } from "../../poly/NodeContext"; import { CoreCameraWebXRVRParamConfig } from "../../../core/camera/webXR/CoreCameraWebXRVR"; class CameraWebXRVRSopParamsConfig extends CoreCameraWebXRVRParamConfig(HierarchyParamConfigAll) { } const ParamsConfig = new CameraWebXRVRSopParamsConfig(); export class CameraWebXRVRSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return CameraSopNodeType.WEBXR_VR; } initializeNode() { this.io.inputs.setCount(1); this.io.inputs.initInputsClonedState(CameraWebXRVRSopOperation.INPUT_CLONED_STATE); } cook(inputCoreGroups) { this._operation = this._operation || new CameraWebXRVRSopOperation(this._scene, this.states, this); const coreGroup = this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }