fix invert zoom

This commit is contained in:
evanpelle
2024-08-19 08:17:53 -07:00
parent f1bddc7eef
commit fe67cc8492
3 changed files with 6 additions and 7 deletions
+5 -4
View File
@@ -29,18 +29,19 @@
* improve front page, only one game at a time every 30s DONE 8/17/2024
* create dev server DONE 8/18/2024
* BUG: boats freeze game on path calculation DONE 8/18/2024
* Use Overpass font
* use analyitics DONE 8/18/2024
* Use Overpass font DONE 8/18/2024
* BUG: invert zoom
* better algorithm for name render placement
* show how many players in each lobby
* make boats larger
* have boats not get close to shore
* use analyitics
* BUG: boat doesn't work if on lake on other player not on lake
* Allow boats to attack TerraNullius
* make coasts look better
* add shader to dim border
* remove player.info()
* fix enemy islands when attacking
* BUG: ocean is considered TerraNullius
* on websocket connect server only send missing turns not all turns
* BUG: fix hotreload (priority queue breaks it)
* BUG: boat doesn't work if on lake on other player not on lake
* PERF: use hierarchical a* search for boats
+1 -1
View File
@@ -166,7 +166,7 @@ export class GameRenderer {
onZoom(event: ZoomEvent) {
const oldScale = this.scale;
const zoomFactor = 1 + event.delta / 600;
this.scale *= zoomFactor;
this.scale /= zoomFactor;
// Clamp the scale to prevent extreme zooming
this.scale = Math.max(0.1, Math.min(10, this.scale));
-2
View File
@@ -20,8 +20,6 @@ export class NameRenderer {
private toRender: PriorityQueue<RenderInfo> = new PriorityQueue<RenderInfo>(1000, (a: RenderInfo, b: RenderInfo) => a.lastRendered - b.lastRendered);
private seenPlayers: Set<Player> = new Set()
constructor(private game: Game, private theme: Theme) {
}