Skip to content

A clone of the Google Daydream VR Remote in JavaScript

Notifications You must be signed in to change notification settings

edwinwebb/daydream-remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DAYDREAM REMOTE

A Google Daydream remote Andriod app clone for Javascript based VR experiments.

Best used with a cutout cardboard overlay. There's an A4 PDF in the ./assets folder. Use the thickest card you have.

To size the graphic to your overlay use the input in the top left corner. Set it to 1, measure the width of the graphic in cm, then divide 4.6 by your measurement. Put this figure into the input.

Notes : ES6. Development only. Contributions welcome.

Install and Use

Install

npm install --save-dev git+https://[email protected]/edwinwebb/daydream-remote

Run NPM Script and start the server

scripts :{
  "dreamremote" : "node ./node_modules/dream-remote/index.js"
}

Load on phone

http://localhost:8081

Connect to in VR app

new WebSocket(`ws://${window.location.hostname}:8081/`)

Socket Events

Wheel touch events

const newEvent = {
  'type' : 'touch',
  x,
  y
};

Gyro event

const newEvent = {
  'type' : 'orientation',
  alpha,
  beta,
  gamma,
  absolute
};

Click event

const newEvent = {
  'type': 'click'
};

About

A clone of the Google Daydream VR Remote in JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published