Up-in-the-Air – commitdiff

You can use Git to clone the repository via the web URL. Download snapshot (zip)
Match random letter rotation during ending cutscene to main gameplay
authorJulian Fietkau <git@fietkau.software>
Thu, 26 Sep 2024 23:52:58 +0000 (01:52 +0200)
committerJulian Fietkau <git@fietkau.software>
Thu, 26 Sep 2024 23:52:58 +0000 (01:52 +0200)
main.js

diff --git a/main.js b/main.js
index 8e4b90754a27c4493fe98082ab5e8cd9c79a190c..61975f2ad8b19a5e0c21f2f0d35b490da32af5eb 100644 (file)
--- a/main.js
+++ b/main.js
@@ -672,7 +672,7 @@ function animate(game, renderer, scene) {
               x = 9999;
             }
             letter.position.set(x, y, z);
-            let rotation = (game.timeProgress * 3) % (2 * Math.PI);
+            let rotation = (game.timeProgress * 3 + 2 * Math.PI * word.randomAnimOffset) % (2 * Math.PI);
             letter.rotation.set(rotation + j, rotation + 2*j, rotation + 3*j);
             letter.scale.set(letterScale, letterScale, letterScale);
           }