Asset

Reference to a custom image that has been included in the touch adaptation package.

Properties

type - string. "asset"

value - string. The name of the image asset that is being referenced.

opacity - number. The opacity that should be applied to the asset. Defaults to 1.0.

Sample

{
    "type": "asset",
    "value": "someImage",
    "opacity": 1
}

Remarks

All assets are either PNG images or a PNG sprite sheet image paired with a JSON sprite atlas.

Assets must be included in all resolutions (1.0x, 1.5x, 2.0x, 3.0x, 4.0x) and at LEAST in the neutral language. Localized assets are supported as well.

The value is the name of the asset that was included without the file extension. Example: For as an asset "someImage.png" the value should be "someImage".

For sprite assets, the value field should be of the form spriteSheetFileName/spriteName. Example: "icons/fire" would map to the 'fire' sprite within the icons.png and icons.json files.

The expected dimensions of the asset depend on where the asset is being used. For sprite assets, the individual sprite must conform to the expected dimensions where it is used.

Check per control documentation for the specific dimensions for each area of use.

Arcade Buttons
Button
Directional Pad
Joystick
Throttle
Touchpad

See also

Touch Adaptation Kit Reference