Closed wumaolinmaoan closed 4 months ago
The recent updates involve significant refactoring and simplification across several classes within the project. The resetStatus
method has been removed from the CompositionComponent
class, leading to adjustments in how status resets are handled across the Composition
, ThreeComposition
, and Player
classes. These changes aim to streamline the code by removing redundant operations and improving property management.
Files | Change Summary |
---|---|
packages/effects-core/src/comp-vfx-item.ts |
Removed the resetStatus method from CompositionComponent class. |
packages/effects-core/src/composition.ts |
Made rootItem property readonly , refactored restart and reset methods, and replaced resetStatus calls with setting ended to false . |
packages/effects-threejs/src/three-composition.ts |
Removed resetStatus call in the ThreeComposition class constructor. |
packages/effects/src/player.ts |
Removed resetStatus call and added setting rootItem.ended to false in the Player class. |
sequenceDiagram
participant Player
participant Composition
participant VFXItem
Player->>Composition: reset()
Composition->>VFXItem: rootItem.ended = false
Note over Composition, VFXItem: Reset operation simplified by setting ended property directly.
In the land of code, where changes bloom, The
resetStatus
met its doom. Withended
set to false, so clear, Our code runs smooth, with less to fear. 🎉✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
resetStatus
method across various components and replaced it with direct property assignments to improve performance and simplify logic.rootItem
property toreadonly
in theComposition
class for better immutability and reliability.restart
andreset
methods in theComposition
class for more efficient operation handling.