Skip to content

TextureDefinition

Texture typessource

Use TextureDefinition.new() to get a new instance to this and pass it to define_texture. width and height always have to be the size of the image file. They should be divisible by tile_width and tile_height respectively. tile_width and tile_height define the size of a single tile, the image will automatically be divided into these tiles. Tiles are labeled in sequence starting at the top left, going right and down at the end of the image (you know, like sentences work in the English language). Use those numbers in Entity::animation_frame. sub_image_offset_x, sub_image_offset_y, sub_image_width and sub_image_height can be used if only a part of the image should be used. Leave them at zero to ignore this.

Fields

height

integer

source

sub_image_height

integer

source

sub_image_offset_x

integer

source

sub_image_offset_y

integer

source

sub_image_width

integer

source

texture_path

string

source

tile_height

integer

source

tile_width

integer

source

width

integer

source