Package-level declarations

Types

Link copied to clipboard

Marks APIs that are experimental and may change or be removed in future releases. Use at your own risk.

Link copied to clipboard

Search order for hit testing.

Link copied to clipboard

Utility functions for geometric intersection and point-in-polygon tests

Link copied to clipboard
data class IsoColor @JvmOverloads constructor(val r: Double, val g: Double, val b: Double, val a: Double = 255.0)

Represents a color with RGB and HSL representations.

Link copied to clipboard
class IsometricEngine @JvmOverloads constructor(angle: Double = PI / 6, scale: Double = 70.0, colorDifference: Double = 0.2, lightColor: IsoColor = IsoColor.WHITE) : SceneProjector

Core isometric rendering engine. Platform-agnostic — outputs PreparedScene that can be rendered by any platform.

Link copied to clipboard
open class Path(points: List<Point>)

Represents a polygon face in 3D space, defined by an ordered list of vertices.

Link copied to clipboard
class Point @JvmOverloads constructor(val x: Double = 0.0, val y: Double = 0.0, val z: Double = 0.0)

A point in 3D isometric space.

Link copied to clipboard
data class Point2D(val x: Double, val y: Double)

A 2D point in screen space (after isometric projection).

Link copied to clipboard
class PreparedScene(val commands: List<RenderCommand>, val width: Int, val height: Int)

A prepared scene ready for rendering. Contains platform-agnostic render commands sorted by depth.

Link copied to clipboard
class RenderCommand(val commandId: String, val points: List<Point2D>, val color: IsoColor, val originalPath: Path, val originalShape: Shape?, val ownerNodeId: String? = null)

A platform-agnostic rendering command representing a single polygon to draw. Contains the 2D screen-space points and color, ready for rendering.

Link copied to clipboard
class RenderOptions @JvmOverloads constructor(val enableDepthSorting: Boolean = true, val enableBackfaceCulling: Boolean = true, val enableBoundsChecking: Boolean = true, val enableBroadPhaseSort: Boolean = true, val broadPhaseCellSize: Double = DEFAULT_BROAD_PHASE_CELL_SIZE)

Configuration options for rendering

Link copied to clipboard
interface SceneProjector

Abstraction over the isometric projection pipeline.

Link copied to clipboard
open class Shape(val paths: List<Path>)

Represents a 3D shape composed of multiple polygon faces (Path instances).

Link copied to clipboard

The world axis along which a io.github.jayteealao.isometric.compose.runtime.Stack composable arranges its children.

Link copied to clipboard
class TileCoordinate(val x: Int, val y: Int)

Discrete 2D tile grid coordinate.

Link copied to clipboard
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.

Link copied to clipboard
class Vector(val x: Double, val y: Double, val z: Double)

A three-dimensional vector used for directions, normals, and light calculations.

Functions

Link copied to clipboard
fun IsometricEngine.screenToTile(screenX: Double, screenY: Double, viewportWidth: Int, viewportHeight: Int, tileSize: Double = 1.0, elevation: Double = 0.0, originOffset: Point = Point.ORIGIN): TileCoordinate

Returns the TileCoordinate of the tile at the given screen position on the specified z-plane.

Link copied to clipboard
fun Point.toTileCoordinate(tileSize: Double = 1.0, originOffset: Point = Point.ORIGIN): TileCoordinate

Converts a continuous world Point to the TileCoordinate of the tile cell that contains it.