UNPKG

@polygonjs/polygonjs

Version:

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

47 lines (46 loc) 1.16 kB
"use strict"; export class SceneWebXRController { constructor(scene) { this.scene = scene; /** * * WebXR * */ this._activeXRController = null; this._activeARController = null; this._activeVRController = null; } _setActiveXRController(controller) { this._activeXRController = controller; } activeXRController() { return this._activeXRController; } setARControllerCreationFunction(func) { this._ARControllerCreateFunction = func; } ARControllerCreateFunction() { return this._ARControllerCreateFunction; } setActiveARController(ARController) { this._activeARController = ARController; this._setActiveXRController(ARController); } activeARController() { return this._activeARController; } setVRControllerCreationFunction(func) { this._VRControllerCreateFunction = func; } VRControllerCreateFunction() { return this._VRControllerCreateFunction; } setActiveVRController(VRController) { this._activeVRController = VRController; this._setActiveXRController(VRController); } activeVRController() { return this._activeVRController; } }