Wed. Nov 6th, 2019

Host your Website

Read and learn

FatCow Plan for $3.15/mo. only

RiftSketch: Live coding in VR with the Oculus Rift, Firefox WebVR, JavaScript and Three.js

1 min read



I built a live-coding web app for the Oculus Rift where you code in JavaScript using Three.js and watch the world change around you in real-time.

It’s quite a niche application since you need to have an Oculus Rift, be a JavaScript programmer *and* be sufficiently familiar with Three.js but, if you fit that criteria, it’s a surprisingly engaging experience!

If happen to have a Rift and you want to try it out yourself, download the Windows or OS X or dev build of Firefox that includes the WebVR APIs from http://blog.bitops.com/blog/2014/08/20/updated-firefox-vr-builds/ and visit http://brianpeiris.github.io/RiftSketch with your Rift hooked up.

The code’s messy but it’s up on GitHub: https://github.com/brianpeiris/RiftSketch

Edit: Since people keep asking, the music is actually just one of the royalty-free tracks from YouTube’s audio library called “Grass” by “Silent Partner”: https://www.youtube.com/audiolibrary_download?vid=2545f834238bcd11

32 thoughts on “RiftSketch: Live coding in VR with the Oculus Rift, Firefox WebVR, JavaScript and Three.js

  1. When I go to that link there doesn't seem to be any "Enter VR" button to press so I can't get my Vive to recognize this as WebVR.

    For instance if this demo has the button and works perfectly:
    http://threejs.org/examples/webvr_cubes.html

    Also the editor doesn't seem to respond to TAB as it should. It should move the cursor right, as usual, but nothing happens.

    Lastly if there is an error it doesn't tell me which line… in fact there are no line numbers at all.

  2. If you made a game out of this, it would be amazing. Something like Minecraft, where you could code and build using a library of objects. Or Project Spark where you could program games using a suite of environments and objects. Java has a lot of applications

  3. is it possible to have a room like this but instead of a coding window you have web browser windows and with the new oculus controls you can select with browser you want closest to you.

  4. How do you get the images to project out from the display which is only a 3D representation. Do you have to sub vector or build an extent frame?

  5. @Brian Peiris Good artists copy, great artists steal. I represent a team participating in the BigDataVR Challenge. Your work presents a template for our project, although we are required to use the UE4 engine. If possible, could I ask you some questions about your implementation?

Comments are closed.

Copyright © All rights reserved. | Newsphere by AF themes.