From 15cd36509f96caed66bbf6c4020b99eb196e896e Mon Sep 17 00:00:00 2001 From: sfja Date: Thu, 11 Jun 2026 14:48:15 +0200 Subject: [PATCH] fix wire state bug + smooth rendering --- app/src/editor/Board.ts | 3 +-- app/src/editor/Renderer.ts | 4 +++- app/src/style.css | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/editor/Board.ts b/app/src/editor/Board.ts index 5321772..d6ba36f 100644 --- a/app/src/editor/Board.ts +++ b/app/src/editor/Board.ts @@ -332,8 +332,7 @@ export class Board { for (const [oldState, newState] of replacedStates) { this.stateWireMap - .get(newState)! - .push(...this.stateWireMap.get(oldState)!); + .set(newState, [...(this.stateWireMap.get(newState) ?? []), ...(this.stateWireMap.get(oldState) ?? [])]) this.stateWireMap.delete(oldState); } diff --git a/app/src/editor/Renderer.ts b/app/src/editor/Renderer.ts index 79c2afc..827cfb4 100644 --- a/app/src/editor/Renderer.ts +++ b/app/src/editor/Renderer.ts @@ -9,7 +9,9 @@ export class Renderer { private offset: V2, ) { this.c = this.canvas.getContext("2d")!; - this.c.imageSmoothingEnabled = false; + // this.c.imageSmoothingEnabled = false; + this.c.imageSmoothingEnabled = true; + this.c.imageSmoothingQuality ="high" } clear() { diff --git a/app/src/style.css b/app/src/style.css index 7d34b1a..5a48ea3 100644 --- a/app/src/style.css +++ b/app/src/style.css @@ -81,7 +81,7 @@ width: 100%; height: 100%; - image-rendering: pixelated; + /* image-rendering: pixelated; */ } }