Implement cesium-vr plugin (VR environment)

1. A concise explanation of the problem you're experiencing.

As far as I know, the cesium application enable to build VR environment such as cardboard in sandcastle example, a cesium-vr plugin created by NICTA. What I want to ask is that
(1) How can I run cesium-vr plugin in my local server?

In the usage explanation(https://github.com/NICTA/cesium-vr), after installing oculus software that I already had and also Firefox nightly, instruction said that this plugin can be run via a local http server from the project root directory.

I downloaded plugin and also place at the project root directory (nodejs), however I could not understand how to run this plugin by using cmd.

It explain just simple cmd code below:

cd cesium-vr
http-server

So, I skipped this instruction and after plugging my VR Headset (Oculus Rift, HTC VIVE), starting up my local cesium (http://localhost:8080).

The detailed code of my modeling is written in next question.

And after clicking vr button in my cesium application, I can see the two split view, but there is no connection with VR headsets.

In the testing, they have tested this plugin with Firefox nightly and oculus rift and it worked well.

My question is how can I run this plugin by using the cmd and can I get any experience or idea to use vr headsets in cesium application

(2) Is an example of VR environment in sandcastle ('cardboard') working with HTC VIVE or Oculus Rift?

I had a HTC VIVE and Oculus Rift, and when I clicked the vr button in sandcastle example (example's name is Cardboard). view was changed as a two split view and there is no interaction with both VR headsets (HTC Vive and Oculus rift).

Could you explain how to use this code for connecting with vr headsets?

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

This below code is my 3D building model imported into cesium application with VR envrionment.

var viewer = new Cesium.Viewer('cesiumContainer', {
    vrButton: true,
    terrainProvider : new Cesium.CesiumTerrainProvider({
        url: Cesium.IonResource.fromAssetId(1)
    })
});
// Click the VR button in the bottom right of the screen to switch to VR mode.

viewer.scene.globe.enableLighting = true;
viewer.scene.globe.depthTestAgainstTerrain = true;
// Grant CesiumJS access to your ion assets
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5Y2U5NWU1Ny1iMmY4LTRkYjMtYThjMi1kMDVmYTY1ZWM1YjMiLCJpZCI6Nzc0OCwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU1MDM2NDcxMH0.xYWY-C0FJjqSkRhRN9UMAzLKxg17whGjUhqihBKkHTs';

viewer.scene.globe.depthTestAgainstTerrain = true;

var tileset = viewer.scene.primbesium3DTileset({
        url: Cesium.IonResource.fromAssetId(15917)
    })
);

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I just import the vr environment navigated and explored with VR Headset in my cesium application for improving the interaction between human and web-based platform.

4. The Cesium version you're using, your operating system and browser.

Most recent version (cesium 1.55), window 10, firefox nightly, chrome.

The built in CesiumJS VR mode just creates the split view, it doesn’t hook into the WebVR API that allows it to work with VR headsets.

I believe that GitHub project adds support for WebVR. Off the top of my head, I think you’ll need to install the http-server npm package to follow their instructions:

npm install -g http-server

``

Otherwise, you might need to ask questions about this project directly on their GitHub, since this isn’t an officially maintained package by the Cesium team.