首页宝宝踢:先只鼓包,0.7 秒后小脚丫才慢慢浮现(v26110649)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
13
js/bump.js
13
js/bump.js
@@ -472,15 +472,16 @@
|
||||
for (const [tx, ty, trx, try_] of TOES) { cx.moveTo(tx + dx + trx, ty + dy); cx.ellipse(tx + dx, ty + dy, trx, try_, 0, 0, 7); }
|
||||
cx.fill();
|
||||
}
|
||||
function footprint(x, y, rx, ry, ang, k) {
|
||||
function footprint(x, y, rx, ry, ang, k, life) {
|
||||
/* 11-07 用户纠正:「要按之前的踢法——先从页面底下把页面踢得鼓起来,隐隐约约,之后才能看清一个小小的脚丫子」
|
||||
→ 脚印缩小到鼓包的一半、软边,顶到六成以上才慢慢浮出来,到最高点也只是浅浅一层(不是贴上去的脚丫图) */
|
||||
if (k < .6) return;
|
||||
const t = (k - .6) / .4, a = t * t * (3 - 2 * t), f = .5;
|
||||
→ 前 0.7 秒只有鼓包,之后 1 秒里小脚丫才慢慢浮出来;脚印缩小到鼓包的一半、软边,最清楚时也只是浅浅一层(不是贴上去的脚丫图);鼓包收回去时跟着淡掉 */
|
||||
if (k < .5 || life < .7) return;
|
||||
const sm = v => (v = Math.min(1, Math.max(0, v)), v * v * (3 - 2 * v));
|
||||
const a = sm((k - .5) / .5) * sm((life - .7) / 1), f = .5;
|
||||
cx.save(); cx.translate(x, y); cx.rotate(ang); cx.scale(rx * f, ry * f);
|
||||
cx.shadowBlur = 6 * dpr;
|
||||
cx.fillStyle = cx.shadowColor = 'rgba(255,255,255,' + (.2 * a).toFixed(3) + ')'; soleShape(-.03, -.035);
|
||||
cx.fillStyle = cx.shadowColor = 'rgba(120,72,58,' + (.2 * a).toFixed(3) + ')'; soleShape(0, 0);
|
||||
cx.fillStyle = cx.shadowColor = 'rgba(120,72,58,' + (.24 * a).toFixed(3) + ')'; soleShape(0, 0);
|
||||
cx.restore();
|
||||
}
|
||||
function paint() {
|
||||
@@ -500,7 +501,7 @@
|
||||
[-.07, -.09, .2, 'rgba(255,255,255,' + (.5 * 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));
|
||||
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), ft.life);
|
||||
}
|
||||
const D = pk.d.v;
|
||||
if (D < -.2) {
|
||||
|
||||
Reference in New Issue
Block a user