From 4f917283e8cf5e00b6efe13822f0f13172daf01e Mon Sep 17 00:00:00 2001 From: KPal <48248865+kpal81xd@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:11:10 +0000 Subject: [PATCH] moved callbacks inside appbase scope (#6149) --- src/framework/app-base.js | 50 ++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/framework/app-base.js b/src/framework/app-base.js index 007ec4f68f9..4f217f60b69 100644 --- a/src/framework/app-base.js +++ b/src/framework/app-base.js @@ -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. * @@ -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. * @@ -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. *