Reference · Looking

pxart anim

An animation as one GIF, plus a strip of what changed frame to frame (the whole-sprite shift taken out) and one line of numbers per frame, so a walk that's secretly a bob shows up.

anim FILE... [-o walk.gif|DIR] [--scale 8] [--fps N] [--variant V] [--dry-run]
usage: pxart anim [-h] [-o O] [--fps FPS] [--scale SCALE] [--variant VARIANT] [--dry-run]
                  files [files ...]

  anim FILE... [-o walk.gif|DIR] [--scale 8] [--fps N] [--variant V] [--dry-run]
      An animation as one GIF, plus a strip of what changed frame to frame (the whole-sprite shift
      taken out) and one line of numbers per frame, so a walk that's secretly a bob shows up.

positional arguments:
  files

options:
  -h, --help         show this help message and exit
  -o O               GIF; without it, only the numbers. A FILE of several groups: a DIR, one DIR/GROUP.gif each (DIR/walk/down.gif)
  --fps FPS
  --scale SCALE
  --variant VARIANT
  --dry-run          print the readout and each output's size and layout, write nothing ('(dry run; nothing written)'); -o may be left off

      walk.gif (one file: each frame at --scale, its 1x and 2x copies beside it in the same
      picture), plus walk.strip.png: row 1 = frames, row 2 = what changed from the previous
      frame after removing the whole-sprite shift ("shift dx,dy then N px (P%) (no shift: M px)";
      P: N as a percent of the frame's opaque pixels, or of both frames' if more; a bob alone
      shows "then 0px (0%)"). The numbers print too, a line per frame (a FILE of several
      groups: a block each, top-level and @still frames skipped; -o a DIR);
      without -o, anim prints only those lines and writes nothing. Read the strip: the Read
      tool shows only a GIF's first frame. Durations come from the file (@anim/@frame ms)
      unless --fps. A group with repeat=1 plays once: frame 0 gets no wrap-around diff.
      --variant V counts V's render: a halo transparent in the base counts, at any alpha.
      An idle: when the bottom stays exactly put (rows Y down identical, 0 px changed) and
      only the part above moves (a breath), shifting would light up the legs, so the strip
      shows the unshifted diff: "no shift then M px (P%) (rows Y+ still; shift dx,dy: N px)".
      Both counts are always shown. That is for an idle, whose legs keep their shape in every
      frame of the animation: a walk whose leg moved even 1px keeps the shift, and in a walk
      a frame whose legs happen to stay put is the body's bob: "shift +0,+1 then 23px (6%) (no
      shift: 201px)". A frame recolored whole (a glow) doesn't count as the legs moving; a
      shadow that changes shape does. So that the rise and the fall of a breath read alike,
      once one frame shows rows still and rows Y down are identical in every frame of the
      animation, every frame whose shift would light them up shows the unshifted diff too; a
      walk over a static shadow keeps every shift.
      Tiles and overlays: frames that fill the canvas and are a ground tile (every pixel
      opaque) or a sparse overlay (at most 1/4 opaque: snow) also try every wrap-around scroll
      (shift --wrap), shown when it leaves strictly fewer pixels changed than the best plain
      shift: "shift dx,dy (wrap) then N px (P%) (no shift: M px)". A character sprite never wraps.

See also, in pxart help all: FORMAT: frames and animation (@frame ids, groups, @anim);
  FORMAT: pivots and timing (pivot=x,y, direction, repeat, ms); FORMAT: variants (@variant,
  %VARIANT); LOOKING: centering (frames of different sizes, --bg, --dry-run).

pxart help all has the whole reference, pxart help TOPIC one part of it.

This is the output of pxart help anim. The other looking commands and their shared notes are in pxart help LOOKING.

This page is built from site/src/data/reference.json in the repository.Edit on GitHub