Open cptbtptpbcptdtptp opened 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.07%. Comparing base (
025033e
) to head (f86007e
). Report is 203 commits behind head on main.:exclamation: Current head f86007e differs from pull request most recent head 5454fd6
Please upload reports for the commit 5454fd6 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The updates enhance the pointer event handling in the Script
class and improve the Pointer
and PointerManager
with new properties and methods. This includes handling drag-related events and tracking entities involved in pointer interactions. Additionally, unit tests in InputManager.test.ts
are updated to reflect these changes, ensuring pointer interactions are thoroughly tested.
File | Change Summary |
---|---|
packages/core/src/Script.ts | Added onPointerStartDrag , onPointerEndDrag , and onPointerDrop methods to the Script class. |
packages/core/src/input/pointer/Pointer.ts | Introduced new properties and methods for pointer interactions, including event handling and entity tracking. |
packages/core/src/input/pointer/PointerManager.ts | Updated event handling logic, added PointerEventType and _dispose method for pointer cleanup. |
tests/src/core/input/InputManager.test.ts | Adjusted entity positions, camera setup, and added tests for new pointer events and hit results. |
sequenceDiagram
participant User
participant Pointer
participant Script
participant Entity
User->>Pointer: Primary button down
Pointer->>Entity: Hit test
Pointer->>Script: onPointerStartDrag
Script-->>Pointer: Dragging logic
User->>Pointer: Primary button up
Pointer->>Entity: Hit test
Pointer->>Script: onPointerEndDrag and onPointerDrop
A rabbit hopped with code so bright,
It brought new features into light.
With pointers dragging here and there,
Entities now handled with care.
In tests we trust, to guide our way,
For better code, hip-hip-hooray! 🐇✨
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?
Script
new callback about drag and dropPointer
new APISummary by CodeRabbit
New Features
onPointerStartDrag
,onPointerEndDrag
, andonPointerDrop
).Bug Fixes
Tests
Refactor