Capítulo 483 de 859

Chapter 483: StereoCompositePassNode

Core Idea

A special (abstract) render pass node that renders the scene as a stereoscopic image. Unlike StereoPassNode, this node merges the image for the left and right eye into a single one. That is required for effects like anaglyph or parallax barrier.

Key Concepts

  • isStereoCompositePassNode : boolean (readonly): This flag can be used for type testing.
  • stereo : StereoCamera: The internal stereo camera that is used to render the scene.

Code Examples

import { StereoCompositePassNode } from 'three/addons/tsl/display/StereoCompositePassNode.js';
  • What it demonstrates: Typical usage of StereoCompositePassNode.

Reference Tables

Constructor

Signature
new StereoCompositePassNode( scene : Scene, camera : Camera ) (abstract)

Properties

PropertyDescription
.isStereoCompositePassNode : boolean (readonly)This flag can be used for type testing.
.stereo : StereoCameraThe internal stereo camera that is used to render the scene.

Methods

MethodDescription
.dispose()Frees internal resources. This method should be called when the pass is no longer required.
.setSize( width : number, height : number )Sets the size of the pass.
.updateBefore( frame : NodeFrame )This method is used to render the effect once per frame.
.updateStereoCamera( coordinateSystem : number )Updates the internal stereo camera.

Key Takeaways

  1. StereoCompositePassNode extends: EventDispatcher → Node → TempNode → PassNode
  2. Most relevant properties: isStereoCompositePassNode, stereo.
  3. Key methods: dispose, setSize, updateBefore, updateStereoCamera.

Connects To