mirror of
https://github.com/w7corp/easywechat.git
synced 2025-01-22 19:52:10 +00:00
Created 初始化 (markdown)
parent
a2621f1269
commit
6ca922237e
18
初始化.md
Normal file
18
初始化.md
Normal file
@ -0,0 +1,18 @@
|
||||
#初始化
|
||||
```js
|
||||
Vg(function(v){
|
||||
v.initDom('gameCanvas').initSize(800, 1300).initZoom(true).run();
|
||||
...
|
||||
});
|
||||
//或
|
||||
var v = new Vg();
|
||||
v.ready(function(){
|
||||
v.initDom('gameCanvas').initSize(800, 1300).initZoom(true).run();
|
||||
...
|
||||
});
|
||||
```
|
||||
##API
|
||||
+ `vg.initDom('gameCanvas')`canvas标签ID[必选]
|
||||
+ `vg.initSize(width, height)`canvas标签尺寸[必选]
|
||||
+ `vg.initZoom()`是否随浏览器缩放[true/false,默认false]
|
||||
+ `vg.run()`初始化
|
Loading…
Reference in New Issue
Block a user