Confetti.prototype.render = function render(now) {
var progress = this.progress.tick(now);
this.canvas.width = this.width;
this.canvas.height = this.height;
for (var i = 0; i <this.length;++i){this.ctx.save();this.ctx.translate(this.sprites[i].position.initX+this.sprites[i].rotation*Confetti.CONST.ROTATION_RATE*progress,this.sprites[i].position.initY+progress*(this.height+this.yRange));this.ctx.rotate(this.sprites[i].rotation);this.ctx.drawImage(this.sprites[i],-Confetti.CONST.SPRITE_WIDTH*Math.abs(Math.sin(progress*Math.PI*2*this.sprites[i].speed))/2,-Confetti.CONST.SPRITE_HEIGHT/2,Confetti.CONST.SPRITE_WIDTH*Math.abs(Math.sin(progress*Math.PI*2*this.sprites[i].speed)),Confetti.CONST.SPRITE_HEIGHT);this.ctx.restore();}requestAnimationFrame(this.render);};_createClass(Confetti,null,[{key:"CONST",get:functionget(){return{SPRITE_WIDTH:9,SPRITE_HEIGHT:16,PAPER_LENGTH:100,DURATION:8000,ROTATION_RATE:50,COLORS:["#EF5350","#EC407A","#AB47BC","#7E57C2","#5C6BC0","#42A5F5","#29B6F6","#26C6DA","#26A69A","#66BB6A","#9CCC65","#D4E157","#FFEE58","#FFCA28","#FFA726","#FF7043","#8D6E63","#BDBDBD","#78909C"]};}}]);returnConfetti;}();(function(){varDURATION =8000,LENGTH =120;newConfetti({width:window.innerWidth,height:window.innerHeight,length:120,duration:8000});;})();</script></body>
http://vditor.b3log.org/demo/ 终于完成 vditor demo。发个红包庆祝下
今天单个红包可以发 520 哦
废了我好久时间,打码去了
他这个都没有开头,连日记都不如
红包应该可以做成个链接,到处发
感人之点在结尾,但是这种人应该不值得被原谅。
我看完了
求地址,我要去吃瓜
把两段连起来就可以两
@233333 这个 js 要有钱才能看见。记得捐赠完不要刷页面,直接看。
@PeterChu 幸苦了,不行就放弃吧
好好努力,别在这瞎混了,我改 bug 去了。
@88250 发现垃圾数据。红包应该至少发 2 个
谁提的红包功能?站出来。害的我昨晚 2 点才睡。
不玩了
捡漏了 8 个红包
好吧,我的能力只能如此了。你们自己想去