controllerOrigin
origin(x, y, z)
origin.messages = []
origin.events = []
Description
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.
Parameters
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,
xhaving a value of0means that the horizontal center of transformations is at the element's left edge.yhaving a value of1means 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, settingyto-2means 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
- 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
- Transforms: Does not apply any CSS transforms.
- CSS: Works with any styling. Sets element's property
style.transform-origin. - Events: Does not set event listeners.
Changes Log
- Controller introduced in v.0.80