App Class
Initialises the application.
Constructor
App
()
Item Index
Methods
animate
(
-
millisecondsPerDay
Animates the objects in the Solar System.
Parameters:
-
millisecondsPerDay
FloatDetermines the speed at which objects spin and orbit.
cleanCanvas
()
Cleans the canvas.
draw
()
Draws to the canvas.
millisecondsSinceLastFrame
()
Int
Returns the number of milliseconds since the last frame.
Returns:
Int:
Number of milliseconds since the last frame.
run
()
Runs on every animation frame.
startTheApp
()
Provides a handle to the external host by adding a class to the body, telling the host the application is ready. Then initialises the controls and starts the animation.
waitUntilAssetsDownloadedThen
(
-
callback
Waits until each Astronomical Object has declared it is ready to be rendered, i.e. texture images have been downloaded.
Parameters:
-
callback
FunctionThe function to call once all assets are downloaded.