Class

Point

Point(x, y, vxopt, vyopt, radiusopt)

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>

View Source Point.js, line 10

Methods

addMotor(x, y, time, radius, speed)

Parameters:
Name Type Description
x number
y number
time number
radius number
speed number

View Source Point.js, line 167

applyForce(f)

Parameters:
Name Type Description
f number | Vector

View Source Point.js, line 155

constrain(verlyInstance)

Parameters:
Name Type Description
verlyInstance Verly

View Source Point.js, line 175

pin() → {Point}

View Source Point.js, line 107

Point

render(ctx)

Parameters:
Name Type Description
ctx CanvasRenderingContext2D

View Source Point.js, line 227

resolveBehaviors(p, radius, strength)

Parameters:
Name Type Description
p Point
radius number
strength number

View Source Point.js, line 140

rotate(angle, offset)

Parameters:
Name Type Description
angle number
offset number

View Source Point.js, line 128

setBounce(b)

Parameters:
Name Type Description
b number

View Source Point.js, line 54

setColor(color) → {Point}

Parameters:
Name Type Description
color string

View Source Point.js, line 90

Point

setForceAcc(f) → {Point}

Parameters:
Name Type Description
f number

View Source Point.js, line 63

Point

setFriction(f)

Parameters:
Name Type Description
f number

View Source Point.js, line 38

setGravity(g)

Parameters:
Name Type Description
g Vector

View Source Point.js, line 30

setGroundFriction(f)

Parameters:
Name Type Description
f number

View Source Point.js, line 46

setMass(m) → {Point}

Parameters:
Name Type Description
m number

View Source Point.js, line 72

Point

setRadius(radius) → {Point}

Parameters:
Name Type Description
radius number

View Source Point.js, line 81

Point

setVelocity(vel) → {Point}

Parameters:
Name Type Description
vel Vector

View Source Point.js, line 99

Point

unpin() → {Point}

View Source Point.js, line 114

Point

update(verlyInstance)

Parameters:
Name Type Description
verlyInstance Verly

View Source Point.js, line 208