Constructor
new CameraGlitch()
Creates a camera glitch subsystem, reusing display band displacement.
- Source:
Extends
Members
(readonly) running :boolean
Whether a nonzero displacement effect is active.
Type:
- boolean
- Inherited From:
- Source:
Methods
start(durationopt, amountopt) → {undefined}
Starts or restarts the effect. Displacements use local buffer pixels.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
duration |
number |
<optional> |
300 | Effect duration in milliseconds. |
amount |
number |
<optional> |
8 | Maximum horizontal displacement in pixels. |
- Inherited From:
- Source:
Returns:
- Type
- undefined
stop() → {undefined}
Stops the effect, retaining its buffer for later reuse.
- Inherited From:
- Source:
Returns:
- Type
- undefined