> Cinder 0.1.0 documentation: API reference
> Canonical page: https://cinder.ash10.dev/docs/api/ · Source: `docs/api/README.md` in the engine repository (engine commit 47c9352, imported 2026-11-09)
> Index of every page for agents: https://cinder.ash10.dev/llms.txt

# API reference

Generated by `tools/gen_api_docs.py` from the docstrings in `cinder/`; do not edit by hand.


## [`cinder.anim`](https://cinder.ash10.dev/docs/api/anim.md)

- `cinder.anim`: Skeletal animation: skeletons, clip sampling, blend trees, animators with crossfades, root motion and events, and a job-parallel system publishing joint palettes to the ECS.
- `cinder.anim.animator`: Animator: states (blend trees) with crossfades, animation events and root motion.
- `cinder.anim.blend`: Blend trees: clips, 1D and 2D blend nodes, evaluated phase-synchronised.
- `cinder.anim.sampling`: Clip sampling: step, linear and cubic-spline keyframes into a local pose.
- `cinder.anim.skeleton`: Skeletons: a bone hierarchy with rest pose, the skin's joint list and inverse bind matrices.
- `cinder.anim.system`: The animation system: animators stored in a pool, advanced in parallel on the job system, and published to the ECS as `JointPalette` components for the render bridge.

## [`cinder.app`](https://cinder.ash10.dev/docs/api/app.md)

- `cinder.app`: Application runtime: subsystems, the fixed-step game loop, windowed and headless modes.
- `cinder.app.app`: The application runtime: owns every subsystem, runs the fixed-step game loop and renders.
- `cinder.app.cli`: Command-line options shared by every Cinder executable (`--headless` for tests and benchmarks).

## [`cinder.assets`](https://cinder.ash10.dev/docs/api/assets.md)

- `cinder.assets`: Assets: glTF import into engine meshes, materials, textures, skins and scenes.
- `cinder.assets.cook`: The asset cooker: glTF sources become cooked meshes, materials and animation clips.
- `cinder.assets.cooked`: Cooked asset formats (little-endian binary, versioned, bounds-checked on read).
- `cinder.assets.gltf`: glTF 2.0 import through cgltf: meshes (with tangents, second UV set, skinning, morph targets), metallic-roughness materials (KHR_texture_transform, KHR_materials_emissive_strength), images (file, data URI or GLB buffer view), nodes, skins and scenes.
- `cinder.assets.runtime`: Runtime asset server: asynchronous loading of cooked assets on the job system, reference counting, and hot reload.
- `cinder.assets.textures`: KTX2 textures: cooking (BasisU ETC1S or UASTC with full mip chains) and runtime loading (transcode to BC7 when the device has block compression, otherwise to RGBA8), through libktx.

## [`cinder.audio`](https://cinder.ash10.dev/docs/api/audio.md)

- `cinder.audio`: Audio over miniaudio: buses, decoded and streamed sounds, one-shots, 3D spatialisation, a listener, and the ECS bridge that follows entities and the camera.
- `cinder.audio.engine`: Audio over miniaudio: buses, decoded and streamed sounds, one-shots, 3D spatialisation and a listener.
- `cinder.audio.sync`: ECS <-> audio: `AudioSource` entities position their sounds, `AudioListener` places the listener (attach it to the camera entity so the listener follows the camera).

## [`cinder.core`](https://cinder.ash10.dev/docs/api/core.md)

- `cinder.core`: Core: math, logging, assertions, allocators, containers, handles, time, file system.
- `cinder.core.arena`: LinearArena: a bump allocator for per-frame scratch memory.
- `cinder.core.assertions`: Engine assertions: broken invariants abort with an explicit message.
- `cinder.core.base64`: Base64 decoding (RFC 4648, with or without padding) for data URIs in glTF files.
- `cinder.core.boxed`: Boxed: a value at a stable heap address.
- `cinder.core.bytes`: Little-endian byte packing for GPU uploads (std140/std430-style layouts are the caller's job).
- `cinder.core.cstring`: C strings to Mojo `String`s, decoding the bytes as UTF-8.
- `cinder.core.fs`: Filesystem helpers with typed errors.
- `cinder.core.handles`: Generational handles and the slot pool that issues them.
- `cinder.core.hash`: Content hashing: 64-bit FNV-1a over bytes and strings (stable across runs and platforms).
- `cinder.core.image`: CPU images: RGBA8 load/decode/save through the shim (stb) and perceptual comparison (SSIM).
- `cinder.core.jobs`: The job system: a work-stealing thread pool with dependency counters.
- `cinder.core.log`: Structured, levelled logging.
- `cinder.core.math`: SIMD math for the engine.
- `cinder.core.math.mat4`: Mat4: a column-major 4x4 float matrix, as WGSL and glTF store it.
- `cinder.core.math.quat`: Quat: a unit quaternion (x, y, z, w) representing a rotation.
- `cinder.core.math.scalar`: Scalar helpers shared by the vector, quaternion and matrix types.
- `cinder.core.math.transform`: Transform: translation, rotation and scale as separate terms (poses, animation keys).
- `cinder.core.math.vec`: Vec2, Vec3 and Vec4: 32-bit float vectors backed by SIMD registers.
- `cinder.core.profile`: Tracy profiling for the engine: zones, frame marks, plots and messages.
- `cinder.core.ring`: RingBuffer: a fixed-capacity FIFO queue with no allocation after construction.
- `cinder.core.time`: Time: a monotonic clock and the fixed-timestep accumulator that drives the simulation.

## [`cinder.ecs`](https://cinder.ash10.dev/docs/api/ecs.md)

- `cinder.ecs`: Entity component system: archetype world, typed queries, change detection, command buffers, parent-child transforms and a scheduler that runs non-conflicting systems in parallel.
- `cinder.ecs.commands`: Deferred structural changes: record while iterating, apply when it is safe.
- `cinder.ecs.hierarchy`: Parent-child transforms: `Parent`, `LocalTransform`, `WorldTransform` and their propagation.
- `cinder.ecs.schedule`: System scheduling by declared component access.
- `cinder.ecs.world`: Archetype ECS: entities, type-erased component columns, typed queries, change detection.

## [`cinder.gfx`](https://cinder.ash10.dev/docs/api/gfx.md)

- `cinder.gfx`: Safe, typed layer over wgpu-native.
- `cinder.gfx.commands`: Command recording: encoders, render and compute passes, copies, submission and readback.
- `cinder.gfx.debug_draw`: Immediate-mode debug lines: segments, boxes, spheres, axes and grids drawn in one line-list pass.
- `cinder.gfx.device`: Gfx: instance, adapter, device and queue, with every wgpu callback pulled from the shim queue.
- `cinder.gfx.pipeline`: Typed descriptors for bind group layouts, bind groups, pipeline layouts and pipelines.
- `cinder.gfx.resources`: Typed GPU resources: one handle type per kind, pooled records, ownership and leak tracking.
- `cinder.gfx.shaders`: ShaderManager: WGSL modules from files, compile diagnostics with file:line:column, hot reload.
- `cinder.gfx.swapchain`: Swapchain: surface configuration, per-frame texture acquisition and presentation.
- `cinder.gfx.util`: Small conversions shared by the gfx modules.

## [`cinder.input`](https://cinder.ash10.dev/docs/api/input.md)

- `cinder.input`: Input: action and axis mapping over keyboard, mouse and gamepad, rebindable and saved to disk.
- `cinder.input.map`: Input mapping: named actions (buttons) and axes over keyboard, mouse and gamepad, rebindable at runtime and saved as a diffable text file.

## [`cinder.physics`](https://cinder.ash10.dev/docs/api/physics.md)

- `cinder.physics`: Physics over Jolt: rigid-body world, queries, character controller and ECS synchronisation.
- `cinder.physics.character`: Character controller over Jolt's CharacterVirtual: slopes, steps and moving platforms.
- `cinder.physics.sync`: ECS <-> physics synchronisation with interpolation.
- `cinder.physics.world`: Rigid-body world over Jolt (joltc): layers, shapes, bodies, queries and queued events.

## [`cinder.platform`](https://cinder.ash10.dev/docs/api/platform.md)

- `cinder.platform`: Platform layer: the native library, SDL3 windows, input events and wgpu surfaces.
- `cinder.platform.events`: Platform events in engine terms, translated from SDL3's event union.
- `cinder.platform.native`: Loading libcinder_native exactly once and sharing it by pointer.
- `cinder.platform.window`: SDL3 platform: initialisation, windows, event polling, gamepads and wgpu surface creation.

## [`cinder.render`](https://cinder.ash10.dev/docs/api/render.md)

- `cinder.render`: Renderer: cameras, meshes, materials, textures, the frame graph and the forward+ pipeline.
- `cinder.render.camera`: Cameras and frustum culling.
- `cinder.render.frame_graph`: Frame graph: declared passes, transient textures with lifetimes and aliasing, automatic ordering.
- `cinder.render.lights`: Lights and the clustered-culling configuration shared with `shaders/common.wgsl`.
- `cinder.render.material`: glTF 2.0 metallic-roughness materials and their GPU bind groups.
- `cinder.render.mesh`: Mesh data on the CPU, GPU meshes, the engine vertex format and procedural primitives.
- `cinder.render.renderer`: The forward+ renderer: shadows, depth prepass, GTAO, clustered lights, PBR, sky, bloom, tonemap.
- `cinder.render.shader_library`: Shader programs assembled from WGSL files with `#include "file.wgsl"` lines, with hot reload.
- `cinder.render.shadows`: Cascaded shadow maps for the sun and an atlas for spot and point lights (CPU-side maths).
- `cinder.render.textures`: GPU textures from CPU images: CPU box-filter mip chains, sRGB or linear formats, defaults.

## [`cinder.scene`](https://cinder.ash10.dev/docs/api/scene.md)

- `cinder.scene`: Scene files: versioned text and binary formats with migrations, over the ECS world.
- `cinder.scene.format`: Scene serialisation: a human-diffable text format and a binary format, versioned, with migrations.
- `cinder.scene.gltf_spawn`: Spawning a glTF asset into the ECS: one entity per node (transform hierarchy) and one child entity per mesh primitive (`MeshRenderer`), plus static collision triangles for level geometry.
- `cinder.scene.render_sync`: Bridge from the ECS world to a `RenderScene`: render components and their collection.

## [`cinder.tools`](https://cinder.ash10.dev/docs/api/tools.md)

- `cinder.tools`: Developer tools: the ImGui debug overlay (frame graph, inspector, assets, render graph, log).
- `cinder.tools.cstrings`: Frame-scoped C strings for immediate-mode UI calls.
- `cinder.tools.debug_ui`: The ImGui debug overlay: frame-time graph and render stats, entity inspector (view and edit components through the scene registry), asset browser, render graph view and log console.
