TileGridConfig

class TileGridConfig(val tileSize: Double = 1.0, val originOffset: Point = Point.ORIGIN, val elevation: (TileCoordinate) -> Double? = null)

Configuration for a io.github.jayteealao.isometric.compose.runtime.TileGrid composable.

All fields have safe defaults: a 1-unit tile size, grid origin at world origin, and a flat ground plane (no per-tile elevation). Pass a TileGridConfig only when customizing these values.

Parameters

tileSize

World units per tile side. Must be positive and finite. Default 1.0.

originOffset

World position of the grid's (0, 0) corner. Default Point.ORIGIN.

elevation

Optional per-tile elevation function. Returns the z-coordinate of the tile surface for the given TileCoordinate. When null, all tiles sit at originOffset.z. Use for terrain height maps.

Note: elevation is excluded from equals and hashCode. Two configs with the same tileSize and originOffset compare equal regardless of their elevation functions. This is intentional — lambda literals do not have stable identity across recompositions, so including them would cause spurious inequality and unnecessary gesture-hub re-registration on every recomposition.

Constructors

Link copied to clipboard
constructor(tileSize: Double = 1.0, originOffset: Point = Point.ORIGIN, elevation: (TileCoordinate) -> Double? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String