Json Lines Animation Output
Writes an animation trace in the JSON Lines (.atf) format: an AnimationTraceHeader on the first line, then one AnimationEvent per line. Each line is independently valid JSON, so the file is streamable and inspectable with standard tools (a text editor, jq, Python).
The writer is renderer- and engine-agnostic: it targets any Writer, which is why it can be unit-tested against an in-memory StringWriter and used in production against a file via toFile. It is Closeable; wrap it in use { } or call close to flush and release the underlying writer.
Usage is "header first, then events": writeHeader must be called exactly once before any write.
Functions
Appends one event as a single JSON line. Requires writeHeader to have been called.
Appends every event in events, in order.
Writes the trace header as the first line. Must be called exactly once, before any write.