melonJS
    Preparing search index...

    Interface GlyphEffectContext

    Reused per-glyph context. Read its values during the callback only.

    interface GlyphEffectContext {
        char: string;
        code: number;
        index: number;
        time: number;
        x: number;
        y: number;
    }
    Index
    char: string

    The UTF-16 character represented by this glyph.

    code: number

    The BMFont character code.

    index: number

    UTF-16 character index across drawn lines, excluding line breaks.

    time: number

    Elapsed update time in milliseconds while the effect is enabled.

    x: number

    Unmodified glyph destination coordinates, after alignment and scaling.

    The natural phase source for a travelling effect: deriving it from GlyphEffectContext.index instead advances the wave as far across a narrow glyph as a wide one, so its wavelength changes with whatever the line spells.

    y: number