Closed RGCHN closed 2 months ago
[!WARNING]
Review failed
The pull request is closed.
The recent updates introduce a new interactive
property to the Composition
class, enabling control over click and drag interactions within compositions. Additionally, changes in error handling, import reorganization, and enhancements to animation handling in SpineVFXItem
are included. Various updates to data structures, method parameters and improved logic also occurred, impacting how interactions and animations are managed across different components.
File Path | Summary of Changes |
---|---|
packages/effects-core/src/composition.ts |
Added an interactive property to Composition with supporting logic changes, introduced CompItemClickedData , and updated CompositionProps and the hitTest method. |
packages/.../event-system.ts |
Reordered imports and added error handling in getTouchEventValue method. |
packages/.../interact-vfx-item.ts |
Reordered imports, added conditional checks for interactive , and reorganized types. |
packages/.../click-handler.ts |
Made hitPositions a mandatory field within the Region type. |
plugin-packages/spine/src/spine-vfx-item.ts |
Introduced methods for enhanced animation control and error handling, including setAnimationListLoopEnd and getAnimationState . |
packages/effects/src/player.ts |
Updated ItemClickedData interface structure and adjusted handleItemClicked method. |
web-packages/demo/src/single.ts |
Modified scene loading logic to introduce a new variable assignment for the loaded scene. |
sequenceDiagram
participant User
participant Player
participant Composition
participant SpineVFXItem
User->>Player: Invoke loadScene()
Player->>Composition: Load and initialize components
Composition-->>Player: Components ready
User->>Composition: Click event
Composition->>Composition: Check interactive property
alt is interactive
Composition->>Player: Handle click interaction
end
User->>SpineVFXItem: Set Animation List Loop End
SpineVFXItem->>SpineVFXItem: Verify Skeleton and animationList
alt Valid conditions
SpineVFXItem->>SpineVFXItem: Set animations with loop end
else Invalid conditions
SpineVFXItem->>User: Return error message
end
In the realm of code so grand, Compositions now take a stand. Interactive clicks abound, Errors deftly handled round. Animations loop with grace, Each component in its place. With every change, our software grows, Like a rabbit hopping, code overflows. 🐇
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
New Features
Bug Fixes
Region
type always includeshitPositions
for consistency.Enhancements
ItemClickedData
interface andhandleItemClicked
method to improve data handling and structure.Refactor
Chores