Capítulo 15 de 859

Chapter 15: ArrayCamera

Core Idea

This type of camera can be used in order to efficiently render a scene with a predefined set of cameras. This is an important performance aspect for rendering VR scenes.

An instance of ArrayCamera always has an array of sub cameras. It's mandatory to define for each sub camera the viewport property which determines the part of the viewport that is rendered with this camera.

Key Concepts

  • cameras : Array.<PerspectiveCamera>: An array of perspective sub cameras.
  • isArrayCamera : boolean (readonly): This flag can be used for type testing.
  • isMultiViewCamera : boolean (readonly): Whether this camera is used with multiview rendering or not.

Reference Tables

Constructor

Signature
new ArrayCamera( array : Array.<PerspectiveCamera> )

Properties

PropertyDescription
.cameras : Array.<PerspectiveCamera>An array of perspective sub cameras.
.isArrayCamera : boolean (readonly)This flag can be used for type testing.
.isMultiViewCamera : boolean (readonly)Whether this camera is used with multiview rendering or not.

Key Takeaways

  1. ArrayCamera extends: EventDispatcher → Object3D → Camera → PerspectiveCamera
  2. Most relevant properties: cameras, isArrayCamera, isMultiViewCamera.

Connects To

  • EventDispatcher: parent class
  • Object3D: parent class
  • Camera: parent class
  • PerspectiveCamera: parent class
  • Source: src/cameras/ArrayCamera.js