melonJS
    Preparing search index...

    Class HologramEffect

    A shader effect that simulates a holographic projection with horizontal scan lines, color shift, and flickering. Commonly used for sci-fi UI, ghost/spirit characters, or tech displays. The time uniform should be updated each frame for animation.

    Renderable.shader for usage

    const holo = new HologramEffect(renderer);
    mySprite.shader = holo;
    // update each frame
    holo.setTime(performance.now() / 1000);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _enabledBeforeSuspend: boolean | undefined
    destroyed: boolean = false

    true once destroy has been called. Distinct from enabled — which also toggles transiently across a context lost / restored cycle — to give callers a stable signal for "this effect has been explicitly released."

    enabled: boolean = false

    whether this effect is active (false in Canvas mode, false after destroy, and false while the WebGL context is suspended between an ONCONTEXT_LOST and the matching ONCONTEXT_RESTORED event).

    Methods