123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <!doctype html>
- <html>
- <head><meta name="x-key" content="a39c0a4735a87896802c4e289f961f9d">
- <meta charset="utf-8" />
- <meta name="viewport" id="viewport" content="width=device-width,user-scalable=no">
- <title>跑酷历险记</title>
- <link rel="shortcut icon" href="icon.png">
- <link rel="icon" href="icon.png">
- <!-- <script type="text/javascript" src="zepto.min.js"></script> -->
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <link rel='canonical' href='' />
- <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-
- <script>
- var ua = navigator.userAgent.toLowerCase(),
- Mobile = {
- isAndroid: ua.indexOf('android') != -1,
- isIOS: ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1
- };
- Mobile.getVersion = function () {
- return ua.match(/(iphone os|android|android)(\/| )([\d_\.]+)/)[3].split(Mobile.isAndroid ? '.' : '_');
- }
- Mobile.isHongMi = function () {
- return (ua.indexOf('jro03l') != -1 && ua.indexOf('xiaomi') == -1)
- || (ua.indexOf('hm') != -1 && ua.indexOf('xiaomi') != -1);
- }
- var setViewPort = function () {
- var uiWidth = 480, vp = document.getElementById("viewport");
- var isIOS = ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1;
- var dpi = "device-dpi";
- if (Mobile.isAndroid) {
- version = Mobile.getVersion();
- var deviceWidth = Math.min(window.screen.width, window.outerWidth);
- dpi = (uiWidth / deviceWidth) * window.devicePixelRatio * 160;
- }
- //vp.content = "width="+uiWidth+",user-scalable=no,target-densitydpi=" + dpi;
- }
- setViewPort();
- </script>
- <style>
- html, body {
- height: 100%;
- }
- body {
- overflow: hidden;
- padding: 0;
- margin: 0;
- background-color: #000;
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- -webkit-backface-visibility: hidden;
- -webkit-user-select: none;
- -webkit-text-size-adjust: none;
- font-family: "Helvetica Neue", Helvetica, STHeiTi, "微软雅黑", "黑体", sans-serif;
- }
- #stage {
- position: absolute;
- left: 0;
- top: 0;
- width: 480px;
- height: 100%;
- overflow: hidden;
- }
- .rotate-guide {
- width: 100%;
- height: 100%;
- background-color: #E0E0E0;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 100000;
- display: none;
- }
- .rotate-guide .guide-wraper {
- position: absolute;
- left: 50%;
- top: 50%;
- width: 100%;
- height: 280;
- width: 280px;
- margin-top: -160px;
- margin-left: -140px;
- }
- .rotate-guide .guide-wraper span {
- display: block;
- width: 100%;
- height: 30px;
- text-align: center;
- font-size: 28px;
- color: #B0B0B0;
- }
- #ad_container {
- background-color: white;
- position: absolute;
- bottom: 0px;
- width: 100%;
- visibility: hidden;
- z-index: -1;
- }
- </style>
- <link rel="stylesheet" type="text/css" href="js/game2014091601.css" />
- <script type="text/javascript" src="js/game2014091603.js"></script>
- <script type="text/javascript" src="js/qqapi.js?_bid=152"></script>
- </head>
- <body>
- <div id="stage"></div>
- <div id="guide" class="rotate-guide">
- <div id="guide-wraper" class='guide-wraper'>
- <img src="assets/rotate_20140522.png" width="280px" height="175px" />
- <span>竖屏体验更佳</span>
- </div>
- </div>
- <div id="ad_container"></div>
- <script>
- function updateQQShareInfo(lv) {
- }
- function log(content, append) {
- if (append) document.getElementById('debug').innerHTML += content;
- else document.getElementById('debug').innerHTML = content;
- }
- var loader;
- var startScore;
- var _get = getRequest();
- var qzoneVersion = [4, 5];
- var startOrientation = window.orientation;
- isTouch = 3;
- var cdn = '';
- var resizeTime = 500;
- if (ua.indexOf('ucbrowser') != -1) resizeTime = 900;
- var isDebug = false;
- var showFps = false;
- var stage, canvas = document.getElementById('stage'), guide = document.getElementById('guide'), __w, __h, game;
- var App = {
- 'rankIndex': [0, 0],
- 'isMobile': document.ontouchstart === null,
- 'openTime': 0,
- 'limitTime': 500,
- eventClick: 'touchend',
- isStopEevent: function (time) {
- return (Date.now() - App.openTime < (time || App.limitTime)); //面板打开后500秒内不响应交互事件(触摸、单击)
- },
- setOpenTime: function () {
- App.openTime = Date.now(); //面板打开后500秒内不响应交互事件(触摸、单击)
- }
- }
- function go1() {
- //设定缩放比例
- renewIndex();
- game = new Game();
- //alert(document.getElementsByTagName('canvas')[0].width);
- }
- var isAddAD = false;
- var adHeight = 75;
- function addADFun(ad) {
- isAddAD = ad;
- renewIndexFn();
- }
- var renewIndex = renewIndexFn = function (update) {
- __w = App.width = document.body.clientWidth;
- __h = App.height = document.body.clientHeight;
- var ad = document.getElementById('ad_container');//
- adHeight = 75 * __w / 480;
- ad.style['height'] = adHeight + 'px';
- if (isAddAD) {
- ad.style['visibility'] = 'visible';
- ad.style['z-index'] = 0;
- __h -= adHeight;
- } else {
- ad.style['visibility'] = 'hidden';
- ad.style['z-index'] = -1;
- }
- var s = Config.SCALE = __w / 480;
- var l = Config.MARGIN_LEFT = -(480 - __w) / 2;
- var oldHeight = __h;
- canvas.style['-webkit-transform'] = 'scale(' + s + ', ' + s + ')';
- canvas.style['margin-left'] = l + 'px';
- canvas.style['height'] = (oldHeight / s) + 'px';
- canvas.style['margin-top'] = -((oldHeight / s) - oldHeight) / 2 + 'px';
- App.height = oldHeight / s;
- try {
- RankUI.getInstance().resize();
- game && game.resize();
- } catch (e) {
- }
- }
- function guideShow() {
- var ht = document.body.clientHeight;
- var guideScale = ht / 280;
- lib.g('guide-wraper').style['-webkit-transform'] = 'scale(' + guideScale + ',' + guideScale + ')';
- guide.style['height'] = (ht + 80) + 'px';
- guide.style.display = 'block';
- }
- //var startOrientation = top.window.orientation;
- var isOrientation = false;
- if (Math.abs(startOrientation) == 90) {
- guideShow();
- App.isStart = false;
- } else {
- go1();
- guide.style.display = 'none';
- }
- var supportsOrientationChange = ("onorientationchange" in window) && (top.location.href === location.href),
- orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
- var timer = null;
- function resize() {
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- timer = setTimeout(function () {
- renewIndex(true);
- }, resizeTime + 50);
- }
- window.addEventListener('resize', resize, false)
- var timer1 = null;
- window.addEventListener(orientationEvent, function () {
- isOrientation = true;
- if (timer1) {
- clearTimeout(timer1);
- timer1 = null;
- }
- timer1 = setTimeout(function () {
- setViewPort();
- if (Math.abs(window.orientation) == 90) {
- guideShow();
- } else {
- if (App.isStart == false) {
- App.isStart = true;
- go1();
- }
- guide.style.display = 'none';
- }
- }, resizeTime);
- }, false);
- document.addEventListener('touchmove', function (event) { event.preventDefault() }, false);
- function callActionScript() { }
- </script>
- <script type="text/JavaScript">
- window.shareData={
- 'title':'跑酷历险记',
- 'link':'http://game.ikongzhong.cn/games/pklxj/',
- 'imgurl':'http://game.ikongzhong.cn/games/pklxj/icon.png'
- }
- window.shareFriendData={
- 'title':'跑酷历险记',
- 'content':'关注空中传媒网络科技,更多好玩的游戏等着你。',
- 'link':'http://game.ikongzhong.cn/games/pklxj/',
- 'imgurl':'http://game.ikongzhong.cn/games/pklxj/icon.png'
- }
- </script>
- <script type="text/JavaScript" src="http://gc.veiying.cn/code"></script>
- </body>
- </html>
|