commit da2670e596b47f0d619479b8260e91185a286d8b
parent 25797180e663f3f0a2236f8f35ee7e46df0f8f12
Author: Kyle Barlow <kb@kylebarlow.com>
Date: Mon, 4 May 2026 13:50:42 -0700
fire-truck: fix dolphin rotation — nose-first with smooth 180° flip
Twemoji dolphin SVG faces left, so +90° = nose up, -90° = nose down.
Previous negative angles had the nose pointing down on ascent and up
on descent. Replace two-tween sequential pattern with parallel tweens:
angle rotates 180° over full 1200ms (Sine.easeInOut, no instant flip
at apex) while y arc rises and falls independently.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/games/fire-truck/game.js b/games/fire-truck/game.js
@@ -1127,14 +1127,19 @@ class FireTruckEndScene extends Phaser.Scene {
this._dolphins.push(d);
const launchDolphin = (dol) => {
dol.y = waterY;
- dol.setAlpha(1).setAngle(-55);
+ dol.setAlpha(1).setAngle(90); // left-facing emoji: +90° = nose straight up
+ // Smooth 180° rotation over the full visible jump (no instant flip)
this.tweens.add({
- targets: dol, y: peakY, angle: -88,
+ targets: dol, angle: -90,
+ duration: 1200, ease: 'Sine.easeInOut',
+ });
+ // y arc: rise then fall
+ this.tweens.add({
+ targets: dol, y: peakY,
duration: 600, ease: 'Sine.easeOut',
onComplete: () => {
- dol.setAngle(88);
this.tweens.add({
- targets: dol, y: waterY, angle: 55,
+ targets: dol, y: waterY,
duration: 600, ease: 'Sine.easeIn',
onComplete: () => {
dol.setAlpha(0);