-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or requestnextIssues related to next pre-releaseIssues related to next pre-release
Description
in react-three-fiber events propagate in 2 different ways: bubbling up the tree and objects sorted in 3d space via the cast ray (see playground). In 2d these are directly related to each other (you can only hit an object behind if it's also behind the parent), but in 3d these feel as 2 separate, unrelated concepts.
To mimick the browser's API, react-three-fiber has only a single way of stopping the event from propagating: event.stopPropagation(). When stopping propagation this stops both the bubbling up via the tree and via the cast ray.
I propose to offer control which type of propagation you want to stop:
// Implicitly stops both
event.stopPropagation()
// Stop propagation via the tree
event.stopPropagation('tree')
// Stop propagation via the ray
event.stopPropagation('ray')I am very much open for naming suggestions. especially 'ray' is a bit ambiguous
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestnextIssues related to next pre-releaseIssues related to next pre-release