Skip to main content

Module iso

Module iso 

Source
Expand description

Headless isometric sprite baker: rasterizes a node subtree into RGBA sprite frames (classic 2:1-ish game isometric) with no window and no GPU.

One frame per azimuth is rendered with an orthographic camera at the given pitch (true isometric = 35.264°), painter-sorted, Lambert-shaded to match the viewer’s look, supersampled and box-filtered for crisp sprite edges. anim_frames > 1 additionally steps the procedural motion (crate::motion) through one full cycle: the sheet becomes a grid of views rows × anim_frames columns, each row a seamless animation loop of one azimuth. anim_frames = 1 keeps the classic horizontal strip. Encode the result with re_io::png::write_png_rgba8.

Structs§

BakeOptions
How to bake. Defaults: four frames (N/E/S/W-ish), true isometric pitch, 128 px sprites, 2× supersampling, shaded, one still frame per view.
BakedSheet
A finished sprite sheet. With anim_frames = 1 a horizontal strip of views() images; otherwise a grid of views() rows (one per azimuth) × anim() columns (one per motion sample), row-major in memory.

Functions§

bake
Bake the subtree under root into an RGBA sprite sheet: views rows (one per azimuth) × anim_frames columns (motion samples of one loop).