new MovingBackground(whichKind, position, initialVelocity, acceleration)
Creates a moving background.
Parameters:
Name |
Type |
Description |
whichKind |
string
|
Options: 'cityStreet' or 'clouds' |
position |
p5.Vector
|
The position vector. |
initialVelocity |
p5.Vector
|
The initial velocity. |
acceleration |
p5.Vector
|
The acceleration. |
Properties:
Name |
Type |
Description |
shapes |
array
|
Initializes the array to hold the randomly generated building data. |
avgVel |
p5.Vector
|
The average velocity. |
MovingBackground.display() |
method
|
Displays the MovingBackground object |
MovingBackground.update() |
method
|
Updates the MovingBackground object |
- Source: