Small World Engine API Reference - v0.78.00
    Preparing search index...

    Class ShakeEffect

    A screen shake effect for the camera, driven by a decaying "trauma" value (trauma^2 envelope, per Squirrel Eiserloh's GDC talk "Juicing Your Cameras With Math") and continuous simplex noise instead of per-frame white noise, so the shake reads as a smooth wobble rather than a jittery flicker.

    Shakes the camera's pitch/yaw (view direction) rather than its position: rotating the camera can never push it through level geometry, unlike a positional offset.

    Hierarchy (View Summary)

    Index
    flashColor: Color = ...

    Tint color for this effect's flash contribution.

    flashIntensity: number = 0

    This effect's contribution to the post-processing screen flash, in [0, 1].

    isFinished: boolean = false

    Whether the effect has finished its duration and should be removed.

    offset: Vector3D = ...

    The current position offset generated by this effect.

    pitchOffset: number = 0

    Pitch (X-axis) rotation offset in radians, applied to the view direction.

    targetOffset: Vector3D = ...

    The current target offset generated by this effect.

    type: CameraEffectType = CameraEffectType.SHAKE

    The unique type identifier of the effect.

    yawOffset: number = 0

    Yaw (Y-axis) rotation offset in radians, applied to the view direction.