Skip to content

feat: add animation_id to DotLottie Config #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theashraf
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Apr 24, 2025

⚠️ No Changeset found

Latest commit: 4106909

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@theashraf theashraf marked this pull request as ready for review April 24, 2025 04:44
@theashraf theashraf requested review from Copilot and samuelOsborne and removed request for Copilot April 24, 2025 04:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new field, animation_id, to the DotLottie configuration and updates its handling in the state machine engine, player logic, and FFI bindings so that animations can now be referenced explicitly by their ID.

  • Added animation_id to the state struct in dotlottie-rs.
  • Updated Config struct and default implementation with animation_id.
  • Extended FFI bindings (both C++ and C) to include animation_id.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dotlottie-rs/src/state_machine_engine/states/mod.rs Added animation_id field to State to integrate with the state machine configuration.
dotlottie-rs/src/dotlottie_player.rs Updated Config, default implementation, and animation loading flow to handle animation_id.
dotlottie-ffi/src/ffi/types.rs Extended DotLottieConfig and its conversions to include animation_id.
dotlottie-ffi/emscripten_bindings.cpp Added binding for animationId in the player bindings.
dotlottie-ffi/bindings.h Updated DotLottieConfig struct to add animation_id.
Files not reviewed (1)
  • dotlottie-ffi/src/dotlottie_player.udl: Language not supported

@samuelOsborne
Copy link
Member

@theashraf Code looks good, could you pls fix the test and add a new one to test this loading mechanism ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants