Configuration options for starting a custom camera shake effect.

interface ShakeOptions {
    callback?: () => void;
    decayCurve?: number;
    duration?: number | { x?: number; y?: number };
    ignoreTimeScale?: boolean;
    infinite?: boolean;
    intensity?: number;
    layers?: number;
    randomInitialAngle?: boolean;
    randomness?: number;
    rotation?: boolean;
    rotationStrength?: number;
    smoothness?: number;
    strength?: number | { x?: number; y?: number };
    timeScale?: number;
    vibrato?: number;
}

Properties

callback?: () => void

Optional callback function executed when this shake completes.

decayCurve?: number

Decay curve factor from 0 (linear) to 1 (exponential) that determines how the shake fades over time.

duration?: number | { x?: number; y?: number }

The duration of the shake in milliseconds. Can be a number or an object specifying duration for X and Y independently.

ignoreTimeScale?: boolean

If true, this shake ignores the global timescale and updates at real-time speed.

infinite?: boolean

Whether the shake runs infinitely without automatic completion or decay.

intensity?: number

Overall intensity multiplier of this shake (0 to 1).

layers?: number

The number of oscillation layers (1 to 3) stacked to build complex shake patterns.

randomInitialAngle?: boolean

Whether to start the shake rotation with a randomized initial angle.

randomness?: number

Variation in force magnitude between 0 and 1.

rotation?: boolean

Whether to enable camera rotation during the shake.

rotationStrength?: number

The maximum rotation amplitude of the shake.

smoothness?: number

Interpolation factor between 0 and 1, where higher values produce smoother transitions between shake forces.

strength?: number | { x?: number; y?: number }

The strength (amplitude) of the shake. Can be a single number (applied to both axes) or an object specifying strength for X and Y independently.

timeScale?: number

Optional per-operation time scale multiplier.

vibrato?: number

The frequency/speed of the shake oscillations in Hz.