g.js — graphical objects for JavaScript

numbernumber

Create a number value.

This function simply returns the input value.

g.number(42);

By itself this seems rather silly, but in networks, this becomes a useful node because it can be used as a variable. You can use it to store a number that you use in several places in your network, for example the size of the composition.

See Also

  • string: Create a string value.
  • color: Create a color value.
  • boolean: Create a boolean value.