Constructor
new Particle(x, y, color, angle, speed, size, deceleration)
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
x |
number | ||
y |
number | ||
color |
P5.Color | ||
angle |
number | direction when moving | |
speed |
number | speed when moving | |
size |
number | undefined | 10 | the size of a particle (the perimeter of a circle) |
deceleration |
number | undefined | 0.1 | the degree of deceleration when moving |
- Source:
Methods
draw()
draws in loop
- Source: