Class VectorTextureAsset extends Asset

Single JSON file asset class responsible for loading json file.

Methods

VectorTextureAsset(name, url, bakeSelf, bakeChildren, namesToBake) constructor

Creates new JSONAsset instance.

Parameters
name : string — Name of the asset.
url : string — The URL of the json.
bakeSelf : boolean — Flag to bake full BVG as texture. If false root will not be baked.
bakeChildren : boolean — Flag to bake each node with id to textures. If false none children nodes will be baked.
namesToBake : Array.<string> — Concrete nodes ids to bake. Works only if bakeChildren is set to true.
bakeTextures() method
Creates baked textures from this graphics data.

Inherited Methods

addLoader(loader) inherited method

Adds given loader to the list. Loader cannot be added to multiply Assets.

Parameters
loader : AssetLoader — Loader to add.
Returns
AssetLoader
onLoaderRequested(factory) inherited method

Called when AssetManager is about to request loaders for this asset.

Parameters
factory : LoaderFactory
onAllLoaded() inherited method
abort() inherited method
Aborts loading of this asset.
ready(data) inherited method

Protected method used to notify AssetManager about completion of loading this asset.

Parameters
data : Object
Returns
void
on(name, callback, context) inherited method

Adds listener by given name and callback.

Parameters
name : string — Message name.
callback : function — Function to be called on message send.
context : * — Object to be used as this in callback function.
Returns
MessageBinding
off(names) inherited method

Removes all bindings by given message name.

Parameters
names : string — One or more message name.
Returns
void
once(name, callback, context) inherited method

Adds listener by given name and callback. Binding will be automatically removed after first execution.

Parameters
name : string — Message name.
callback : function — Function to be called on message send.
context : * — Object to be used as this in callback function.
Returns
MessageBinding
post(name, params) inherited method

Posts message with a given params.

Adding ~ character to the begging of the name will bubble message to the top of the tree.

Parameters
name : string — The name of a message
params : * — A list of params to send
Returns
void

Inherited Properties

type : string inherited property
Returns the type of this asset.
name : string inherited property
Returns the name of this asset.
data : ? inherited property
Returns loaded data object associated with this asset.
isReady : boolean inherited property
Returns true if this asset is loaded.
loaders : Array. inherited property
Returns array of loaders.
parent : MessageDispatcher | null inherited property
Returns parent MessageDispatcher.
stage : Stage | null inherited property
Returns the stage Game Object to which this belongs to or null if not added onto stage.
path : string | null inherited property
Returns string representing a url like path to this object in the display
tree.