Releases: LottieFiles/dotlottie-rs
0.1.47 (2025-08-12)
0.1.46 (2025-07-29)
0.1.45 (2025-07-23)
0.1.44 (2025-06-23)
0.1.43 (2025-06-07)
Features
enable ttf font loader in ThorVG (#334)
🎸 add 16KB page size support for arm64 & x86_64 Android (#330)
target Android API level 21 for wider device support (#332)
add support for Apple visionOS & tvOS (#327)
refactor: replace base64 encoding dependency with custom implementation
refactor: simplify error handling and remove unnecessary error details
binary size improvement by removing external webp/png/jpeg dependencies in favor of ThorVG's internal implementations
Fixes
correct internal frame buffer length (#336)
remove emscripten Observer bindings violating CSP in WASM (#338)
0.1.42 (2025-05-28)
Features
lazily create the animation and background shape right after setting the frame buffer and renderer target
upgrade thorvg v1.0-pre21
Fixes
on_loop_complete event firing issue in state machine
optimize frame buffer reuse to reduce unnecessary memory allocations
0.1.41 (2025-05-16)
0.1.40 (2025-04-16)
Features
state machine support
feat: add support for state machines, bumps ThorVG to version 1.0-pre19
Added cross-platform state machine support. State machines allow you to create deep interactive scenarios with Lottie animations. With a single state machine definition file your animations can become interactive across Web, Android and iOS.
To get started you can either load a state machine via a string with it's contents like so:
const success = animation.stateMachineLoadData("{initial: ...}");Or from a definition file inside your .lottie:
const success = animation.stateMachineLoad("state_machine_id");The to start it:
const success = animation.stateMachineStart();You can add a state machine observer like so:
struct MyStateMachineObserver;
impl StateMachineObserver for MyStateMachineObserver {
fn on_transition(&self, previous_state: String, new_state: String) {
println!(
"[state machine event] on_transition: {} -> {}",
previous_state, new_state
);
}
...
}
let observer: Arc<dyn StateMachineObserver + 'static> = Arc::new(MyStateMachineObserver {});
animation.state_machine_subscribe(observer.clone());Notes:
-
This update also includes support for event observer bindings for WASM. All player events are supported alongside state machine events.
-
Bumps ThorVG to v1.0-pre19 for the use of new OBB (Oriented Bounding Box) support.
0.1.39 (2025-03-31)
Features
optimize WASM build for size (#301)
upgrade thorvg v1.0-pre14 (#303)
add tweening between markers and frames (#294)
🎸 pick up .lot ext from dotLottie files (#308)
upgrade thorvg-v1.0-pre18 (#313)
feat: add animation tweening support
Added new tweening capabilities to smoothly animate between frames using cubic bezier easing:
- Added
tweenmethod to directly tween between two frames with linear progress:
animation.tween(10.0, 20.0, 0.5); // Tween from frame 10 to 20 at 50% progress- Added
tween_tomethod for time-based tweening with custom easing:
// Tween to frame 20 from the current frame over 2 seconds using custom easing curve
animation.tween_to(20.0, 2.0, [0.4, 0.0, 0.6, 1.0]);- Added
tween_to_markermethod for marker-based tweening with custom easing:
// Tween to marker "jump" from the current frame over 2 seconds using custom easing curve
animation.tween_to_marker("jump", 2.0, [0.4, 0.0, 0.6, 1.0]);- Added helper methods to manage tween state:
is_tweening()- Check if animation is currently tweeningtween_update()- Update tween progress based on elapsed time
The tweening implementation uses cubic bezier interpolation for smooth easing effects. The easing curve is defined by control points P1(x1,y1) and P2(x2,y2), with P0(0,0) and P3(1,1) fixed.