Constructor
new Laya()
Member
(static) alertGlobalError :Boolean
(static) version :String
Current engine version.
- Default Value:
- "1.7.7beta"
Methods
init(width, height, …plugins) → {Object}
Initialization engine. The engine needs to be initialized, otherwise it might be wrong.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
width |
Number
|
The initial game window width, also known as the design width. | |
height |
Number
|
Initial height of the game window, also known as the design height. | |
plugins |
Rest
|
<repeatable> |
Plugins list, such as WebGL (rendered in WebGL mode). |
Returns:
- Type:
-
Object
Returns the native canvas reference, which makes it easy to modify the canvas property