Capítulo 500 de 859

Chapter 500: TransitionNode

Core Idea

Post processing node for creating a transition effect between scenes.

Key Concepts

  • mixRatioNode : Node.<float>: The interpolation factor that controls the mix.
  • mixTextureNode : TextureNode: A texture that defines how the transition effect should look like.
  • textureNodeA : TextureNode: A texture node that represents the beauty pass of the first scene.
  • textureNodeB : TextureNode: A texture node that represents the beauty pass of the second scene.
  • thresholdNode : Node.<float>: Can be used to tweak the linear interpolation.
  • useTextureNode : Node.<float>: Whether mixTextureNode should influence the transition or not.

Code Examples

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

Reference Tables

Constructor

Signature
new TransitionNode( textureNodeA : TextureNode, textureNodeB : TextureNode, mixTextureNode : TextureNode, mixRatioNode : Node.<float>, thresholdNode : Node.<float>, useTextureNode : Node.<float> )

Properties

PropertyDescription
.mixRatioNode : Node.<float>The interpolation factor that controls the mix.
.mixTextureNode : TextureNodeA texture that defines how the transition effect should look like.
.textureNodeA : TextureNodeA texture node that represents the beauty pass of the first scene.
.textureNodeB : TextureNodeA texture node that represents the beauty pass of the second scene.
.thresholdNode : Node.<float>Can be used to tweak the linear interpolation.
.useTextureNode : Node.<float>Whether mixTextureNode should influence the transition or not.

Methods

MethodDescription
.setup( builder : NodeBuilder ) : ShaderCallNodeInternalThis method is used to setup the effect's TSL code.

Key Takeaways

  1. TransitionNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: mixRatioNode, mixTextureNode, textureNodeA, textureNodeB.
  3. Key methods: setup.

Connects To