Creates a control variable.
const controlVar = new ControlVar(Units.rgb, { r: 0, g: 0, b: 0 }) Copy
const controlVar = new ControlVar(Units.rgb, { r: 0, g: 0, b: 0 })
The type of the control is taken from the type of the unit formatting function.
All control variables are objects internally, but for ease of use, control variables can also be defined like:
const controlVar = new ControlVar(Units.num, 0)// same asconst controlVar = new ControlVar(Units.num, { _: 0 }) Copy
const controlVar = new ControlVar(Units.num, 0)// same asconst controlVar = new ControlVar(Units.num, { _: 0 })
To change their value, the set method must be used to ensure that any other variables depending on it are updated.
set
Protected
Generated using TypeDoc
Creates a control variable.
The type of the control is taken from the type of the unit formatting function.
All control variables are objects internally, but for ease of use, control variables can also be defined like:
To change their value, the
set
method must be used to ensure that any other variables depending on it are updated.