springroll.pixi.BitmapFontTask Class

Internal class for loading a bitmap font for Pixi.

Constructor

springroll.pixi.BitmapFontTask

(
  • asset
)
private

Parameters:

  • asset Object

    The data properties

    • type String

      Must be "pixi" to signify that this asset should be parsed specifically for Pixi.

    • font String

      The BitmapFont source data

    • [cache=false] Boolean optional

      If we should cache the result

    • [image] String optional

      The atlas image path

    • [color] String optional

      The color image path, if not using image property

    • [alpha] String optional

      The alpha image path, if not using image property

    • [id] String optional

      Id of asset

    • [complete] Function optional

      The event to call when done

    • [sizes=null] Object optional

      Define if certain sizes are not supported

destroy

()
Destroy this load task and don't use after this.

loadImage

(
  • assets
  • done
  • [ignoreCacheSetting]
)
Load the texture from the properties

Parameters:

  • assets Object
    The assets object to load
  • done Function
    Callback when complete, returns new TextureAtlas
  • [ignoreCacheSetting] Boolean optional
    If the setting to cache results should be ignored because this task is still returning stuff to another task.

start

(
  • callback
)

Inherited from springroll.pixi.TextureTask but overwritten in start:89

Start the task

Parameters:

  • callback Function

    Callback when finished

test

(
  • asset
)
Boolean
static

Defined in test:48

Test if we should run this task

Parameters:

  • asset Object

    The asset to check

Returns:

Boolean:

If the asset is compatible with this asset

alpha

String
The atlas alpha source path

color

String
The atlas color source path

font

String

Defined in font:38

The BitmapFont data source path

image

String
The atlas source path

uploadToGPU

Boolean
If the texture should be uploaded to the GPU immediately.