Skip to content

Commit

Permalink
moved callbacks inside appbase scope (#6149)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd authored Mar 13, 2024
1 parent 436babd commit 4f91728
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions src/framework/app-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,6 @@ class Progress {
}
}

/**
* Callback used by {@link AppBase#configure} when configuration file is loaded and parsed (or
* an error occurs).
*
* @callback ConfigureAppCallback
* @param {string|null} err - The error message in the case where the loading or parsing fails.
*/

/**
* Callback used by {@link AppBase#preload} when all assets (marked as 'preload') are loaded.
*
* @callback PreloadAppCallback
*/

/**
* Gets the current application, if any.
*
Expand Down Expand Up @@ -123,6 +109,32 @@ let app = null;
* @augments EventHandler
*/
class AppBase extends EventHandler {
/**
* Callback used by {@link AppBase#configure} when configuration file is loaded and parsed (or
* an error occurs).
*
* @callback ConfigureAppCallback
* @param {string|null} err - The error message in the case where the loading or parsing fails.
* @returns {void}
*/

/**
* Callback used by {@link AppBase#preload} when all assets (marked as 'preload') are loaded.
*
* @callback PreloadAppCallback
* @returns {void}
*/

/**
* Callback used by {@link AppBase#start} and itself to request
* the rendering of a new animation frame.
*
* @callback MakeTickCallback
* @param {number} [timestamp] - The timestamp supplied by requestAnimationFrame.
* @param {*} [frame] - XRFrame from requestAnimationFrame callback.
* @returns {void}
*/

/**
* A request id returned by requestAnimationFrame, allowing us to cancel it.
*
Expand Down Expand Up @@ -2088,16 +2100,6 @@ class AppBase extends EventHandler {
// static data
const _frameEndData = {};

/**
* Callback used by {@link AppBase#start} and itself to request
* the rendering of a new animation frame.
*
* @callback MakeTickCallback
* @param {number} [timestamp] - The timestamp supplied by requestAnimationFrame.
* @param {*} [frame] - XRFrame from requestAnimationFrame callback.
* @ignore
*/

/**
* Create tick function to be wrapped in closure.
*
Expand Down

0 comments on commit 4f91728

Please sign in to comment.