Comments (5)
Clicking on button is nice but for testing not ideal. As mentioned in MozillaReality/WebXR-emulator-extension#296 being able to make calls directly from the browser console allows for testing programmatically, that means tests could be provided with the WebXR page itself and make the development cycle more efficient.
Happy to expose these if people will find them useful, and it should be easy to do. Can you suggest a list of APIs and their signatures?
from immersive-web-emulator.
Hello @felixtrz ! +1 to this feature. I've been modifying the immersive-web emulator polyfill so it can be added to a page without extension, just like a library. It is useful when dealing with running tests in headless mode in CI.
For now, I'm using the api that immersive-web polyfill is providing - just sending some CustomEvents, like "webxr-input-pose" or "webxr-pose" for example. But it would be more convenient, if I could just do something like this:
const polyfill = new WebXRPolyfill();
polyfill.setPose({position: new Vector3(), quaternion: new Quaternion()});
polyfill.controllers.right.setPose({position: new Vector3(), quaternion: new Quaternion()});
poyfill.controllers.right.click();
Please note it's just a pseudocode. Also I think this library should be usable without threejs in client app, just used threejs primitives for an example.
from immersive-web-emulator.
@felixtrz if it is ok for you, we can make a draft PR in like a week or two with our proposal. But we are glad to hear everybody's opinion!
from immersive-web-emulator.
I really really want to be able to do this for a) automated testing b) using ps5 controller to use joysticks/buttons/pose. Still looking at other workarounds with exisitng codebase.
from immersive-web-emulator.
+1 on being vital for automated testing
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.