origin(x, y, z) origin.messages = [] = []


element 1

element 2

Sets the element's center of transformations. The x and y coordinates are supplied relative to the element's size, and z is supplied in pixels.

Modifies element's style.transform-origin CSS property.


Visit page Controller # Common Parameters for documentation on the parameters, common to all controllers: id, paused and disabled.

Parameters of origin():

x, y
Coordinates of the transformations center on the 2D plane, relative to the element's size. For example, x having a value of 0 means that the horizontal center of transformations is at the element's left edge. y having a value of 1 means that the vertical center of transformations is at the element's bottom edge. Note that the center can be set outside of the element's box. For example, setting y to -2 means that the center is vertically situated above the element's top edge at a distance equal to twice the element's height. Default values: 0.5, 0.5
Z coordinate of the transformations center, supplied in pixels. A positive value means the center is between the layout plane and the camera, and a negative value - that the center is in the distance behind the layout plane. Default value: 0

Accepted Messages

Visit page Controller # Common Messages for documentation on the messages, accepted by all controllers: pause, unpause, enable, disable, params and remove.

Messages specific to origin(): none

Generated Events

Visit page Controller # Common Events for documentation on the events, generated by all controllers: frame, remove, paused, unpaused enabled and disabled.

Events specific to origin(): none

Interaction with DOM

Changes Log

  1. Controller introduced in v.0.80

See Also