Skip to content

jayteealao/Isometric

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

148 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Isometric

Declarative isometric rendering for Jetpack Compose.

License Kotlin API

Isometric scene with prisms, stairs, pyramids, and octahedron

What is Isometric?

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.

Features

  • Declarative scene graphShape, Group, Path, Batch, If, ForEach composables
  • 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 gridTileGrid composable for isometric tile maps with automatic tap-to-tile routing
  • Stack layoutStack composable 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 CustomNode for full control

Quick Start

Installation

dependencies {
    implementation("io.github.jayteealao:isometric-compose:1.1.0")
}

Your First Scene

@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.

Documentation

Requirements

Requirement Version
Android min SDK 24
Kotlin 1.9+
Jetpack Compose 1.5+
JVM target 11

Modules

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)

Available Shapes

Prism Pyramid Cylinder Octahedron Stairs Knot
Prism Pyramid Cylinder Octahedron Stairs Knot

Credits

Originally created by Fabian Terhorst. Rewritten in Kotlin with Compose Runtime API by jayteealao.

License

Apache License 2.0

About

Isometric drawing library for Android (Attempting a port to jetpack compose)

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Kotlin 73.3%
  • MDX 20.9%
  • Astro 3.2%
  • Shell 1.5%
  • JavaScript 1.1%