Documents can be saved as the editor's own JSON (Save as JSON, in Configure's
Serialization row, off by default) and any .anm2 starting with '{' opens as
one. The schema is new, not an XML mirror: content items in arrays (an item's
index is its id), animations keyed by unique name (a repeat saves as "Name 2"),
groups nested, paired values as arrays, a frame on a region storing only the
region, ISO 8601 dates, every default left out, and one line per frame and
content item, with anything else that fits in 100 columns on one line. Unknown
XML isn't kept. Each part is described once (frame_io, track_io, model_io...)
and run by a JsonWriter or a JsonReader; simdjson parses (new submodule). A
JSON file that opens but has unknown keys, wrong types, unknown values or bad
indices lists them by location in a warning toast; libraries toast their load
problems too. With Save as JSON on, saving always shows the Isaac warning.
The extended format is gone: no setting, File menu toggle, ExtendedVersion or
isExtendedFormat. XML saves are always the game's copy with SourceDocument;
old extended files still open. Document saves take Options instead of loose
bools, and model_load reads through model_load_string. docs/json_format.md
replaces docs/extended_format.md; goldens lose ExtendedVersion and the
.extended variants.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Packing an SVG sheet makes a new SVG holding its drawing once (as a symbol),
each region a clipped view of it at its new place; merging makes an SVG
whenever any sheet is one, with PNG sheets embedded as images (the merged
sheet's file name takes the matching extension). Both go through
Image::compose, which also does the pixel versions, so merge_append is gone.
Vector sheets save as their SVG (autosaves too, and images load as PNG or
SVG by content), and their asset key includes the SVG. Rasterize in the
Spritesheets menu turns selected SVG sheets into PNGs beside them, with a
toast for each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Rebirth document's game copy turns each animation layer into plain layers,
one per layer its child draws, baked a frame at a time (runs of identical
frames merged; skew dropped), adding library spritesheets at paths relative to
the document; the editor's copy is unchanged and the Isaac warning says so.
Layers whose animation isn't in its file are drawn red in the Layers window
(nothing is said while a library hasn't loaded). Onionskin pivot paths are
redrawn when a library loads or reloads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drawing or erasing on an SVG spritesheet shows why it can't be edited (and
no longer leaves an empty undo step). Saving a Rebirth document whose layers
show SVG spritesheets first offers to convert them into PNGs beside them
(one undoable edit); keeping them counts them in the Isaac warning. The
game's copy of a trigger keeps its first event that isn't stop or done, and
only further custom events count as dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An .svg spritesheet loads through lunasvg (now part of the core library) at
one pixel per SVG unit, so regions, crops and picking work as for PNGs. The
preview, renders and CLI draw it again, cached per power-of-two zoom level up
to 8x, so it stays sharp when zoomed or scaled. Its pixels aren't edited
(pencil, eraser, pack and merge leave it alone, and Save skips it), and the
Isaac warning counts SVG sheets since the game can't load them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blur is a layer frame's box blur, as Flash's low-quality BlurFilter: a box that many canvas pixels wide, averaged
over the frame's crop (premultiplied) by the texture shader, the quad grown by its reach. An animation layer blurs
its child's draws at least as much. It interpolates, copies, batches (clamped to 0-255), saves as an editor-only
Blur attribute and counts as an Isaac issue.
Change All Frame Properties gains the Child section (animation, mode, start frame, random, restart), applied only
to animation layers and disabled when no animation layer is targeted. Frame Properties' Flip X/Y sit below Visible
instead of inside Child.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Libraries window (docked with Spritesheets and Sounds) links other .anm2
files: cards list each one's animations, open it as a tab, and reload when
it changes on disk. A layer's Source is a spritesheet or an animation, from
this file or a library; the preview, renders and CLI draw the child in the
layer's frame. Animation-layer keyframes set the child's animation, mode
(loop, once, hold), start frame (or random) and restart; Child is also a
copyable frame property. All of it is editor-only and counted by the Isaac
warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- anm2ed-cli info|frame|render: a text summary, one frame as a PNG, or the
whole animation as a contact sheet, PNG sequence, GIF or video, drawn by
the editor's OpenGL renderer in a hidden window (render::HeadlessGL).
- render::animation_frame_render / animation_record draw an animation's
layers over its bounds (Canvas::layers_render, also used by About) and
record them through the existing Recorder.
- The editor's code builds as anm2ed_app, shared by the editor, the CLI and
anm2ed_render_tests, which checks a fixture's pixels and golden PNGs
(with tolerance; skipped without OpenGL) and leaves its renders in
build/renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>