楼主: 凡哥

[碎语] 源码小屋

[复制链接]
一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-10 16:50 | 显示全部楼层
糊涂仙儿 发表于 2024-6-10 16:06
说太对了。端午安康

点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-11 07:44 | 显示全部楼层

2024年6月11日 星期二

Beyond - 午夜怨曲

<style> #tz { margin: 30px 0 30px calc(50% - 602px); width: 1024px; height: 680px; background: url('https://638183.freep.cn/638183/t24/2/wyyq.jpg') no-repeat center/cover; box-shadow: 2px 2px 6px gray; overflow: hidden; z-index: 1; display: grid; place-items: center; position: relative; } #lrc { position: absolute; top: 20px; font: normal 30px sans-serif; text-shadow: 1px 1px 1px white; background: linear-gradient(to right, red, blue, green, red); background-clip: text; -webkit-background-clip: text; color: transparent; filter: drop-shadow(-1px -1px 6px gray); user-select: none; animation: swear 6s linear infinite alternate var(--state); } #player { position: absolute; left: calc(50% - 140px); bottom: 20px; width: 280px; height:10px; background: linear-gradient(to right, var(--color) var(--prg), transparent 0); border: 1px solid var(--color); border-radius: 6px; display: grid; place-items: center; --color: rgba(170, 70, 140, .8); --prg: 0%; --btnSize: 50px;} #player::before, #player::after { position: absolute; content: ''; } #player::before { width: var(--btnSize); height: var(--btnSize); top: calc(var(--btnSize) * -1 - 5px); background: url('https://638183.freep.cn/638183/t23/btn/f5.png') no-repeat center/cover; animation: rot 6s linear infinite var(--state);} #player::after { content: attr(data-time); inset: -30px 0 10px 0; text-align: justify; text-align-last: justify; font-size: 14px; color: var(--color); pointer-events: none; } .vid { position: absolute; bottom: 0; width: 100%; height: calc(100% + 60px); object-fit: cover; mix-blend-mode: screen; opacity: .5; pointer-events: none; } @keyframes rot { to { transform: rotate(360deg); } } @keyframes swear {     from { transform: perspective(400px) rotateY(20deg); }     to { transform: perspective(400px) rotateY(-20deg); } } </style>   <div id="tz">     <audio id="aud" src="https://www.kumeiwp.com/wj/185715/2023/12/29/50af91e6f3d50ca6948569d83241d798.mp3" autoplay loop></audio>     <video class="vid" src="https://img.tukuppt.com/video_show/2475824/00/08/36/5d1ec038a435c.mp4" autoplay loop disablePictureInPicture muted></video>     <div id="lrc">HUA CHAO PLAYER</div>     <div id="player"></div> </div>   <script>     var script = document.createElement('script');     script.charset = 'utf-8';     script.src = 'https://638183.freep.cn/638183/web/js2024/tube3dlrc.js';     document.body.appendChild(script);     var lrcAr = [ [1,"Beyond - 午夜怨曲",2], [5,"作词 : 叶世荣",3.3], [6.31,"作曲 : 黄家驹",2], [8.25,"编曲 : Beyond",2.9], [10.62,"监制 : 王纪华/Beyond",2.8], [13.4,"电子合成器 : 周启生",14.1], [27.54,"从来不知想拥有多少的理想",6.4], [33.94,"还离不开种种困忧",6.3], [40.26,"勉强去掩饰失意的感觉",6.0], [46.21,"再次听到昨日的冷嘲",6.5], [52.73,"徘徊於街中恐怕只得孤独",6.6], [59.32,"寻回思忆中的碎片",6.2], [65.49,"变作了一堆草芥风中散",6.0], [71.5,"与你奏过午夜的怨曲",5.1], [76.57,"总有挫折打碎我的心",3.2], [79.77,"紧抱过去抑压了的手",4.4], [84.12,"我与你也彼此一起艰苦过",5.0], [89.1,"写上每句冰冷冷的诗",3.3], [92.39,"不会放弃高唱这首歌",4.2], [96.59,"我与你也彼此真的相识过",20.6], [116.23,"从回忆中找不到天真的笑声",5.1], [122.31,"曾留不得心中斗争",5.1], [127.46,"每次去担当失意的主角",7.6], [135.05,"冷笑变作故事的作者",4.8], [139.82,"总有挫折打碎我的心",3.2], [142.98,"紧抱过去抑压了的手",3.9], [146.91,"我与你也彼此一起艰苦过",5.4], [152.29,"写上每句冰冷冷的诗",3.3], [155.61,"不会放弃高唱这首歌",4.3], [159.93,"我与你也彼此真的相识过",32.1], [192.05,"啊~啊将障碍能撕破",10.6], [202.62,"总有挫折打碎我的心",3.5], [206.17,"紧抱过去抑压了的手",4.4], [210.53,"我与你也彼此一起艰苦过",5.0], [215.54,"写上每句冰冷冷的诗",3.3], [218.8,"不会放弃高唱这首歌",4.3], [223.15,"我与你也彼此真的相识过",5.1], [228.25,"总有挫折打碎我的心",3.1], [231.39,"紧抱过去抑压了的手",4.4], [235.8,"我与你也彼此一起艰苦过",5.0], [240.79,"写上每句冰冷冷的诗",3.2], [244.02,"不会放弃高唱这首歌",4.3], [248.36,"我与你也彼此真的相识过",5.1], [253.47,"总有挫折打碎我的心",3.3], [256.76,"紧抱过去抑压了的手",4.3], [261.09,"我与你也彼此一起艰苦过",6] ]; </script>

评分

1

查看全部评分

点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-11 07:48 | 显示全部楼层
说明:

tube3dlrc.js 对歌词数组 lrcAr 每句歌词的第二个时间信息不敏感,实际上没有使用该信息。所以,歌词制作只需转换成花潮格式就可以了,甚至可以不需要第二个时间信息。如下格式的歌词数组也是可以的:

var lrcAr = [[0,"歌词一"],[3.2,"歌词二"],[5,"..."],[241.35,"歌词N"]];

相关约定:

   ① 帖子 id="tz"
   ② audio id="aud"
   ③ video class="vid"
   ④ 播放控制器标签 id="player"
   ⑤ 歌词显示标签 id="lrc"
   ⑥ 歌词数组 var lrcAr = [[0,"歌词一",2],[3.2,"歌词二"],3,[5,"...",6],[241.35,"歌词N",8.1]];

评分

1

查看全部评分

点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-6-11 21:43 | 显示全部楼层
凡哥 发表于 2024-6-11 07:48
说明:

tube3dlrc.js 对歌词数组 lrcAr 每句歌词的第二个时间信息不敏感,实际上没有使用该信息。所以,歌 ...

这个歌词不需要第二遍微调,节省一些时间
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-12 19:22 | 显示全部楼层
花简静 发表于 2024-6-11 21:43
这个歌词不需要第二遍微调,节省一些时间

点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-12 19:23 | 显示全部楼层

2024年6月12日 星期三

阿兰 - 明日赞歌

<style> #outBox { margin: 30px 0 0 calc(50% - 730px); width: 1280px; height: 850px; background: url('https://638183.freep.cn/638183/t24/3/alan.jpg') no-repeat center/cover; border: 1px solid gray; overflow: hidden; z-index: 1; position: relative; } #innerBox { position: absolute; right: 30px; top: calc(50% - 150px); width: 300px; height: 300px; background: inherit; border-radius: 50%; box-shadow: inset 0 0 100px rgba(0,0,128,.5), 0 0 36px rgba(0,0,128,.5); cursor: pointer; transition: 1s; } #innerBox:hover { height: 350px; } </style>   <div id="outBox">     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=26402257" autoplay loop></audio>     <div id="innerBox" title="播放"></div> </div>   <script> (function() {     let ani, idx = 0;     const pics = new Array(10).fill(0).map((item, key) => 'https://638183.freep.cn/638183/t24/3/alan' + (key + 1) + '.jpg');     const showPic = () => {         innerBox.style.backgroundImage = `url(${pics[idx]})`;         var outwidth = outBox.offsetWidth, outheight = outBox.offsetHeight;         var inwidth = innerBox.offsetWidth, inheight = innerBox.offsetHeight;         var cx = (outwidth - inwidth - 150), cy = (outheight - inheight) / 2;           var fly = [             {right: `-${inwidth}px`, top: `${cy}px`},             {right: `${cx}px`, top: `${cy}px`, offset: 0.25},             {right: `${cx}px`, top: `${cy - 30}px`},             {right: `${cx}px`, top: `${cy + 30}px`},             {right: `${cx}px`, top: `${cy - 30}px`},             {right: `${cx}px`, top: `${cy}px`},             {right: `${cx}px`, top: `${cy}px`, offset: 0.95},             {right: `${outwidth}px`, top: `${cy}px`}         ];         ani = innerBox.animate(fly, 10000);         ani.onfinish = () => {             idx = (idx + 1) % (pics.length);             showPic();         };     };     const mState = () => {         aud.paused ? ani.pause() : ani.play();         innerBox.title = ['暂停','播放'][+aud.paused];     };     aud.onplaying = aud.onpause = () => mState();     innerBox.onmouseover = () => {if(!aud.paused) ani.pause();};     innerBox.onmouseout = () => {if(!aud.paused) ani.play();};     innerBox.onclick = () => aud.paused ? aud.play() : aud.pause();     showPic(); })(); </script>

评分

1

查看全部评分

点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-6-12 21:02 | 显示全部楼层

一般歌曲四分钟,微调也得四分钟。省去自然是好一些的。。哎,老师我说错了么
点评
回复

使用道具

笑傲江湖
一叶知秋 版主勋章 山高为峰 山外有山 45 樱果相依 24 46 47 48 一坛酒
发表于 2024-6-12 22:51 | 显示全部楼层
凡兄真厉害。。。
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-14 12:07 | 显示全部楼层

2024年6月14日 星期五

大湖

<style> #tz { margin: 30px 0 30px calc(50% - 730px); width: 1280px; height: 750px; background: lightblue; box-shadow: 3px 3px 6px rgba(0,0,0,.6); overflow: hidden; user-select: none; z-index: 1; perspective: 2000px; position: relative; } #picbox { position: absolute; opacity: .8; border-radius: 20px; transform-style: preserve-3d; cursor: pointer; } #vid { position: absolute; bottom: 0; width: 100%; height: calc(100% + 65px); object-fit: cover; pointer-events: none; } </style>   <div id="tz">     <video id="vid" src="https://img.tukuppt.com/video_show/2418175/00/01/83/5b4b0c1e236a1.mp4" autoplay loop muted disablePictureInPicture></video>     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1411157155" autoplay loop></audio>     <img id="picbox" src="https://638183.freep.cn/638183/small/hxxb.webp" alt="" /> </div>   <script> (function() {     const pics = new Array(5).fill(0).map((_,k) => 'https://638183.freep.cn/638183/t24/3/dh' + (k+1) + '.jpeg');     let ani, ar = [];     const loadImages = async urls => {         const promises = [];         for (let url of urls) {             promises.push(new Promise(resolve => {                 const img = new Image();                 img.onload = () => {                     ar.push([`${img.src}`, `${img.naturalWidth}`, `${img.naturalHeight}`]);                     resolve();                 };                 img.src = url;             }));         }         await Promise.all(promises);         showPic();     };     const showPic = () => {         let idx = Math.floor(Math.random() * pics.length);         let w1 = tz.offsetWidth, h1 = tz.offsetHeight, w2 = ar[idx][1], h2 = ar[idx][2];         let x = Math.random() > 0.5 ? w1 : -w1, y = Math.random() > 0.5 ? h1 : -h2;         picbox.src = ar[idx][0];         const kfs = [             {left: `${x}px`, top: `${y}px`},             {left: `${(w1 - w2) / 2}px`, top: `${(h1 - h2) / 2}px`, transform: `rotateY(0)`, offset: 0.1},             {transform: `rotateY(-15deg)`},             {transform: `rotateY(0)`},             {transform: `scale(1.2)`},             {transform: `scale(0.8)`},             {transform: `rotateY(15deg)`},             {left: `${(w1 - w2) / 2}px`, top: `${(h1 - h2) / 2}px`, transform: `rotateY(0)`, offset: 0.9},             {left: `${x}px`, top: `${y}px`, transform: `rotateZ(180deg) scale(0)`},         ];         ani = picbox.animate(kfs, 10000);         ani.onfinish = () => showPic();     };     picbox.onclick = () => aud.paused ? (aud.play(), ani.play()) : (aud.pause(), ani.pause());     picbox.onmouseover = () => { if(!aud.paused) ani.pause(); };     picbox.onmouseout = () => { if(!aud.paused) ani.play(); };     loadImages(pics); })(); </script>

评分

1

查看全部评分

点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-14 20:52 | 显示全部楼层
令狐冲 发表于 2024-6-12 22:51
凡兄真厉害。。。

果酱
点评
回复

使用道具

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|千山论坛

GMT+8, 2024-9-20 05:35

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表