Skip to main content

Interface: VariableOptions

Defined in: src/mobjects/text/Variable.ts:17

Options for creating a Variable mobject

Properties​

fontSize?​

optional fontSize: number

Defined in: src/mobjects/text/Variable.ts:33

Font size for the value. Default: 48


includeSign?​

optional includeSign: boolean

Defined in: src/mobjects/text/Variable.ts:27

Whether to show + sign for positive values. Default: false


label​

label: string

Defined in: src/mobjects/text/Variable.ts:19

The variable name/label (rendered as LaTeX). Example: 'x', '\theta', 'time'


labelBuff?​

optional labelBuff: number

Defined in: src/mobjects/text/Variable.ts:35

Buffer between label and equals sign. Default: 0.1


labelColor?​

optional labelColor: string

Defined in: src/mobjects/text/Variable.ts:29

Color for the label. Default: '#ffffff'


numDecimalPlaces?​

optional numDecimalPlaces: number

Defined in: src/mobjects/text/Variable.ts:23

Options for the decimal number display


showEllipsis?​

optional showEllipsis: boolean

Defined in: src/mobjects/text/Variable.ts:25

Whether to show ellipsis after the value. Default: false


value?​

optional value: number

Defined in: src/mobjects/text/Variable.ts:21

Initial numeric value. Default: 0


valueBuff?​

optional valueBuff: number

Defined in: src/mobjects/text/Variable.ts:37

Buffer between equals sign and value. Default: 0.1


valueColor?​

optional valueColor: string

Defined in: src/mobjects/text/Variable.ts:31

Color for the value. Default: '#ffffff'