├── alipay ├── 靶标系统.png └── index.html ├── assets ├── tank.png ├── alipay.png ├── brush.png ├── heart.png ├── snake.png ├── zhihu.png ├── evan-you.png ├── game2048.png ├── globule.png ├── love-time.png ├── side-text.png ├── universe.png ├── five-chess.png ├── man-down100.png ├── photo-wall.png └── look-def-color.png ├── love-time ├── renxi.mp3 ├── renxi │ ├── default.css │ ├── jscex.min.js │ ├── functions.js │ ├── jscex-builderbase.min.js │ ├── jscex-async-powerpack.min.js │ └── jscex-async.min.js └── index.html ├── photo-wall └── a │ ├── a.mp3 │ ├── 14915.jpg │ ├── iali0.jpg │ ├── iali2.jpg │ ├── iali3.jpg │ ├── iali4.jpg │ ├── iali5.jpg │ ├── iali6.jpg │ ├── iali8.gif │ ├── iali9.jpg │ ├── iali10.gif │ ├── iali11.jpg │ ├── iali12.jpg │ ├── iali14.jpg │ ├── iali16.jpg │ ├── iali18.jpg │ ├── iali19.jpg │ ├── iali20.jpg │ ├── iali21.jpg │ ├── iali22.jpg │ ├── iali24.jpg │ ├── iali25.jpg │ ├── iali29.jpg │ ├── iali30_1.jpg │ ├── iali30_2.jpg │ ├── iali31.jpg │ ├── iali32.jpg │ ├── iali35.jpg │ ├── iali37.jpg │ ├── iali40.jpg │ ├── iali42.jpg │ ├── iali44.jpg │ ├── iali45.jpg │ ├── iali46.jpg │ ├── iali49.jpg │ ├── iali50_1.jpg │ ├── iali50_2.jpg │ ├── iali51.jpg │ ├── iali57.gif │ ├── iali58.jpg │ ├── iali59.png │ ├── iali60.jpg │ ├── iali62.jpg │ ├── iali63.jpg │ ├── iali64.jpg │ ├── iali65.jpg │ ├── iali66.jpg │ ├── iali67.jpg │ ├── iali68.jpg │ ├── iali69.jpg │ ├── iali71.jpg │ ├── iali75.jpg │ ├── iali76.gif │ ├── iali77.jpg │ ├── iali59_002.png │ ├── core.php │ ├── love.js │ └── stat.php ├── tank ├── audio │ ├── move.mp3 │ ├── prop.mp3 │ ├── start.mp3 │ ├── attack.mp3 │ ├── tankCrack.mp3 │ ├── bulletCrack.mp3 │ └── playerCrack.mp3 ├── images │ ├── menu.gif │ ├── Thumbs.db │ └── tankAll.gif ├── js │ ├── num.js │ ├── Helper.js │ ├── keyboard.js │ ├── crackAnimation.js │ ├── menu.js │ ├── stage.js │ ├── const.js │ ├── prop.js │ ├── bullet.js │ ├── map.js │ ├── Collision.js │ └── tank.js └── index.html ├── man-down100 ├── img │ ├── baozi.png │ ├── block.png │ ├── flip.png │ ├── man.png │ ├── move.png │ ├── thorn.png │ ├── game_bg.png │ ├── icons_btn.png │ └── thorn_bg.png ├── css │ ├── myreset.css │ └── index.css ├── index.html └── js │ ├── person.js │ ├── index.js │ └── block.js ├── look-def-color ├── js │ ├── .DS_Store │ ├── color1.js │ ├── app.js │ └── game.js ├── css │ ├── .DS_Store │ └── m.min.css ├── img │ ├── black1.png │ └── black2.png └── index.html ├── five-chess ├── css │ ├── FiveChess.css │ └── myreset.css ├── index.html └── js │ ├── html5.js │ └── FiveChess.js ├── heart ├── style │ ├── default.css │ ├── functions.js │ └── garden.js └── index.html ├── evan-you └── index.html ├── side-text ├── css │ ├── normalize.css │ └── style.css └── index.html ├── globule └── index.html ├── universe └── index.html ├── README.md ├── zhihu └── index.html ├── brush └── index.html └── snake └── index.html /alipay/靶标系统.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/alipay/靶标系统.png -------------------------------------------------------------------------------- /assets/tank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/tank.png -------------------------------------------------------------------------------- /assets/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/alipay.png -------------------------------------------------------------------------------- /assets/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/brush.png -------------------------------------------------------------------------------- /assets/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/heart.png -------------------------------------------------------------------------------- /assets/snake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/snake.png -------------------------------------------------------------------------------- /assets/zhihu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/zhihu.png -------------------------------------------------------------------------------- /assets/evan-you.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/evan-you.png -------------------------------------------------------------------------------- /assets/game2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/game2048.png -------------------------------------------------------------------------------- /assets/globule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/globule.png -------------------------------------------------------------------------------- /assets/love-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/love-time.png -------------------------------------------------------------------------------- /assets/side-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/side-text.png -------------------------------------------------------------------------------- /assets/universe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/universe.png -------------------------------------------------------------------------------- /love-time/renxi.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/love-time/renxi.mp3 -------------------------------------------------------------------------------- /photo-wall/a/a.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/a.mp3 -------------------------------------------------------------------------------- /tank/audio/move.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/move.mp3 -------------------------------------------------------------------------------- /tank/audio/prop.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/prop.mp3 -------------------------------------------------------------------------------- /tank/audio/start.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/start.mp3 -------------------------------------------------------------------------------- /tank/images/menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/images/menu.gif -------------------------------------------------------------------------------- /assets/five-chess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/five-chess.png -------------------------------------------------------------------------------- /assets/man-down100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/man-down100.png -------------------------------------------------------------------------------- /assets/photo-wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/photo-wall.png -------------------------------------------------------------------------------- /photo-wall/a/14915.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/14915.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali0.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali2.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali3.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali4.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali5.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali6.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali8.gif -------------------------------------------------------------------------------- /photo-wall/a/iali9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali9.jpg -------------------------------------------------------------------------------- /tank/audio/attack.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/attack.mp3 -------------------------------------------------------------------------------- /tank/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/images/Thumbs.db -------------------------------------------------------------------------------- /assets/look-def-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/assets/look-def-color.png -------------------------------------------------------------------------------- /man-down100/img/baozi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/baozi.png -------------------------------------------------------------------------------- /man-down100/img/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/block.png -------------------------------------------------------------------------------- /man-down100/img/flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/flip.png -------------------------------------------------------------------------------- /man-down100/img/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/man.png -------------------------------------------------------------------------------- /man-down100/img/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/move.png -------------------------------------------------------------------------------- /man-down100/img/thorn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/thorn.png -------------------------------------------------------------------------------- /photo-wall/a/iali10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali10.gif -------------------------------------------------------------------------------- /photo-wall/a/iali11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali11.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali12.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali14.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali16.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali18.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali19.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali20.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali21.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali22.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali24.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali25.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali29.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali30_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali30_1.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali30_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali30_2.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali31.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali32.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali35.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali37.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali40.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali42.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali44.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali45.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali46.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali49.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali50_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali50_1.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali50_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali50_2.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali51.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali57.gif -------------------------------------------------------------------------------- /photo-wall/a/iali58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali58.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali59.png -------------------------------------------------------------------------------- /photo-wall/a/iali60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali60.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali62.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali62.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali63.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali63.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali64.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali64.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali65.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali65.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali66.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali66.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali67.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali67.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali68.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali68.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali69.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali69.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali71.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali71.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali75.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali75.jpg -------------------------------------------------------------------------------- /photo-wall/a/iali76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali76.gif -------------------------------------------------------------------------------- /photo-wall/a/iali77.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali77.jpg -------------------------------------------------------------------------------- /tank/audio/tankCrack.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/tankCrack.mp3 -------------------------------------------------------------------------------- /tank/images/tankAll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/images/tankAll.gif -------------------------------------------------------------------------------- /look-def-color/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/look-def-color/js/.DS_Store -------------------------------------------------------------------------------- /man-down100/img/game_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/game_bg.png -------------------------------------------------------------------------------- /photo-wall/a/iali59_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/photo-wall/a/iali59_002.png -------------------------------------------------------------------------------- /tank/audio/bulletCrack.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/bulletCrack.mp3 -------------------------------------------------------------------------------- /tank/audio/playerCrack.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/tank/audio/playerCrack.mp3 -------------------------------------------------------------------------------- /look-def-color/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/look-def-color/css/.DS_Store -------------------------------------------------------------------------------- /look-def-color/img/black1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/look-def-color/img/black1.png -------------------------------------------------------------------------------- /look-def-color/img/black2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/look-def-color/img/black2.png -------------------------------------------------------------------------------- /man-down100/img/icons_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/icons_btn.png -------------------------------------------------------------------------------- /man-down100/img/thorn_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bxm0927/canvas-special/HEAD/man-down100/img/thorn_bg.png -------------------------------------------------------------------------------- /five-chess/css/FiveChess.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | body { 3 | background: #ccc; 4 | } 5 | canvas { 6 | position: absolute; 7 | top: 50%; 8 | left: 50%; 9 | margin: -225px 0 0 -225px; 10 | background: #fff; 11 | box-shadow: 5px 5px 100px #aaa; 12 | } -------------------------------------------------------------------------------- /tank/js/num.js: -------------------------------------------------------------------------------- 1 | var Num = function(context){ 2 | this.ctx = context; 3 | this.size = 14; 4 | 5 | this.draw = function(num,x,y){ 6 | var tempX = x; 7 | var tempY = y; 8 | var tempNumArray = []; 9 | if(num == 0){ 10 | tempNumArray.push(0); 11 | }else{ 12 | while(num > 0){ 13 | tempNumArray.push(num % 10); 14 | num = parseInt(num/10); 15 | } 16 | } 17 | for(var i=tempNumArray.length-1;i>=0;i--){ 18 | tempX = x+(tempNumArray.length-i-1) * this.size; 19 | this.ctx.drawImage(RESOURCE_IMAGE,POS["num"][0]+tempNumArray[i]*14,POS["num"][1],this.size, this.size,tempX, tempY,this.size, this.size); 20 | 21 | } 22 | }; 23 | 24 | }; -------------------------------------------------------------------------------- /man-down100/css/myreset.css: -------------------------------------------------------------------------------- 1 | /* 维护:白小明 2 | * 版本:v1.0 | 2016.12.01 3 | * 理念:清除和重置是紧密不可分的 4 | * 特色:适应中文,基于最新主流浏览器*/ 5 | 6 | /* 清除内外边距 */ 7 | @charset "utf-8"; 8 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, 9 | pre,dl, dt, dd, ul, ol, li, 10 | fieldset, lengend, button, input, textarea, 11 | th, td { margin: 0; padding: 0; } 12 | 13 | /* 重置格式元素 */ 14 | ul, ol { list-style: none; } 15 | a { text-decoration: none; } 16 | a:hover { text-decoration: underline; } 17 | q:before, q:after { content: ''; } 18 | 19 | /* 重置表单元素 */ 20 | legend { color: #000; } /* for ie6 */ 21 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 22 | 23 | /* 重置表格元素 */ 24 | table { border-collapse: collapse; border-spacing: 0; } -------------------------------------------------------------------------------- /five-chess/css/myreset.css: -------------------------------------------------------------------------------- 1 | /* 2 | 维护:白小明 3 | 版本:v1.0 | 2016113 4 | 理念:清除和重置是紧密不可分的 5 | 特色:适应中文,基于最新主流浏览器 6 | */ 7 | 8 | /* 清除内外边距 */ 9 | @charset "utf-8"; 10 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, 11 | pre,dl, dt, dd, ul, ol, li, 12 | fieldset, lengend, button, input, textarea, 13 | th, td { margin: 0; padding: 0; } 14 | 15 | /* 重置格式元素 */ 16 | ul, ol { list-style: none; } 17 | a { text-decoration: none; } 18 | a:hover { text-decoration: underline; } 19 | q:before, q:after { content: ''; } 20 | 21 | /* 重置表单元素 */ 22 | legend { color: #000; } /* for ie6 */ 23 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 24 | 25 | /* 重置表格元素 */ 26 | table { border-collapse: collapse; border-spacing: 0; } -------------------------------------------------------------------------------- /love-time/renxi/default.css: -------------------------------------------------------------------------------- 1 | body{margin:0;padding:0;background:#ffe;font-size:14px;font-family:'微软雅黑','宋体',sans-serif;color:#231F20;overflow:auto} 2 | a {color:#000;font-size:14px;} 3 | #main{width:100%;} 4 | #wrap{position:relative;margin:0 auto;width:1100px;height:680px;margin-top:10px;} 5 | #text{width:400px;height:425px;left:60px;top:80px;position:absolute;} 6 | #code{display:none;font-size:16px;} 7 | #clock-box {position:absolute;left:60px;top:550px;font-size:28px;display:none;} 8 | #clock-box a {font-size:28px;text-decoration:none;} 9 | #clock{margin-left:48px;} 10 | #clock .digit {font-size:64px;} 11 | #canvas{margin:0 auto;width:1100px;height:680px;} 12 | #error{margin:0 auto;text-align:center;margin-top:60px;display:none;} 13 | .hand{cursor:pointer;} 14 | .say{margin-left:5px;} 15 | .space{margin-right:150px;} 16 | -------------------------------------------------------------------------------- /love-time/renxi/jscex.min.js: -------------------------------------------------------------------------------- 1 | (function(){var b={DEBUG:1,INFO:2,WARN:3,ERROR:4},d=function(){this.level=b.WARN};d.prototype={log:function(a){try{console.log(a)}catch(b){}},debug:function(a){this.level<=b.DEBUG&&this.log(a)},info:function(a){this.level<=b.INFO&&this.log(a)},warn:function(a){this.level<=b.WARN&&this.log(a)},error:function(a){this.level<=b.ERROR&&this.log(a)}};var e=function(a){var b=[],c;for(c in a)b.push(c);return b},c=function(a){a._forInKeys=e;a.Logging={Logger:d,Level:b};a.logger=new d;a.modules={};a.binders= 2 | {};a.builders={}},f=typeof define==="function"&&!define.amd,g=typeof require==="function"&&typeof define==="function"&&define.amd;typeof require==="function"&&typeof module!=="undefined"&&module.exports?c(module.exports):f?define("jscex",function(a,b,d){c(d.exports)}):g?define("jscex",function(){var a={};c(a);return a}):(typeof Jscex=="undefined"&&(Jscex={}),c(Jscex))})(); 3 | -------------------------------------------------------------------------------- /five-chess/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 |
18 | 19 | Your browser does not support the Canvas API. 20 | Please upgrade your browser. 21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /tank/js/Helper.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 数组删除某个元素 4 | * @param arg 元素 5 | * @returns 6 | */ 7 | Array.prototype.remove = function(arg){ 8 | var i=0,n=0; 9 | var arrSize = this.length; 10 | for(i=0;i this.frame * gaptime - parseInt(gaptime/2)){ 32 | this.tempDir = -1; 33 | } 34 | if(this.times <= 0){ 35 | this.isOver = true; 36 | } 37 | }; 38 | }; -------------------------------------------------------------------------------- /tank/js/menu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 游戏开始菜单 3 | **/ 4 | 5 | var Menu = function(context){ 6 | this.ctx = context; 7 | this.x = 0; 8 | this.y = SCREEN_HEIGHT; 9 | this.selectTank = new SelectTank(); 10 | this.playNum = 1; 11 | this.times = 0; 12 | 13 | /** 14 | * 画菜单 15 | */ 16 | this.draw = function(){ 17 | this.times ++ ; 18 | var temp = 0; 19 | if( parseInt(this.times / 6) % 2 == 0){ 20 | temp = 0; 21 | }else{ 22 | temp = this.selectTank.size; 23 | } 24 | if(this.y <= 0){ 25 | this.y = 0; 26 | }else{ 27 | this.y -= 5; 28 | } 29 | this.ctx.clearRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); 30 | this.ctx.save(); 31 | //画背景 32 | this.ctx.drawImage(MENU_IMAGE, this.x, this.y); 33 | //画选择坦克 34 | this.ctx.drawImage(RESOURCE_IMAGE,POS["selectTank"][0],POS["selectTank"][1] + temp,this.selectTank.size,this.selectTank.size, 35 | this.selectTank.x,this.y + this.selectTank.ys[this.playNum-1],this.selectTank.size,this.selectTank.size); 36 | this.ctx.restore(); 37 | }; 38 | 39 | /** 40 | * 选择坦克上下移动 41 | */ 42 | this.next = function(n){ 43 | this.playNum += n; 44 | if(this.playNum > 2){ 45 | this.playNum = 1; 46 | }else if(this.playNum < 1){ 47 | this.playNum = 2; 48 | } 49 | }; 50 | }; -------------------------------------------------------------------------------- /man-down100/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 是男人就下100层 6 | 7 | 8 | 9 | 10 |
11 | 12 | 你的浏览器不支持 canvas 标签,请更新你的浏览器! 13 | 14 | 15 |
16 | 17 |
18 | 19 |
20 | 第 0 层 21 |
22 | 23 |
24 | 25 | 加载中... 26 |
27 | 28 |
29 | 30 |

31 | 32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /tank/js/stage.js: -------------------------------------------------------------------------------- 1 | 2 | var Stage = function(context,l){ 3 | this.ctx = context; 4 | this.ctx.fillStyle = "#7f7f7f"; 5 | this.drawHeigth = 15; 6 | this.level = l; 7 | this.temp = 0; 8 | this.dir = 1; //中间切换的方向,1:合上,2:展开 9 | this.isReady = false;//标识地图是否已经画好 10 | this.levelNum = new Num(context); 11 | 12 | this.init = function(level){ 13 | this.dir = 1; 14 | this.isReady = false; 15 | this.level = level; 16 | this.temp = 0; 17 | }; 18 | 19 | this.draw = function(){ 20 | if(this.dir == 1){ 21 | 22 | //temp = 15*15 灰色屏幕已经画完 23 | if(this.temp == 225){ 24 | //78,14为STAGE字样在图片资源中的宽和高,194,208为canvas中的位置 25 | this.ctx.drawImage(RESOURCE_IMAGE, POS["stageLevel"][0], POS["stageLevel"][1], 78, 14, 194, 208, 78, 14); 26 | //14为数字的宽和高,308, 208为canvas中的位置 27 | this.levelNum.draw(this.level,308, 208); 28 | //this.ctx.drawImage(RESOURCE_IMAGE,POS["num"][0]+this.level*14,POS["num"][1],14, 14,308, 208,14, 14); 29 | //绘制地图,调用main里面的方法 30 | initMap(); 31 | 32 | }else if(this.temp == 225 + 600){ 33 | //600即调用了600/15次,主要用来停顿 34 | this.temp = 225; 35 | this.dir = -1; 36 | START_AUDIO.play(); 37 | }else{ 38 | this.ctx.fillRect(0, this.temp, 512, this.drawHeigth); 39 | this.ctx.fillRect(0, 448 - this.temp - this.drawHeigth , 512, this.drawHeigth); 40 | } 41 | }else{ 42 | if(this.temp >= 0){ 43 | this.ctx.clearRect(0, this.temp , 512, this.drawHeigth); 44 | this.ctx.clearRect(0, 448 - this.temp - this.drawHeigth, 512, this.drawHeigth); 45 | }else{ 46 | this.isReady = true; 47 | } 48 | } 49 | this.temp += this.drawHeigth * this.dir; 50 | }; 51 | }; -------------------------------------------------------------------------------- /evan-you/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 | 11 | 12 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /look-def-color/js/color1.js: -------------------------------------------------------------------------------- 1 | !function() { 2 | var box = $("#box"), span = "span", 3 | e = { 4 | lvT: _lang[_config.lang].lv_txt, 5 | render: function(e, f) { 6 | var g = _config.color.lvMap[f] || _.last(_config.color.lvMap); 7 | this.d = 15 * Math.max(9 - g, 1); 8 | this.d = f > 20 ? 10 : this.d; 9 | this.d = f > 40 ? 8 : this.d; 10 | this.d = f > 50 ? 5 : this.d; 11 | var h = Math.floor(Math.random() * e * e), 12 | i = this.getColor(255 - this.d), //干扰色 13 | j = this.getLvColor(i[0]); //目标颜色 14 | 15 | box.find(span).css("background-color", i[1]); 16 | box.find(span).eq(h).css("background-color", j[1]).data("type", "a"); 17 | 18 | 19 | },getColor: function(a) { 20 | var b = [ 21 | Math.round(Math.random() * a), 22 | Math.round(Math.random() * a), 23 | Math.round(Math.random() * a) 24 | ], 25 | c = "rgb(" + b.join(",") + ")"; 26 | return [b, c] 27 | },getLvColor: function(a) { 28 | var b = this.d, c = _.map(a, function(a) { 29 | return a + b + 10 30 | }), 31 | d = "rgb(" + c.join(",") + ")"; 32 | return [c, d] 33 | }, 34 | getGameOverText: function(lv) { 35 | var b = 20 > lv ? 0 : Math.ceil((lv - 20) / 10); 36 | var c = this.lvT[b] || _.last(this.lvT); 37 | var d = c+"lv"+lv; 38 | return {txt: d} 39 | }}; 40 | API.color = e 41 | }(); -------------------------------------------------------------------------------- /tank/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 30 |
31 |

操作说明:玩家1:wasd上左下右,space射击;玩家2:方向键,enter射击。n下一关,p上一关。

32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 |
40 |
41 | 42 |
43 |
44 |

来源:源码之家

45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /love-time/renxi/functions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * http://love.hackerzhou.me 3 | */ 4 | 5 | // variables 6 | var $win = $(window); 7 | var clientWidth = $win.width(); 8 | var clientHeight = $win.height(); 9 | 10 | $(window).resize(function() { 11 | var newWidth = $win.width(); 12 | var newHeight = $win.height(); 13 | if (newWidth != clientWidth && newHeight != clientHeight) { 14 | location.replace(location); 15 | } 16 | }); 17 | 18 | (function($) { 19 | $.fn.typewriter = function() { 20 | this.each(function() { 21 | var $ele = $(this), str = $ele.html(), progress = 0; 22 | $ele.html(''); 23 | var timer = setInterval(function() { 24 | var current = str.substr(progress, 1); 25 | if (current == '<') { 26 | progress = str.indexOf('>', progress) + 1; 27 | } else { 28 | progress++; 29 | } 30 | $ele.html(str.substring(0, progress) + (progress & 1 ? '_' : '')); 31 | if (progress >= str.length) { 32 | clearInterval(timer); 33 | } 34 | }, 75); 35 | }); 36 | return this; 37 | }; 38 | })(jQuery); 39 | 40 | function timeElapse(date){ 41 | var current = Date(); 42 | var seconds = (Date.parse(current) - Date.parse(date)) / 1000; 43 | var days = Math.floor(seconds / (3600 * 24)); 44 | seconds = seconds % (3600 * 24); 45 | var hours = Math.floor(seconds / 3600); 46 | if (hours < 10) { 47 | hours = "0" + hours; 48 | } 49 | seconds = seconds % 3600; 50 | var minutes = Math.floor(seconds / 60); 51 | if (minutes < 10) { 52 | minutes = "0" + minutes; 53 | } 54 | seconds = seconds % 60; 55 | if (seconds < 10) { 56 | seconds = "0" + seconds; 57 | } 58 | var result = "第 " + days + "" + hours + " 小时 " + minutes + " 分钟 " + seconds + " 秒"; 59 | $("#clock").html(result); 60 | } 61 | -------------------------------------------------------------------------------- /side-text/css/normalize.css: -------------------------------------------------------------------------------- 1 | html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} 2 | -------------------------------------------------------------------------------- /love-time/renxi/jscex-builderbase.min.js: -------------------------------------------------------------------------------- 1 | (function(){var j=function(){};j.prototype={Loop:function(b,c,a,d){return{next:function(e,i){var f=function(b){a.next(e,function(a,e){if(a=="normal"||a=="continue")g(b);else if(a=="throw"||a=="return")i(a,e);else if(a=="break")i("normal");else throw Error('Invalid type for "Loop": '+a);})},g=function(a){try{c&&!a&&c.call(e),!b||b.call(e)?f(!1):i("normal")}catch(d){i("throw",d)}};d?f(!0):g(!0)}}},Delay:function(b){return{next:function(c,a){try{b.call(c).next(c,a)}catch(d){a("throw",d)}}}},Combine:function(b, 2 | c){return{next:function(a,d){b.next(a,function(b,i,f){if(b=="normal")try{c.next(a,d)}catch(g){d("throw",g)}else d(b,i,f)})}}},Return:function(b){return{next:function(c,a){a("return",b)}}},Normal:function(){return{next:function(b,c){c("normal")}}},Break:function(){return{next:function(b,c){c("break")}}},Continue:function(){return{next:function(b,c){c("continue")}}},Throw:function(b){return{next:function(c,a){a("throw",b)}}},Try:function(b,c,a){return{next:function(d,e){b.next(d,function(b,f,g){if(b!= 3 | "throw"||!c)a?a.next(d,function(a,c,d){a=="normal"?e(b,f,g):e(a,c,d)}):e(b,f,g);else if(c){var h;try{h=c.call(d,f)}catch(j){a?a.next(d,function(a,b,c){a=="normal"?e("throw",j):e(a,b,c)}):e("throw",j)}h&&h.next(d,function(b,c,f){b=="throw"?a?a.next(d,function(a,d,g){a=="normal"?e(b,c,f):e(a,d,g)}):e(b,c,f):a?a.next(d,function(a,d,g){a=="normal"?e(b,c,f):e(a,d,g)}):e(b,c,f)})}else a.next(d,function(a,c,d){a=="normal"?e(b,f,g):e(a,c,d)})})}}}};var h=function(b){if(!b.modules)b.modules={};if(!b.modules.builderbase)b.modules.builderbase= 4 | !0,b.BuilderBase=j},k=typeof define==="function"&&!define.amd,l=typeof require==="function"&&typeof define==="function"&&define.amd;if(typeof require==="function"&&typeof module!=="undefined"&&module.exports)module.exports.init=h;else if(k)define("jscex-builderbase",function(b,c,a){a.exports.init=h});else if(l)define("jscex-builderbase",function(){return{init:h}});else{if(typeof Jscex==="undefined")throw Error('Missing the root object, please load "jscex" module first.');h(Jscex)}})(); 5 | -------------------------------------------------------------------------------- /alipay/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 62 | 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | 72 |
73 | 74 | 75 |
76 | 77 | 90 | 91 | -------------------------------------------------------------------------------- /tank/js/const.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 静态变量 3 | */ 4 | 5 | var SCREEN_WIDTH = 512; //屏幕宽 6 | var SCREEN_HEIGHT = 448;//屏幕高 7 | 8 | 9 | /**************图片资源*****************/ 10 | var MENU_IMAGE = new Image(); 11 | MENU_IMAGE.src = "images/menu.gif"; 12 | var RESOURCE_IMAGE = new Image(); 13 | RESOURCE_IMAGE.src = "images/tankAll.gif"; 14 | 15 | 16 | /**************各个图块在图片中的位置*****************/ 17 | var POS = new Array(); 18 | POS["selectTank"] = [128,96]; 19 | POS["stageLevel"] = [396,96]; 20 | POS["num"] = [256,96]; 21 | POS["map"] = [0,96]; 22 | POS["home"] = [256,0]; 23 | POS["score"] = [0,112]; 24 | POS["player"] = [0,0]; 25 | POS["protected"] = [160,96]; 26 | POS["enemyBefore"] = [256,32]; 27 | POS["enemy1"] = [0,32]; 28 | POS["enemy2"] = [128,32]; 29 | POS["enemy3"] = [0,64]; 30 | POS["bullet"] = [80,96]; 31 | POS["tankBomb"] = [0,160]; 32 | POS["bulletBomb"] = [320,0]; 33 | POS["over"] = [384,64]; 34 | POS["prop"] = [256,110]; 35 | 36 | /**************声音资源*****************/ 37 | var START_AUDIO = new Audio("audio/start.mp3"); 38 | var BULLET_DESTROY_AUDIO = new Audio("audio/bulletCrack.mp3"); 39 | var TANK_DESTROY_AUDIO = new Audio("audio/tankCrack.mp3"); 40 | var PLAYER_DESTROY_AUDIO = new Audio("audio/playerCrack.mp3"); 41 | var MOVE_AUDIO = new Audio("audio/move.mp3"); 42 | var ATTACK_AUDIO = new Audio("audio/attack.mp3"); 43 | var PROP_AUDIO = new Audio("audio/prop.mp3"); 44 | 45 | 46 | /**************游戏状态*****************/ 47 | var GAME_STATE_MENU = 0; 48 | var GAME_STATE_INIT = 1; 49 | var GAME_STATE_START = 2; 50 | var GAME_STATE_OVER = 3; 51 | var GAME_STATE_WIN = 4; 52 | 53 | /**************地图块*****************/ 54 | var WALL = 1; 55 | var GRID = 2; 56 | var GRASS = 3; 57 | var WATER = 4; 58 | var ICE = 5; 59 | var HOME = 9; 60 | var ANOTHREHOME = 8; 61 | 62 | /**************坦克及子弹的四个方向*****************/ 63 | var UP = 0; 64 | var DOWN = 1; 65 | var LEFT = 2; 66 | var RIGHT = 3; 67 | 68 | /**************坦克及子弹的四个方向*****************/ 69 | var ENEMY_LOCATION = [192,0,384]; //相对与主游戏区 70 | 71 | /**************子弹类型*****************/ 72 | var BULLET_TYPE_PLAYER = 1; 73 | var BULLET_TYPE_ENEMY = 2; 74 | /**************爆炸类型****************/ 75 | var CRACK_TYPE_TANK = "tank"; 76 | var CRACK_TYPE_BULLET = "bullet"; 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /tank/js/prop.js: -------------------------------------------------------------------------------- 1 | 2 | var Prop = function(context){ 3 | this.x = 0; 4 | this.y = 0; 5 | this.duration = 600; 6 | this.type = 0; 7 | this.hit = false; 8 | this.width = 30; 9 | this.height = 28; 10 | this.ctx = context; 11 | this.isDestroyed = false; 12 | this.size = 28; 13 | 14 | this.init = function(){ 15 | this.ctx.clearRect(this.x,this.y,this.width,this.height); 16 | this.duration = 600; 17 | this.type = parseInt(Math.random() * 6); 18 | this.x = parseInt(Math.random() * 384)+map.offsetX; 19 | this.y = parseInt(Math.random() * 384)+map.offsetY; 20 | this.isDestroyed = false; 21 | }; 22 | 23 | this.draw = function(){ 24 | if(this.duration > 0 && !this.isDestroyed){ 25 | this.ctx.drawImage(RESOURCE_IMAGE,POS["prop"][0]+this.type*this.width,POS["prop"][1],this.width,this.height,this.x,this.y,this.width,this.height); 26 | this.duration -- ; 27 | this.isHit(); 28 | }else{ 29 | this.ctx.clearRect(this.x,this.y,this.width,this.height); 30 | this.isDestroyed = true; 31 | } 32 | }; 33 | 34 | this.isHit = function(){ 35 | var player = null; 36 | if(player1.lives > 0 && CheckIntersect(this,player1,0)){ 37 | this.hit = true; 38 | player = player1; 39 | }else if(player2.lives > 0 && CheckIntersect(this,player2,0)){ 40 | this.hit = true; 41 | player = player2; 42 | } 43 | if(this.hit){ 44 | PROP_AUDIO.play(); 45 | this.isDestroyed = true; 46 | this.ctx.clearRect(this.x,this.y,this.width,this.height); 47 | switch(this.type){ 48 | case 0: 49 | player.lives ++; 50 | break; 51 | case 1: 52 | emenyStopTime = 500; 53 | break; 54 | case 2: 55 | var mapChangeIndex = [[23,11],[23,12],[23,13],[23,14],[24,11],[24,14],[25,11],[25,14]]; 56 | map.updateMap(mapChangeIndex,GRID); 57 | homeProtectedTime = 500; 58 | break; 59 | case 3: 60 | if(enemyArray != null || enemyArray.length > 0){ 61 | for(var i=0;iarticle,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); 8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d"):a=""+m+"",n.createIcon([a])))}(); 2 | (function(){function n(){this.c()}var p=['http://aijava.cn/','http://aijava.cn/*.html'],e=document,g=window,m=encodeURIComponent,q="unknow",l=null;n.prototype={c:function(){if(!1===this.d())return!1;var a;this.a(e,"mousedown",this.b);a=g.navigator.userAgent;l=e.documentElement&&0!==e.documentElement.clientHeight?e.documentElement:e.body;a=a?a.toLowerCase().replace(/-/g,""):"";for(var b="netscape;se 1.;se 2.;saayaa;360se;tencent;qqbrowser;mqqbrowser;maxthon;myie;theworld;konqueror;firefox;chrome;safari;msie 5.0;msie 5.5;msie 6.0;msie 7.0;msie 8.0;msie 9.0;msie 10.0;Mozilla;opera".split(";"), 3 | d=0;d 2 | 3 | 4 | 5 | 6 | Canvas_鼠标移动炫彩小球 7 | 20 | 21 | 22 | 23 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /heart/style/functions.js: -------------------------------------------------------------------------------- 1 | /*Download by http://www.codefans.net*/ 2 | var $window=$(window),gardenCtx,gardenCanvas,$garden,garden;var clientWidth=$(window).width();var clientHeight=$(window).height();$(function(){$loveHeart=$("#loveHeart");var a=$loveHeart.width()/2;var b=$loveHeart.height()/2-55;$garden=$("#garden");gardenCanvas=$garden[0];gardenCanvas.width=$("#loveHeart").width();gardenCanvas.height=$("#loveHeart").height();gardenCtx=gardenCanvas.getContext("2d");gardenCtx.globalCompositeOperation="lighter";garden=new Garden(gardenCtx,gardenCanvas);$("#content").css("width",$loveHeart.width()+$("#code").width());$("#content").css("height",Math.max($loveHeart.height(),$("#code").height()));$("#content").css("margin-top",Math.max(($window.height()-$("#content").height())/2,10));$("#content").css("margin-left",Math.max(($window.width()-$("#content").width())/2,10));setInterval(function(){garden.render()},Garden.options.growSpeed)});$(window).resize(function(){var b=$(window).width();var a=$(window).height();if(b!=clientWidth&&a!=clientHeight){location.replace(location)}});function getHeartPoint(c){var b=c/Math.PI;var a=19.5*(16*Math.pow(Math.sin(b),3));var d=-20*(13*Math.cos(b)-5*Math.cos(2*b)-2*Math.cos(3*b)-Math.cos(4*b));return new Array(offsetX+a,offsetY+d)}function startHeartAnimation(){var c=50;var d=10;var b=new Array();var a=setInterval(function(){var h=getHeartPoint(d);var e=true;for(var f=0;f=30){clearInterval(a);showMessages()}else{d+=0.2}},c)}(function(a){a.fn.typewriter=function(){this.each(function(){var d=a(this),c=d.html(),b=0;d.html("");var e=setInterval(function(){var f=c.substr(b,1);if(f=="<"){b=c.indexOf(">",b)+1}else{b++}d.html(c.substring(0,b)+(b&1?"_":""));if(b>=c.length){clearInterval(e)}},75)});return this}})(jQuery);function timeElapse(c){var e=Date();var f=(Date.parse(e)-Date.parse(c))/1000;var g=Math.floor(f/(3600*24));f=f%(3600*24);var b=Math.floor(f/3600);if(b<10){b="0"+b}f=f%3600;var d=Math.floor(f/60);if(d<10){d="0"+d}f=f%60;if(f<10){f="0"+f}var a=''+g+' days '+b+' hours '+d+' minutes '+f+" seconds";$("#elapseClock").html(a)}function showMessages(){$("#messages").fadeIn(5000,function(){showLoveU()})}function adjustWordsPosition(){$("#words").css("position","absolute");$("#words").css("top",$("#garden").position().top+195);$("#words").css("left",$("#garden").position().left+70)}function adjustCodePosition(){$("#code").css("margin-top",($("#garden").height()-$("#code").height())/2)}function showLoveU(){$("#loveu").fadeIn(3000)}; -------------------------------------------------------------------------------- /universe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 106 | 107 | 108 |
    109 |
  • 110 |
  • 111 |
  • 112 |
  • 113 |
  • 114 |
  • 115 |
  • 116 |
  • 117 |
  • 118 |
  • 119 |
120 | 121 | -------------------------------------------------------------------------------- /tank/js/bullet.js: -------------------------------------------------------------------------------- 1 | 2 | var Bullet = function(context,owner,type,dir){ 3 | this.ctx = context; 4 | this.x = 0; 5 | this.y = 0; 6 | this.owner = owner; //子弹的所属者 7 | this.type = type;//1、玩家 2、敌方 8 | this.dir = dir; 9 | this.speed = 3; 10 | this.size = 6; 11 | this.hit = false; 12 | this.isDestroyed = false; 13 | 14 | this.draw = function(){ 15 | this.ctx.drawImage(RESOURCE_IMAGE,POS["bullet"][0]+this.dir*this.size,POS["bullet"][1],this.size,this.size,this.x,this.y,this.size,this.size); 16 | this.move(); 17 | }; 18 | 19 | this.move = function(){ 20 | if(this.dir == UP){ 21 | this.y -= this.speed; 22 | }else if(this.dir == DOWN){ 23 | this.y += this.speed; 24 | }else if(this.dir == RIGHT){ 25 | this.x += this.speed; 26 | }else if(this.dir == LEFT){ 27 | this.x -= this.speed; 28 | } 29 | 30 | this.isHit(); 31 | }; 32 | 33 | /** 34 | * 碰撞检测 35 | */ 36 | this.isHit = function(){ 37 | if(this.isDestroyed){ 38 | return; 39 | } 40 | //临界检测 41 | if(this.x < map.offsetX){ 42 | this.x = map.offsetX; 43 | this.hit = true; 44 | }else if(this.x > map.offsetX + map.mapWidth - this.size){ 45 | this.x = map.offsetX + map.mapWidth - this.size; 46 | this.hit = true; 47 | } 48 | if(this.y < map.offsetY){ 49 | this.y = map.offsetY; 50 | this.hit = true; 51 | }else if(this.y > map.offsetY + map.mapHeight - this.size){ 52 | this.y = map.offsetY + map.mapHeight - this.size; 53 | this.hit = true; 54 | } 55 | //子弹是否碰撞了其他子弹 56 | if(!this.hit){ 57 | if(bulletArray != null && bulletArray.length > 0){ 58 | for(var i=0;i 0){ 76 | for(var i=0;i 1){ 81 | enemyObj.lives --; 82 | }else{ 83 | enemyObj.distroy(); 84 | } 85 | this.hit = true; 86 | break; 87 | } 88 | } 89 | } 90 | }else if(this.type == BULLET_TYPE_ENEMY){ 91 | if(player1.lives > 0 && CheckIntersect(this,player1,0)){ 92 | if(!player1.isProtected && !player1.isDestroyed){ 93 | player1.distroy(); 94 | } 95 | this.hit = true; 96 | }else if(player2.lives > 0 && CheckIntersect(this,player2,0)){ 97 | if(!player2.isProtected && !player2.isDestroyed){ 98 | player2.distroy(); 99 | } 100 | this.hit = true; 101 | } 102 | } 103 | } 104 | 105 | 106 | if(this.hit){ 107 | this.distroy(); 108 | } 109 | }; 110 | 111 | /** 112 | * 销毁 113 | */ 114 | this.distroy = function(){ 115 | this.isDestroyed = true; 116 | crackArray.push(new CrackAnimation(CRACK_TYPE_BULLET,this.ctx,this)); 117 | if(!this.owner.isAI){ 118 | BULLET_DESTROY_AUDIO.play(); 119 | } 120 | }; 121 | 122 | 123 | }; -------------------------------------------------------------------------------- /heart/style/garden.js: -------------------------------------------------------------------------------- 1 | /*Download by http://www.codefans.net*/ 2 | function Vector(a,b){this.x=a;this.y=b}Vector.prototype={rotate:function(b){var a=this.x;var c=this.y;this.x=Math.cos(b)*a-Math.sin(b)*c;this.y=Math.sin(b)*a+Math.cos(b)*c;return this},mult:function(a){this.x*=a;this.y*=a;return this},clone:function(){return new Vector(this.x,this.y)},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},subtract:function(a){this.x-=a.x;this.y-=a.y;return this},set:function(a,b){this.x=a;this.y=b;return this}};function Petal(a,f,b,e,c,d){this.stretchA=a;this.stretchB=f;this.startAngle=b;this.angle=e;this.bloom=d;this.growFactor=c;this.r=1;this.isfinished=false}Petal.prototype={draw:function(){var a=this.bloom.garden.ctx;var e,d,c,b;e=new Vector(0,this.r).rotate(Garden.degrad(this.startAngle));d=e.clone().rotate(Garden.degrad(this.angle));c=e.clone().mult(this.stretchA);b=d.clone().mult(this.stretchB);a.strokeStyle=this.bloom.c;a.beginPath();a.moveTo(e.x,e.y);a.bezierCurveTo(c.x,c.y,b.x,b.y,d.x,d.y);a.stroke()},render:function(){if(this.r<=this.bloom.r){this.r+=this.growFactor;this.draw()}else{this.isfinished=true}}};function Bloom(e,d,f,a,b){this.p=e;this.r=d;this.c=f;this.pc=a;this.petals=[];this.garden=b;this.init();this.garden.addBloom(this)}Bloom.prototype={draw:function(){var c,b=true;this.garden.ctx.save();this.garden.ctx.translate(this.p.x,this.p.y);for(var a=0;a` 元素用于在网页上绘制图形。这是一个 HTML 图形容器,必须使用脚本来绘制图形。 4 | 5 | **注意**:IE 8 以及更早的版本不支持 `` 元素。 6 | 7 | ## 1. 尤雨溪个人主页炫彩三角纽带效果,点击可变换 8 | 9 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/evan-you) | [演示](https://bxm0927.github.io/canvas-special/evan-you/index.html) ] 10 | 11 | ![](./assets/evan-you.png) 12 | 13 | ## 2. 知乎登录注册页动态离子背景效果 14 | 15 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/zhihu) | [演示](https://bxm0927.github.io/canvas-special/zhihu/index.html) ] 16 | 17 | ![](./assets/zhihu.png) 18 | 19 | ## 3. 基于 canvas 的五子棋完整功能实现 20 | 21 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/five-chess) | [演示](https://bxm0927.github.io/canvas-special/five-chess/index.html) ] 22 | 23 | ![](./assets/five-chess.png) 24 | 25 | ## 4. 基于 canvas 的《是男人就下100层》小游戏完美实现 26 | 27 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/man-down100) | [演示](https://bxm0927.github.io/canvas-special/man-down100/index.html) ] 28 | 29 | ![](./assets/man-down100.png) 30 | 31 | ## 5. 毛笔字书写田字格,可以写字 32 | 33 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/brush) | [演示](https://bxm0927.github.io/canvas-special/brush/index.html) ] 34 | 35 | ![](./assets/brush.png) 36 | 37 | ## 6. 随心而动,随刃而行。输入文字显示动画粒子特效 38 | 39 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/side-text) | [演示](https://bxm0927.github.io/canvas-special/side-text/index.html) ] 40 | 41 | ![](./assets/side-text.png) 42 | 43 | ## 7. 鼠标移动炫彩小球 44 | 45 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/globule) | [演示](https://bxm0927.github.io/canvas-special/globule/index.html) ] 46 | 47 | ![](./assets/globule.png) 48 | 49 | ## 8. 2048 50 | 51 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/game2048) | [演示](https://bxm0927.github.io/canvas-special/game2048/index.html) ] 52 | 53 | ![](./assets/game2048.png) 54 | 55 | ## 9. 贪吃蛇 56 | 57 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/snake) | [演示](https://bxm0927.github.io/canvas-special/snake/index.html) ] 58 | 59 | ![](./assets/snake.png) 60 | 61 | ## 10. 看你有多色 62 | 63 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/look-def-color) | [演示](https://bxm0927.github.io/canvas-special/look-def-color/index.html) ] 64 | 65 | ![](./assets/look-def-color.png) 66 | 67 | ## 11. 坦克大战 68 | 69 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/tank) | [演示](https://bxm0927.github.io/canvas-special/tank/index.html) ] 70 | 71 | ![](./assets/tank.png) 72 | 73 | ## 12. 宇宙行星旋转特效 74 | 75 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/universe) | [演示](https://bxm0927.github.io/canvas-special/universe/index.html) ] 76 | 77 | ![](./assets/universe.png) 78 | 79 | ## 13. 支付宝咻咻咻动画特效 80 | 81 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/alipay) | [演示](https://bxm0927.github.io/canvas-special/alipay/index.html) ] 82 | 83 | ![](./assets/alipay.png) 84 | 85 | ## 14. 程序员表白代码 86 | 87 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/love-time) | [演示](https://bxm0927.github.io/canvas-special/love-time/index.html) ] 88 | 89 | ![](./assets/love-time.png) 90 | 91 | ## 15. 心形文字 92 | 93 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/heart) | [演示](https://bxm0927.github.io/canvas-special/heart/index.html) ] 94 | 95 | ![](./assets/heart.png) 96 | 97 | ## 16. 照片墙 98 | 99 | [ [源码](https://github.com/bxm0927/canvas-special/blob/master/photo-wall) | [演示](https://bxm0927.github.io/canvas-special/photo-wall/index.html) ] 100 | 101 | ![](./assets/photo-wall.png) 102 | 103 | ## License 104 | 105 | The code is available under the [MIT license](https://opensource.org/licenses/MIT). 106 | 107 | 部分收集于网络,侵删。 108 | -------------------------------------------------------------------------------- /side-text/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | HTML5 Canvas粒子效果文字动画特效DEMO演示 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 |
?
24 | 25 |
26 | 27 | 28 |
29 | 30 |
31 |
32 |
CommandsInfoShare
33 | 34 |
35 |
    36 |
  • TextType anythingDemo
  • 37 |
  • Countdown#countdownnumberDemo
  • 38 |
  • Time#timeDemo
  • 39 |
  • Rectangle#rectanglewidth x heightDemo
  • 40 |
  • Circle#circlediameterDemo
  • 41 | 42 |
  • Animatecommand1 |command2Demo
  • 43 |
44 | 45 |
46 |
47 |

Shape Shifter

48 |

49 | An experiment by Kenneth Cachia.
50 |
Font Awesome is being used to render all #icons. 51 |

52 | 53 |

Visit Shape Shifter to use icons.

54 |
55 |
56 | 57 |
58 |
59 |

Sharing

60 |

Simply add ?a= to the current URL to share any static or animated text. Examples:

61 |

62 | www.kennethcachia.com/shape-shifter?a=Hello
63 | www.kennethcachia.com/shape-shifter?a=Hello|#countdown 3 64 |

65 |
66 |
67 |
68 |
69 |
70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /love-time/renxi/jscex-async.min.js: -------------------------------------------------------------------------------- 1 | (function(){var k=function(){};k.prototype={isCancellation:!0,message:"The task has been cancelled."};typeof __jscex__async__taskIdSeed==="undefined"&&(__jscex__async__taskIdSeed=0);var l=function(b){return typeof b.start==="function"&&typeof b.addEventListener==="function"&&typeof b.removeEventListener==="function"&&typeof b.complete==="function"},j=function(b){if(!b.modules.async){var d=function(){};d.prototype={register:function(a){this.isCancellationRequested&&a();if(!this._handlers)this._handlers= 2 | [];this._handlers.push(a)},unregister:function(a){this._handlers&&(a=this._handlers.indexOf(a),a>=0&&this._handlers.splice(a,1))},cancel:function(){if(!this.isCancellationRequested){this.isCancellationRequested=!0;var a=this._handlers;delete this._handlers;for(var f=0;f=0&&c.splice(i,1)}}}};e.create=function(a){return new e(a)};e.isTask=l;var h=function(){};h.prototype={Start:function(a,b){return e.create(function(c){b.next(a,function(a,b){if(a=="normal"||a=="return")c.complete("success",b);else if(a=="throw")c.complete("failure",b);else throw Error("Unsupported type: "+a);})})},Bind:function(a,b){return{next:function(c,e){var d= 6 | function(a){if(a.error)e("throw",a.error);else{var d;try{d=b.call(c,a.result)}catch(h){e("throw",h);return}d.next(c,e)}};a.status=="ready"?(a.addEventListener("complete",d),a.start()):a.status=="running"?a.addEventListener("complete",d):d(a)}}}};for(var g in b.BuilderBase.prototype)h.prototype[g]=b.BuilderBase.prototype[g];if(!b.Async)b.Async={};g=b.Async;g.CancellationToken=d;g.CanceledError=k;g.Task=e;g.AsyncBuilder=h;if(!b.builders)b.builders={};b.binders.async="$await";b.builders.async=new h; 7 | b.modules.async=!0}},m=typeof define==="function"&&!define.amd,n=typeof require==="function"&&typeof define==="function"&&define.amd;if(typeof require==="function"&&typeof module!=="undefined"&&module.exports)module.exports.init=function(b){if(!b.modules.builderbase){if(typeof __dirname==="string")try{require.paths.unshift(__dirname)}catch(d){try{module.paths.unshift(__dirname)}catch(e){}}require("jscex-builderbase").init(b)}j(b)};else if(m)define("jscex-async",["jscex-builderbase"],function(b,d, 8 | e){e.exports.init=function(d){d.modules.builderbase||b("jscex-builderbase").init(d);j(d)}});else if(n)define("jscex-async",["jscex-builderbase"],function(b){return{init:function(d){d.modules.builderbase||b.init(d);j(d)}}});else{if(typeof Jscex==="undefined")throw Error('Missing the root object, please load "jscex" module first.');if(!Jscex.modules.builderbase)throw Error('Missing essential components, please initialize "builderbase" module first.');j(Jscex)}})(); 9 | -------------------------------------------------------------------------------- /look-def-color/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 看你有多色 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
加载中...
21 |
22 |
23 |

看你有多色

24 | 25 |
找出所有色块里颜色不同的一个
26 |
27 | 30 | 33 |
34 |
35 |
36 |
37 | 38 | 得分: 39 | 40 | 1 41 | 42 | 43 | 44 | 45 | 46 | 暂停 47 | 48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |

57 |

再得分,就可再打败万人

58 |
59 | 62 | 65 |
66 | 67 | 更多游戏 68 | 69 |
70 |
71 |
72 |
73 |

74 | 游戏暂停 75 |

76 |
77 | 80 | 83 |
84 | 85 | 更多游戏 86 | 87 |
88 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /look-def-color/js/app.js: -------------------------------------------------------------------------------- 1 | !function() { 2 | var b = { 3 | index: $("#index"), 4 | room: $("#room"), 5 | loading: $("#loading"), 6 | dialog: $("#dialog"), 7 | play: $(".btn-play"), 8 | }, 9 | ua = window.navigator.userAgent.toLowerCase(), 10 | isAndroid = /android/i.test(ua), 11 | isIOS = /iphone|ipad|ipod/i.test(ua), 12 | app = { 13 | init: function() { 14 | this.initEvent(); 15 | this.loading(); 16 | }, 17 | loading: function() { 18 | function a() { 19 | d++, d == 10 && app.render() 20 | } 21 | if (_config.pic.isOpen) 22 | for (var b = ["assets/img/1.png", "assets/img/2.png", "assets/img/3.png", "assets/img/4.png", "assets/img/5.png", "assets/img/6.png", "assets/img/7.png", "assets/img/8.png", "assets/img/9.png", "assets/img/10.png", "assets/img/11.png", "assets/img/12.png", "assets/img/13.png", "assets/img/14.png", "assets/img/15.png", "assets/img/16.png", "assets/img/17.png", "assets/img/18.png"], c = b.length, d = 0, e = 0; c > e; e++) { 23 | var g = new Image; 24 | g.onload = a, g.src = b[e] 25 | } 26 | else 27 | app.render(); 28 | 29 | }, 30 | render: function() { 31 | setTimeout(function() { 32 | b.loading.hide(), b.index.show() 33 | }, 1000) 34 | }, 35 | initEvent: function() { 36 | var clickEvent = "ontouchstart" in document.documentElement ? "touchstart" : "click", 37 | myApp = this; 38 | b.play.on(clickEvent, function() { 39 | var type = $(this).data("type") || "color"; 40 | b.index.hide(), Game.init(type, b.room, myApp) 41 | }); 42 | this.weixinEvent(); 43 | },weixinEvent: function(){ 44 | var h = _lang[_config.lang]; 45 | document.addEventListener("WeixinJSBridgeReady", 46 | function() { 47 | if (WeixinJSBridge) { 48 | WeixinJSBridge.on("menu:share:appmessage", function() { 49 | var a = "color2" == Game.type ? h.share_txt_d : "", 50 | b = Game.lastScore > 0 ? a + h.share_txt1 + Game.lastScore + h.share_txt2 + Game.lastGamePercent + h.share_txt3 + Game.lastGameTxt + h.share_txt4 : shareData.tTitle; 51 | WeixinJSBridge.invoke( 52 | "sendAppMessage", 53 | { 54 | img_url: shareData.imgUrl, 55 | link: shareData.timeLineLink, 56 | desc: shareData.tContent, 57 | title: b 58 | }, function() {}); 59 | }); 60 | WeixinJSBridge.on("menu:share:timeline", function() { 61 | var a = "color2" == Game.type ? h.share_txt_d : "", 62 | b = Game.lastScore > 0 ? a + h.share_txt1 + Game.lastScore + h.share_txt2 + Game.lastGamePercent + h.share_txt3 + Game.lastGameTxt + h.share_txt4 : shareData.tTitle; 63 | WeixinJSBridge.invoke( 64 | "shareTimeline", 65 | { 66 | img_url: shareData.imgUrl, 67 | link: shareData.timeLineLink, 68 | desc: shareData.tContent, 69 | title: b 70 | }, function() {}); 71 | }); 72 | } 73 | }, 74 | false); 75 | }}; 76 | app.init(); 77 | window.API = {} 78 | 79 | 80 | }(); 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /zhihu/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 24 | 25 | 26 | 27 | 28 | 29 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /look-def-color/css/m.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * ------------------------------------------------------------- 3 | * Copyright (c) 2014 boyaa All rights reserved. 4 | * http://html5.boyaa.com/ 5 | * ------------------------------------------------------------- 6 | */ 7 | 8 | 9 | body{background-color:#F06060;color:#fff;font:12px/1.5 '微软雅黑'}body>a{display:none}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.clearfix{zoom:1}.page{position:absolute;top:0;left:0;right:0;bottom:0}.hide{display:none}#loading{display:block;font-size:30px;text-align:center;color:#fff}.coyright{position:absolute;bottom:0;left:0;display:block;width:100%;text-align:center;font-size:14px;color:#FFA1A1}#loading .loading-txt{height:100px;width:100%;position:absolute;top:0;left:0;right:0;bottom:60px;margin:auto}.boyaa_logo{height:50px;width:110px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;border-radius:10px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.5);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.5);box-shadow:1px 1px 3px rgba(0,0,0,.5)}.boyaa_logo img{max-width:100%;border-radius:10px;display:block}.copyright{position:absolute;bottom:0;left:0;width:100%;text-align:center;font-size:16px}#index h1{text-align:center;font-size:30px;padding:30px 0;text-shadow:1px 1px 1px #AB3C3C}#index .btns{text-align:center;position:absolute;bottom:10px;height:210px;width:100%;color:#ddd}#room header{position:absolute;top:0;left:0;width:100%;height:50px;line-height:50px;text-align:center;font-size:16px;color:#FFA1A1}#room header .lv{position:absolute;height:50px;left:10px;top:0}#room header .lv em{font-style:normal}#room header .btn-pause{position:absolute;top:5px;right:10px;height:40px;width:auto;line-height:40px;padding:0 10px;margin:0;color:#fff}#room header .time{font-size:20px;font-weight:700;background-color:#FD9090;color:#FFCACA;padding:0 10px;border-radius:10px}#room header .time.danger{color:#FF0505;background-color:#fff}#help{height:30px;font-size:16px;color:#FFA1A1;text-align:center}#box{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:#ddd;border-radius:10px;padding:10px}#box span{background-color: white; display:block;float:left;border-radius:10px;cursor:pointer;border:5px solid #ddd;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#box span em{height:30%;width:30%;background-color:#fff;border-radius:50%;display:block;position:absolute;left:0;top:0;right:0;bottom:0;margin:auto}#box.lv2 span{width:50%;height:50%}#box.lv3 span{width:33.33%;height:33.33%}#box.lv4 span{width:25%;height:25%}#box.lv5 span{width:20%;height:20%;border-width:3px}#box.lv6 span{width:16.666%;height:16.666%;border-width:3px}#box.lv7 span{width:14.28%;height:14.28%;border-width:3px}#box.lv8 span{width:12.5%;height:12.5%;border-width:3px}#box.lv9 span{width:11.111%;height:11.111%;border-width:3px}#box span img{width:100%}#dialog{background-color:#A74343;padding-top:50px;box-sizing:border-box;-webkit-box-sizing:border-box}#dialog:after{position:absolute;top:0;right:0;display:block;content:'';width:90px;height:75px;}#dialog .inner{height:100%;width:100%;text-align:center;font-size:20px}#dialog .inner .content{padding-top:30px}#dialog .inner h3{line-height:60px;font-size:40px;margin:0;color:#321}#dialog .inner .pause h3{color:#FFE2C5}#dialog .btn{margin:15px auto}#dialog .inner p{margin:0}#dialog .inner-content{height:270px;width:100%;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}.btn{border:none;color:inherit;cursor:pointer;display:inline-block;margin:10px 30px;text-transform:uppercase;letter-spacing:1px;font-weight:700;outline:0;position:relative;background:#FCAD26;border-radius:7px;box-shadow:0 5px #DA9622;font-size:20px;font-family:'微软雅黑';height:50px;width:220px;line-height:50px;-webkit-tap-highlight-color:transparent}.btn.btn-bottom{position:absolute;width:300px;padding:0;bottom:20px;left:50%;margin-left:-150px}.btn.btn-new{background:#5cbcf6;box-shadow:0 5px #49A7DF}#dialog .btn-wrap{width:220px;margin:0 auto}#dialog .btn-wrap .btn{width:105px;float:left}#dialog .btn-wrap .btn.btn-restart{margin-left:10px}#tips{font-size:12px}.boyaa-logo{display:block;height:50px;width:100px;margin:0 auto;-webkit-tap-highlight-color:transparent}.boyaa-logo img{max-width:100%}.banner{width:640px;background-color:#123;max-width:100%;position:absolute;bottom:0;left:0;display:none}.banner img{display:block;max-width:100%}@media all and (orientation:landscape){#room header{height:100%;width:80px}#room header .lv{left:0}#room header .time{display:inline-block;height:50px;width:100%;padding:0;position:absolute;top:50%;left:0;margin-top:-25px}#room header .btn-pause{top:auto;bottom:15px}#box{top:0;left:80px}#dialog{padding-top:0;padding-left:80px}#dialog .inner .content{padding-top:100px}}@media all and (max-width:361px){#box.lv1 span,#box.lv2 span,#box.lv3 span,#box.lv4 span{border-width:2px;border-radius:5px}#box.lv5 span,#box.lv6 span,#box.lv7 span,#box.lv8 span,#box.lv9 span{border-width:1px;border-radius:3px}}.btn-boyaa{text-decoration:none}.btn-boyaa img{height:30px;width:30px;vertical-align:middle;margin-left:10px} -------------------------------------------------------------------------------- /man-down100/css/index.css: -------------------------------------------------------------------------------- 1 | .main{ 2 | background-color:#9dd9ed; 3 | background-image:-webkit-gradient( 4 | linear, 5 | left top, 6 | left bottom, 7 | color-stop(0, #01b9f5), 8 | color-stop(0.51, #9dd9ed) 9 | ); 10 | /* 11 | background-attachment -- 定义背景图片随滚动轴的移动方式 12 | 取值: scroll | fixed | inherit 13 | scroll: 随着页面的滚动轴背景图片将移动 14 | fixed: 随着页面的滚动轴背景图片不会移动 15 | inherit: 继承初始值: scroll 16 | */ 17 | background-attachment:fixed; 18 | height:480px; 19 | width:320px; 20 | position: relative; 21 | left:50%; 22 | margin-left:-160px; 23 | } 24 | .life{ 25 | width:100px; 26 | height:10px; 27 | position: absolute; 28 | /* 29 | 引用方法 30 | z-index : auto | number 31 | auto:默认值。 32 | number: 无单位的整数值,可为负数 。 33 | z-index值较大的元素将叠加在z-index值较小的元素之上。 34 | 对于未指定此属性的定位对象,z-index 值为正数的对象会在其之上, 35 | 而 z-index 值为负数的对象在其之下。 36 | 37 | */ 38 | z-index:2; 39 | left:10px; 40 | top:10px; 41 | border:1px solid #ff9900; 42 | border-radius: 7px; 43 | padding:1px; 44 | background:white; 45 | 46 | } 47 | .life label{ 48 | /*行内块*/ 49 | display: inline-block; 50 | width: 0px; 51 | height:10px; 52 | background-color: #ff9900; 53 | border-radius: 7px; 54 | float:left; 55 | } 56 | .level{ 57 | position: absolute; 58 | z-index:2; 59 | color:white; 60 | font-size:14px; 61 | right:10px; 62 | top:10px; 63 | font-weight:bolder; 64 | } 65 | .level span{ 66 | color: #fb0; 67 | font-weight: bolder; 68 | } 69 | .start_flush{ 70 | position: absolute; 71 | left:0; 72 | top:0; 73 | width:320px; 74 | height:480px; 75 | /* 76 | */ 77 | background:url(../img/game_bg.png) no-repeat; 78 | z-index: 10; 79 | background-size: 320px 480px; 80 | } 81 | .start_btn{ 82 | display: inline-block; 83 | position: absolute; 84 | width:60px; 85 | height:60px; 86 | border:4px solid #364348; 87 | border-radius: 32px; 88 | left:239px; 89 | top:394px; 90 | } 91 | .start_btn:before{ 92 | content:""; 93 | display: inline-block; 94 | position: absolute; 95 | width: 0; 96 | height: 0; 97 | overflow: hidden; 98 | border-top: 20px solid transparent; 99 | border-left: 40px solid #feff01; 100 | border-bottom: 20px solid transparent; 101 | top:9px; 102 | left:15px; 103 | } 104 | .start_btn:active:before{ 105 | border-left-color: #fb0; 106 | } 107 | .end_flush{ 108 | position: absolute; 109 | left:30px; 110 | top:130px; 111 | width:260px; 112 | height:123px; 113 | display: none;/*block none*/ 114 | background-color: white; 115 | border: 1px solid #589300; 116 | border-radius: 20px; 117 | } 118 | .end_flush .icon{ 119 | display:inline-block; 120 | float:left; 121 | width:55px; 122 | height:53px; 123 | background:url(../img/baozi.png) no-repeat; 124 | background-size:55px 106px; 125 | margin: 12px 0 0 12px;/*左上右下*/ 126 | } 127 | .end_flush .icon.happy{ 128 | /* 129 | 不是截取,是位移,坐标是从元素左上方开始算的,第一个0是左边0,第二个是上面0 130 | 0 0 就是不截取 131 | 0 20px 就是左边不动,上面往下移动背景图 20px 132 | 自己试试就明白了。 133 | 追问那要是若是0 -30,左边不动,-30该从哪里算起呢? 134 | 回答 往上方移动30px 135 | */ 136 | background:url(../img/baozi.png) 0 -54px no-repeat; 137 | background-size:55px 107px; 138 | } 139 | .end_flush p{ 140 | display: inline-block; 141 | float:right; 142 | width:170px; 143 | color:#31454c; 144 | margin-right:10px; 145 | font-size: 16px; 146 | font-weight: bolder; 147 | line-height:26px; 148 | } 149 | .end_flush p label{ 150 | color:#ff9900; 151 | } 152 | .end_flush .replay_btn{ 153 | display: inline-block; 154 | position: absolute; 155 | color:#fb0; 156 | /* 157 | 是给文字添加阴影效果 4个值的含义分别是: 158 | 0:阴影水平偏移值(可取正负值); 159 | 1px:阴影垂直偏移值(可取正负值); 160 | 1px:阴影模糊值; 161 | rgba(0,0,0,0.8):阴影颜色; 162 | */ 163 | text-shadow:1px 1px 1px #333333; 164 | bottom:20px; 165 | right:20px; 166 | font-size:16px; 167 | font-weight:bolder; 168 | /* 169 | CSS文字修饰为无;一般用于设置清除超链接的默认下划线 170 | 文字连接的修饰:显示无 171 | */ 172 | text-decoration:none; 173 | line-height:23px; 174 | } 175 | .end_flush .replay_btn:after{ 176 | content:""; 177 | display:inline-block; 178 | /* 179 | background:url(../images/list01.png) no-repeat 0 center; 180 | 的意思是 图像地址 不重复 水平位置0 垂直位置居中 181 | 0 center 的意思就是 水平位置0 垂直位置居中 182 | -4px -3px 的意思就是 水平位置-4px 垂直位置-3px 183 | */ 184 | background:url(../img/icons_btn.png) no-repeat right 0; 185 | /* 186 | background-size可以设置2个值,1个为必填,1个为可选。 187 |    其中第1个值用于指定背景图的width,第2个值用于指定背景图的height, 188 | 如果只给background-size设置1个值,则第2个值默认为auto(cover和contain特定值除外)。 189 | cover: 保持图像本身的宽高比例,将图片缩放到正好完全覆盖定义背景的区域; 190 | contain: 保持图像本身的宽高比例,将图片缩放到宽度或高度正好适应定义背景的区域 191 | */ 192 | background-size: 19px 108px; 193 | width:19px; 194 | height:23px; 195 | float:right; 196 | /* 197 | 这个意思距离右边补距5像素,可跟百分比如(padding-right:5%; 距离右边补5%的距离) 198 | */ 199 | padding-right: 5px; 200 | } -------------------------------------------------------------------------------- /photo-wall/a/love.js: -------------------------------------------------------------------------------- 1 | function onNavigation(a) { 2 | 2 == a.progress && player.pause() 3 | } 4 | 5 | function trim(str){ //删除左右两端的空格 6 | return str.replace(/(^\s*)|(\s*$)/g, ""); 7 | } 8 | 9 | function getUrlParam(name) { 10 | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 11 | var r = window.location.search.substr(1).match(reg); 12 | if (r != null) 13 | return trim(decodeURIComponent(r[2])); 14 | return false; 15 | } 16 | 17 | $(function(){ 18 | var y = getUrlParam("y"),m = getUrlParam("m"),love = getUrlParam("love"),bgmMusic = getUrlParam("bgmMusic"); 19 | for (var a = {}, b = 1; 79 > b; b++){ 20 | var value = getUrlParam("text-" + b); 21 | if(value){ 22 | $("#text-" + b).text(value); 23 | } 24 | if(y){ 25 | $("#text-" + b).text($("#text-" + b).text().replace(/小明/g,y)); 26 | } 27 | if(m){ 28 | $("#text-" + b).text($("#text-" + b).text().replace(/小红/g,m)); 29 | } 30 | if(love){ 31 | $("title").text(y + "❤" + m + love); 32 | } 33 | if(bgmMusic){ 34 | $("#bgmMusic").attr("src",bgmMusic); 35 | $("#text-music").text(bgmMusic); 36 | } 37 | } 38 | $("title").text($("title").text() + " | 永远幸福 (codejie.net)"); 39 | }); 40 | 41 | function getUrl(){ 42 | var url = "http://aijava.cn/demo/love/2014/?y=" + $("#text-75").text() + "&m=" + $("#text-76").text() + "&love=" + $("#text-77").text() + "&bgmMusic" + $("#text-music").text(); 43 | for (var a = {}, b = 1; 10 > b; b++){//url长度限制、取前10个 44 | var value = $("#text-" + b).text(); 45 | if(value){ 46 | url += "&text-" + b + "=" + encodeURIComponent($("#text-" + b).text()); 47 | } 48 | } 49 | return url; 50 | } 51 | 52 | Flowtime.showProgress(!0), Flowtime.addEventListener("flowtimenavigation", onNavigation, !1), Flowtime.start(), $(function () { 53 | $(".nojavascript").remove(), setInterval(function () { 54 | $(".showtip").removeClass("showtip").hide().siblings("span").addClass("showtip").fadeIn() 55 | }, 5e3), $("#write-submit").click(function () { 56 | $(".write-ok").fadeIn(), $("#text-href").focus(), $("#back").click(function () { 57 | $(".write-ok").fadeOut() 58 | }), $("#write-post").click(function () { 59 | 60 | var y = $("#text-75").text(),m = $("#text-76").text(),love = $("#text-77").text(),bgmMusic = $("#text-music").text(); 61 | for (var a = {}, b = 1; 79 > b; b++){ 62 | var value = getUrlParam("text-" + b); 63 | if(value){ 64 | $("#text-" + b).text(value); 65 | } 66 | if(y){ 67 | $("#text-" + b).text($("#text-" + b).text().replace(/小明/g,y)); 68 | } 69 | if(m){ 70 | $("#text-" + b).text($("#text-" + b).text().replace(/小红/g,m)); 71 | } 72 | if(love){ 73 | $("title").text(y + "❤" + m + love); 74 | } 75 | if(bgmMusic){ 76 | $("#bgmMusic").attr("src",bgmMusic); 77 | $("#text-music").text(bgmMusic); 78 | } 79 | } 80 | $("title").text($("title").text() + " | 永远幸福 (codejie.net)"); 81 | 82 | bd_share(); 83 | 84 | var b = $("#text-href").text(), 85 | c = $("#text-music").text(); 86 | 87 | $("#back").hide(); 88 | $(".write-ok p").hide(); 89 | $(".write-ok div button").hide(); 90 | $(".write-ok div h2").hide().text("\u6210\u529f\u751f\u6210\u8868\u2764\u767d\u9875\u9762").fadeIn(); 91 | $("#write-url").html('\u60a8\u7684\u8868\u767d\u94fe\u63a5\u662f\uff1a' 92 | + 93 | "http://aijava.cn/demo/love/2014/?y=" + $("#text-75").text() + "&m=" + $("#text-76").text() + "&love=" + $("#text-77").text() 94 | + "").fadeIn(); 95 | $(".write-share").css("display", "inline-block").children("p").show() 96 | }) 97 | }); 98 | var bgmMusic = document.getElementById("bgmMusic"); 99 | $("#on").click(function () { 100 | bgmMusic.pause(), $("#on").hide(200), $("#off").css({ 101 | display: "inline-block" 102 | }, 300) 103 | }), $("#off").click(function () { 104 | bgmMusic.play(), $("#off").hide(200), $("#on").css({ 105 | display: "inline-block" 106 | }, 300) 107 | }); 108 | }); 109 | 110 | function bd_share(){ 111 | var sharetext = $("#text-75").text() + "love" + $("#text-76").text() + $("#text-77").text(); 112 | with(sharedesc = $("#text-1").text() + $("#text-2").text() + $("#text-3").text() + $("#text-4").text() + $("#text-5").text() + $("#text-6").text() + $("#text-7").text() + $("#text-8").text() + "......", window._bd_share_config = { 113 | common: { 114 | bdSnsKey: {}, 115 | bdText: sharetext, 116 | bdDesc: sharedesc, 117 | bdUrl: getUrl(), 118 | bdMini: "2", 119 | bdMiniList: ["mshare", "qzone", "tsina", "bdysc", "weixin", "renren", "tqq", "bdxc", "kaixin001", "tqf", "tieba", "douban", "tsohu", "bdhome", "sqq", "thx", "qq", "ibaidu", "taobao", "hi", "baidu", "sohu", "t163", "qy", "meilishuo", "mogujie", "diandian", "huaban", "leho", "share189", "duitang", "hx", "tfh", "fx", "youdao", "sdo", "qingbiji", "ifeng", "people", "xinhua", "ff", "mail", "kanshou", "isohu", "yaolan", "wealink", "xg", "ty", "iguba", "fbook", "twi", "deli", "s139"], 120 | bdPic: "http://kingzs70.oss.aliyuncs.com/iali/img/319280.jpg", 121 | bdStyle: "1", 122 | bdSize: "32" 123 | }, 124 | share: {} 125 | }, document) 0[(getElementsByTagName("head")[0] || body).appendChild(createElement("script")).src = "http://bdimg.share.baidu.com/static/api/js/share.js?v=86326610.js?cdnversion=" + ~ (-new Date / 36e5)] 126 | } -------------------------------------------------------------------------------- /tank/js/map.js: -------------------------------------------------------------------------------- 1 | 2 | var Map = function(wCtx,gCtx){ 3 | this.level = 1; 4 | this.mapLevel = null; 5 | this.wallCtx = wCtx; 6 | this.grassCtx = gCtx; 7 | 8 | this.offsetX = 32; //主游戏区的X偏移量 9 | this.offsetY = 16;//主游戏区的Y偏移量 10 | this.wTileCount = 26; //主游戏区的宽度地图块数 11 | this.HTileCount = 26;//主游戏区的高度地图块数 12 | this.tileSize = 16; //地图块的大小 13 | this.homeSize = 32; //家图标的大小 14 | this.num = new Num(this.wallCtx); 15 | this.mapWidth = 416; 16 | this.mapHeight = 416; 17 | 18 | this.setMapLevel = function(level){ 19 | this.level = level; 20 | var tempMap = eval("map"+this.level); 21 | this.mapLevel = new Array(); 22 | for(var i=0;i 0){ 138 | var indexSize = indexArr.length; 139 | for(var i=0;i 0){ 143 | this.wallCtx.drawImage(RESOURCE_IMAGE,this.tileSize*(target-1) + POS["map"][0], POS["map"][1],this.tileSize,this.tileSize,index[1]*this.tileSize + this.offsetX, index[0]*this.tileSize + this.offsetY,this.tileSize,this.tileSize) ; 144 | }else{ 145 | this.wallCtx.fillStyle = "#000"; 146 | this.wallCtx.fillRect(index[1]*this.tileSize + this.offsetX, index[0]*this.tileSize + this.offsetY,this.tileSize,this.tileSize); 147 | } 148 | } 149 | } 150 | }; 151 | 152 | this.homeHit = function(){ 153 | this.wallCtx.drawImage(RESOURCE_IMAGE,POS["home"][0]+this.homeSize, POS["home"][1], this.homeSize, this.homeSize, 12*this.tileSize + this.offsetX, 24*this.tileSize + this.offsetY, this.homeSize, this.homeSize) ; 154 | }; 155 | }; -------------------------------------------------------------------------------- /heart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 我爱动力节点 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 | /**
23 | * We are both XXX Unversity business administration and programmers,
24 | * so I write some code to show my love to you.
25 | */
26 | Boy i = new Boy("boyname");
27 | Girl u = new Girl("girlname");
28 | // April 28, 2014, I told you I love you.
29 | i.love(u);
30 | // but..., what you said that meaning we are still good friends.
31 | u.sayOtherthing();
32 | // Since then, I ask you for the reason.
33 | var reason=i.ask(u);
34 | // you say we were not understand enough for each other .
35 | $("body").append(reason);
36 | // You say that it is too quickily to turn our relation of lover.
37 | // And take care of u and our love.
38 | i.takeCareOf(u);
39 | // So I keep waiting and I have confidence that you will.
40 | boolean isAccept = false;
41 | while (isAccept) {
42 | i.waitFor(u);
43 | // I think it is an important decision
44 | // and you should forgot the unhappy things that happended before.
45 | isAccept = u.thinkOver();
46 | }
47 | // After a please sound of accept, we will live happily ever after.
48 | u.accept(i);
49 | i.liveHappilyWith(u);
50 | 58 |
59 |
60 | 61 |
62 |
63 |
64 | 72 |
73 | girlname, I will have fallen in love with you for 74 | 75 | click me if accept me 76 |
77 |
78 | Love u forever and ever.
79 |
- boyname
80 |
81 |
82 |
83 |
84 |
85 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /brush/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 写字 7 | 28 | 29 | 30 | 31 | 32 | 您的浏览器不支持canvas技术,请升级浏览器! 33 | 34 | 清空 35 | 36 | 37 | 38 | 198 | -------------------------------------------------------------------------------- /five-chess/js/FiveChess.js: -------------------------------------------------------------------------------- 1 | /* 2 | 思路:(1-4:UI,5-:AI) 3 | 1.画15*15棋盘 4 | DrawChessBoard() 5 | 2.置所有位置未落子二维函数 6 | hasChess() 7 | 3.走了一步棋 8 | oneStep(i, j, me) 9 | 4.落子事件 10 | onclick 11 | 12 | 5.赢法三维数组CountallWins() 13 | 三维数组初始化 14 | 置所有赢法为true 15 | mythiswin[i]的个数(5个赢) 16 | pcthiswin[i]的个数(5个赢) 17 | 6.AI();二维权重数组myScore/pcScore 18 | 8.用max、u、v记录最大值权重信息 19 | */ 20 | 21 | var FiveChesscanvas = document.getElementById('FiveChesscanvas'); 22 | var ctx = FiveChesscanvas.getContext('2d'); 23 | var has = []; 24 | var me = true; 25 | var allwins = []; 26 | var count = 0; 27 | var mythiswin = []; 28 | var pcthiswin = []; 29 | var over = false; 30 | 31 | 32 | onload = function() { 33 | DrawChessBoard(); 34 | hasChess(); 35 | CountallWins(); 36 | } 37 | 38 | function DrawChessBoard() { 39 | ctx.beginPath(); 40 | for(var i=0; i<15; i++) { 41 | ctx.moveTo(15, 15+30*i); 42 | ctx.lineTo(435, 15+30*i); 43 | 44 | ctx.moveTo(15+30*i, 15); 45 | ctx.lineTo(15+30*i, 435); 46 | } 47 | ctx.strokeStyle = "#666"; 48 | ctx.stroke(); 49 | ctx.closePath(); 50 | 51 | // sign 52 | ctx.beginPath(); 53 | ctx.moveTo(215, 225); 54 | ctx.lineTo(235, 225); 55 | ctx.moveTo(225, 215); 56 | ctx.lineTo(225, 235); 57 | ctx.lineWidth = 2; 58 | ctx.strokeStyle = "#000"; 59 | ctx.stroke(); 60 | ctx.closePath(); 61 | } 62 | 63 | function hasChess() { 64 | for(var i=0; i<15; i++) { 65 | has[i] = []; 66 | for(var j=0; j<15; j++) { 67 | has[i][j] = 0; 68 | } 69 | } 70 | } 71 | 72 | function CountallWins() { 73 | for(var i=0; i<15; i++) { 74 | allwins[i] = []; 75 | for(var j=0; j<15; j++) { 76 | allwins[i][j] = []; 77 | } 78 | } 79 | 80 | // 横 81 | for(var i=0; i<15; i++) { 82 | for(var j=0; j<11; j++) { 83 | for(var k=0; k<5; k++) { 84 | allwins[i][j+k][count] = true; 85 | } 86 | count++; 87 | } 88 | } 89 | 90 | // 竖 91 | for(var i=0; i<15; i++) { 92 | for(var j=0; j<11; j++) { 93 | for(var k=0; k<5; k++) { 94 | allwins[j+k][i][count] = true; 95 | } 96 | count++; 97 | } 98 | } 99 | 100 | // 斜 101 | for(var i=0; i<11; i++) { 102 | for(var j=0; j<11; j++) { 103 | for(var k=0; k<5; k++) { 104 | allwins[i+k][j+k][count] = true; 105 | } 106 | count++; 107 | } 108 | } 109 | 110 | // 反斜 111 | for(var i=14; i>3; i--) { 112 | for(var j=0; j<11; j++) { 113 | for(var k=0; k<5; k++) { 114 | allwins[i-k][j+k][count] = true; 115 | } 116 | count++; 117 | } 118 | } 119 | 120 | // 一共572种赢法 121 | console.log(count); 122 | 123 | for(var i=0; i<=count; i++) { 124 | // 在每种赢法上的初始值为0 125 | mythiswin[i] = 0; 126 | pcthiswin[i] = 0; 127 | } 128 | } 129 | 130 | function oneStep(i, j, me) { 131 | ctx.beginPath(); 132 | ctx.arc(30*i+15, 30*j+15, 13, 0, Math.PI*2); 133 | var gradient = ctx.createRadialGradient(30*i+15, 30*j+15, 13, 30*i+15, 30*j+15, 0); 134 | if(me) { 135 | gradient.addColorStop(0, "#0a0a0a"); 136 | gradient.addColorStop(1, "#636766"); 137 | } 138 | else { 139 | gradient.addColorStop(0, "#b1b1b1"); 140 | gradient.addColorStop(1, "#f9f9f9"); 141 | } 142 | ctx.fillStyle = gradient; 143 | ctx.fill(); 144 | ctx.closePath(); 145 | } 146 | 147 | FiveChesscanvas.onclick = function(e) { 148 | if(over) { 149 | return; 150 | } 151 | if(!me) { 152 | return; 153 | } 154 | var x = e.offsetX; 155 | var y = e.offsetY; 156 | var i = Math.floor(x/30); 157 | var j = Math.floor(y/30); 158 | if(has[i][j] == 0) { 159 | oneStep(i, j, true); 160 | has[i][j] = 1; 161 | console.log("落子坐标 " + i + "," + j); 162 | 163 | for(var k=0; k<=count; k++) { 164 | if(allwins[i][j][k]) { 165 | mythiswin[k]++; 166 | pcthiswin[k] = 50; 167 | if(mythiswin[k] == 5) { 168 | alert("恭喜你,你赢了!"); 169 | over = true; 170 | } 171 | } 172 | } 173 | if(!over) { 174 | me = !me; 175 | AI(); 176 | } 177 | } 178 | } 179 | 180 | function AI() { 181 | // 在每个位置落子的价值 182 | var myScore = []; 183 | var pcScore = []; 184 | var max = 0; 185 | var u = 0; 186 | var v = 0; 187 | for(var i=0; i<15; i++) { 188 | myScore[i] = []; 189 | pcScore[i] = []; 190 | for(var j=0; j<15; j++) { 191 | // 初始为0 192 | myScore[i][j] = 0; 193 | pcScore[i][j] = 0; 194 | } 195 | } 196 | 197 | for(var i=0; i<15; i++) { 198 | for(var j=0;j<15; j++) { 199 | if(has[i][j] == 0) { 200 | for(var k=0; k<=count; k++) { 201 | if(allwins[i][j][k]) { 202 | if(mythiswin[k] == 1) { 203 | myScore[i][j] += 200; 204 | }else if(mythiswin[k] == 2) { 205 | myScore[i][j] += 400; 206 | }else if(mythiswin[k] == 3) { 207 | myScore[i][j] += 1000; 208 | }else if(mythiswin[k] == 4) { 209 | myScore[i][j] += 10000; 210 | } 211 | 212 | if(pcthiswin[k] == 1) { 213 | pcScore[i][j] += 220; 214 | }else if(pcthiswin[k] == 2) { 215 | pcScore[i][j] += 420; 216 | }else if(pcthiswin[k] == 3) { 217 | pcScore[i][j] += 1100; 218 | }else if(pcthiswin[k] == 4) { 219 | pcScore[i][j] += 20000; 220 | } 221 | } 222 | } 223 | 224 | if(myScore[i][j] > max) { 225 | max = myScore[i][j]; 226 | u = i; 227 | v = j; 228 | }else if(myScore[i][j] == max) { 229 | if(pcScore[i][j] > pcScore[u][v]) { 230 | u = i; 231 | v = j; 232 | } 233 | } 234 | 235 | if(pcScore[i][j] > max) { 236 | max = pcScore[i][j]; 237 | u = i; 238 | v = j; 239 | }else if(pcScore[i][j] == max) { 240 | if(myScore[i][j] > myScore[u][v]) { 241 | u = i; 242 | v = j; 243 | } 244 | } 245 | } 246 | } 247 | } 248 | 249 | oneStep(u, v ,false); 250 | has[u][v] = 2; 251 | console.log("机器落子坐标 " + u + "," + v); 252 | for(var k=0; k<=count; k++) { 253 | if(allwins[u][v][k]) { 254 | pcthiswin[k]++; 255 | mythiswin[k] = 60; 256 | if(pcthiswin[k] == 5) { 257 | alert("很遗憾,电脑赢!"); 258 | over = true; 259 | } 260 | } 261 | } 262 | 263 | if(!over) { 264 | me = !me; 265 | } 266 | } -------------------------------------------------------------------------------- /man-down100/js/person.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 人物的定义 3 | */ 4 | var Person = function(x,y,img,cxt,panelInfo) { 5 | 6 | this.x = x; 7 | this.y = y; 8 | this.img = img; 9 | this.cxt = cxt; 10 | this.pinfo = panelInfo;//游戏窗口面板 11 | 12 | this.xspeed = 7;//x轴加速度 13 | this.yspeed = 5;//y轴加速度 14 | 15 | this.yaspeed = 0.2;//y轴 加速度 增量 16 | 17 | this.life = 10;//血量 18 | 19 | this.lifeAdd = 0.5;//血量增加幅度 20 | 21 | this.dir = "down";//方向 22 | 23 | this.lastKey = "";//最后按键 24 | 25 | this.sprite = null;//精灵 26 | 27 | this.isJump = true;//是否跳起 28 | 29 | this.isFilp = false;//是否在弹簧障碍物 上 弹起 30 | 31 | this.block = null;//障碍物 32 | 33 | this.isDead = false;//是否死亡 34 | 35 | this.init();//初始化 36 | } 37 | Person.prototype = { 38 | init : function(){//初始化 39 | 40 | this.initSprite(); 41 | 42 | this.sprite.setYSpeed(this.yspeed,this.yaspeed); 43 | }, 44 | initSprite : function(){//初始化精灵 45 | 46 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,10,{x:this.x,y:this.y}); 47 | 48 | sprite.add("down",new WF.sprite.Animation({startX:64,sw:64,sh:64,width:32,height:32})); 49 | sprite.add("normal",new WF.sprite.Animation({sw:64,sh:64,width:32,height:32})); 50 | sprite.add("up",new WF.sprite.Animation({startX:128,sw:64,sh:64,width:32,height:32})); 51 | sprite.add("right",new WF.sprite.Animation({startX:320,fs:2,sw:64,sh:64,width:32,height:32,loop:true})); 52 | sprite.add("left",new WF.sprite.Animation({startX:192,fs:2,sw:64,sh:64,width:32,height:32,loop:true})); 53 | 54 | this.sprite = sprite; 55 | }, 56 | changeDir : function(dir,flag){//改变方向 57 | 58 | this.lastKey = dir; 59 | 60 | if(this.isDead)return false; 61 | 62 | if(dir == this.dir && (dir=="left" || dir=="right"))return false; 63 | 64 | if(this.isJump == false || dir == "down" || dir == "up"){ 65 | 66 | this.dir = dir; 67 | 68 | this.sprite.change(this.dir); 69 | } 70 | 71 | var xforce = this.block?this.block.xforce||0:0;//x轴 障碍物 推动力 72 | 73 | //根据方向 设置x轴 加速度 74 | if(dir == "left")this.sprite.setXSpeed(this.xspeed*-1 + xforce); 75 | else if(dir == "right")this.sprite.setXSpeed(this.xspeed + xforce); 76 | else if(dir == "normal" && !flag) this.sprite.setXSpeed(xforce); 77 | }, 78 | draw : function(){//绘制 精灵 79 | 80 | this.sprite.draw(); 81 | }, 82 | update : function(){//更新 83 | //改变加速度 84 | this.sprite.update(); 85 | 86 | 87 | //更新血量 88 | this.life += this.lifeAdd; 89 | if(this.life >= 100)this.life = 100; 90 | 91 | // alert("1"); 92 | 93 | //判断边界值(小人 x轴位置 0px - 320px) 94 | var f_size = this.size(); 95 | 96 | // alert("2"); 97 | 98 | var x = f_size.x; 99 | var y = f_size.y; 100 | 101 | //小人 超出左边界 102 | if(x <= 0)x = 0; 103 | //小人 超出右边界 104 | if(f_size.r >= this.pinfo.w)x = this.pinfo.w - f_size.w; 105 | 106 | 107 | 108 | //小人 超出下边界 同时处于跳跃状态 109 | if(f_size.b >= this.pinfo.h && this.isJump==true){ 110 | //小人 y轴位置 111 | y = this.pinfo.h - f_size.h; 112 | 113 | //死亡 114 | this.dead(); 115 | } 116 | 117 | //小人 超出上边界 118 | if(f_size.y <= 0)this.dead(); 119 | 120 | //判断是否离开方块 121 | if(this.block){ 122 | 123 | var b_size = this.block.size(); 124 | //离开障碍物 125 | if(f_size.r <= b_size.x || f_size.x >= b_size.r){ 126 | 127 | this.goDown(); 128 | } 129 | } 130 | 131 | //离开弹簧障碍物 同时 y轴加速度>0 132 | if(this.isFilp && this.sprite.yspeed >= 0){ 133 | 134 | this.goDown(); 135 | } 136 | //小人移动 137 | this.move(x,y); 138 | }, 139 | dead : function(){//死亡 140 | 141 | this.sprite.setXSpeed(0); 142 | this.sprite.setYSpeed(0); 143 | 144 | this.changeDir("normal"); 145 | 146 | this.isDead = true; 147 | }, 148 | goDown : function(){//正在向下 149 | //方向正常、x轴加速度为0 150 | if(this.dir == "normal")this.sprite.setXSpeed(0); 151 | //y轴加速度 随着y轴增量 -> 增加 152 | this.sprite.setYSpeed(this.yspeed,this.yaspeed); 153 | this.changeDir("down"); 154 | this.isJump = true; 155 | this.isFilp = false; 156 | 157 | this.block = null;//无障碍物 158 | }, 159 | goUp : function(){//正在向上 160 | 161 | this.changeDir("up"); 162 | 163 | this.isJump = true;//处于跳跃 164 | 165 | this.isFilp = true;//在弹簧障碍物上 跳起 166 | 167 | this.block = null;//无障碍物 168 | 169 | //y轴加速度, y轴加速度增量 170 | this.sprite.setYSpeed(this.yspeed*-2,0.4); 171 | }, 172 | move : function(x,y){//移动 173 | 174 | this.sprite.move(x,y); 175 | }, 176 | checkBlockOn : function(block){//检查是否在障碍物上 177 | 178 | if(!this.isJump)return false; 179 | 180 | var m_size = this.size(); 181 | var b_size = block.sprite.size(); 182 | 183 | if(m_size.r > b_size.x && m_size.x < b_size.r){ 184 | 185 | if(m_size.b >= b_size.y && m_size.b <= b_size.b +4){ 186 | 187 | this.standBlock(m_size.x,b_size.y-m_size.h); 188 | 189 | this.block = block; 190 | 191 | block.ManOn(this); 192 | 193 | return true; 194 | } 195 | } 196 | 197 | return false; 198 | }, 199 | standBlock : function(x,y){//位于障碍物上 200 | 201 | this.move(x,y); 202 | 203 | this.isJump = false; 204 | 205 | if(this.lastKey == "left" || this.lastKey == "right"){ 206 | this.changeDir(this.lastKey); 207 | }else{ 208 | this.changeDir("normal",true); 209 | } 210 | }, 211 | changeSpeed : function(xspeed,yspeed){//改变加速度 212 | 213 | if(xspeed)this.sprite.setXSpeed(xspeed); 214 | if(yspeed)this.sprite.setYSpeed(yspeed); 215 | }, 216 | setXForce : function(xforce){//设置x轴 推动力 217 | 218 | if(this.dir == "left"){ 219 | this.sprite.setXSpeed(this.xspeed * -1 + xforce); 220 | } 221 | else if(this.dir == "right"){ 222 | this.sprite.setXSpeed(this.xspeed + xforce); 223 | } 224 | else if(this.dir == "normal"){ 225 | this.sprite.setXSpeed(xforce); 226 | } 227 | }, 228 | cutLift : function(cut){//缩减生命值 229 | 230 | this.life -= cut; 231 | 232 | if(this.life <= 0)this.dead(); 233 | }, 234 | size : function(){//小人大小 235 | 236 | return this.sprite.size(); 237 | } 238 | } 239 | 240 | 241 | 242 | -------------------------------------------------------------------------------- /man-down100/js/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 游戏主逻辑入口文件,处理主要逻辑 3 | */ 4 | var Main = { 5 | gameInfo : {w:0,h:0},//游戏画面大小 6 | cxt : null,//context 绘制图形的上下文对象 7 | person : null, 8 | timeQuene : null,//时间队列 9 | time : 0, 10 | leveltime : 0,//等级时间 11 | level : 0,//等级 12 | imgs : [],//图片 13 | blocks : [],//障碍物 14 | init : function(){//初始化 15 | 16 | Main.initStart(); 17 | }, 18 | initStart : function(){//初始化开始 19 | 20 | Main.initData(); 21 | }, 22 | initData : function(){//初始化数据 23 | 24 | WF.file.imgs(["img/man.png","img/block.png","img/move.png","img/thorn.png","img/flip.png","img/thorn_bg.png"],function(imgs){ 25 | 26 | Main.imgs = imgs; 27 | 28 | var canvas = WF.getId("canvas"); 29 | 30 | Main.gameInfo.w = canvas.offsetWidth;// 偏移宽度 31 | Main.gameInfo.h = canvas.offsetHeight;// 偏移高度 32 | 33 | Main.cxt = canvas.getContext("2d");//可以在页面绘制图形的对象 34 | 35 | /** 36 | * 一般都是用display:none和display:block来控制层的显示 37 | * 简单点说,block 显示DIV,none 隐藏DIV。 38 | */ 39 | WF.getId("js_start_loading").style.display="none"; 40 | WF.getId("js_start_btn").style.display = "block"; 41 | }); 42 | }, 43 | start : function(){//开始 44 | 45 | WF.getId("js_start_flush").style.display = "none"; 46 | //初始化人物 47 | Main.person = new Person(150,0,Main.imgs[0],Main.cxt,Main.gameInfo); 48 | //初始化障碍物 49 | Main.initBlock(Main.imgs); 50 | //初始化事件 51 | Main.initEvent(); 52 | //启动游戏,运行 53 | Main.process(); 54 | }, 55 | initBlock : function(imgs){//初始化障碍物 56 | 57 | BlockFactory.init({ 58 | block : imgs[1], 59 | move : imgs[2], 60 | flip : imgs[4], 61 | thorn : imgs[3], 62 | cxt : Main.cxt, 63 | gameinfo : Main.gameInfo 64 | }); 65 | 66 | var block = new NormalBlock(120,460,imgs[1],Main.cxt,Main.gameInfo); 67 | 68 | block.init(); 69 | 70 | Main.blocks.push(block); 71 | }, 72 | initEvent : function(){//初始化事件 73 | 74 | WF.getId("js_main").onkeydown = function(e){Main.keyDown(e);}; 75 | WF.getId("js_main").onkeyup = function(e){Main.keyUp(e);}; 76 | 77 | }, 78 | keyDown : function(e){//按键按下 79 | 80 | if(e.keyCode == 37){ 81 | 82 | this.person.changeDir("left"); 83 | } 84 | if(e.keyCode == 39){ 85 | 86 | this.person.changeDir("right"); 87 | } 88 | 89 | e.preventDefault();//阻止按键 90 | }, 91 | keyUp : function(e){//按键松开 92 | 93 | if(e.keyCode == 37 || e.keyCode == 39){ 94 | 95 | this.person.changeDir("normal"); 96 | } 97 | 98 | e.preventDefault(); 99 | }, 100 | process : function(){//游戏运行 101 | 102 | 103 | var tq = new WF.time.TimeProcess(); 104 | 105 | tq.add(Main.draw,null,Main); 106 | tq.add(Main.update,null,Main); 107 | 108 | this.timeQuene = tq;//游戏时间进程 109 | this.timeQuene.start(); 110 | }, 111 | draw : function(){ 112 | 113 | Main.cxt.clearRect(0,0,Main.gameInfo.w,Main.gameInfo.h);//清除图像 114 | 115 | Main.drawThornBg();//绘制荆棘(针刺)背景 116 | 117 | Main.person.draw();//绘制小人 118 | 119 | //绘制障碍物 120 | for(var i=0,l=Main.blocks.length;i= 40){ 147 | 148 | Main.blocks.push(BlockFactory.create()); 149 | 150 | Main.time = 0;//时间 151 | Main.leveltime += 2;//级别时间 152 | 153 | //floor()是取小于一个数的最大整数,如Math.floor(4.6)为4。 154 | Main.level = Math.floor(Main.leveltime / 10);//级别 155 | } 156 | 157 | 158 | //小人更新 159 | Main.person.update(); 160 | 161 | 162 | if(Main.person.isDead){ 163 | 164 | Main.over();//游戏结束 165 | 166 | WF.getId("js_life").style.width = "0px"; 167 | 168 | return false; 169 | } 170 | 171 | 172 | //障碍物更新 173 | for(var i=0,l=Main.blocks.length;i= 3){ 207 | 208 | WF.getId("js_end_flush").getElementsByTagName("p")[0].innerHTML = "你牛B呀,下了层,男人中的男人呀!"; 209 | WF.getId("js_end_flush").getElementsByTagName("a")[0].innerHTML = "想更男人一点"; 210 | WF.getId("js_end_flush").getElementsByTagName("span")[0].className = "icon happy"; 211 | } 212 | else{ 213 | WF.getId("js_end_flush").getElementsByTagName("p")[0].innerHTML = "你太菜了,才玩了层,还不算真男人呀!"; 214 | WF.getId("js_end_flush").getElementsByTagName("a")[0].innerHTML = "再来一次"; 215 | WF.getId("js_end_flush").getElementsByTagName("span")[0].className = "icon"; 216 | } 217 | 218 | }, 219 | removeBlock : function(block){ 220 | /** 221 | * splice方法是怎样的?arr.splice(0,1);其中arr是个数组。不明白括号里的0和1代表什么意思? 222 | * 替换0开始的长度为1的范围内的内容吧。 223 | * 后面还需要第3个参数,如果没有第3个参数那就表示把 0,1 的内容替换成没有,自然也就是相当于删除了第0个元素。 224 | */ 225 | Main.blocks.splice(Main.blocks.indexOf(block),1); 226 | }, 227 | replay : function(){ 228 | 229 | Main.blocks = []; 230 | Main.time = 0; 231 | Main.leveltime = 0; 232 | Main.level = 0; 233 | Main.person.life = 100; 234 | 235 | Main.start(); 236 | 237 | WF.getId("js_end_flush").style.display = "none"; 238 | } 239 | 240 | 241 | } 242 | Main.init(); 243 | 244 | -------------------------------------------------------------------------------- /tank/js/Collision.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 检测2个物体是否碰撞 3 | * @param object1 物体1 4 | * @param object2 物体2 5 | * @param overlap 允许重叠的大小 6 | * @returns {Boolean} 如果碰撞了,返回true 7 | */ 8 | function CheckIntersect(object1, object2, overlap) 9 | { 10 | // x-轴 x-轴 11 | // A1------>B1 C1 A2------>B2 C2 12 | // +--------+ ^ +--------+ ^ 13 | // | object1| | y-轴 | object2| | y-轴 14 | // | | | | | | 15 | // +--------+ D1 +--------+ D2 16 | // 17 | //overlap是重叠的区域值 18 | A1 = object1.x + overlap; 19 | B1 = object1.x + object1.size - overlap; 20 | C1 = object1.y + overlap; 21 | D1 = object1.y + object1.size - overlap; 22 | 23 | A2 = object2.x + overlap; 24 | B2 = object2.x + object2.size - overlap; 25 | C2 = object2.y + overlap; 26 | D2 = object2.y + object2.size - overlap; 27 | 28 | //假如他们在x-轴重叠 29 | if(A1 >= A2 && A1 <= B2 30 | || B1 >= A2 && B1 <= B2) 31 | { 32 | //判断y-轴重叠 33 | if(C1 >= C2 && C1 <= D2 || D1 >= C2 && D1 <= D2) 34 | { 35 | return true; 36 | } 37 | } 38 | return false; 39 | } 40 | 41 | /** 42 | * 坦克与地图块碰撞 43 | * @param tank 坦克对象 44 | * @param mapobj 地图对象 45 | * @returns {Boolean} 如果碰撞,返回true 46 | */ 47 | function tankMapCollision(tank,mapobj){ 48 | //移动检测,记录最后一次的移动方向,根据方向判断+-overlap, 49 | var tileNum = 0;//需要检测的tile数 50 | var rowIndex = 0;//map中的行索引 51 | var colIndex = 0;//map中的列索引 52 | var overlap = 3;//允许重叠的大小 53 | 54 | //根据tank的x、y计算出map中的row和col 55 | if(tank.dir == UP){ 56 | rowIndex = parseInt((tank.tempY + overlap - mapobj.offsetY)/mapobj.tileSize); 57 | colIndex = parseInt((tank.tempX + overlap- mapobj.offsetX)/mapobj.tileSize); 58 | }else if(tank.dir == DOWN){ 59 | //向下,即dir==1的时候,行索引的计算需要+tank.Height 60 | rowIndex = parseInt((tank.tempY - overlap - mapobj.offsetY + tank.size)/mapobj.tileSize); 61 | colIndex = parseInt((tank.tempX + overlap- mapobj.offsetX)/mapobj.tileSize); 62 | }else if(tank.dir == LEFT){ 63 | rowIndex = parseInt((tank.tempY + overlap- mapobj.offsetY)/mapobj.tileSize); 64 | colIndex = parseInt((tank.tempX + overlap - mapobj.offsetX)/mapobj.tileSize); 65 | }else if(tank.dir == RIGHT){ 66 | rowIndex = parseInt((tank.tempY + overlap- mapobj.offsetY)/mapobj.tileSize); 67 | //向右,即dir==3的时候,列索引的计算需要+tank.Height 68 | colIndex = parseInt((tank.tempX - overlap - mapobj.offsetX + tank.size)/mapobj.tileSize); 69 | } 70 | if(rowIndex >= mapobj.HTileCount || rowIndex < 0 || colIndex >= mapobj.wTileCount || colIndex < 0){ 71 | return true; 72 | } 73 | if(tank.dir == UP || tank.dir == DOWN){ 74 | var tempWidth = parseInt(tank.tempX - map.offsetX - (colIndex)*mapobj.tileSize + tank.size - overlap);//去除重叠部分 75 | if(tempWidth % mapobj.tileSize == 0 ){ 76 | tileNum = parseInt(tempWidth/mapobj.tileSize); 77 | }else{ 78 | tileNum = parseInt(tempWidth/mapobj.tileSize) + 1; 79 | } 80 | for(var i=0;i= mapobj.HTileCount || rowIndex < 0 || colIndex >= mapobj.wTileCount || colIndex < 0){ 141 | return true; 142 | } 143 | 144 | if(bullet.dir == UP || bullet.dir == DOWN){ 145 | var tempWidth = parseInt(bullet.x - map.offsetX - (colIndex)*mapobj.tileSize + bullet.size); 146 | if(tempWidth % mapobj.tileSize == 0 ){ 147 | tileNum = parseInt(tempWidth/mapobj.tileSize); 148 | }else{ 149 | tileNum = parseInt(tempWidth/mapobj.tileSize) + 1; 150 | } 151 | for(var i=0;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 贪吃蛇 11 | 12 | 22 | 23 | 24 | 25 | Your browser does not support the Canvas API. 26 | Please upgrade your browser. 27 | 28 | 29 | 224 | 225 | -------------------------------------------------------------------------------- /man-down100/js/block.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 各种障碍物块的定义 3 | */ 4 | var BlockBase = function(x,y,img,cxt,panelInfo){//基础障碍物 5 | 6 | this.x = x; 7 | this.y = y; 8 | this.img = img; 9 | this.cxt = cxt; 10 | this.pinfo = panelInfo; 11 | 12 | this.yspeed = -4; 13 | 14 | this.sprite = null; 15 | 16 | this.dismiss = false;//障碍物消失 17 | } 18 | BlockBase.prototype = { 19 | 20 | init : function(){//初始化 21 | 22 | this.initSprite(); 23 | }, 24 | initSprite : function(){},//初始化精灵 25 | draw : function() {//绘制障碍物 26 | 27 | this.sprite.draw(); 28 | }, 29 | update : function(){//更新 30 | 31 | this.sprite.update(); 32 | 33 | this.childUpdate(); 34 | }, 35 | childUpdate : function(){},//子更新 36 | checkMap : function(){//检查障碍物是否超出地图 37 | 38 | var size = this.sprite.size(); 39 | 40 | if(size.y <= 0)return true; 41 | 42 | return false; 43 | }, 44 | ManOn : function(man){},//人物在障碍物上 45 | size : function(){//障碍物大小 46 | 47 | return this.sprite.size(); 48 | } 49 | } 50 | 51 | var NormalBlock = function(x,y,img,cxt,panelInfo){//普通障碍物 52 | 53 | /** 54 | * var a={name:"haha"}; 55 | function b(){alert(this.name);} 56 | var test = function() { 57 | return b.apply(a,arguments); 58 | }; 59 | test(); 60 | 61 | this.name 打印结果为:haha 62 | */ 63 | BlockBase.apply(this,arguments); 64 | } 65 | NormalBlock.prototype = new BlockBase(); 66 | 67 | NormalBlock.prototype.initSprite = function(){//初始化普通障碍物 68 | 69 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,1,{x:this.x,y:this.y,yspeed:this.yspeed}); 70 | 71 | sprite.add("normal",new WF.sprite.Animation({sw:200,sh:32,width:100,height:16,dir:"down"})); 72 | 73 | this.sprite = sprite; 74 | }; 75 | NormalBlock.prototype.ManOn = function(man){//人物在普通障碍物上 76 | 77 | man.changeSpeed(0,this.yspeed); 78 | } 79 | 80 | 81 | var MissBlock = function(x,y,img,cxt,panelInfo){//消失障碍物 82 | BlockBase.apply(this,arguments); 83 | 84 | this.restTime = 30; 85 | 86 | this.isStand = false; 87 | } 88 | MissBlock.prototype = new BlockBase(); 89 | 90 | MissBlock.prototype.initSprite = function(){//初始化 消失障碍物 91 | 92 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,1,{x:this.x,y:this.y,yspeed:this.yspeed}); 93 | 94 | sprite.add("normal",new WF.sprite.Animation({startY:32,sw:200,sh:32,width:100,height:16,dir:"down"})); 95 | 96 | this.sprite = sprite; 97 | } 98 | MissBlock.prototype.ManOn = function(man){//人物在消失障碍物上 99 | 100 | man.changeSpeed(0,this.yspeed); 101 | 102 | this.isStand = true; 103 | } 104 | MissBlock.prototype.childUpdate = function(){//消失障碍物 子更新(状态) 105 | 106 | //isStand 是否可以站立 107 | if(!this.isStand)return false; 108 | 109 | this.restTime--;//休息时间 110 | 111 | if(this.restTime <= 0){ 112 | //障碍物销毁 113 | this.dismiss = true; 114 | } 115 | } 116 | 117 | 118 | var LeftBlock = function(x,y,img,cxt,panelInfo){//左滑障碍物 119 | BlockBase.apply(this,arguments); 120 | 121 | this.xforce = -4; 122 | } 123 | LeftBlock.prototype = new BlockBase(); 124 | 125 | LeftBlock.prototype.initSprite = function(){//初始化左滑障碍物 126 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,5,{x:this.x,y:this.y,yspeed:this.yspeed}); 127 | 128 | sprite.add("normal",new WF.sprite.Animation({sw:200,sh:32,width:100,height:16,dir:"down",fs:2,loop:true})); 129 | 130 | this.sprite = sprite; 131 | } 132 | LeftBlock.prototype.ManOn = function(man){//人物在左滑障碍物上 133 | 134 | man.changeSpeed(0,this.yspeed); 135 | 136 | man.setXForce(this.xforce); 137 | } 138 | 139 | 140 | var RightBlock = function(x,y,img,cxt,panelInfo){//右滑障碍物 141 | 142 | BlockBase.apply(this,arguments); 143 | 144 | this.xforce = 4; 145 | } 146 | RightBlock.prototype = new BlockBase(); 147 | 148 | RightBlock.prototype.initSprite = function(){//初始化 右滑障碍物 149 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,5,{x:this.x,y:this.y,yspeed:this.yspeed}); 150 | 151 | sprite.add("normal",new WF.sprite.Animation({startY:64,sw:200,sh:32,width:100,height:16,dir:"down",fs:2,loop:true})); 152 | 153 | this.sprite = sprite; 154 | } 155 | RightBlock.prototype.ManOn = function(man){//人物在右滑障碍物上 156 | 157 | man.changeSpeed(0,this.yspeed); 158 | 159 | man.setXForce(this.xforce); 160 | } 161 | 162 | 163 | var ThornBlock = function(x,y,img,cxt,panelInfo){//荆棘(针刺)障碍物 164 | 165 | BlockBase.apply(this,arguments); 166 | 167 | this.cut = 70; 168 | } 169 | ThornBlock.prototype = new BlockBase(); 170 | 171 | ThornBlock.prototype.initSprite = function(){//初始化荆棘(针刺)障碍物 172 | 173 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,1,{x:this.x,y:this.y,yspeed:this.yspeed}); 174 | 175 | sprite.add("normal",new WF.sprite.Animation({sw:200,sh:32,width:100,height:16,dir:"down"})); 176 | 177 | this.sprite = sprite; 178 | } 179 | ThornBlock.prototype.ManOn = function(man){//人物在荆棘(针刺)障碍物上 180 | 181 | man.cutLift(this.cut); 182 | 183 | man.changeSpeed(0,this.yspeed); 184 | } 185 | 186 | 187 | var FlipBlock = function(x,y,img,cxt,panelInfo){//弹跳障碍物 188 | 189 | BlockBase.apply(this,arguments); 190 | 191 | this.flipcount = 5; 192 | 193 | this.isStand = false; 194 | } 195 | FlipBlock.prototype = new BlockBase(); 196 | 197 | FlipBlock.prototype.initSprite = function(){//初始化弹跳障碍物 198 | 199 | var sprite = new WF.sprite.Sprite(this.img,this.cxt,1,{x:this.x,y:this.y,yspeed:this.yspeed}); 200 | 201 | sprite.add("normal",new WF.sprite.Animation({sw:200,sh:32,width:100,height:16,dir:"down"})); 202 | sprite.add("down",new WF.sprite.Animation({startY:32,sw:200,sh:24,width:100,height:12,dir:"down"})); 203 | sprite.add("up",new WF.sprite.Animation({startY:56,sw:200,sh:43,width:100,height:22,dir:"down"})); 204 | 205 | this.sprite = sprite; 206 | } 207 | FlipBlock.prototype.changeDir = function(dir){//弹跳障碍物 改变方向 208 | 209 | var o_size = this.sprite.size(); 210 | 211 | this.sprite.change(dir); 212 | 213 | var n_size = this.sprite.size(); 214 | 215 | var y = (o_size.h - n_size.h) + o_size.y; 216 | 217 | this.sprite.move(o_size.x,y); 218 | } 219 | FlipBlock.prototype.ManOn = function(man){//人物在弹跳障碍物上 220 | 221 | this.changeDir("down"); 222 | 223 | man.changeSpeed(0,this.yspeed); 224 | 225 | this.isStand = true; 226 | 227 | man.goUp(); 228 | } 229 | FlipBlock.prototype.childUpdate = function(){//弹跳障碍物 子更新(状态) 230 | 231 | //isStand 是否可以站立 232 | if(!this.isStand)return false; 233 | 234 | this.flipcount--;//弹跳次数减少 235 | 236 | if(this.flipcount <= 0){ 237 | 238 | this.isStand = false; 239 | this.flipcount = 5; 240 | 241 | this.changeDir("up"); 242 | } 243 | } 244 | 245 | 246 | var BlockFactory = {//障碍物制造工厂 247 | imgs : { 248 | "block":null, 249 | "move":null, 250 | "flip":null, 251 | "thorn":null 252 | }, 253 | gameinfo : null, 254 | cxt : null, 255 | init : function(param){//初始化 256 | 257 | this.imgs.block = param.block; 258 | this.imgs.move = param.move; 259 | this.imgs.flip = param.flip; 260 | this.imgs.thorn = param.thorn; 261 | 262 | this.gameinfo = param.gameinfo; 263 | this.cxt = param.cxt; 264 | }, 265 | create : function(){//创建 266 | //Math.random()是令系统随机选取0-13之间的14位的随机数 267 | var rnd = Math.floor(Math.random()*14); 268 | 269 | var rnd_x = Math.floor(Math.random()*224); 270 | 271 | var x = rnd_x; 272 | var y = 460; 273 | 274 | var block; 275 | 276 | switch(rnd){ 277 | case 0: 278 | case 1: 279 | case 2: 280 | block = new NormalBlock(x,y,this.imgs.block,this.cxt,this.gameinfo); 281 | break; 282 | case 3: 283 | case 4: 284 | block = new MissBlock(x,y,this.imgs.block,this.cxt,this.gameinfo); 285 | break; 286 | case 5: 287 | case 6: 288 | case 7: 289 | block = new LeftBlock(x,y,this.imgs.move,this.cxt,this.gameinfo); 290 | break; 291 | case 8: 292 | case 9: 293 | case 10: 294 | block = new RightBlock(x,y,this.imgs.move,this.cxt,this.gameinfo); 295 | break; 296 | case 11: 297 | case 12: 298 | block = new FlipBlock(x,y,this.imgs.flip,this.cxt,this.gameinfo); 299 | break; 300 | case 13: 301 | block = new ThornBlock(x,y,this.imgs.thorn,this.cxt,this.gameinfo); 302 | break; 303 | } 304 | 305 | block.init(); 306 | 307 | return block; 308 | } 309 | } 310 | 311 | 312 | 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /love-time/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery+Html5实现唯美表白动画代码 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 25 | 28 |
29 |
本页面采用HTML5编辑,目前您的浏览器无法显示,请换成谷歌(Chrome)或者火狐(Firefox)浏览器,或者其他游览器的最新版本。
30 |
31 |
32 |
亲爱的小宝宝,我爱你,虽然你看不见我对你的告白
33 |
34 | 我知道我不会甜言蜜语,但是我会用行动证明一切
35 |
36 | 你说我啰嗦,有些东西因为越在乎所以越失去
37 | 因为我太爱你了,所以我失去你了
38 | 因为我太啰嗦了,所以你离开了我
39 | 虽然你看不见我的告白,但是我还是要把这些心里话说出来
40 |
41 | -- 爱你的仁希--
42 |

43 |
44 |
45 |
亲爱的小宝宝,我喜欢你 已经是…… 46 |
47 |
48 | 49 |
50 |
51 | 53 | 209 | 210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /side-text/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | font-family: "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif; 4 | background: #79a8ae; 5 | color: #666; 6 | font-size: 16px; 7 | line-height: 1.5em; 8 | } 9 | 10 | h1 { 11 | color: #111; 12 | margin: 0 0 12px 0; 13 | font-size: 24px; 14 | line-height: 1.5em; 15 | } 16 | 17 | p { 18 | margin: 0 0 10x 0; 19 | } 20 | 21 | a { 22 | color: #888; 23 | text-decoration: none; 24 | border-bottom: 1px solid #ccc; 25 | } 26 | 27 | a:hover { 28 | border-bottom-color: #888; 29 | } 30 | 31 | body, 32 | .overlay { 33 | -webkit-perspective: 1000; 34 | -webkit-perspective-origin-y: 25%; 35 | } 36 | 37 | .body--ready { 38 | /* Ideas 39 | background: -webkit-linear-gradient(top, #e2b986 -10%, #241c35 140%); 40 | background: -webkit-linear-gradient(top, #c97369 -40%, #241c35 130%); 41 | background: -webkit-linear-gradient(top, #fac4c4 -10%, #606386 140%); 42 | background: -webkit-linear-gradient(top, #519ab0 0%, #414A6D 110%); 43 | background: -webkit-linear-gradient(top, rgb(129, 0, 170) 0%, rgb(43, 4, 114) 110%); 44 | background: -webkit-linear-gradient(top, rgb(163, 235, 189) 0%, rgb(16, 93, 145) 110%); 45 | background: -webkit-linear-gradient(top, rgb(165, 103, 189) 0%, rgb(75, 233, 214) 120%); 46 | */ 47 | 48 | background: -webkit-linear-gradient(top, rgb(203, 235, 219) 0%, rgb(55, 148, 192) 120%); 49 | background: -moz-linear-gradient(top, rgb(203, 235, 219) 0%, rgb(55, 148, 192) 120%); 50 | background: -o-linear-gradient(top, rgb(203, 235, 219) 0%, rgb(55, 148, 192) 120%); 51 | background: -ms-linear-gradient(top, rgb(203, 235, 219) 0%, rgb(55, 148, 192) 120%); 52 | background: linear-gradient(top, rgb(203, 235, 219) 0%, rgb(55, 148, 192) 120%); 53 | } 54 | 55 | .body--ready .overlay { 56 | -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1), 57 | opacity 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1); 58 | -moz-transition: -moz-transform 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1), 59 | opacity 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1); 60 | -ms-transition: -ms-transform 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1), 61 | opacity 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1); 62 | -o-transition: -o-transform 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1), 63 | opacity 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1); 64 | transition: transform 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1), 65 | opacity 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1); 66 | } 67 | 68 | 69 | .ui { 70 | position: absolute; 71 | left: 50%; 72 | bottom: 5%; 73 | width: 300px; 74 | margin-left: -150px; 75 | } 76 | 77 | .ui-input { 78 | width: 100%; 79 | height: 50px; 80 | background: none; 81 | font-size: 24px; 82 | font-weight: bold; 83 | color: #fff; 84 | text-align: center; 85 | border: none; 86 | border-bottom: 2px solid white; 87 | } 88 | 89 | .ui-input:focus { 90 | outline: none; 91 | border: none; 92 | border-bottom: 2px solid white; 93 | } 94 | 95 | .ui-return { 96 | display: none; 97 | position: absolute; 98 | top: 20px; 99 | right: 0; 100 | padding: 3px 2px 0 2px; 101 | font-size: 10px; 102 | line-height: 10px; 103 | color: #fff; 104 | border: 1px solid #fff; 105 | } 106 | 107 | .ui--enter .ui-return { 108 | display: block; 109 | } 110 | 111 | .ui--wide { 112 | width: 76%; 113 | margin-left: 12%; 114 | left: 0; 115 | } 116 | 117 | .ui--wide .ui-return { 118 | right: -20px; 119 | } 120 | 121 | .help { 122 | position: absolute; 123 | top: 40px; 124 | right: 40px; 125 | width: 25px; 126 | height: 25px; 127 | text-align: center; 128 | font-size: 13px; 129 | line-height: 27px; 130 | font-weight: bold; 131 | cursor: pointer; 132 | background: #fff; 133 | color: #79a8ae; 134 | opacity: .9; 135 | 136 | -webkit-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 137 | -moz-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 138 | -ms-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 139 | -o-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 140 | transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 141 | } 142 | 143 | .help:hover { 144 | opacity: 1; 145 | } 146 | 147 | .overlay { 148 | position: absolute; 149 | top: 50%; 150 | left: 50%; 151 | width: 550px; 152 | height: 490px; 153 | margin: -260px 0 0 -275px; 154 | opacity: 0; 155 | 156 | -webkit-transform: rotateY(90deg); 157 | -moz-transform: rotateY(90deg); 158 | -ms-transform: rotateY(90deg); 159 | -o-transform: rotateY(90deg); 160 | transform: rotateY(90deg); 161 | } 162 | 163 | .overlay--visible { 164 | opacity: 1; 165 | 166 | -webkit-transform: rotateY(0); 167 | -moz-transform: rotateY(0); 168 | -ms-transform: rotateY(0); 169 | -o-transform: rotateY(0); 170 | transform: rotateY(0); 171 | } 172 | 173 | .ui-share, 174 | .ui-details { 175 | opacity: .9; 176 | background: #fff; 177 | z-index: 2; 178 | } 179 | 180 | .ui-details-content, 181 | .ui-share-content { 182 | padding: 100px 50px; 183 | } 184 | 185 | .commands { 186 | margin: 0; 187 | padding: 0; 188 | list-style: none; 189 | cursor: pointer; 190 | } 191 | 192 | .commands-item { 193 | font-size: 12px; 194 | line-height: 22px; 195 | font-weight: bold; 196 | text-transform: uppercase; 197 | letter-spacing: 1px; 198 | padding: 20px; 199 | background: #fff; 200 | margin-top: 1px; 201 | color: #333; 202 | opacity: .9; 203 | 204 | -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.694, 0.0482, 0.335, 1), 205 | opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 206 | -moz-transition: -moz-transform 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1), 207 | opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 208 | -ms-transition: -ms-transform 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1), 209 | opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 210 | -o-transition: -o-transform 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1), 211 | opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 212 | transition: transform 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1), 213 | opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 214 | } 215 | 216 | .commands-item--gap { 217 | margin-top: 9px; 218 | } 219 | 220 | .commands-item:hover { 221 | opacity: 1; 222 | } 223 | 224 | .commands-item:hover .commands-item-action { 225 | background: #333; 226 | } 227 | 228 | .commands-item a { 229 | display: inline-block; 230 | } 231 | 232 | .commands-item-mode { 233 | display: inline-block; 234 | margin-left: 3px; 235 | font-style: italic; 236 | color: #ccc; 237 | } 238 | 239 | .commands-item-title { 240 | display: inline-block; 241 | width: 150px; 242 | } 243 | 244 | .commands-item-info { 245 | display: inline-block; 246 | width: 300px; 247 | font-size: 14px; 248 | text-transform: none; 249 | letter-spacing: 0; 250 | font-weight: normal; 251 | color: #aaa; 252 | } 253 | 254 | .commands-item-action { 255 | display: inline-block; 256 | float: right; 257 | margin-top: 3px; 258 | text-transform: uppercase; 259 | font-size: 10px; 260 | line-height: 10px; 261 | color: #fff; 262 | background: #90c9d1; 263 | padding: 5px 10px 4px 10px; 264 | border-radius: 3px; 265 | } 266 | 267 | .commands-item:first-child { 268 | margin-top: 0; 269 | } 270 | 271 | .twitter-share { 272 | position: absolute; 273 | top: 4px; 274 | right: 20px; 275 | } 276 | 277 | 278 | .tabs-labels { 279 | margin-bottom: 9px; 280 | } 281 | 282 | .tabs-label { 283 | display: inline-block; 284 | background: #fff; 285 | padding: 10px 20px; 286 | font-size: 12px; 287 | line-height: 22px; 288 | font-weight: bold; 289 | text-transform: uppercase; 290 | letter-spacing: 1px; 291 | color: #333; 292 | opacity: .5; 293 | cursor: pointer; 294 | margin-right: 2px; 295 | 296 | -webkit-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 297 | -moz-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 298 | -ms-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 299 | -o-transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 300 | transition: opacity 0.1s cubic-bezier(0.694, 0.0482, 0.335, 1); 301 | } 302 | 303 | .tabs-label:hover { 304 | opacity: .9; 305 | } 306 | 307 | .tabs-label--active { 308 | opacity: .9; 309 | } 310 | 311 | .tabs-panel { 312 | display: none; 313 | } 314 | 315 | .tabs-panel--active { 316 | display: block; 317 | } 318 | 319 | .tab-panel { 320 | position: absolute; 321 | top: 0; 322 | left: 0; 323 | width: 100%; 324 | } 325 | 326 | .touch .ui-input { 327 | display: none; 328 | } 329 | -------------------------------------------------------------------------------- /tank/js/tank.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 坦克基类 3 | * @returns 4 | */ 5 | var Tank = function(){ 6 | this.x = 0; 7 | this.y = 0; 8 | this.size = 32;//坦克的大小 9 | this.dir = UP;//方向0:上 1:下 2:左3:右 10 | this.speed = 1;//坦克的速度 11 | this.frame = 0;//控制敌方坦克切换方向的时间 12 | this.hit = false; //是否碰到墙或者坦克 13 | this.isAI = false; //是否自动 14 | this.isShooting = false;//子弹是否在运行中 15 | this.bullet = null;//子弹 16 | this.shootRate = 0.6;//射击的概率 17 | this.isDestroyed = false; 18 | this.tempX = 0; 19 | this.tempY = 0; 20 | 21 | this.move = function(){ 22 | //如果是AI坦克,在一定时间或者碰撞之后切换方法 23 | 24 | if(this.isAI && emenyStopTime > 0 ){ 25 | return; 26 | } 27 | 28 | this.tempX = this.x; 29 | this.tempY = this.y; 30 | 31 | if(this.isAI){ 32 | this.frame ++; 33 | if(this.frame % 100 == 0 || this.hit){ 34 | this.dir = parseInt(Math.random()*4);//随机一个方向 35 | this.hit = false; 36 | this.frame = 0; 37 | } 38 | } 39 | if(this.dir == UP){ 40 | this.tempY -= this.speed; 41 | }else if(this.dir == DOWN){ 42 | this.tempY += this.speed; 43 | }else if(this.dir == RIGHT){ 44 | this.tempX += this.speed; 45 | }else if(this.dir == LEFT){ 46 | this.tempX -= this.speed; 47 | } 48 | this.isHit(); 49 | if(!this.hit){ 50 | this.x = this.tempX; 51 | this.y = this.tempY; 52 | } 53 | }; 54 | 55 | /** 56 | * 碰撞检测 57 | */ 58 | this.isHit = function(){ 59 | //临界检测 60 | if(this.dir == LEFT){ 61 | if(this.x <= map.offsetX){ 62 | this.x = map.offsetX; 63 | this.hit = true; 64 | } 65 | }else if(this.dir == RIGHT){ 66 | if(this.x >= map.offsetX + map.mapWidth - this.size){ 67 | this.x = map.offsetX + map.mapWidth - this.size; 68 | this.hit = true; 69 | } 70 | }else if(this.dir == UP ){ 71 | if(this.y <= map.offsetY){ 72 | this.y = map.offsetY; 73 | this.hit = true; 74 | } 75 | }else if(this.dir == DOWN){ 76 | if(this.y >= map.offsetY + map.mapHeight - this.size){ 77 | this.y = map.offsetY + map.mapHeight - this.size; 78 | this.hit = true; 79 | } 80 | } 81 | if(!this.hit){ 82 | //地图检测 83 | if(tankMapCollision(this,map)){ 84 | this.hit = true; 85 | } 86 | } 87 | //坦克检测 88 | /*if(enemyArray != null && enemyArray.length >0){ 89 | var enemySize = enemyArray.length; 90 | for(var i=0;i 0 ){ 110 | return; 111 | } 112 | if(this.isShooting){ 113 | return ; 114 | }else{ 115 | var tempX = this.x; 116 | var tempY = this.y; 117 | this.bullet = new Bullet(this.ctx,this,type,this.dir); 118 | if(this.dir == UP){ 119 | tempX = this.x + parseInt(this.size/2) - parseInt(this.bullet.size/2); 120 | tempY = this.y - this.bullet.size; 121 | }else if(this.dir == DOWN){ 122 | tempX = this.x + parseInt(this.size/2) - parseInt(this.bullet.size/2); 123 | tempY = this.y + this.size; 124 | }else if(this.dir == LEFT){ 125 | tempX = this.x - this.bullet.size; 126 | tempY = this.y + parseInt(this.size/2) - parseInt(this.bullet.size/2); 127 | }else if(this.dir == RIGHT){ 128 | tempX = this.x + this.size; 129 | tempY = this.y + parseInt(this.size/2) - parseInt(this.bullet.size/2); 130 | } 131 | this.bullet.x = tempX; 132 | this.bullet.y = tempY; 133 | if(!this.isAI){ 134 | ATTACK_AUDIO.play(); 135 | } 136 | this.bullet.draw(); 137 | //将子弹加入的子弹数组中 138 | bulletArray.push(this.bullet); 139 | this.isShooting = true; 140 | } 141 | }; 142 | 143 | /** 144 | * 坦克被击毁 145 | */ 146 | this.distroy = function(){ 147 | this.isDestroyed = true; 148 | crackArray.push(new CrackAnimation(CRACK_TYPE_TANK,this.ctx,this)); 149 | TANK_DESTROY_AUDIO.play(); 150 | }; 151 | 152 | 153 | 154 | }; 155 | 156 | /** 157 | * 菜单选择坦克 158 | * @returns 159 | */ 160 | var SelectTank = function(){ 161 | this.ys = [250, 281];//两个Y坐标,分别对应1p和2p 162 | this.x = 140; 163 | this.size = 27; 164 | }; 165 | 166 | SelectTank.prototype = new Tank(); 167 | 168 | /** 169 | * 玩家坦克 170 | * @param context 画坦克的画布 171 | * @returns 172 | */ 173 | var PlayTank = function(context){ 174 | this.ctx = context; 175 | this.lives = 3;//生命值 176 | this.isProtected = true;//是否受保护 177 | this.protectedTime = 500;//保护时间 178 | this.offsetX = 0;//坦克2与坦克1的距离 179 | this.speed = 2;//坦克的速度 180 | 181 | this.draw = function(){ 182 | this.hit = false; 183 | this.ctx.drawImage(RESOURCE_IMAGE,POS["player"][0]+this.offsetX+this.dir*this.size,POS["player"][1],this.size,this.size,this.x,this.y,this.size,this.size); 184 | if(this.isProtected){ 185 | var temp = parseInt((500-this.protectedTime)/5)%2; 186 | this.ctx.drawImage(RESOURCE_IMAGE,POS["protected"][0],POS["protected"][1]+32*temp,32, 32,this.x,this.y,32, 32); 187 | this.protectedTime--; 188 | if(this.protectedTime == 0){ 189 | this.isProtected = false; 190 | } 191 | } 192 | 193 | }; 194 | 195 | this.distroy = function(){ 196 | this.isDestroyed = true; 197 | crackArray.push(new CrackAnimation(CRACK_TYPE_TANK,this.ctx,this)); 198 | PLAYER_DESTROY_AUDIO.play(); 199 | }; 200 | 201 | this.renascenc = function(player){ 202 | this.lives -- ; 203 | this.dir = UP; 204 | this.isProtected = true; 205 | this.protectedTime = 500; 206 | this.isDestroyed = false; 207 | var temp= 0 ; 208 | if(player == 1){ 209 | temp = 129; 210 | }else{ 211 | temp = 256; 212 | } 213 | this.x = temp + map.offsetX; 214 | this.y = 385 + map.offsetY; 215 | }; 216 | 217 | }; 218 | PlayTank.prototype = new Tank(); 219 | 220 | /** 221 | * 敌方坦克1 222 | * @param context 画坦克的画布 223 | * @returns 224 | */ 225 | var EnemyOne = function(context){ 226 | this.ctx = context; 227 | this.isAppear = false; 228 | this.times = 0; 229 | this.lives = 1; 230 | this.isAI = true; 231 | this.speed = 1.5; 232 | 233 | this.draw = function(){ 234 | this.times ++; 235 | if(!this.isAppear){ 236 | var temp = parseInt(this.times/5)%7; 237 | this.ctx.drawImage(RESOURCE_IMAGE,POS["enemyBefore"][0]+temp*32,POS["enemyBefore"][1],32,32,this.x,this.y,32,32); 238 | if(this.times == 34){ 239 | this.isAppear = true; 240 | this.times = 0; 241 | this.shoot(2); 242 | } 243 | }else{ 244 | this.ctx.drawImage(RESOURCE_IMAGE,POS["enemy1"][0]+this.dir*this.size,POS["enemy1"][1],32,32,this.x,this.y,32,32); 245 | 246 | //以一定的概率射击 247 | if(this.times %50 ==0){ 248 | var ra = Math.random(); 249 | if(ra < this.shootRate){ 250 | this.shoot(2); 251 | } 252 | this.times = 0; 253 | } 254 | this.move(); 255 | 256 | 257 | } 258 | 259 | }; 260 | 261 | }; 262 | EnemyOne.prototype = new Tank(); 263 | 264 | 265 | /** 266 | * 敌方坦克2 267 | * @param context 画坦克的画布 268 | * @returns 269 | */ 270 | var EnemyTwo = function(context){ 271 | this.ctx = context; 272 | this.isAppear = false; 273 | this.times = 0; 274 | this.lives = 2; 275 | this.isAI = true; 276 | this.speed = 1; 277 | 278 | this.draw = function(){ 279 | this.times ++; 280 | if(!this.isAppear){ 281 | var temp = parseInt(this.times/5)%7; 282 | this.ctx.drawImage(RESOURCE_IMAGE,POS["enemyBefore"][0]+temp*32,POS["enemyBefore"][1],32,32,this.x,this.y,32,32); 283 | if(this.times == 35){ 284 | this.isAppear = true; 285 | this.times = 0; 286 | this.shoot(2); 287 | } 288 | }else{ 289 | this.ctx.drawImage(RESOURCE_IMAGE,POS["enemy2"][0]+this.dir*this.size,POS["enemy2"][1],32,32,this.x,this.y,32,32); 290 | //以一定的概率射击 291 | if(this.times %50 ==0){ 292 | var ra = Math.random(); 293 | if(ra < this.shootRate){ 294 | this.shoot(2); 295 | } 296 | this.times = 0; 297 | } 298 | this.move(); 299 | } 300 | }; 301 | 302 | }; 303 | EnemyTwo.prototype = new Tank(); 304 | 305 | 306 | 307 | /** 308 | * 敌方坦克3 309 | * @param context 画坦克的画布 310 | * @returns 311 | */ 312 | var EnemyThree = function(context){ 313 | this.ctx = context; 314 | this.isAppear = false; 315 | this.times = 0; 316 | this.lives = 3; 317 | this.isAI = true; 318 | this.speed = 0.5; 319 | 320 | this.draw = function(){ 321 | this.times ++; 322 | if(!this.isAppear){ 323 | var temp = parseInt(this.times/5)%7; 324 | this.ctx.drawImage(RESOURCE_IMAGE,POS["enemyBefore"][0]+temp*32,POS["enemyBefore"][1],32,32,this.x,this.y,32,32); 325 | if(this.times == 35){ 326 | this.isAppear = true; 327 | this.times = 0; 328 | this.shoot(2); 329 | } 330 | }else{ 331 | this.ctx.drawImage(RESOURCE_IMAGE,POS["enemy3"][0]+this.dir*this.size+(3-this.lives)*this.size*4,POS["enemy3"][1],32,32,this.x,this.y,32,32); 332 | //以一定的概率射击 333 | if(this.times %50 ==0){ 334 | var ra = Math.random(); 335 | if(ra < this.shootRate){ 336 | this.shoot(2); 337 | } 338 | this.times = 0; 339 | } 340 | this.move(); 341 | } 342 | 343 | }; 344 | 345 | }; 346 | EnemyThree.prototype = new Tank(); 347 | 348 | 349 | 350 | 351 | 352 | -------------------------------------------------------------------------------- /look-def-color/js/game.js: -------------------------------------------------------------------------------- 1 | var _lang = { 2 | zh: {title: "看你有多色",help_txt: "找出所有色块里颜色不同的一个",score: "得分:",btn_pause: "暂停",btn_normal: "普通场",btn_double: "双飞场",btn_normal_mode: "普通模式",btn_double_mode: "双飞模式",btn_reTry: "重来",btn_more_game: "更多游戏",game_pause: "游戏暂停",btn_resume: "继续",loading: "加载中...",lv_txt: ["瞎子", "色盲", "色郎", "色狼", "色鬼", "色魔", "超级色魔", "变态色魔", "孤独求色"],lv_txt2: ["色不起来", "有色心没色胆", "好色之徒", "色胆包天", "色不知耻", "英雄本色", "色射具全", "裸色舔香", "衣冠禽色"],tips: '再得分,就可再打败万人',share_txt_d: "[双飞]",share_txt1: "我怒砍",share_txt2: "分,击败",share_txt3: "%的人,我是[",share_txt4: "],不服来战!",coyright: "版权归博雅所有.侵权必究 v1.2.1",desc: "找出所有色块中颜色不同的一块。分享朋友圈,找到身边的色魔"}, 3 | en: {title: "How strong is your eyesight",help_txt: "Find the box with the different colour",score: "Score:",btn_normal: "normal",btn_double: "double",btn_normal_mode: "normal",btn_double_mode: "double",btn_pause: "Pause",btn_start: "Start",btn_reTry: "Again",btn_more_game: "More games",game_pause: "Pause",btn_resume: "Continues",loading: "loading...",lv_txt: ["Blind", "Very weak", "Weak", "Just so so", "Not bad", "Nice one", "Great", "Amazing", "Insane"],lv_txt2: ["色不起来", "有色心没色胆", "好色之徒", "色胆包天", "色不知耻", "英雄本色", "色射具全", "裸色舔香", "衣冠禽色"],share_txt1: "I passed ",share_txt2: "stages and defeated ",share_txt3: "% people. I am ",share_txt4: ", come to challenge me if you dare!",coyright: "copyright by boyaa. v1.2.0",tips: '再得分,就可再打败万人',desc: "Find the box with the different colour, share it to your friends!"} 4 | } 5 | , _config = { 6 | lang: "zh", 7 | color: { 8 | allTime: 60, 9 | addTime: 0, 10 | lvMap: [2, 3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9] 11 | }, 12 | color2: {allTime: 60,addTime: 0,lvMap: [4, 4, 6, 6, 6, 6, 6, 6, 8]}, 13 | pic: {isOpen: false,allTime: 5,addTime: 0,lvMap: [2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8]} 14 | } 15 | , shareData = { 16 | imgUrl: "http://wbpkh5001.17c.cn/html5/assets/img/find.logo.png?ver=1.1.62", 17 | timeLineLink: "http://url.cn/RN8G9E", 18 | tTitle: _lang[_config.lang].title, 19 | tContent: _lang[_config.lang].desc 20 | }; 21 | 22 | 23 | !function() { 24 | var box = $("#box"), 25 | b = { 26 | lv: $("#room .lv em"), 27 | time: $("#room .time"), 28 | start: $("#dialog .btn-restart"), 29 | pause: $("#room .btn-pause"), 30 | resume: $("#dialog .btn-resume"), 31 | mode: $("#mode"), 32 | dialog: $("#dialog"), 33 | d_content: $("#dialog .content"), 34 | d_pause: $("#dialog .pause"), 35 | d_gameover: $("#dialog .gameover") 36 | }, 37 | c = { 38 | target: 1, 39 | finded: 0, 40 | score: 0, 41 | init: function(type, el, parent) { 42 | this.type = type; 43 | this.target = "color2" == type ? 2 : 1; 44 | this.api = API[type]; 45 | this.config = _config[type]; 46 | this.lang = _lang[_config.lang]; 47 | b.mode.data("type", "color" == type ? "color2" : "color").html("color" == type ? this.lang.btn_double : this.lang.btn_normal); 48 | this.reset(); 49 | this.parent = parent; 50 | this.el = el; 51 | this.renderUI(); 52 | this.inited || this.initEvent(); 53 | this.inited = true; 54 | this.start(); 55 | }, 56 | renderUI: function() { 57 | var isLandscape = 90 == window.orientation || -90 == window.orientation; 58 | var width = isLandscape ? window.innerHeight : window.innerWidth; 59 | width -= 20, width = Math.min(width, 500); 60 | box.width(width).height(width); 61 | this.el.show() 62 | }, 63 | initEvent: function() { 64 | var eventName = "ontouchstart" in document.documentElement ? "touchend" : "click", myGame = this; 65 | $(window).resize(function() { 66 | myGame.renderUI() 67 | }); 68 | box.on(eventName, "span", function() { 69 | var type = $(this).data("type"); 70 | if("a" == type){ 71 | $(this).css("background-color", "#f00").data("type", "").html(""); 72 | myGame.finded++ 73 | if(myGame.finded == myGame.target){ 74 | myGame.nextLv.call(myGame); 75 | } 76 | } 77 | }); 78 | b.pause.on(eventName, _.bind(this.pause, this)); 79 | b.resume.on(eventName, _.bind(this.resume, this)); 80 | b.start.on(eventName, function() { 81 | myGame.score = 0; 82 | b.time.html(0); 83 | myGame.reset(); 84 | myGame.start() 85 | }); 86 | }, 87 | start: function() { 88 | this.time > 5 && b.time.removeClass("danger"); 89 | this.finded = 0; 90 | b.dialog.hide(); 91 | this._pause = false; 92 | this.lv = "undefined" != typeof this.lv ? this.lv + 1 : 0; 93 | this.lvMap = this.config.lvMap[this.lv] || _.last(this.config.lvMap); 94 | this.renderMap(); 95 | this.renderInfo(); 96 | this.timer || 97 | (this.timer = setInterval(_.bind(this.tick, this), 1000)); 98 | }, 99 | share: function() { 100 | }, 101 | resume: function() { 102 | b.dialog.hide(); 103 | this._pause = false 104 | }, 105 | pause: function() { 106 | this._pause = true; 107 | b.d_content.hide(); 108 | b.d_pause.show(); 109 | b.dialog.show() 110 | }, 111 | tick: function() { 112 | if (this._pause) { 113 | return 114 | } 115 | else{ 116 | this.time--; 117 | this.time < 6 && b.time.addClass("danger"); 118 | if(this.time < 0){ 119 | this.gameOver() 120 | } 121 | else{ 122 | b.time.text(parseInt(this.time)); 123 | } 124 | } 125 | }, 126 | renderMap: function() { 127 | if (!this._pause) { 128 | var n = this.lvMap * this.lvMap, 129 | c = "", d = "lv" + this.lvMap; 130 | _(n).times(function() { 131 | c += "" 132 | }); 133 | box.attr("class", d).html(c); 134 | this.api.render(this.lvMap, this.lv); 135 | } 136 | }, 137 | renderInfo: function() { 138 | this.score += "color2" == this.type ? this.lvMap / 2 : 1; 139 | b.lv.text(this.score) 140 | }, 141 | gameOver: function() { 142 | var d = this.api.getGameOverText(this.score); 143 | this.lastScore = this.score; 144 | this.lastGameTxt = d.txt; 145 | b.d_content.hide(); 146 | b.d_gameover.show().find("h3").html(this.lastGameTxt); 147 | 148 | box.find("span").fadeOut(1500, function() { 149 | b.dialog.show() 150 | }); 151 | if ( "color2" == this.type) { 152 | var e = [2, 3, 4][parseInt(2 * Math.random())]; 153 | $("#_score").html(e); 154 | var f; 155 | f = this.socre < 70 ? (20 + 10 * Math.random()).toFixed(1) : this.socre < 80 ? (30 + 20 * Math.random()).toFixed(1) : this.socre < 90 ? (70 + 10 * Math.random()).toFixed(1) : this.socre < 100 ? (100 + 100 * Math.random()).toFixed(1) : this.socre < 110 ? (60 + 10 * Math.random()).toFixed(1) : this.socre < 120 ? (30 + 20 * Math.random()).toFixed(1) : this.socre < 130 ? (10 + 10 * Math.random()).toFixed(1) : (5 + 10 * Math.random()).toFixed(1); 156 | $("#_num").html(f), $("#tips").show() 157 | } else 158 | $("#tips").hide(); 159 | this._pause = true; 160 | var g = "color2" == this.type ? "d_" : ""; 161 | }, 162 | reset: function() { 163 | this.time = this.config.allTime; 164 | this.lv = -1 165 | }, 166 | nextLv: function() { 167 | this.time += this.config.addTime; 168 | b.time.text(parseInt(this.time)); 169 | if(!this._pause) 170 | this.start(); 171 | } 172 | }; 173 | window.Game = c; 174 | }(); -------------------------------------------------------------------------------- /photo-wall/a/stat.php: -------------------------------------------------------------------------------- 1 | (function(){function l(){this.c="5796950";this.R="z";this.N="pic1";this.K="";this.M="";this.o="1392358528";this.P="z7.cnzz.com";this.L="";this.s="CNZZDATA"+this.c;this.r="_CNZZDbridge_"+this.c;this.G="_cnzz_CV"+this.c;this.u="0";this.B={};this.a={};this.la()}function g(a,b){try{var c=[];c.push("siteid=5796950"); 2 | c.push("name="+d(a.name));c.push("msg="+d(a.message));c.push("r="+d(h.referrer));c.push("page="+d(f.location.href));c.push("agent="+d(f.navigator.userAgent));c.push("ex="+d(b));c.push("rnd="+Math.floor(2147483648*Math.random()));(new Image).src="http://jserr.cnzz.com/log.php?"+c.join("&")}catch(e){}}var h=document,f=window,d=encodeURIComponent,k=decodeURIComponent,p=unescape,r=escape,m="https:"===f.location.protocol?"https:":"http:",s=m+"//c.cnzz.com/core.php";l.prototype={la:function(){try{this.U(), 3 | this.J(),this.ia(),this.H(),this.m(),this.ga(),this.fa(),this.ja(),this.j(),this.ea(),this.ha(),this.ka(),this.ca(),this.aa(),this.da(),this.qa(),f[this.r]=f[this.r]||{},this.ba("_cnzz_CV")}catch(a){g(a,"i failed")}},oa:function(){try{var a=this;f._czc={push:function(){return a.C.apply(a,arguments)}}}catch(b){g(b,"oP failed")}},aa:function(){try{var a=f._czc;if("[object Array]"==={}.toString.call(a))for(var b=0;bthis.a.b[b].g&&delete this.a.b[b];this.w()}catch(c){g(c,"cCV failed")}},w:function(){try{var a=[],b,c,e;for(e in this.a.b){var f=[];f.push(e);f.push(this.a.b[e].T);f.push(this.a.b[e].g);b=f.join("|");a.push(b)}if(0===a.length)return!0; 8 | var k=new Date;k.setTime(k.getTime()+157248E5);c=this.G+"=";this.b=d(a.join("&"));c+=this.b;c+="; expires="+k.toUTCString();h.cookie=c+"; path=/"}catch(l){g(l,"sCV failed")}},ca:function(){try{if(""!==f.location.hash)return this.F=f.location.href}catch(a){g(a,"gCP failed")}},j:function(){try{return this.a.ra=h.referrer||""}catch(a){g(a,"gR failed")}},ea:function(){try{return this.a.n=f.navigator.systemLanguage||f.navigator.language,this.a.n=this.a.n.toLowerCase(),this.a.n}catch(a){g(a,"gL failed")}}, 9 | ha:function(){try{return this.a.Q=f.screen.width&&f.screen.height?f.screen.width+"x"+f.screen.height:"0x0",this.a.Q}catch(a){g(a,"gS failed")}},m:function(){try{return this.a.na=this.h("ntime")||"none"}catch(a){g(a,"gLVST failed")}},I:function(){try{return this.a.q=this.h("ltime")||(new Date).getTime()}catch(a){g(a,"gFVBT failed")}},ga:function(){try{var a=this.h("cnzz_a");if(null===a)a=0;else{var b=1E3*this.m(),c=new Date;c.setTime(b);(new Date).getDate()===c.getDate()?a++:a=0}return this.a.v=a}catch(e){g(e, 10 | "gRT failed")}},fa:function(){try{return this.a.e=this.h("rtime"),null===this.a.e&&(this.a.e=0),0r(a).indexOf("%u")?!1:!0},k:function(a){try{for(var b=a.length,c=null,d=0;d