# @zakkster/lite-spring
> Damped harmonic oscillator. Spring + SpringPool (SoA). Per-spring config, presets.

## Install
npm i @zakkster/lite-spring

## Import
import { Spring, SpringPool, criticalDamping, springPreset } from '@zakkster/lite-spring';

## Key Facts
- Spring(stiffness, damping, initial): single spring
- SpringPool(capacity, stiffness, damping): N springs in Float32Array
- Per-spring stiffnesses[] and dampings[] in pool
- timeScale on both Spring and SpringPool (0 = frozen)
- criticalDamping(stiffness) computes zero-overshoot damping
- 6 presets: snappy, bouncy, gentle, wobbly, stiff, slow
- Semi-implicit Euler integration (stable, fast)
- Dependencies: @zakkster/lite-lerp

## Usage
const s = new Spring(200, 15);
s.target = 100;
s.update(dt); // in game loop
object.x = s.value;

const pool = new SpringPool(100, 120, 12);
pool.setTarget(0, 100);
pool.stiffnesses[0] = 400; // per-spring override
pool.update(dt);
