Features
Data-bound draw order
A draw order's active rule can now be bound to a view model property in the Rive Editor, and Android plays that binding. A number selects a rule by position, where 0 is Normal, and a string or enum selects a rule by its name. A name that matches no rule selects Normal, and a two-way binding reports the active rule back. (Change)
Scripting improvements
These changes apply to Luau scripts running in the Android runtime:
- Transition child artboards: A transition script can now walk and move a child's content through
TransitionChild.artboard, which exposes its nodes, children, and bounds. The view stays valid for the whole transition. After the transition ends, it reads as empty and ignores writes. (Change) - Clearing image properties: Assigning
nilto an image property, as invm:getImage(name).value = nil, now clears it. Whatever the property is bound to draws nothing, and the image is freed once nothing else holds it. Assigningnilpreviously raised a type error. (Change)
Fixes
- Crashes in apps built with Kotlin 2.2 or later: Since 11.17.0, calling
blankInstance(),defaultInstance(), ornamedInstance()onViewModelSource.NamedorViewModelSource.DefaultForArtboardcrashed withNoSuchMethodErrorin apps built with Kotlin 2.2 or later, and in code compiled against 11.16.x or earlier. These calls work again. (Fix) - Multi-touch in
Rive: Pressing a second finger could send a duplicate press to the first finger, and lifting either finger could release both, clearing a target the user was still holding. Each finger's press and release now reach only that finger's targets. Contributed by @egemenertugrul in #489. (Fix) - Legacy views freezing after a resize: A Legacy
RiveAnimationViewcould freeze on its last frame after its surface was resized, while Rive's log repeated "Trying to doFrame before WorkerImpl is started" every frame. This happened when the render thread started playback for a state machine input during the surface swap. The view now keeps drawing on the new surface. (Fix) - Layout inside scripted transitions: A nested artboard inside a scripted transition didn't join the layout around it. For example, a child set to fill stayed at its artboard's design size. It now takes part in the layout, as it does inside a Solo. (Fix)
Behavior changes
GPU Canvas texture rules
GPU Canvas scripts now create textures and texture views under WebGPU's rules on every backend, including Vulkan and OpenGL. A texture needs at least one mip level and no more than its size allows, a cube texture has square faces, and a multisampled texture must be a 2D render target with one mip level. Render targets and multisampled textures can't use rgba8snorm or a compressed format. A view must suit its texture, for example a 2D view covers one layer, and cube array views aren't supported. A script that breaks these rules now gets an error from GPUTexture.new or GPUTexture:view, instead of handing the descriptor to the GPU. (Change, Change)