Closed samuelOsborne closed 1 month ago
Latest commit: 53730279920f12f8c89f1e6b4becb4200f952dd0
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This PR adds layer hit detection, along with a few refactors
Features:
getLayerBounds
API function. Pass a layer name and it returns a vec where the first 4 values correspond to x, y, width, heightperform_hit_check(&self, target: &str, x: f32, y: f32)
which returnstrue
if the supplied target string (layer name) and x, y coordinate are within its bounding box, otherwise returnsfalse
Refactors:
postEventPayload
for web, replaced with individual functions