nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.32k stars 3.89k forks source link

bug webVR webXR nwjs #7266

Open jonlepage opened 4 years ago

jonlepage commented 4 years ago

NWJS Version :

"{
    "node": "13.3.0",
    "v8": "7.9.317.31",
    "uv": "1.33.1",
    "zlib": "1.2.11",
    "brotli": "1.0.7",
    "ares": "1.15.0",
    "modules": "79",
    "nghttp2": "1.40.0",
    "napi": "5",
    "llhttp": "2.0.1",
    "openssl": "1.1.1d",
    "icu": "64.2",
    "unicode": "12.1",
    "nw": "0.43.0",
    "node-webkit": "0.43.0",
    "nw-commit-id": "a09cec1-c5d1d9e-da90f9f-6fd41d2",
    "nw-flavor": "sdk",
    "chromium": "79.0.3945.79"
}"

Expected behavior

We should see the app inside the VR headset or the WMR screen.

Actual behavior

Nothing happen, no error log .... connextion seem work, but get a infinite loading. (nothing display)

Note: if you try without nwjs in a browser [vivaldi,chrome,firefox,edge], it work fine. (see:video)

How to reproduce

Fork https://github.com/immersive-web/webxr-samples Download nwjs SDK and add to repo as subfolder. Package.json

{
    "name": "helloworld",
    "main": "360-photos.html",
    "chromium-args": "--disable-raf-throttling --limit-fps=120 --remote-debugging-port=9222 --ignore-gpu-blacklist --force-gpu-mem-available-mb=14000 --enable-gpu-rasterization ",
    "js-flags": "--expose_gc --enable-webvr --webxr --enable-gamepad-extensions --enable-gamepad-vibration"

}

lauch.json (optional vscode)

    "configurations": [
        {
            "type": "nwjs",
            "request": "launch",
            "name": "Launch NWjs",
            "nwjsVersion": "any",
            "runtimeExecutable": "${workspaceRoot}\\SDK\\nw.exe",
            "port": 9222,
            "webRoot": "${workspaceFolder}",
            "reloadAfterAttached": true
        }
    ]

than click launch nwjs. (optional vscode) image


I made a little video to show the issue. You can see the app show nothing, but if i run from webbrowser it work fine. https://youtu.be/JtJhQI_fTwM


maybe more related Link ??

is this can maybe related ? can you confirm we can map vr with nwjs APP ? If yes , can we add this as feature requests ? https://github.com/nwjs/nw.js/issues/4259 Or any help to fix this issue ? thank you so much and keep good job.

rogerwang commented 4 years ago

It should be supported as long as it works with Chromium. I'll need a device to reproduce and fix this...

jonlepage commented 4 years ago

@rogerwang if you have window 10 developer , you no need headset to run mixed reality . Microsoft made a simulation feature, but i never test by myself. I have a colleague who uses this to develop under unity. image https://www.laptopmag.com/articles/experience-windows-mixed-reality-without-headset Maybe this can help you to test.

jonlepage commented 4 years ago

Also i also forgotten to mention, you can see in the video upper. It not work with nwjs, but if i pass by a web browser, it work fine. It why i think it can be related to nwjs.

arpu commented 4 years ago

webxr webvr only works on https secure maybe this could be the problem

jonlepage commented 4 years ago

Any way to make nwjs run in secure local space ? maybe a flag ? "chromium-args": "--force-secure-content", I search but cant find.