Declarative isometric rendering for Jetpack Compose.
Isometric is a Kotlin library for rendering interactive isometric (2.5D) scenes in Jetpack Compose. Build scenes declaratively with Shape, Group, and Path composables. Transforms accumulate through the hierarchy, animations recompose only changed nodes, and built-in gesture handling supports tap and drag interactions with spatial hit testing.
- Declarative scene graph —
Shape,Group,Path,Batch,If,ForEachcomposables - Hierarchical transforms — position, rotation, and scale accumulate through groups
- Per-node dirty tracking — only changed subtrees re-render
- Built-in animation — vsync-aligned via
withFrameNanos - Gesture handling — tap and drag with spatial-indexed hit testing
- Tile grid —
TileGridcomposable for isometric tile maps with automatic tap-to-tile routing - Stack layout —
Stackcomposable for 1D arrangement along any world axis (X, Y, or Z) - Camera control — pan and zoom with
CameraState - 6 built-in shapes — Prism, Pyramid, Cylinder, Octahedron, Stairs, Knot
- Custom shapes — extrude paths or implement
CustomNodefor full control
dependencies {
implementation("io.github.jayteealao:isometric-compose:1.1.0")
}@Composable
fun MyIsometricScene() {
IsometricScene {
Shape(geometry = Prism(position = Point(0.0, 0.0, 0.0)))
}
}The shape uses the scene default color. Pass color = IsoColor(r, g, b) when you want an explicit override.
See the Quick Start guide for a complete walkthrough.
- Quick Start — Build your first scene in 5 minutes
- Coordinate System — How 3D world space maps to 2D screen space
- Shapes Guide — Built-in shapes, transforms, and custom geometry
- Animation — vsync-aligned animation with
withFrameNanos - Gestures — Tap and drag with spatial hit testing
- Tile Grid — Render and interact with isometric tile grids
- Stack — Arrange shapes along a world axis
- Camera — Pan and zoom with
CameraState - Theming & Colors —
IsoColor, palettes, lighting, stroke styles - Custom Shapes —
Path,Shape.extrude, andCustomNode - Performance — Caching, native canvas, spatial indexing
- Compose Interop — Layout, state sharing, Material theming, navigation
- Advanced Configuration — Lifecycle hooks, custom engines, escape hatches
- Scene Graph — Architecture, node types, and dirty tracking
- Depth Sorting — How isometric draw order works
- Rendering Pipeline — From recomposition to pixels
- Migration Guide — Migrating from the View API to Compose
| Requirement | Version |
|---|---|
| Android min SDK | 24 |
| Kotlin | 1.9+ |
| Jetpack Compose | 1.5+ |
| JVM target | 11 |
| Module | Description |
|---|---|
isometric-core |
Platform-agnostic rendering engine (pure Kotlin/JVM) |
isometric-compose |
Jetpack Compose integration (IsometricScene) |
isometric-android-view |
Traditional Android View support (IsometricView) |
| Prism | Pyramid | Cylinder | Octahedron | Stairs | Knot |
|---|---|---|---|---|---|
Originally created by Fabian Terhorst. Rewritten in Kotlin with Compose Runtime API by jayteealao.