rive_deferred library

Deferred recording. The factory wraps a native DeferredSession which is a rive::Factory, so file import records every resource instead of touching the driver. Attach the session to a RenderTexture to record and replay.

Functions

deferredAttachedTexture(Factory factory) Object?
Tracked so owners can detach before the session dies.
deferredAutoAttach(Factory factory) bool
Whether the render box should attach this session itself.
deferredBoundToOneTexture(Factory factory) bool
Whether this session can only ever replay into one texture, so a second one has to be refused however distinct its content is.
deferredSessionAddress(Factory? factory) int
The native session address; 0 when this is not a live session.
deferredThreadStats(Factory factory) → ({int frames, int recordUs, int replayUs, int streamPeakBytes})
Producer and consumer busy time since the last call, plus the largest stream any one of those frames recorded. Zeros when no deferred session is active. It is a high water mark sampled at snapshot rather than a live read, because a session's stream drains at the frame boundary.
enableDeferredAutoAttach(Factory factory) → void
makeDeferredRiveFactory() Factory?
Create a deferred recording factory wrapping the process ore context, or null when unsupported. One per imported file, reusable across reloads.
makeHeadlessDeferredFactory() Factory?
A recording session with no real ore context and no GPU, so tests can exercise the deferred path type headlessly.
setDeferredAttachedTexture(Factory factory, Object? texture) → void
setTextureDisplaying(Artboard artboard, RenderTexture? texture) → void
textureDisplaying(Artboard artboard) RenderTexture?
The texture displaying artboard, live or not. One artboard instance is one animation state, so only one texture may show it at a time.