TranslateX

The TranslateX accessor (class ) moves a node horizontally to a position determined by a minimum position, a position range, a minimum value, and a value range. The new position is computed from the value assigned to the TranslateX accessor using the following formula:

x = xmin + (v - minimum) * xrange / range

Parameters

  • Graphic Node: Name of the node to move. It must be a graphic node.

  • Minimum X: Name of the minimum position (Float or Integer).

  • X range: Name of the position range (Float or Integer).

  • Minimum: Name of the minimum value (Float or Integer).

  • Range: Name of the value range (Float or Integer).

  • Handle Interaction: Boolean specifying whether the accessor should behave like an Event accessor when the user clicks on the node to rotate it. If it is set to true, the user can rotate the node and the accessor value is updated accordingly.

  • The type of the value is Float.

Example

The use of Translate accessors is similar to the use of Scale accessors, except that Translate accessors change the position instead of the size of an object. See the transformer prototype in the samples library.