-
Notifications
You must be signed in to change notification settings - Fork 14
Object2D
Kiminaze edited this page May 1, 2022
·
2 revisions
All other 2D elements inherit from this base class. All functions this class provides can be used by the other classes.
Creates a new Object2D from a position and scale. This is an internal function and should not be used by an inexperienced user. This description is just included for completeness.
| Parameter | Type | Range | Default | Description |
|---|---|---|---|---|
| position | vector2 | vector2(0, 0)-vector2(1, 1) | vector2(0, 0) | The position of the Object2D in screen space coordinates. |
| scale | vector2 | vector2(0, 0)-vector2(1, 1) | vector2(1, 1) | The scale of the Object2D. |
-- create a new Object2D at the top left of the screen.
local obj1 = Object2D()
-- create a new Object2D at the top middle of the screen, scaled down to a quarter of its original size
local obj2 = Object2D(vecto2(0, 0.5), vector2(0.25, 0.25)MORE TBD