interface Primitives · Values

Real

interface Real extends ReadOnlyReal

A reactive number: code that depends on it runs again when its value changes.

Create one with values.real(…) of a group. Read and write the number with value. Code that depends on a Real runs again after each change: an action in Reactive.do, or an Attach link that got the Real as an option.

Computations take a Real wherever they take a number (Real | NumberLike) but read it once, when they are called. To keep a result up to date, call the computation inside Reactive.do with the Real among the senders. A Real passed as result is written in place, and the actions that depend on it run.

Animate.real animates the value.

Properties

value

value: number

The number. Setting it to a different number is a change; setting the same number is not.