question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't assume that an inputsourceschange event will be fired at the start of the session

See original GitHub issue
Description of the problem

Currently, the three.js code setting up XR controllers only does this setup when an inputsourceschange event is fired. However, it is possible for a session to start with controllers already attached. My understanding is that Chrome will always fire inputsourceschange events at the beginning of the session, but I don’t think this is necessary according to the spec. Servo currently just starts off with the correct input sources, only spawning events when things change.

We should instead initialize the controller map when the session is created.

https://github.com/mrdoob/three.js/blob/fb29d21e65c2cb8a0bf8b797c0deefa5fe8c8cde/src/renderers/webxr/WebXRManager.js#L233

Three.js version
  • Dev
  • r113
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)
  • VR Device

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Manishearthcommented, May 5, 2020

Yes.

0reactions
Mugen87commented, May 5, 2020

Unnecessary due to upstream spec changes (immersive-web/webxr#961).

As far as I understand, this issue and the respective PR #18639 can be closed then, right? The tweaks to the specs ensure that inputsourceschange should be fired on start by WebXR implementations, correct?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not firing onChange event · Issue #359 · testing-library/react ...
I have a controlled input element and I cannot capture the onChange event. I would expect the let onChange function of the example...
Read more >
Event when window.location.href changes - Stack Overflow
I use this script in my extension "Grab Any Media" and work fine ( like youtube case ) var oldHref = document.location.href; window.onload...
Read more >
Window: beforeunload event - Web APIs | MDN
The beforeunload event is fired when the window, the document and its resources are about to be unloaded. The document is still visible...
Read more >
Amazon EventBridge event patterns - AWS Documentation
Event patterns have the same structure as the events they match. Rules use event patterns to select events and send them to targets....
Read more >
Change events - Unity - Manual
The event triggers after a change assigns a new value to a visual element. You can't cancel change events to prevent a value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found