Capítulo 472 de 859

Chapter 472: ShadowBaseNode

Core Idea

Base class for all shadow nodes.

Shadow nodes encapsulate shadow related logic and are always coupled to lighting nodes. Lighting nodes might share the same shadow node type or use specific ones depending on their requirements.

Key Concepts

  • isShadowBaseNode : boolean (readonly): This flag can be used for type testing.
  • light : Light: The shadow casting light.
  • updateBeforeType : string: Overwritten since shadows are updated by default per render.

Reference Tables

Constructor

Signature
new ShadowBaseNode( light : Light )

Properties

PropertyDescription
.isShadowBaseNode : boolean (readonly)This flag can be used for type testing.
.light : LightThe shadow casting light.
.updateBeforeType : stringOverwritten since shadows are updated by default per render.

Methods

MethodDescription
.setupShadowPosition( object : NodeBuilder )Setups the shadow position node which is by default the predefined TSL node object shadowPositionWorld.

Key Takeaways

  1. ShadowBaseNode extends: EventDispatcher → Node
  2. Most relevant properties: isShadowBaseNode, light, updateBeforeType.
  3. Key methods: setupShadowPosition.

Connects To