Add body to button links, add performance to diagnostic
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user