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 { CameraWebXRARSopOperation } from "../../operations/sop/CameraWebXRAR"; import { HierarchyParamConfigAll } from "../utils/params/ParamsConfig"; import { CameraSopNodeType } from "../../poly/NodeContext"; import { CoreCameraWebXRARParamConfig } from "../../../core/camera/webXR/CoreCameraWebXRAR"; class CameraWebXRARSopParamsConfig extends CoreCameraWebXRARParamConfig(HierarchyParamConfigAll) { } const ParamsConfig = new CameraWebXRARSopParamsConfig(); export class CameraWebXRARSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return CameraSopNodeType.WEBXR_AR; } initializeNode() { this.io.inputs.setCount(1); this.io.inputs.initInputsClonedState(CameraWebXRARSopOperation.INPUT_CLONED_STATE); } cook(inputCoreGroups) { this._operation = this._operation || new CameraWebXRARSopOperation(this._scene, this.states, this); const coreGroup = this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }