Add more documentation to the preloader
This commit is contained in:
parent
a55e96a819
commit
805360565b
@ -1,5 +1,19 @@
|
||||
var constants = {
|
||||
testOrganizer: {
|
||||
EXAMPLE_DELETE_ME_LATER : 1277336
|
||||
},
|
||||
ui: {
|
||||
// These are the variables that control injection/cssinjector.js
|
||||
// To add a new theme var, you must also add it to the injector
|
||||
theme: {
|
||||
webpage: {
|
||||
bg_color: "#242424",
|
||||
text_color: "#ffffff",
|
||||
canvas_border: "rgb(63, 63, 63)"
|
||||
},
|
||||
game: {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
@ -1,3 +1,26 @@
|
||||
/**
|
||||
* This file contains the code that powers the full-screen loading animation.
|
||||
* Multiple animations can be created in the same webpage, and toggled individually.
|
||||
*
|
||||
* --- Usage ---
|
||||
* let myPreloader = new Preloader();
|
||||
*
|
||||
* // Show the loader
|
||||
* myPreloader.show(true);
|
||||
*
|
||||
* // load some stuff
|
||||
* // ...
|
||||
*
|
||||
* // Fade out the animation
|
||||
* myPreloader.hide(false);
|
||||
*
|
||||
* --- How it works ---
|
||||
* On creation, the Preloader injects some HTML into the webpage with a unique ID
|
||||
* for the instance. Hiding and showing works by modifying the active classes for
|
||||
* the loader. The "appear" and "disappear" classes will render their respective
|
||||
* animations in _sass/ui/page_loader.scss
|
||||
*/
|
||||
|
||||
let preloaderCount = 0;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user