Constructor
new Point(x, y, vxopt, vyopt, radiusopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
x |
number | ||
y |
number | ||
vx |
number |
<optional> |
|
vy |
number |
<optional> |
|
radius |
number |
<optional> |
Methods
addMotor(x, y, time, radius, speed)
Parameters:
Name | Type | Description |
---|---|---|
x |
number | |
y |
number | |
time |
number | |
radius |
number | |
speed |
number |
render(ctx)
Parameters:
Name | Type | Description |
---|---|---|
ctx |
CanvasRenderingContext2D |
resolveBehaviors(p, radius, strength)
Parameters:
Name | Type | Description |
---|---|---|
p |
Point | |
radius |
number | |
strength |
number |
rotate(angle, offset)
Parameters:
Name | Type | Description |
---|---|---|
angle |
number | |
offset |
number |