mwg API
    Preparing search index...

    Interface FloatingTextPush

    interface FloatingTextPush {
        color?: number;
        duration?: number;
        hold?: number;
        key?: string | number;
        rise?: number;
        scale?: number;
        size?: number;
        text: string;
        x: number;
        y: number;
    }

    Hierarchy (View Summary)

    Index
    color?: number
    duration?: number

    seconds it takes to fully rise and fade; defaults to 0.8

    hold?: number

    The fraction of the lifetime the text stays fully opaque before it starts fading, 0 to 1. Defaults to 0 - a straight fade across the whole life, the pre-existing behaviour. 0.5 is the classic damage-number curve: readable for half its time, then gone.

    key?: string | number

    Pop-ups pushed with the same key stack upward instead of overprinting. A pop-up with no key always stands alone.

    A key is the target's own identity, which is what Java's stacks.get(key) is keyed on: a caller reusing one key for two different targets sees their lines stacked together.

    rise?: number

    total pixels it rises over its lifetime; defaults to 24

    scale?: number

    Uniform scale for the pop-up, applied before it is measured. Pass it here rather than scaling the returned pop-up: a FloatingText's height includes its own scale, so a scale applied after the push is measured wrong and the lines stack by a size they are not drawn at (a port rasterising at 21px and drawing at 7 spaced one stack three times too far apart).

    size?: number
    text: string
    x: number

    where the pop-up belongs, in the stack's own coordinate space

    y: number