Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualMouseModule: support for groups #273

Closed
4 of 21 tasks
sasha240100 opened this issue Jul 3, 2017 · 0 comments
Closed
4 of 21 tasks

VirtualMouseModule: support for groups #273

sasha240100 opened this issue Jul 3, 2017 · 0 comments
Assignees
Milestone

Comments

@sasha240100
Copy link
Member

sasha240100 commented Jul 3, 2017

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
sasha240100 added a commit that referenced this issue Jul 3, 2017
#273: VirtualMouseModule track groups
@sasha240100 sasha240100 added this to the v2.0.1 milestone Jul 3, 2017
@sasha240100 sasha240100 self-assigned this Jul 3, 2017
@sasha240100 sasha240100 modified the milestones: v2.1.0, v2.0.1 Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant