Skip to main content

Assets

APIs for image assets and rendering options.


Image

Drawable image asset.

Attributes

AttributeTypeDescription
widthnumberWidth in pixels (read-only)
heightnumberHeight in pixels (read-only)

See Also: Renderer.drawImage


ImageFilter

Defines image sampling behavior during scaling or transformation.

Values

ValueDescription
trilinearSmooth filtering (default)
nearestPixel-perfect, no interpolation

See Also: Image, ImageSampler


ImageSampler

Sampling parameters applied when drawing an image, including wrapping and filtering behavior.

Note: The official scripting docs do not list concrete ImageSampler values. Use editor autocomplete to confirm what your build supports.

Usage

ImageSampler is passed to renderer:drawImage() to control how images are rendered:

local sampler = ImageSampler.someValue -- Use a value supported by your build (check autocomplete)
renderer:drawImage(image, sampler, BlendMode.srcOver, 1.0)

See Also: ImageFilter, ImageWrap


ImageWrap

Defines how texture coordinates outside the [0, 1] range are handled.

Values

ValueDescription
clampClamps coordinates to [0, 1] range
repeatTiles the texture by repeating
mirrorMirrors the texture at boundaries

See Also: ImageSampler, Image

Next Steps