Rive CLI 1.12.0

This release loads hidden Components only when they're first shown, lets scripts draw text a page at a time with highlights and underlines, and keeps parallel rive commands logged in. Two changes need action: a stale id in a view model path now fails the build (see RML below), and FillRule is gone from AnimaScript paths (see AnimaScript below). Update with rive update (curl install) or brew upgrade --cask rive-cli (Homebrew).

Runtime

  • ๐Ÿช† Hidden Components load when shown: a Component hidden by a Solo is now created the first time it's shown, instead of when the file loads. A clock with 11 digit options per slot went from 2,524 Components created at load to 178, and loads about 6 times faster. A Solo still keeps the state of the options it hides. Markup projects get it by default, and deferCollapsedNestedArtboards="false" on the <Backboard> element turns it off. Runtimes that don't support it yet load everything up front.

  • โšก Faster loading and playback for large files: creating an artboard with over a thousand data binds is up to about 8 times faster, and a large file with many levels of nested Components advances up to about 15% faster.

  • ๐Ÿ”ค Text backgrounds follow modifiers: a text modifier that moves, rotates, scales, or fades letters, Follow Path included, now takes each letter's piece of the text style's Background with it.

  • ๐Ÿ“ Fit Font Size with font axis modifiers: a text set to Fit Font Size with a modifier that changes a variable font axis, like weight, now stays inside its box when its text gets shorter.

  • ๐ŸŽž๏ธ Remapped time on the same frame: a Component's animation set to Remap now shows a bound time, or a time a joystick sets, on the frame it's set. Before, it showed one frame late.


Scripting

These work in AnimaScript and Luau.

  • ๐Ÿ“„ Draw text a page at a time: Text.drawLines(renderer, first, last) draws a range of a Text's lines, so a paragraph can split across pages. In AnimaScript, reading a Text's lines no longer builds an object per glyph, so measuring text to split it costs less. Read the lines again after the text changes.

  • ๐Ÿ–๏ธ Highlight, underline, and strikethrough in script text: a TextRunStyle takes optional highlight, underline, and strikethrough paints. Underlines and strikethroughs take their position and thickness from the run's font, and neighboring runs with the same paint join into one bar per line.

  • โ†”๏ธ Justify script text: TextAlign.justify in AnimaScript and 'justify' in Luau stretch every line of a paragraph but its last to the width of the box.

AnimaScript

  • โš ๏ธ Paths fill clockwise, as in Luau: FillRule and Path.fillRule are gone from rive/path, so a script that sets them no longer compiles. Wind outlines clockwise and holes counterclockwise. Scripts that never set a fill rule draw the same, and the fillRule attribute on a markup <Fill> is unchanged.

  • ๐Ÿงฎ Integer math agrees across a program: when some code needs the older integer math, the whole program now uses it, with a W3022 warning naming the line and how to keep the newer math. Before, two functions could disagree about one number. An unsigned variable that goes below zero, like x-- on a u32 field, also gets the warning instead of silently becoming a huge number.

  • ๐Ÿงน Smoother script memory: scripts that keep many small objects no longer stall a frame each time their memory is collected, and a script that makes a different size of buffer every frame no longer grows until it runs out of memory. A script that runs out of memory or stack partway through a call keeps its memory intact.

RML (the markup the CLI compiles)

  • โš ๏ธ Stale ids in view model paths fail the build: the build now checks every id in a view model path, the lists of ids that data binds, listeners, and triggers follow, as it already checked single references. A project with an id that points to a deleted object fails to build, and can't be pushed, until it's fixed.

  • ๐Ÿ”ข Enum properties must name an enum: a view model enum property whose enumId names something other than an enum now fails the build. Before, it bound whichever enum had the same index. A property with no enum builds with a missing-reference warning, and runtimes read it as an empty enum.


Commands

  • ๐Ÿ”‘ Parallel commands stay logged in: when your login expires while several rive commands run at once, as agents often do, they now share one refreshed login. Before, one of them could log you out.

  • ๐Ÿ’ณ Credits left after rive illustrate: once the art is written, rive illustrate prints a line like $18.30 of agent credits left in Acme (43567) with what your Workspace has left, even with --quiet on. It's the whole Workspace's balance.

  • ๐Ÿ’ฅ Crash fixes: --advance or a --commands step on a project with no artboards yet, and a rive.yaml value of the wrong type, like a list under the artboards key, which now says what the field needs.