Capítulo 503 de 859

Chapter 503: UniformGroupNode

Core Idea

This node can be used to group single instances of UniformNode and manage them as a uniform buffer.

In most cases, the predefined nodes objectGroup, renderGroup and frameGroup will be used when defining the UniformNode#groupNode property.

  • objectGroup: Uniform buffer per object.
  • renderGroup: Shared uniform buffer, updated once per render call.
  • frameGroup: Shared uniform buffer, updated once per frame.

Key Concepts

  • isUniformGroup : boolean (readonly): This flag can be used for type testing.
  • name : string: The name of the uniform group node.
  • order : number: Influences the internal sorting. TODO: Add details when this property should be changed.
  • shared : boolean: Whether this uniform group node is shared or not.
  • updateType : string | null: The update type of the uniform group node.

Reference Tables

Constructor

Signature
`new UniformGroupNode( name : string, shared : boolean, order : number, updateType : string

Properties

PropertyDescription
.isUniformGroup : boolean (readonly)This flag can be used for type testing.
.name : stringThe name of the uniform group node.
.order : numberInfluences the internal sorting. TODO: Add details when this property should be changed.
.shared : booleanWhether this uniform group node is shared or not.
`.updateType : stringnull`

Methods

MethodDescription
.deserialize( data : Object )Deserializes the uniform group node from a JSON object.
.serialize( data : Object )Serializes the uniform group node to a JSON object.
.update()Marks the uniform group node as needing an update. This will trigger the necessary updates in the rendering process.

Key Takeaways

  1. UniformGroupNode extends: EventDispatcher → Node
  2. Most relevant properties: isUniformGroup, name, order, shared.
  3. Key methods: deserialize, serialize, update.

Connects To