video.init

init(width: number, height: number, options: ApplicationSettings) → {boolean}

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

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

The width of the canvas viewport

height number

The height of the canvas viewport

options ApplicationSettings

<optional>

optional parameters for the renderer

Returns:
Type Description
boolean

false if initialization failed (canvas not supported)

Powered by webdoc!