Closed samavati closed 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
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.
This has been merged as part of: https://github.com/rive-app/rive-wasm/commit/fa1319ef2d3d83556465adddb0a3c4d83ac9be22
Thanks again for the contribution.
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
Pull Request Description
π Description
This pull request refactors the
Animation
class to improve code organization and maintainability. TheAnimation
class has been moved fromrive.ts
to a new module underjs/src/animation/
. This change encapsulates the animation logic within its own module, making the codebase more modular and easier to navigate.π οΈ Changes
Animation.ts
underjs/src/animation/
to house theAnimation
class.index.ts
file in thejs/src/animation/
directory to export theAnimation
class.rive.ts
to use the newly createdAnimation
module.Animation
class definition fromrive.ts
.π‘ Motivation
The primary motivation for this refactor is to enhance code organization. By moving the
Animation
class to its own module, we achieve:Animation
class.π Detailed Changes
js/src/animation/Animation.ts
Animation
class is now defined in this file.js/src/animation/index.ts
Animation
class fromAnimation.ts
.js/src/rive.ts
Animation
class from the newjs/src/animation/
module.Animation
class definition that was previously embedded in this file.π§ͺ Testing
Animation
class continue to pass.Animation
class works seamlessly with the rest of the codebase after the refactor.π Impact
This refactor should have no functional impact on the existing features. It is purely an internal code organization improvement.
π Notes
Animation
class should now refer to the new module underjs/src/animation/
.Animation
class are made in the newAnimation.ts
file.Thank you for reviewing this pull request. Looking forward to your feedback and approval!