Comments (8)
This should now be fixed, you can get the fix now by building from source, or you can wait til next week when we push an update. Thanks again for flagging this!
from immersive-web-emulator.
According to the WebXR Gamepad API spec: https://www.w3.org/TR/webxr-gamepads-module-1/#example-mappings,
gamepad.axes[0] and gamepad.axes[1] are supposed to be the x and y value of touch pad on controllers, quest devices do not have a touch pad, so the value being null or undefined is expected.
If you are looking for the joystick x and y value, they are gamepad.axes[2] and gamepad.axes[3]
from immersive-web-emulator.
Also, according to the spec: https://www.w3.org/TR/webxr-gamepads-module-1/#xr-standard-heading, none of the axes values are required.
from immersive-web-emulator.
@andreasplesch I am closing this issue now, feel free to reopen this if my comments did not fully address your concerns.
from immersive-web-emulator.
Thanks. But I think you may have missed
https://www.w3.org/TR/webxr-gamepads-module-1/#xr-standard-heading
Devices that lack one of the optional inputs listed in the tables above MUST preserve their place in the buttons or axes array, reporting a placeholder button or placeholder axis, respectively. A placeholder button MUST report 0 for value, false for pressed, and false for touched. A placeholder axis MUST report 0.
So instead of null or undefined the placeholder value must be 0.
This is to make it compatible with
https://w3c.github.io/gamepad/#dom-gamepad-axes
which states:
All axis values MUST be linearly normalized to the range [-1.0 .. 1.0].
as well as https://www.w3.org/TR/gamepad/#dfn-axes
A [sequence](https://webidl.spec.whatwg.org/#idl-sequence) of [double](https://webidl.spec.whatwg.org/#idl-double) values representing the current state of axes exposed by this device
from immersive-web-emulator.
Unfortunately I cannot reopen the issue. Please let me know if I should file a new issue.
from immersive-web-emulator.
Oops! You got me there. I will put up a fix soon!
from immersive-web-emulator.
Glad to help !
from immersive-web-emulator.
Related Issues (20)
- Bug: On smaller screen only half of the scene is shown HOT 1
- Head is always at 1.75cm even when not using local floor HOT 1
- Reference Space Type is "viewer" in the frame the session start, instead of the proper one
- Add an option to specify the emulator current reference space type
- It's hard to perform multiple quick press on the emulator
- THREE version used in emulator leaks into content.
- Add/Remove Controller / Hand HOT 1
- Input button retains state at page load before entering immersive mode
- Cycling gizmo modes via numpad keybindings not working.
- I can add a mesh with no width, height, depth.
- WebXR Anchors module always enabled.
- Removed meshes remain in frame.detectedMeshes
- Change mesh size
- XR Planes for user defined meshes
- add ability to toggle XRMeshes visibility
- Type in controllers / headset position and rotation HOT 1
- Reset default pose HOT 1
- Unexpected `press` or `selectstart` behaviour HOT 2
- Capture mouse/keyboard input from website viewport to control emulated headset and controllers. HOT 1
- Simulator does remove canvas from custom web components and after session the canvas is not in the document anymore HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immersive-web-emulator.