Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appbase Callbacks JSDoc #6149

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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