The base path to the assets directory.
Used internally to preload the game and its assets.
The game instance.
Get a audio that was loaded.
If the audio was loaded on the fly, it may not be ready yet! You can
check whether the file was loaded or not using the loaded() method.
The name of the file to get.
The audio file, or null if the audio was not loaded using loadAudio().
Get a file from the loader.
If the file was loaded on the fly, it may not be ready yet! You can
check whether the file was loaded or not using the loaded() method.
The name of the file to get.
The file, or null if the Loader does not contain the specified file.
Get an image that was loaded.
If the image was loaded on the fly, it may not be ready yet! You can
check whether the file was loaded or not using the loaded() method.
The name of the file to get.
The image file, or null if the image was not loaded using loadImage().
Get a JSON file that was loaded.
If the JSON file was loaded on the fly, it may not be ready yet! You can
check whether the file was loaded or not using the loaded() method.
The name of the file to get.
The parsed JSON file, or null if the JSON file was not loaded using loadJSON().
Load an audio file.
If the file can't be loaded, the game won't start and a message will
be logged to the console.
The name to save this file as in the loader.
The path to the file to load.
Load an image file.
If the file can't be loaded, the game won't start and a message will
be logged to the console.
The name to save this file as in the loader.
The path to the file to load.
Load a json file.
If the file can't be loaded, the game won't start and a message will
be logged to the console.
The name to save this file as in the loader.
The path to the file to load.
Load a video file.
If the file can't be loaded, the game won't start and a message will
be logged to the console.
The name to save this file as in the loader.
The path to the file to load.
Check whether a file is ready to be used or not.
The file to check.
Get a video that was loaded.
If the video was loaded on the fly, it may not be ready yet! You can
check whether the file was loaded or not using the loaded() method.
The name of the file to get.
The video file, or null if the video was not loaded using loadVideo().
Generated using TypeDoc
The loader is an easy way to preload all the required assets for your game.
You can use it from the load() method of your Game class.
It can also be used while the game is running to load assets on the fly.