# @zakkster/lite-embers
> Zero-GC SoA volumetric ember engine. Localized spawn, color bucketing, chromatic shimmer, dynamic buoyancy, death hooks.

## Install
npm i @zakkster/lite-embers

## API
- new EmberEngine(maxParticles?, config?)
- .spawn(dt, w, h, boxX?, boxY?, boxW?, boxH?) — localized spawn within bounding box
- .updateAndDraw(ctx, dt, w, h) — physics + render (overlay, no clearRect)
- .clear() / .destroy()

## Config
buoyancy (120), wind (20), density (5), baseRadius (3), driftAmplitude (25), driftFreq (2),
lifeMin (1.5), lifeMax (4), onEmberDeath (null), heatColors (4 OKLCH), rng (Math.random)

## Key Features
- Localized spawn bounds: embers only emit within (boxX, boxY, boxW, boxH)
- Dynamic cooling buoyancy: rises fast near fire, slows at height
- Chromatic shimmer: color index oscillates via sin for flickering heat
- O(C) color-bucketed render: one ctx.fill() per color tier
- onEmberDeath(x, y) hook: handoff to smoke engine without coupling
- invLife[] precomputed, dt clamped to 0.1
