Skip to content

load_asset

Load a PNG, FPG, atlas or Aseprite asset by path.

Parameters

  • path — A path relative to the working directory.
  • options? — A table with format, pivot and transparent_zero.
local hero = load_asset("hero.json")
local icon = load_asset("icon.png", {pivot = "center"})

Related: load_image, load_atlas, load_aseprite.

See the images guide for more examples and limits.