melonJS
    Preparing search index...

    Variable ScaleMethodsConst

    ScaleMethods: {
        FillMax: "fill-max";
        FillMin: "fill-min";
        Fit: "fit";
        Flex: "flex";
        FlexHeight: "flex-height";
        FlexWidth: "flex-width";
        Manual: "manual";
        Stretch: "stretch";
    } = ...

    Type Declaration

    • ReadonlyFillMax: "fill-max"

      Canvas is resized to fit maximum design resolution; content is scaled to design aspect ratio

    • ReadonlyFillMin: "fill-min"

      Canvas is resized to fit minimum design resolution; content is scaled to design aspect ratio

    • ReadonlyFit: "fit"

      Letterboxed; the DESIGN RESOLUTION is kept and the whole frame is scaled to the largest factor that fits, leaving the rest as margin.

      The one mode where the game always sees exactly the world it was authored for: every other mode resizes the renderer, so the viewport grows or shrinks with the window. It is also the only mode scaleRounding applies to, since it is the only one with a fixed factor to round.

    • ReadonlyFlex: "flex"

      Canvas width & height is resized to fit; content is scaled to design aspect ratio

    • ReadonlyFlexHeight: "flex-height"

      Canvas height is resized to fit; content is scaled to design aspect ratio

    • ReadonlyFlexWidth: "flex-width"

      Canvas width is resized to fit; content is scaled to design aspect ratio

    • ReadonlyManual: "manual"

      Manual; no automatic scaling is performed. The canvas keeps the size it was given and nothing is measured.

      No illustration: there is nothing to show. The one that used to sit here was Fit's.

    • ReadonlyStretch: "stretch"

      Canvas is resized to fit; content is scaled to screen aspect ratio