Skip to content

Preliminary

GUI Texture is widely used for background setup, image dispaly, etc. LDLib provides lots of different textures. Textures have some generic functions.

Basic Properties

Field Description
xOffset Horizontal offset
yOffset Vertical offset
scale Scale factor (default is 1)
rotation Rotation angle in degrees

APIs

rotate

Sets the rotation angle.

texture.rotate(45);

scale

Sets the scale factor.

texture.scale(1.5);

transform

Sets the horizontal and vertical offset.

texture.transform(10, 20);

copy

Creates a copy of the texture.

var copiedTexture = texture.copy();