LogoPixi’VN

Assets

Describes how to define, initialize and load assets in Pixi’VN (ink), including asset matrix setup, ink load/lazyload commands, manifest examples, and asset aliases.

As explained in more detail here, initialize the asset matrix at project start and decide when assets should be loaded.

In ink you have less control than in JavaScript/TypeScript over how and when to load assets. Pixi’VN provides a single ink command that loads assets before a label starts. Use the following syntax:

file_type_ink
ink
# {operation} {assets or bundle} {list of URL/path of the image}
  • #: is the hashtag symbol to identify a hashtag command.
  • operation: the operation to perform. Currently supported:
    • load: It loads with await the assets or bundle (Assets.load or Assets.loadBundle).
    • lazyload: It loads the assets or bundle in the background (Assets.backgroundLoad or Assets.backgroundLoadBundle).
  • assets or bundle: The type of asset to load. Available types are:
    • assets: It loads the assets.
    • bundle: It loads the bundle.
  • list of URL/path of the image: The list of URLs/paths of the images (or other assets) you want to load. If you initialized the asset matrix, you can use an asset alias instead of a URL. Note: to write https:// in ink you must escape the slashes as https:\/\/ because // is treated as a comment in ink.
=== start ===
# lazyload bundle main_menu start
# load assets eggHead flowerTop my_video
# show image eggHead
# show image flowerTop
# show video my_video
# pause
-> start