LDtkLevelBackgroundPositionData

@Serializable
data class LDtkLevelBackgroundPositionData(val cropRect: List<Float>, val scale: List<Float>, val topLeftPx: List<Int>)

Level background image position info

Constructors

Link copied to clipboard
fun LDtkLevelBackgroundPositionData(cropRect: List<Float>, scale: List<Float>, topLeftPx: List<Int>)

Properties

Link copied to clipboard

An array of 4 float values describing the cropped sub-rectangle of the displayed background image. This cropping happens when original is larger than the level bounds. Array format: [ cropX, cropY, cropWidth, cropHeight ]

Link copied to clipboard

An array containing the [scaleX,scaleY] values of the cropped background image, depending on bgPos option.

Link copied to clipboard

An array containing the [x,y] pixel coordinates of the top-left corner of the cropped background image, depending on bgPos option.