new ModelCircle( [p_config])
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p_config |
Object |
<optional> |
Properties
|
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
r |
number | the radius of the circle |
x |
number | the x position of the circle |
y |
number | the y position of the circle |
vx |
number | the x velocity of the circle |
vy |
number | the y velocity of the circle |
left |
number | the x position of the left border (AABB) |
right |
number | the x position of the right border (AABB) |
top |
number | the y position of the top border (AABB) |
bottom |
number | the y position of the bottom border (AABB) |
Methods
-
moveTo( [p_config])
-
Moves the circle to a specific point. By default it's moved to the point stated in the config object that has been passed to the constructor.
Parameters:
Name Type Argument Description p_configObject <optional>
Properties
Name Type Description xnumber ynumber - Source:
-
start()
-
Starts the circle moving around.
- Source:
-
stop()
-
Stops the circle moving around.
- Source:
-
update(p_delta_s)
-
Parameters:
Name Type Description p_delta_snumber time in seconds since last call (max 1/60) - Source: