Capítulo 20 de 859

Chapter 20: StereoCamera

Core Idea

A special type of camera that uses two perspective cameras with stereoscopic projection. Can be used for rendering stereo effects like 3D Anaglyph or Parallax Barrier.

Key Concepts

  • aspect : number: The aspect.
  • cameraL : PerspectiveCamera: The camera representing the left eye. This is added to layer 1 so objects to be rendered by the left camera must also be added to this la…
  • cameraR : PerspectiveCamera: The camera representing the right eye. This is added to layer 2 so objects to be rendered by the right camera must also be added to this …
  • eyeSep : number: The eye separation which represents the distance between the left and right camera.
  • type : string (readonly): The type property is used for detecting the object type in context of serialization/deserialization.

Reference Tables

Constructor

Signature
new StereoCamera()

Properties

PropertyDescription
.aspect : numberThe aspect.
.cameraL : PerspectiveCameraThe camera representing the left eye. This is added to layer 1 so objects to be rendered by the left camera must also be added to this layer.
.cameraR : PerspectiveCameraThe camera representing the right eye. This is added to layer 2 so objects to be rendered by the right camera must also be added to this layer.
.eyeSep : numberThe eye separation which represents the distance between the left and right camera.
.type : string (readonly)The type property is used for detecting the object type in context of serialization/deserialization.

Methods

MethodDescription
.update( camera : PerspectiveCamera )Updates the stereo camera based on the given perspective camera.

Key Takeaways

  1. Most relevant properties: aspect, cameraL, cameraR, eyeSep.
  2. Key methods: update.

Connects To