- commit
- 279e7d61820f53fd56ad28e601df7800e2d6d0ba
- parent
- 44e38c31878cf0b93ecd638b712e46088c2151d0
- author
- Dami <dami.etoile@gmail.com>
| M | src/ | 5 | +++-- |
| M | tests/ | 2 | +- |
@@ -122,7 +122,7 @@ export function winMotionFrame(elapsedOrOptions = {}, options = {}) {
122122 ringProgress: phase(frameNow, started, WIN_TIMING.ring),123123 cardProgress: phase(frameNow, cardStart, WIN_TIMING.slam),124124 cardScale: 1.05 - 0.05 * easeOut(phase(frameNow, cardStart, WIN_TIMING.slam)),125- cardAlpha: phase(frameNow, cardStart, 80),125+ cardAlpha: phase(frameNow, cardStart, 50),126126 cardOffset: 0,127127 tileProgress: Array.from({ length: count }, (_, index) =>128128 phase(frameNow, cardStart + (WIN_TIMING.stamps[index] ?? WIN_TIMING.stamps.at(-1) + (index - 2) * 70), WIN_TIMING.stamp),@@ -238,7 +238,8 @@ function drawCard(ctx, view, frame, winningRule) {
238238 const opacity = 1 - frame.exitProgress;239239 ctx.save();240240 // The face, lip, and signal stroke are one physical card and share this241- // alpha. It reaches full ink in 80ms, rather than fading each layer apart.241+ // alpha. It reaches full ink before the early slam review frame, rather than242+ // fading each layer apart.242243 ctx.globalAlpha = opacity * frame.cardAlpha;243244 ctx.translate(w / 2, cardY + cardHeight / 2);244245 ctx.scale(frame.cardScale, frame.cardScale);@@ -69,7 +69,7 @@ test('win card ink reaches full alpha within the card slam beat', () => {
6969 const start = 1000;7070 const cardStart = start + WIN_TIMING.cardDelay;7171 assert.equal(winMotionFrame({ now: cardStart, winStart: start }).cardAlpha, 0);72- assert.equal(winMotionFrame({ now: cardStart + 80, winStart: start }).cardAlpha, 1);72+ assert.equal(winMotionFrame({ now: cardStart + 60, winStart: start }).cardAlpha, 1);7373 });7474 7575 test('win headline keeps plural while counting and uses singular once settled', () => {