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 573b429 commit bce8fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/xr/src/session/XRSessionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ export class XRSessionManager {
* Add a listening function for session state changes.
* @param listener - The listening function
*/
addChangedListener(listener: (state: XRSessionState) => void): void {
addStateChangedListener(listener: (state: XRSessionState) => void): void {
this._listeners.push({ fn: listener });
}

/**
* Remove a listening function of session state changes.
* @param listener - The listening function
*/
removeChangedListener(listener: (state: XRSessionState) => void): void {
removeStateChangedListener(listener: (state: XRSessionState) => void): void {
this._listeners.findAndRemove((value) => (value.fn === listener ? (value.destroyed = true) : false));
}

Expand Down

0 comments on commit bce8fbb

Please sign in to comment.