Class: ModelRectangle

ModelRectangle


new ModelRectangle( [p_config])

Parameters:
Name Type Argument Description
p_config Object <optional>
Properties
Name Type Argument Default Description
width number <optional>
0
height number <optional>
0
x number <optional>
0
y number <optional>
0
vx number <optional>
0
vy number <optional>
0
ax number <optional>
0
ay number <optional>
0
Properties:
Name Type Description
width number the width of the rectangle
height number the height of the rectangle
x number the x position of the rectangle
y number the y position of the rectangle
vx number the x velocity of the rectangle
vy number the y velocity of the rectangle
ax number the x acceleration of the rectangle
ay number the y acceleration of the rectangle
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)
Source:

Methods


update(p_delta_s)

Parameters:
Name Type Description
p_delta_s number time in seconds since last call (max 1/60)
Source: