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

    // init the video with a 640x480 canvas
    me.video.init(640, 480, {
    parent : "screen",
    renderer : me.video.AUTO,
    scale : "auto",
    scaleMethod : "fit"
    });