Shapes
Shape Catalog
Section titled “Shape Catalog”Isometric ships with six built-in shape geometries. Each constructor takes a position: Point as its first argument.
| Shape | Preview | Constructor | Notes |
|---|---|---|---|
| Prism | ![]() | Prism(position, width=1, depth=1, height=1) | Rectangular box |
| Pyramid | ![]() | Pyramid(position, width=1, depth=1, height=1) | Pyramid |
| Cylinder | ![]() | Cylinder(position, radius=1, height=1, vertices=20) | vertices controls smoothness |
| Octahedron | ![]() | Octahedron(position) | Fixed unit size |
| Stairs | ![]() | Stairs(position, stepCount) | stepCount is required |
| Knot | ![]() | Knot(position) | @ExperimentalIsometricApi, known depth-sorting issues |
Using the Shape Composable
Section titled “Using the Shape Composable”The Shape composable renders a geometry inside an IsometricScene:
Shape( geometry = Prism(Point.ORIGIN, width = 2.0, depth = 1.0, height = 1.5), color = IsoColor(33, 150, 243), position = Point(0.0, 0.0, 0.0), rotation = 0.0, scale = 1.0, visible = true)- geometry — one of the built-in shapes or a custom
Shape - color — an
IsoColorvalue (defaults toLocalDefaultColor) - position — world-space offset applied after geometry construction
- rotation — rotation angle in radians
- scale — uniform scale factor
- visible — toggle rendering without removing the node from the tree
Transform Operations
Section titled “Transform Operations”All transforms return a new Shape instance (shapes are immutable).
translate
Section titled “translate”Moves a shape by the given deltas:
val box = Prism(Point.ORIGIN)val moved = box.translate(2.0, 0.0, 1.0) // shift right and upScales relative to an origin point:
val box = Prism(Point.ORIGIN)val scaled = box.scale(Point.ORIGIN, 2.0, 1.0, 0.5) // stretch X, compress ZrotateZ
Section titled “rotateZ”Rotates around the Z axis (vertical in isometric view). This is the most common rotation. rotateX and rotateY are also available.
val box = Prism(Point.ORIGIN)val rotated = box.rotateZ(Point(0.5, 0.5, 0.0), Math.PI / 4) // 45 degreesExtruding 2D Paths
Section titled “Extruding 2D Paths”Shape.extrude takes a 2D Path and lifts it into a 3D solid. See the Custom Shapes guide for the full extrusion walkthrough and examples.





