melonJS
    Preparing search index...

    Interface UIJuiceSettings

    The bounce settings every built-in widget takes in its settings object: a small grow under the pointer and a squash while held. Only the drawing scales; the hit area and the layout stay as they are. See UIBaseElement#hoverScale.

    // a button that grows 5% under the pointer and squashes while held
    const play = new UITextButton(100, 200, {
    text: "Play",
    hoverScale: 1.05,
    pressScale: 0.92,
    });
    interface UIJuiceSettings {
        hoverScale?: number;
        pressScale?: number;
    }

    Hierarchy (View Summary)

    Index
    hoverScale?: number

    The scale the widget is drawn at under the pointer, or while it has the keyboard and gamepad focus, such as 1.05. 1 turns it off.

    1
    
    pressScale?: number

    The scale the widget is drawn at while held down, such as 0.92. 1 turns it off.

    1