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

Hoverability does not follow the spec #36

Open
hybridherbst opened this issue Dec 4, 2024 · 1 comment
Open

Hoverability does not follow the spec #36

hybridherbst opened this issue Dec 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hybridherbst
Copy link
Contributor

Here's a test file:
Hover.glb.zip

Currently, hovering over it and moving the mouse on the object causes all kinds of glitches because it seems that the hover event is repeatedly called when the hovered object changes. That does not match the spec language which mentions hovering should behave similar to how it does in HTML – only leaving the entire subtree of a node would cause hoverUp to be invoked.

@mattmacf98
Copy link
Contributor

the node hierarchy a root starting from 2 which contains children 3-14 and a root at 15 which has the rest as children. I have logged out the old hover node index and new one in the pointer listener and have also logged out the actual hover in and out events.

here is an example

BabylonDecorator.ts:86 OLD HOVERED NODE -1, NEW 13
OnHoverIn.ts:36 EXECUTING HOVER IN FOR 2 BECAUSE OF 13
8BabylonDecorator.ts:86 OLD HOVERED NODE 13, NEW 13
BabylonDecorator.ts:86 OLD HOVERED NODE 13, NEW 26
OnHoverOut.ts:36 EXECUTING HOVER OUT FOR 2 BECAUSE OF 13
2BabylonDecorator.ts:86 OLD HOVERED NODE 26, NEW 26
BabylonDecorator.ts:86 OLD HOVERED NODE 26, NEW 13
OnHoverIn.ts:36 EXECUTING HOVER IN FOR 2 BECAUSE OF 13
4BabylonDecorator.ts:86 OLD HOVERED NODE 13, NEW 13
BabylonDecorator.ts:86 OLD HOVERED NODE 13, NEW 26
OnHoverOut.ts:36 EXECUTING HOVER OUT FOR 2 BECAUSE OF 13
11BabylonDecorator.ts:86 OLD HOVERED NODE 26, NEW 26
BabylonDecorator.ts:86 OLD HOVERED NODE 26, NEW 13
OnHoverIn.ts:36 EXECUTING HOVER IN FOR 2 BECAUSE OF 13

it seems the pointer detects that it is hovering over one of the nodes from that second root which starts at 15 and that is why hover out gets triggered

when I opened this in blender, I saw you had essentially a copy of the geo in the clickToOpen (states)
Screenshot 2024-12-04 at 11 52 15 PM

I think the duplicate meshes under different parent nodes is causing the flickering, could you try either

  1. parenting both of these hierarchies under a top level node and adding the hover on that or
  2. removing this duplicate state transform heirarchy

@mattmacf98 mattmacf98 added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants