Class: Preloader

DKTools.Scene.Preloader

Scene preloader class

new DKTools.Scene.Preloader ()

Members

_errors Number privatereadonly

_finished Boolean privatereadonly

_queue Array.<Promise> privatereadonly

_running Boolean privatereadonly

Methods

_onError () private

Processes the loading error

add (resource)

Adds the resource to preloading
Name Type Description
resource Promise | Bitmap | WebAudio Resource

finish ()

Finishes the preloading

hasErrors ()Boolean

Returns true if the preloader has errors
Returns:
Type Description
Boolean Preloader has errors

initialize ()

Initializes the preloader

isReady ()Boolean

Returns true if the preloader is ready
Returns:
Type Description
Boolean Preloader is ready

isRunning ()Boolean

Returns true if the preloader is running
Returns:
Type Description
Boolean Preloader is running

start ()

Starts the preloading