Created 初始化 (markdown)

wailovet 2015-12-24 15:33:54 +08:00
parent a2621f1269
commit 6ca922237e

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()`初始化