WIP: Adding some animations, as well as tween'd camera movement

The tween'd movement is non-blocking and therefor stutters less. Only
issue is it doesn't go to the correct path yet.
This commit is contained in:
Tyler Marques 2025-03-25 11:39:39 -04:00
parent 12983d6164
commit e979c065bc
No known key found for this signature in database
GPG key ID: 7672EFD79378341C
10 changed files with 127 additions and 121 deletions

View file

@ -7,7 +7,7 @@ import { createChatWindows } from "./domElements/chatWindows";
import { logger } from "./logger";
import { OrbitControls } from "three/examples/jsm/Addons.js";
import { displayInitialPhase } from "./phase";
import * as TWEEN from "@tweenjs/tween.js";
import { Tween, Group as TweenGroup } from "@tweenjs/tween.js";
//FIXME: This whole file is a mess. Need to organize and format
//
@ -56,10 +56,14 @@ class GameState {
unitMeshes: THREE.Group[]
// Animations needed for this turn
unitAnimations: TWEEN.Tween[]
unitAnimations: Tween[]
//
playbackTimer: number
// Camera Animation during playing
cameraPanAnim: TweenGroup | undefined
constructor(boardName: AvailableMaps) {
this.phaseIndex = 0
this.gameData = null