Using different cameras for different scenes
There are two different camera types in Three.js: the orthographic camera and the perspective camera. Note that Three.js also provides a couple of very specific cameras for creating scenes that can be viewed using 3D glasses or VR gear. We won’t go into detail about those cameras in this book, since they work exactly the same as the cameras explained in this chapter. If you’re interested in these cameras, Three.js provides a few standard examples:
- Anaglyph effect: https://threejs.org/examples/#webgl_effects_anaglyph
- Parallax barrier: https://threejs.org/examples/#webgl_effects_parallaxbarrier
- Stereo effect: https://threejs.org/examples/#webgl_effects_stereo
If you’re looking for simple VR cameras, you can use THREE.StereoCamera
to create 3D scenes that are rendered side to side (standard stereo effect), use a parallel barrier (as 3DS provides), or provide an anaglyph effect where the different...