小辣椒 发表于 2022-8-30 19:47

如果你想你可以赢(同玩岁月粒子效果)


<style>
#papa { left: -390px; /*margin: auto;*/ width: 1368px; height: 722px; top: 150px; display: grid; place-items: center; background: teal url('https://wj.zp68.com/lxx/yunhua/2022/08/30/IF.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; z-index: 3; }
#canv { position: absolute; bottom: 200px; left: 550px; cursor: pointer; box-reflect: below 0 linear-gradient(transparent, transparent 50%, rgba(255,255,255,.3)); -webkit-box-reflect: below 0 linear-gradient(transparent, transparent 50%, rgba(255,255,255,.3)); }
#lrcbox { position: absolute; left: 50px; top: 500px; font: bold 30px / 50px sans-serif; color:Cornislk; text-shadow: 1px 1px 1px #CCC, 10px 10px 10px rgba(0, 0, 0, .35); user-select: none; }
</style>

<div id="papa">
        <canvas id="canv"></canvas>
        <span id="lrcbox">you can win if you want<br>【如果你想你可以赢】</span>
</div>

<script>
let ctx = canv.getContext('2d'),
        w = canv.width = 70,
        h = canv.height = 50,
        lines = [],
        total = 10,
        lineWidth = (w - 2 * total) / total,
        aud = new Audio();

aud.src = 'https://wj.zp68.com/lxx/yunhua/2022/08/30/Want.mp3';
aud.loop = true;
aud.autoplay = true;

aud.addEventListener('timeupdate', change);
canv.onclick = () => aud.paused ? aud.play() : aud.pause();

function Line(x1,y1,x2,y2) {
        this.x1 = x1;
        this.y1 = y1;
        this.x2 = x2;
        this.y2 = y2;
        lines.push(this);
}

Line.prototype.draw = function() {
        ctx.beginPath();
        ctx.strokeStyle = this.color;
        ctx.lineWidth = lineWidth;
        ctx.moveTo(this.x1, this.y1);
        ctx.lineTo(this.x2,this.y2);
        ctx.stroke();
}

for(let j = 0; j < total; j ++) {
        let line = new Line();
        line.x1 = j * lineWidth + j*2 + lineWidth / 2 + 1;
        line.y1 = h;
        line.x2 = line.x1;
        line.y2 = 60;
        line.color = 'purple';
        line.draw();
}

function change() {
        ctx.clearRect(0,0,w,h);
        for(let item of lines) {
                item.color = '#' + Math.random().toString(16).substr(-6);
                item.y2 = h - (Math.random() * h);
                item.draw();
        }
}

change();

</script>
<br><br><br><br><br><br><br><br><br><br>

小辣椒 发表于 2022-8-30 19:49

@走过岁月

岁月捣鼓一个玩玩,好久没有玩你的粒子效果了{:4_187:}

小辣椒 发表于 2022-8-30 19:49

@马黑黑
谢谢黑黑的单曲频谱播放器

绿叶清舟 发表于 2022-8-30 19:58

漂亮啊,这身材岁月喜欢

小辣椒 发表于 2022-8-30 20:00

绿叶清舟 发表于 2022-8-30 19:58
漂亮啊,这身材岁月喜欢

哈哈~~~清舟也是了解岁月的{:4_173:}

马黑黑 发表于 2022-8-30 20:19

这才叫闪亮登场{:4_170:}

绿叶清舟 发表于 2022-8-30 20:26

小辣椒 发表于 2022-8-30 20:00
哈哈~~~清舟也是了解岁月的

就了解了这一点{:4_189:}

红影 发表于 2022-8-30 20:51

着粒子效果带来一种火爆的感觉,气氛火爆,美女的身材更火爆{:4_173:}

走过岁月 发表于 2022-8-30 21:20

小辣椒 发表于 2022-8-30 19:49
@走过岁月

岁月捣鼓一个玩玩,好久没有玩你的粒子效果了

来了

走过岁月 发表于 2022-8-30 21:21

看入迷了差点忘了回帖

走过岁月 发表于 2022-8-30 21:23

看到性感的小内内,诱惑哦

走过岁月 发表于 2022-8-30 21:25

这身材加上这音乐,劲爆

走过岁月 发表于 2022-8-30 21:26

差点忘了喊冬雨兄一起欣赏 {:4_195:}

梦油 发表于 2022-8-31 09:57

小辣椒朋友出手不凡啊!

加林森 发表于 2022-8-31 17:46

好漂亮的粒子效果。真漂亮。大美女要让岁月流鼻血了。{:4_199:}

小辣椒 发表于 2022-8-31 20:47

马黑黑 发表于 2022-8-30 20:19
这才叫闪亮登场

哈哈~~~美吧

小辣椒 发表于 2022-8-31 20:47

绿叶清舟 发表于 2022-8-30 20:26
就了解了这一点

其实岁月真的很怕羞的一个人{:4_173:}

小辣椒 发表于 2022-8-31 20:48

红影 发表于 2022-8-30 20:51
着粒子效果带来一种火爆的感觉,气氛火爆,美女的身材更火爆

亲爱的,诱惑一下的{:4_182:}

小辣椒 发表于 2022-8-31 20:48

走过岁月 发表于 2022-8-30 21:20
来了

岁月晚上好,晓得你很忙,还是上来了{:4_187:}

小辣椒 发表于 2022-8-31 20:49

走过岁月 发表于 2022-8-30 21:21
看入迷了差点忘了回帖

真的假的{:4_170:}
页: [1] 2 3
查看完整版本: 如果你想你可以赢(同玩岁月粒子效果)