Engineering

Diagnostics

Inspect Zeenat.js scene state, resource counts, effective motion and isolated effect failures.

Read a scene snapshot

Diagnostics include the preset, engine state, intensity, effective motion, viewport, seed, DOM nodes, animations, timers, RAF loops, mounted effects, semantic layers and isolated errors.

DebugScene.tsx
const ref = useRef<ZeenatHandle>(null);

<Zeenat ref={ref} preset="spring" debug />;

const snapshot = ref.current?.getDiagnostics();
const unsubscribe = ref.current?.subscribeDiagnostics(console.log);

Debug mode

debug enables diagnostic DOM state but does not render a production panel. A development tool or playground can subscribe to snapshots and display them separately.

Effect isolation

A mount failure aborts the failing effect's scope, cancels its scheduler work and animations, removes its layer, records diagnostics and reports a prefixed console error. Healthy sibling effects continue.