Module API - end-user/expressions

An expression is a textual value that starts with =. Expressions unlike [Code Handlers](code handler) can be defined on the .json config file and support teleporting.

BeamToIX supports:

  • binary operators: +, -, *, /, % (modulus). Work both with numbers and arrays. + operator also concatenates textual values.

  • equality and comparison operators: ==, !=, <, >, <=, >=.

  • logical comparison: and, or. These operators transform the 2 numerical values into 0 (false) or 1 (true).

  • parenthesis: (, ).

  • .

  • textual values: delimited by single quotes. the following character strings have a special meaning: - \' - defines a single quote - \n - defines new line

  • numerical values.

  • numerical arrays: [x,y,z].

  • variables: numerical, textual, numerical arrays, objects.

  • variable array one-dimension indices.

BeamToIX has the following built-in variables:

e - mathematical constant 'e'. pi - mathematical constant 'pi'. deg2rad - =pi/180. rad2deg - =180/pi.

fps - frames per second. frameWidth - frame output width = generated file image width. frameHeight - frame output height = generated file image height.

isTeleporting - Is True, if it's teleporting.

v0 - Computed Numerical valueStart. v1 - Computed Numerical value. vd - Computed Numerical difference value - valueStart. vt - Computed Numerical value injected to the easing function. vot - Computed Numerical value injected to the oscillator function. vpt - Computed Numerical value injected to the path function. t - t used to interpolate an easing, oscillator or path via expression.

= 'A' + 'Beamer'. = round(12.4 + ceil(50.5) / 2 * (60 % 4)). = cos(60*deg2rad) * random(). = iff(fps < 20, 'too few frames', 'lots of frames'). =[2, 3] + [4, 5]. =chart.labelsY.marginAfter. =foo[x-y+z].

Index

Enumerations

Interfaces

Type Aliases

Variables

Functions