melonJS
    Preparing search index...

    Function init

    • Initialize the "video" system (create a canvas based on the given arguments, and the related renderer).

      Parameters

      • width: number

        The width of the canvas viewport

      • height: number

        The height of the canvas viewport

      • Optionaloptions: any

        optional parameters for the renderer

      Returns boolean

      false if initialization failed (canvas not supported)

      video

      since 18.3.0 — use Application constructor instead: const app = new Application(width, height, options)

      Application

      // using the new Application entry point (recommended)
      const app = new Application(640, 480, {
      parent : "screen",
      scale : "auto",
      scaleMethod : "fit"
      });

      // legacy usage (still supported)
      me.video.init(640, 480, {
      parent : "screen",
      renderer : me.video.AUTO,
      scale : "auto",
      scaleMethod : "fit"
      });