geometry

geometry

The geomtry namespace is a particular namespace that is contained in several objects like images, sprites, polygons, etc.
Properties:
Name Type Description
x number The horizontal position (in pixels)
y number The vertical position (in pixels)
body_x number The horizontal position of the physics body (in pixels)
body_y number The vertical position of the physics body (in pixels)
scale_x number The horizontal scale (ratio, 1=100% of the original size, 2=twice the original size, etc.)
scale_y number The vertical scale (ratio, 1=100% of the original size, 2=twice the original size, etc.)
flip_x boolean Flip horizontal
flip_y boolean Flip vertical
angle number The rotation angle, from 0 to 360
alpha number The alpha property (trasparency), from 0 to 1
display_width number (read-only) The displayed width in px (affected by scale)
display_height number (read-only) The displayed height in px (affected by scale)
Source: