Trippy trails mode

If you are craving hallucinogenic simulations, we'll introduce a "trippy trails mode" to our visualizations! The implementation is added to the RenderBox library itself. If you're using the completed RenderBox library, then just toggle on the mode in your app. For example, in setup() of MainActivity, add the following line of code at the end:

        RenderBox.mainCamera.trailsMode = true;

To implement it in your copy of RenderBox library, open that project (in Android Studio). In the Camera class (the components/Camera.java file), add public boolean trailsMode:

    public boolean trailsMode;

Then, in onDrawEye, instead of erasing the screen for the new frame, we'll draw a full screen quad over the entire frame, with alpha transparency, thus ...

Get Cardboard VR Projects for Android now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.