Doc > Expressions

Doc > Expressions

The following expressions are available to use in most parameters:

variables

  • $F: current frame
  • $T: current time
  • $OS: current node name
  • $CH: current param name
  • $CEX: input centroid x component
  • $CEY: input centroid y component
  • $CEZ: input centroid z component

Those variables are aliases to the javascript math module:

  • $E
  • $LN2
  • $LN10
  • $LOG10E
  • $LOG2E
  • $PI
  • $SQRT1_2
  • $SQRT2

math expressions

The following are native javascript functions:

  • abs
  • acos
  • acosh
  • asin
  • asinh
  • atan
  • atan2
  • atanh
  • ceil
  • cos
  • cosh
  • exp
  • expm1
  • floor
  • log
  • log1p
  • log2
  • log10
  • max
  • min
  • pow
  • random (which aliases to Math.rand())
  • round
  • sign
  • sin
  • sinh
  • sqrt
  • tan
  • tanh

If you are targetting ES6 (available in modern browsers), you can also have:

  • cbrt
  • hypot
  • log10
  • trunc

The following are aliases from the Polygonjs CoreMath module:

  • fit
  • fit01
  • fract
  • deg2rad
  • rad2deg
  • rand
  • clamp

And the following are alias to the Polygonjs Easing module:

  • linear
  • ease_i
  • ease_o
  • ease_io
  • ease_i2
  • ease_o2
  • ease_io2
  • ease_i3
  • ease_o3
  • ease_io3
  • ease_i4
  • ease_o4
  • ease_io4
  • ease_i_sin
  • ease_o_sin
  • ease_io_sin
  • ease_i_elastic
  • ease_o_elastic
  • ease_io_elastic

string expressions:

Other Expressions

Those expressions are custom to Polygonjs and will allow you to fetch various aspects of geometries: