Skip to content

Commit

Permalink
fix resize for world offscreen worker
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieali committed May 27, 2022
1 parent d1563b7 commit bc172ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/world.onscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,11 @@ class WorldOnscreen {
this.#sleeperCount++
}

resize() {
resize(options) {
// redraw the dicebox
this.#container.create({aspect: this.#canvas.width / this.#canvas.height})
const width = this.#canvas.width = options.width
const height = this.#canvas.height = options.height
this.#container.create({aspect: width / height})
this.#engine.resize()
}
}
Expand Down

0 comments on commit bc172ed

Please sign in to comment.