remove canvas requirement for camera
This commit is contained in:
parent
f5f08be505
commit
34c58dcd71
2 changed files with 5 additions and 22 deletions
|
|
@ -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 = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue