Skip to content

Freeze

Stores and holds a value until explicitly updated.

This node stores a value and holds it until it is updated. It acts like a memory cell.

This node has two main operations:

  1. Initialize: Triggering the exec input port reads the value from Init, stores it, and makes it available on the value output port. It then triggers the exec output port to continue the execution flow.
  2. Update: Triggering the Update input port reads the value from Replace, updates the stored value, and makes the new value available on the value output port. This operation does not trigger the exec output port.

Example Use Case#

This is useful for accumulating values within a loop. For instance, you could use it with an Array Add node to build an array iteratively. The Freeze node would hold the array being built, and on each loop iteration, the Update input would be triggered to store the newly appended array.

Inputs#

Port Description
Stores the value from the Init input.
Init
The initial value to store.
Replace
The new value to replace the stored one.
Update
Updates the stored value using the Replace input.

Outputs#

Port Description
Continues execution after the value is stored.
The currently stored value.

ID: core/freeze@v1