Gleam - v1.0.2
    Preparing search index...

    Class Screenshake

    Shake an element by mutating its inline CSS each rAF tick. One shake per instance — re-calling shake while one is active returns null. The returned dispose function (and natural timer expiry) restores every CSS key the shake touched.

    Only the built-in SHAKE_TYPES (NORMAL, FAST) are supported today. Letting callers define their own would be a natural extension — impact pulses, slow rumble, directional jolts — since ShakeType is already public.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Start a shake of the given shakeType. Returns a dispose function that stops the shake early and restores every CSS key it touched, or null if a shake is already active on this instance. Auto-stops and restores when the timer reaches zero.

      Parameters

      Returns (() => void) | null