Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.49 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.49 KB

VirtualBoyEffect for Three.js

This effect makes your scene into something like a Virtual Boy application.

Description

The Virtual Boy is a legendary video game console developed by Nintendo. By using this effect and the Google Cardboard, you can virtualboyize your three.js application.

Note that this effect is built on codes from the deprecated CardboardEffect so there may be same issues as the effect.

Demo

https://technohippy.github.io/VirtualBoyEffect

Usage

Include required libs:

<script src="js/three.js"></script>
<script src="js/EffectComposer.js"></script>
<script src="js/FilmShader.js"></script>
<script src="js/FilmPass.js"></script>
<script src="js/RenderPass.js"></script>
<script src="js/CopyShader.js"></script>
<script src="js/ShaderPass.js"></script>
<script src="js/VignetteShader.js"></script>
<script src="js/VirtualBoyEffect.js"></script>

Construct the effect with a WebGLRenderer instance:

var virtualBoyEffect = new THREE.VirtualBoyEffect(renderer);

Render by using the instance:

function render() {
  requestAnimationFrame(render);
  virtualBoyEffect.render(scene, camera);
}
render();

Licence

MIT

Author

technohippy