Add body to button links, add performance to diagnostic

This commit is contained in:
LoveEevee
2018-10-14 13:37:27 +03:00
parent 68d69d4a0a
commit a0635812bb
6 changed files with 63 additions and 27 deletions

View File

@@ -5,6 +5,8 @@ class Loader{
this.assetsDiv = document.getElementById("assets")
this.canvasTest = new CanvasTest()
p2 = new P2Connection()
this.startTime = +new Date
this.ajax("src/views/loader.html").then(this.run.bind(this))
}
run(page){
@@ -85,6 +87,7 @@ class Loader{
})
this.promises.push(this.canvasTest.blurPerformance().then(result => {
perf.blur = result
if(result > 1000 / 50){
// Less than 50 fps with blur enabled
disableBlur = true
@@ -96,7 +99,9 @@ class Loader{
})
Promise.all(this.promises).then(() => {
this.canvasTest.drawAllImages().then(() => {
this.canvasTest.drawAllImages().then(result => {
perf.allImg = result
perf.load = (+new Date) - this.startTime
this.canvasTest.clean()
this.clean()
this.callback()