Deployment fix
This commit is contained in:
@@ -68,11 +68,10 @@ export default {
|
||||
this.canvas.height = window.innerHeight
|
||||
this.canvas.addEventListener('mousemove', this.mouseEvent)
|
||||
this.canvas.addEventListener('touchmove', this.touchEvent)
|
||||
this.renderTimer = setInterval(this.render, 1000 / 60)
|
||||
this.renderTimer = setInterval(this.render, 1000 / 120)
|
||||
},
|
||||
methods: {
|
||||
render () {
|
||||
this.stats.lastFrame = performance.now()
|
||||
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)
|
||||
this.renderBorders()
|
||||
|
||||
@@ -99,6 +98,8 @@ export default {
|
||||
this.renderMouse()
|
||||
|
||||
this.renderDebug()
|
||||
|
||||
this.stats.lastFrame = performance.now()
|
||||
},
|
||||
renderBorders () {
|
||||
this.context.strokeStyle = 'white'
|
||||
@@ -138,11 +139,11 @@ export default {
|
||||
this.context.fillStyle = 'white'
|
||||
this.context.textAlign = 'start'
|
||||
this.context.fillText('camera x: ' + this.camera.x + ' y:' + this.camera.y, 10, 12)
|
||||
// this.context.fillText('a:' + player.angle + ' a_t' + player.targetAngle, 10, 24)
|
||||
this.context.fillText('canvasX: ' + canvasX + ' canvasY:' + canvasY, 10, 36)
|
||||
this.context.fillText('mouse x: ' + this.mouse.x + ' y:' + this.mouse.y, 10, 24)
|
||||
this.context.fillText('canvasX: ' + canvasX + ' canvasY: ' + canvasY, 10, 36)
|
||||
this.context.fillText('Total walls: ' + this.stats.totalWalls, 10, 48)
|
||||
this.context.fillText('Last update: ' + this.stats.lastUpdateTime, 10, 60)
|
||||
const fps = (performance.now() - this.stats.lastFrame) * 60
|
||||
const fps = 1000 / (performance.now() - this.stats.lastFrame)
|
||||
this.context.fillText('FPS: ' + fps, 10, 72)
|
||||
},
|
||||
renderMouse () {
|
||||
|
||||
Reference in New Issue
Block a user