首页宝宝踢:脚印改实心软边压痕,看得出来(v26110645)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<title>兜爸心选 · 孕育陪伴</title>
|
||||
<!-- 11-04 UGC 总开关(孕妈广场 + 测一测,后台 /box_bm/plaza 顶部切换),见 js/ugc.js -->
|
||||
<script src="js/ugc.js?v=26110702"></script>
|
||||
<!-- V:26110644 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<!-- V:26110645 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<link rel="stylesheet" href="mama-box.css">
|
||||
<link rel="stylesheet" href="night.css?v=26110608">
|
||||
<link rel="stylesheet" href="js/wh-cm.css?v=26110642">
|
||||
@@ -2732,7 +2732,7 @@ html.night .rs-pan .rp-card{background:rgba(255,255,255,.06);border-color:rgba(2
|
||||
})();
|
||||
</script>
|
||||
<!-- 2026-10-03 首页彩蛋:宝宝在肚皮底下动(独立文件,删掉这一行即整体下线;开关在「隐私权限」) -->
|
||||
<script src="js/bump.js?v=26110644"></script>
|
||||
<script src="js/bump.js?v=26110645"></script>
|
||||
<!-- 2026-10-04 首页头图:按孕周换宝宝 + 阳光水波(独立文件) -->
|
||||
<script src="js/hero-fx.js"></script>
|
||||
<!-- 2026-10-05 首页头图:宝宝时不时动一动小手小脚(独立文件,删掉这一行即下线) -->
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26110644';
|
||||
var VER = '26110645';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
|
||||
22
js/bump.js
22
js/bump.js
@@ -459,15 +459,21 @@
|
||||
// 脚印:脚跟 / 足弓外沿 / 前掌 / 五个脚趾,单位坐标(脚尖朝 -y),整体缩到鼓包的 0.62
|
||||
const FOOT = [[0, .42, .2], [.1, .12, .15], [-.02, -.18, .24], [-.17, -.5, .1], [-.04, -.57, .08], [.07, -.55, .07], [.16, -.5, .06], [.23, -.41, .055]];
|
||||
function footprint(x, y, rx, ry, ang, k) {
|
||||
/* 11-07 用户:「能看出小脚印」→ 压痕加深约 2.5 倍、整体放大到 0.7、顶到一半就开始显出来(原来淡到几乎看不见) */
|
||||
/* 11-07 用户:「能看出小脚印」→ 原来是全软边的极淡阴影(0.075),实际看不出来。
|
||||
改成实心中间 + 软边的压痕(暖灰,峰值约 0.38),左上错开一层白边当受光沿,顶到一小半就开始显出来 */
|
||||
if (k < .15) return;
|
||||
const a = Math.min(1, (k - .15) / .6), f = .7, dark = [], lite = [];
|
||||
for (const [px, py, r] of FOOT) {
|
||||
// 压痕:中性灰、很淡;左上角错开一点白,像皮肤底下被顶出的浅浅轮廓,而不是画上去的图案
|
||||
dark.push([px * f, py * f, r * f * 1.35, 'rgba(110,70,58,' + (.2 * a).toFixed(3) + ')']);
|
||||
lite.push([px * f - .03, py * f - .04, r * f * 1.1, 'rgba(255,255,255,' + (.28 * a).toFixed(3) + ')']);
|
||||
}
|
||||
blob(x, y, rx, ry, ang, dark.concat(lite));
|
||||
const a = Math.min(1, (k - .15) / .6), f = .72;
|
||||
cx.save(); cx.translate(x, y); cx.rotate(ang); cx.scale(rx, ry);
|
||||
const dot = (ox, oy, r, rgb, al) => {
|
||||
const g = cx.createRadialGradient(ox, oy, 0, ox, oy, r);
|
||||
g.addColorStop(0, 'rgba(' + rgb + ',' + al.toFixed(3) + ')');
|
||||
g.addColorStop(.55, 'rgba(' + rgb + ',' + (al * .8).toFixed(3) + ')');
|
||||
g.addColorStop(1, 'rgba(' + rgb + ',0)');
|
||||
cx.fillStyle = g; cx.beginPath(); cx.arc(ox, oy, r, 0, 7); cx.fill();
|
||||
};
|
||||
for (const [px, py, r] of FOOT) dot(px * f - .025, py * f - .03, r * f * 1.25, '255,255,255', .32 * a);
|
||||
for (const [px, py, r] of FOOT) dot(px * f, py * f, r * f * 1.05, '120,72,58', .38 * a);
|
||||
cx.restore();
|
||||
}
|
||||
function paint() {
|
||||
cx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user