import{_ as a,o as s,c as e,Q as o}from"./chunks/framework.4313453f.js";const E=JSON.parse('{"title":"Image","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"references/image.md","filePath":"references/image.md","lastUpdated":null}'),n={name:"references/image.md"},l=o(`
The Image object is designed for adding more advanced backgrounds to your interface. It supports the loading of .nfp and .bimg images, allowing for greater customization of your interface’s appearance.
| Property | Type | Description |
|---|---|---|
| frame | number | Determines the current frame of the bimg image |
| XOffset | number | Horizontal offset of the image from its starting position |
| YOffset | number | Vertical offset of the image from its starting position |
This method sets the image to be displayed in the Image object.
string The path to the image file you wish to use.string (optional) - The format of the image: nfp or bimg.object The object in uselocal main = basalt.createFrame()
local image = main:addImage()
image:set("dog.nfp")local main = basalt.createFrame()
local image = main:addImage()
image:set("dog.nfp")Plays a animated bimg image
boolean optional - infinite loop.object The object in uselocal main = basalt.createFrame()
local image = main:addImage()
image:set("dog.bimg"):play()local main = basalt.createFrame()
local image = main:addImage()
image:set("dog.bimg"):play()