video.init
init(width: number, height: number, options: Application.Settings) → {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"
});
Name | Type | Attributes | Description |
---|---|---|---|
width | number |
The width of the canvas viewport |
|
height | number |
The height of the canvas viewport |
|
options | Application.Settings |
<optional> |
optional parameters for the renderer |
Type | Description |
---|---|
boolean |
false if initialization failed (canvas not supported) |