Write Google Cardboard VR Apps with Processing

Here's a screenshot photo of a demonstration Android app I wrote to show the use of the "Processing" language to create an Android phone application for the Google Cardboard VR (Virtual Reality) headset. 

This short video shows user interaction with the screen to rotate a photo cube. When installed in the Cardboard headset the user can explore the stereo photos displayed on the cube zooming in or panning left and right. I also demonstrate how graphics and text may be drawn with Processing.

"Processing" is a Java based programming language, library, and development environment designed for visual artists, designers, and programmers. I merged the Processing for Android core library with the Google Cardboard SDK so that anyone can write Cardboard VR apps using Processing. At this stage Android Studio is needed to develop code since a Processing-Cardboard library is not yet available to use in the PDE (Processing Development Environment) tool. The technical details about the project are on GitHub.

This open source code is available at: https://github.com/ajavamind/Processing-Cardboard   

My example code displays a stereo photo cube in front of a stereo photo background. In a Cardboard viewer the user may change the viewing angle and size of the cube with head movement. A screen tap,  magnet pull, or Bluetooth keyboard enter key will bring the cube back to its original viewing location. Tilting the viewer left or right will change the cube size. 

Moving your finger on the display will rotate the cube for a different photo view. I can also rotate the cube by connecting a USB mouse to my phone through a USB OTG Host cable adapter. Dragging the mouse cursor rotates the photo cube.

UPDATE 2016-01-24
Source code updated for Processing Android version 3.
See http://andymodlaphotography.blogspot.com/2016/01/processing-for-google-cardboard-vr.html