API Docs for: 0.1.0
Show:

App Class

Module: App

Initialises the application.

Constructor

App

()

Methods

animate

(
  • millisecondsPerDay
)

Animates the objects in the Solar System.

Parameters:

  • millisecondsPerDay Float

    Determines 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 Function

    The function to call once all assets are downloaded.