pixi.loaders.SpineLoader

type
class
extends
pixi.utils.EventTarget
metadata
:native
"PIXI.SpineLoader"

Constructor

new(url : String, ?crossorigin : Bool)
parameters
url {String} The url of the JSON file
[crossorigin] {Bool} Whether requests should be treated as crossorigin
The Spine loader is used to load in JSON spine data To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source You will need to generate a sprite sheet to accompany the spine data When loaded this class will dispatch a "loaded" event

Instance Variables hide inherited show inherited

crossorigin : Bool

Whether the requests should be treated as cross origin

loaded : Bool

read-only Whether the data has loaded yet

url : String

The url of the json file

Instance Methods hide inherited show inherited

addEventListener(eventName : String, callback : Dynamic) : Void

inherited from pixi.utils.EventTarget

dispatchEvent(eventName : String, ?data : Dynamic) : Bool

inherited from pixi.utils.EventTarget

emit(eventName : String, ?data : Dynamic) : Bool

inherited from pixi.utils.EventTarget
parameters
eventName {String} The name of the event.
data {Dynamic}
returns
{Bool} Indication if we've emitted an event.
Emit an event to all registered event listeners.

listeners(eventName : String) : Array<Dynamic>

inherited from pixi.utils.EventTarget
parameters
eventName {String} The events that should be listed.
returns
{Array} An array of listener functions
Return a list of assigned event listeners.

load() : Void

Loads the JSON data

off(eventName : String, callback : Dynamic) : Void

inherited from pixi.utils.EventTarget
parameters
eventName {String} The event we want to remove.
callback {Function} The listener that we need to find.
Remove event listeners.

on(eventName : String, callback : Dynamic) : Void

inherited from pixi.utils.EventTarget
parameters
eventName {String} Name of the event.
callback {Functon} Callback function.
Register a new EventListener for the given event.

once(eventName : String, callback : Dynamic) : Void

inherited from pixi.utils.EventTarget
parameters
eventName {String} Name of the event.
callback {Function} Callback function.
Add an EventListener that's only called once.

removeAllEventListeners(eventName : String) : Void

inherited from pixi.utils.EventTarget
parameters
eventName {String} The event you want to remove all listeners for.
Remove all listeners or only the listeners for the specified event.

removeEventListener(eventName : String, callback : Dynamic) : Void

inherited from pixi.utils.EventTarget