Miscellaneous bug fixes

This commit is contained in:
LoveEevee
2018-12-13 12:18:52 +03:00
parent f726ecdd7b
commit 5f4048315d
16 changed files with 145 additions and 93 deletions

View File

@@ -46,7 +46,7 @@ class CanvasTest{
blurIteration(){
return new Promise(resolve => {
requestAnimationFrame(() => {
var startTime = +new Date
var startTime = Date.now()
var ctx = this.ctx
ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)
@@ -84,14 +84,14 @@ class CanvasTest{
{fill: "#fff", shadow: [-1, 1, 3, 1.5]}
])
}
resolve((+new Date) - startTime)
resolve(Date.now() - startTime)
})
})
}
drawAllImages(){
return new Promise(resolve => {
requestAnimationFrame(() => {
var startTime = +new Date
var startTime = Date.now()
var ctx = this.ctx
ctx.save()
ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)
@@ -132,7 +132,7 @@ class CanvasTest{
}
ctx.restore()
resolve((+new Date) - startTime)
resolve(Date.now() - startTime)
})
})
}