fix wire state bug + smooth rendering
This commit is contained in:
parent
e57b364090
commit
15cd36509f
@ -332,8 +332,7 @@ export class Board {
|
|||||||
|
|
||||||
for (const [oldState, newState] of replacedStates) {
|
for (const [oldState, newState] of replacedStates) {
|
||||||
this.stateWireMap
|
this.stateWireMap
|
||||||
.get(newState)!
|
.set(newState, [...(this.stateWireMap.get(newState) ?? []), ...(this.stateWireMap.get(oldState) ?? [])])
|
||||||
.push(...this.stateWireMap.get(oldState)!);
|
|
||||||
this.stateWireMap.delete(oldState);
|
this.stateWireMap.delete(oldState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,9 @@ export class Renderer {
|
|||||||
private offset: V2,
|
private offset: V2,
|
||||||
) {
|
) {
|
||||||
this.c = this.canvas.getContext("2d")!;
|
this.c = this.canvas.getContext("2d")!;
|
||||||
this.c.imageSmoothingEnabled = false;
|
// this.c.imageSmoothingEnabled = false;
|
||||||
|
this.c.imageSmoothingEnabled = true;
|
||||||
|
this.c.imageSmoothingQuality ="high"
|
||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
|
|||||||
@ -81,7 +81,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
image-rendering: pixelated;
|
/* image-rendering: pixelated; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user