AtlasLoader Class
The atlas file loader is used to load in Atlas data and parse it When loaded this class will dispatch a 'loaded' event If loading fails this class will dispatch an 'error' event
Constructor
AtlasLoader
-
url
-
crossorigin
Parameters:
-
url
Stringthe url of the JSON file
-
crossorigin
Boolean
Item Index
Methods
Properties
Methods
addEventListener
-
type
-
listener
Adds a listener for a specific event
Parameters:
-
type
StringA string representing the event type to listen for.
-
listener
FunctionThe callback function that will be fired when the event occurs
dispatchEvent
-
event
Fires the event, ie pretends that the event has happened
Parameters:
-
event
Eventthe event object
load
()
Starts loading the JSON file
onAtlasLoaded
()
private
Invoke when JSON file is loaded
onError
()
private
Invoke when error occured
onLoaded
()
private
Invoke when json file has loaded
removeAllEventListeners
-
type
Removes all the listeners that were active for the specified event type
Parameters:
-
type
StringA string representing the event type which will have all its listeners removed
removeEventListener
-
type
-
listener
Removes the specified listener that was assigned to the specified event type
Parameters:
-
type
StringA string representing the event type which will have its listener removed
-
listener
FunctionThe callback function that was be fired when the event occured
Properties
listeners
Object
Holds all the listeners