悄悄话夜空八改:满天四角星有大有小一闪一闪、流星头改白色光滴无十字、尾巴软边 (v26100172)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
14
js/app.js
14
js/app.js
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26100171';
|
||||
var VER = '26100172';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
@@ -3357,10 +3357,12 @@
|
||||
const box = $('#wskStars');
|
||||
if (box.childElementCount) return;
|
||||
let h = '';
|
||||
for (let k = 0; k < 130; k++) {
|
||||
const r = Math.random(), sz = r < .75 ? 1 + Math.random() : r < .95 ? 2 + Math.random() : 3;
|
||||
h += '<i style="left:' + (Math.random() * 100).toFixed(1) + '%;top:' + (Math.random() * 92).toFixed(1) + '%;width:' + sz.toFixed(1) + 'px;height:' + sz.toFixed(1) +
|
||||
'px;--o:' + (.25 + Math.random() * .6).toFixed(2) + ';animation-delay:-' + (Math.random() * 6).toFixed(1) + 's;animation-duration:' + (3 + Math.random() * 4).toFixed(1) + 's"></i>';
|
||||
/* 八改(用户:「星空里都要是星星,不要圆点;有大有小,有的一闪一闪」):全部用四角星形,
|
||||
大小 4–15px,约一半会闪 */
|
||||
for (let k = 0; k < 120; k++) {
|
||||
const r = Math.random(), sz = r < .68 ? 4 + Math.random() * 3 : r < .94 ? 8 + Math.random() * 3 : 12 + Math.random() * 3;
|
||||
h += '<i class="' + (Math.random() < .5 ? 'tw' : '') + '" style="left:' + (Math.random() * 100).toFixed(1) + '%;top:' + (Math.random() * 92).toFixed(1) + '%;width:' + sz.toFixed(1) + 'px;height:' + sz.toFixed(1) +
|
||||
'px;--o:' + (.35 + Math.random() * .6).toFixed(2) + ';animation-delay:-' + (Math.random() * 6).toFixed(1) + 's;animation-duration:' + (1.6 + Math.random() * 3).toFixed(1) + 's"></i>';
|
||||
}
|
||||
box.innerHTML = h;
|
||||
}
|
||||
@@ -3372,7 +3374,7 @@
|
||||
const h = hsh(it.id), c = i % cols, r = Math.floor(i / cols);
|
||||
const x = 36 + ((c + .5 + ((h % 100) / 100 - .5) * .7) / cols) * 58;
|
||||
const y = 21 + ((r + .5 + (((h >> 8) % 100) / 100 - .5) * .6) / rows) * 38;
|
||||
const sz = it.mine ? 9 : Math.round(4 + Math.min(it.hugs || 0, 30) / 30 * 6);
|
||||
const sz = it.mine ? 26 : Math.round(15 + Math.min(it.hugs || 0, 30) / 30 * 11);
|
||||
return '<button type="button" class="wsk-st' + (it.mine ? ' mine' : '') + (seen.has(it.id) ? ' seen' : '') + (i === fresh && !seen.size ? ' hint' : '') +
|
||||
'" data-go="' + (i + 1) + '" style="left:' + x.toFixed(1) + '%;top:' + y.toFixed(1) + '%;--s:' + sz + 'px;--tw:' + (2 + (h % 30) / 10).toFixed(1) + 's" aria-label="' + esc(it.text) + '"><i></i></button>';
|
||||
}).join('');
|
||||
|
||||
Reference in New Issue
Block a user