style(首页彩蛋): 胎动只凸起不变色,小脚丫带隐约脚印 (v26100405)
鼓包/摁压的暖红阴影与桃色高光改为中性灰阴影 + 白高光;foot/kick 峰值时叠一层极淡软边脚印(脚跟/前掌/五趾)。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>兜爸心选 · 孕育陪伴</title>
|
||||
<!-- V:26100404 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<!-- V:26100405 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<link rel="stylesheet" href="mama-box.css">
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<!-- 共享助手:授权/跳商城/位置上报(分享卡片同步,见 docs/h5-auth-standard.md 第四节) -->
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26100404';
|
||||
var VER = '26100405';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
|
||||
30
js/bump.js
30
js/bump.js
@@ -409,6 +409,18 @@
|
||||
}
|
||||
cx.restore();
|
||||
}
|
||||
// 脚印:脚跟 / 足弓外沿 / 前掌 / 五个脚趾,单位坐标(脚尖朝 -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) {
|
||||
if (k < .25) return;
|
||||
const a = (k - .25) / .75, f = .62, dark = [], lite = [];
|
||||
for (const [px, py, r] of FOOT) {
|
||||
// 压痕:中性灰、很淡;左上角错开一点白,像皮肤底下被顶出的浅浅轮廓,而不是画上去的图案
|
||||
dark.push([px * f, py * f, r * f * 1.5, 'rgba(70,62,58,' + (.075 * a).toFixed(3) + ')']);
|
||||
lite.push([px * f - .03, py * f - .04, r * f * 1.2, 'rgba(255,255,255,' + (.12 * a).toFixed(3) + ')']);
|
||||
}
|
||||
blob(x, y, rx, ry, ang, dark.concat(lite));
|
||||
}
|
||||
function paint() {
|
||||
cx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||
cx.clearRect(0, 0, cv.width, cv.height);
|
||||
@@ -417,24 +429,26 @@
|
||||
if (H > .1) {
|
||||
const P = ft.part, sp = ft.spread.v, k = Math.min(H / 9, 1.3) / sp;
|
||||
blob(ft.x + ft.ox + ox, ft.y + ft.oy + oy, P.rx * sp, P.ry * sp, ft.ang + (mode === 'show' ? ft.wob : 0), [
|
||||
[.14, .2, 1.05, 'rgba(160,64,40,' + (.24 * k).toFixed(3) + ')'],
|
||||
[.34, .42, .7, 'rgba(150,55,32,' + (.24 * k).toFixed(3) + ')'],
|
||||
[-.06, -.08, .62, 'rgba(255,196,170,' + (.2 * k).toFixed(3) + ')'],
|
||||
[-.26, -.32, .5, 'rgba(255,250,244,' + (.32 * k).toFixed(3) + ')']
|
||||
// 2026-10-04 用户:「凸起就行,不要变颜色(之前踢完泛浅红)」—— 只留中性灰的背光阴影 + 白高光,不带任何暖色
|
||||
[.16, .22, 1.02, 'rgba(70,62,58,' + (.1 * k).toFixed(3) + ')'],
|
||||
[.34, .42, .66, 'rgba(70,62,58,' + (.08 * k).toFixed(3) + ')'],
|
||||
[-.26, -.32, .55, 'rgba(255,255,255,' + (.38 * k).toFixed(3) + ')']
|
||||
]);
|
||||
// 小脚丫顶上来时,隐隐约约带出一个脚印:极淡、全是软边,峰值时才看得出,凑近看像有像无
|
||||
if (P === PARTS.foot || P === PARTS.kick) footprint(ft.x + ft.ox + ox, ft.y + ft.oy + oy, P.rx * sp, P.ry * sp, ft.ang + (mode === 'show' ? ft.wob : 0), Math.min(H / P.amp, 1));
|
||||
}
|
||||
const D = pk.d.v;
|
||||
if (D < -.2) {
|
||||
const k = Math.min(-D / 12, 1.2);
|
||||
blob(pk.x + ox, pk.y + oy, 40, 40, 0, [
|
||||
[-.16, -.2, .9, 'rgba(140,55,35,' + (.24 * k).toFixed(3) + ')'],
|
||||
[.32, .36, .55, 'rgba(255,250,244,' + (.45 * k).toFixed(3) + ')']
|
||||
[-.16, -.2, .9, 'rgba(70,62,58,' + (.14 * k).toFixed(3) + ')'],
|
||||
[.32, .36, .55, 'rgba(255,255,255,' + (.45 * k).toFixed(3) + ')']
|
||||
]);
|
||||
} else if (D > .2) {
|
||||
const k = Math.min(D / 10, 1);
|
||||
blob(pk.x + ox, pk.y + oy, 40, 40, 0, [
|
||||
[.14, .2, .95, 'rgba(150,62,38,' + (.08 * k).toFixed(3) + ')'],
|
||||
[-.22, -.28, .65, 'rgba(255,250,244,' + (.3 * k).toFixed(3) + ')']
|
||||
[.14, .2, .95, 'rgba(70,62,58,' + (.06 * k).toFixed(3) + ')'],
|
||||
[-.22, -.28, .65, 'rgba(255,255,255,' + (.3 * k).toFixed(3) + ')']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user