Skip to content

Commit

Permalink
feat: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
cptbtptpbcptdtptp committed Jul 19, 2024
1 parent 228b3de commit 573b429
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions packages/xr/src/XRManagerExtended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { XRSessionManager } from "./session/XRSessionManager";
import { XRSessionMode } from "./session/XRSessionMode";
import { XRSessionState } from "./session/XRSessionState";
/**
* XRManager is the entry point of the XR system.
* @internal
*/
export class XRManagerExtended extends XRManager {
/** @internal */
Expand Down Expand Up @@ -97,19 +97,13 @@ export class XRManagerExtended extends XRManager {
});
}

/**
* @internal
*/
override _initialize(engine: Engine, xrDevice: IXRDevice): void {
this._platformDevice = xrDevice;
this.sessionManager = new XRSessionManager(this, engine);
this.inputManager = new XRInputManager(this, engine);
this.cameraManager = new XRCameraManager(this);
}

/**
* @internal
*/
override _update(): void {
const { sessionManager } = this;
if (sessionManager.state !== XRSessionState.Running) return;
Expand All @@ -123,9 +117,6 @@ export class XRManagerExtended extends XRManager {
}
}

/**
* @internal
*/
override _destroy(): void {
if (this.sessionManager._platformSession) {
this.exitXR().then(() => {
Expand All @@ -140,23 +131,14 @@ export class XRManagerExtended extends XRManager {
}
}

/**
* @internal
*/
override _getRequestAnimationFrame(): (callback: FrameRequestCallback) => number {
return this.sessionManager._getRequestAnimationFrame();
}

/**
* @internal
*/
override _getCancelAnimationFrame(): (id: number) => void {
return this.sessionManager._getCancelAnimationFrame();
}

/**
* @internal
*/
override _getCameraClearFlagsMask(type: CameraType): CameraClearFlags {
return this.cameraManager._getCameraClearFlagsMask(type);
}
Expand Down

0 comments on commit 573b429

Please sign in to comment.