Constructor
new CameraShake(camera, strength, length)
Create a new CameraShake Object.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
camera | Camera | Camera to be owned by | |
strength | number | Intensity of the effect | |
length | number | 1 | Duration of the effect |
Methods
_make()
Initializes the effect.
remove()
Remove the effect from the camera.
update(elapsed)
Update the camera shake effect.
Parameters:
Name | Type | Description |
---|---|---|
elapsed | number | Time since last update in seconds |