rive-app / rive-wasm

Wasm/JS runtime for Rive
MIT License
735 stars 52 forks source link

refactor(animation): refactor Animation class to a separate module #356

Closed samavati closed 5 months ago

samavati commented 5 months ago

Pull Request Description

πŸ“œ Description

This pull request refactors the Animation class to improve code organization and maintainability. The Animation class has been moved from rive.ts to a new module under js/src/animation/. This change encapsulates the animation logic within its own module, making the codebase more modular and easier to navigate.

πŸ› οΈ Changes

πŸ’‘ Motivation

The primary motivation for this refactor is to enhance code organization. By moving the Animation class to its own module, we achieve:

πŸ” Detailed Changes

js/src/animation/Animation.ts

js/src/animation/index.ts

js/src/rive.ts

πŸ§ͺ Testing

πŸ“ˆ Impact

This refactor should have no functional impact on the existing features. It is purely an internal code organization improvement.

πŸ“ Notes


Thank you for reviewing this pull request. Looking forward to your feedback and approval!

samavati commented 5 months ago

Hi @zplata,

I haven't heard back about this pull request yet and I'm eager to get your feedback on the refactoring changes to the Animation class.

Specifically, I'd love to know your thoughts on separating the Animation class into a separate module for better development.

Thanks for your time! Ehsan

HayesGordon commented 5 months ago

Hi @samavati, we'll get this merged in. Thank you for your contribution and great description.

Just a note that I will need to co-author this with you. We'll generate a new commit from this PR to our upstream MONO repository, which will then be available in the public repo. Once that is out, I'll close this PR.

HayesGordon commented 5 months ago

This has been merged as part of: https://github.com/rive-app/rive-wasm/commit/fa1319ef2d3d83556465adddb0a3c4d83ac9be22

Thanks again for the contribution.

samavati commented 5 months ago

This has been merged as part of: fa1319e

Thanks again for the contribution.

@HayesGordon Thank you I'm planning to do more refactors in this repo and also contribute to develop new features for example, the next one would be #358 I'm so glad that I can help here and make the developers lives easier ☺️ Thank you for this great project