remove canvas requirement for camera

This commit is contained in:
Zutatensuppe 2021-04-17 19:11:43 +02:00
parent f5f08be505
commit 34c58dcd71
2 changed files with 5 additions and 22 deletions

View file

@ -408,11 +408,11 @@ async function main() {
// initialize some view data
// this global data will change according to input events
const viewport = new Camera(canvas)
const viewport = new Camera()
// center viewport
viewport.move(
-(TABLE_WIDTH - viewport.width) /2,
-(TABLE_HEIGHT - viewport.height) /2
-(TABLE_WIDTH - canvas.width) /2,
-(TABLE_HEIGHT - canvas.height) /2
)
const playerBgColor = () => {