Extends
- BaseEffect
Methods
apply(mainContext, sceneCanvas, effectPipelineDataopt) → {Object}
Applies the screen shake by modifying the drawing offset.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mainContext |
CanvasRenderingContext2D | The context of the main (visible) canvas. | ||
sceneCanvas |
HTMLCanvasElement | The offscreen canvas containing the rendered scene content. | ||
effectPipelineData |
object |
<optional> |
{drawX: 0, drawY: 0} | Data from previous effects. |
- Source:
Returns:
The modified draw offsets.
- Type
- Object
update(deltaTime)
Updates the shake effect's intensity over time if decay is enabled.
Parameters:
Name | Type | Description |
---|---|---|
deltaTime |
number | The time elapsed since the last frame, in seconds. |
- Source: