index.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  6. <link rel="icon" type="image/GIF" href="res/favicon.ico"/>
  7. <meta http-equiv="cache-control" content="no-cache">
  8. <meta name="viewport" content="user-scalable=no" />
  9. <meta name="apple-mobile-web-app-capable" content="yes"/>
  10. <meta name="full-screen" content="yes"/>
  11. <meta name="screen-orientation" content="portrait"/>
  12. <meta name="x5-fullscreen" content="true"/>
  13. <meta name="360-fullscreen" content="true"/>
  14. <title>看看你有多老</title>
  15. <script type="text/javascript" src="static/cocos2d-3.0rc1.canvas.v2.min.js"></script>
  16. </head>
  17. <body>
  18. <canvas id="gameCanvas" width="480" height="800" style="background:#fff"></canvas>
  19. <script src="static/weixinapi.min.js"></script>
  20. <script type="text/javascript">
  21. window.onload = function(){
  22. cc.game.onStart = function(){
  23. cc.view.enableAutoFullScreen(false);
  24. cc.view.setDesignResolutionSize(720, 1280, cc.ResolutionPolicy.SHOW_ALL);
  25. cc.view.resizeWithBrowserSize(true);
  26. cc.director.setDisplayStats(cc.game.config.showFPS);
  27. //load resources
  28. cc._loaderImage = "";
  29. cc.LoaderScene.preload([], function () {
  30. cc.director.runScene(new HelloWorldScene());
  31. }, this);
  32. };
  33. cc.game.run("gameCanvas");
  34. };
  35. </script>
  36. <img src="http://img.tongji.linezing.com/3455448/tongji.gif">
  37. </body>
  38. </html>