Skip to content

Commit

Permalink
Use canvas instead of SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancea committed Jul 30, 2024
1 parent 13724c9 commit 784f35c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/graphics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export function initializeGraphics() {
const element = document.getElementById("game");
assert(element, "Could not find game element");

two = new Two().appendTo(element);
two = new Two({
type: Two.Types.canvas,
fitted: true,
}).appendTo(element);

function resizeElement() {
assert(two, "Game not initialized");
Expand Down

0 comments on commit 784f35c

Please sign in to comment.