c2.js
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Arc
Field
Circle
Constraint
Circle
Field
Collision
Const
Force
Constraint
Force
Gravitation
Interaction
Force
Line
Field
Particle
constructor
mass
position
previous
Position
radius
add
Force
add
Velocity
bounce
bounds
clear
Force
clear
Velocity
fix
unfix
update
velocity
Point
Field
Polygon
Constraint
Rect
Constraint
Spring
World
Hierarchy
Particle
Index
Constructors
constructor
Properties
mass
position
previous
Position
radius
Methods
add
Force
add
Velocity
bounce
bounds
clear
Force
clear
Velocity
fix
unfix
update
velocity
Constructors
constructor
new
Particle
(
x
:
number
, y
:
number
)
:
Particle
Parameters
x:
number
y:
number
Returns
Particle
Properties
mass
mass
:
number
= 1
position
position
:
Vector
previous
Position
previous
Position
:
Vector
radius
radius
:
number
= 1
Methods
add
Force
add
Force
(
f
:
Vector
)
:
void
Parameters
f:
Vector
Returns
void
add
Velocity
add
Velocity
(
v
:
Vector
)
:
void
Parameters
v:
Vector
Returns
void
bounce
bounce
(
rect
:
Rect
)
:
void
Parameters
rect:
Rect
Returns
void
bounds
bounds
(
)
:
Circle
Returns
Circle
clear
Force
clear
Force
(
)
:
void
Returns
void
clear
Velocity
clear
Velocity
(
)
:
void
Returns
void
fix
fix
(
)
:
void
Returns
void
unfix
unfix
(
)
:
void
Returns
void
update
update
(
friction
?:
number
)
:
void
Parameters
friction:
number
= 1
Returns
void
velocity
velocity
(
)
:
Vector
Returns
Vector