Changing style of a-scene from none to block breaks raycaster
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
Loading a-scene with display = "none" and then changing the display = "block" seems like messing up with the event onMouseMove in cursor component. The value of direction passed to raycaster is NaN.
However, entering VR fixes that problem. Or exiting VR.
Also after some testing, if the scene is loaded with display = "block" and then toggled to none and back to block doesn't affect raycaster.
This seems to be the problem only if the scene is loaded under the tag style display = "none"
Check out the link here : https://circular-forger.glitch.me/
I'm working on a project which loads the scene and later with user interaction the scene is made visible.
- A-Frame Version: 0.9.2
- Platform / Device:MacOS Firefox Browser
- Reproducible Code Snippet or URL: https://circular-forger.glitch.me/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the linked Glitch example in Firefox with the a-scene initially set to display none, then trace cursor's onMouseMove handling and the direction passed to raycaster. Done means changing display from none to block produces a valid ray direction without entering or exiting VR, with a regression test covering the initial hidden-scene case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, three.js
- Domain
- computer-graphics, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100