-
-
Notifications
You must be signed in to change notification settings - Fork 388
Closed
Description
The current version of VirtualMouseModule doesn't support groups and children.
Temporary workaround:
mouseModule.intersection = function(component) {
const rc = this.raycaster;
let singleObject = true;
let object = component.native;
let objects = [];
if (object.children.length > 0) {
singleObject = false;
object.traverse(child => {
objects.push(child);
})
}
return singleObject ? rc.intersectObject(object) : rc.intersectObjects(objects);
}
mouseModule.hovers = function(component) {
return this.intersection(component).length > 0;
}TODO:
- Support for nested objects
-
.intersection()for children
-
Version:
- v2.x.x
- v1.x.x
Issue type:
- Bug
- Proposal/Enhancement
- Question
- Discussion
Tested on:
Desktop
- Chrome
- Chrome Canary
- Chrome dev-channel
- Firefox
- Opera
- Microsoft IE
- Microsoft Edge
Android
- Chrome
- Firefox
- Opera
IOS
- Chrome
- Firefox
- Opera
Reactions are currently unavailable