diff --git a/index.html b/index.html index d940cac..09d2b2d 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ 兜爸心选 · 孕育陪伴 - + @@ -2732,7 +2732,7 @@ html.night .rs-pan .rp-card{background:rgba(255,255,255,.06);border-color:rgba(2 })(); - + diff --git a/js/app.js b/js/app.js index 6b0bee1..1ad0e50 100644 --- a/js/app.js +++ b/js/app.js @@ -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)); diff --git a/js/bump.js b/js/bump.js index 8ae6b3c..0c059ed 100644 --- a/js/bump.js +++ b/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);