Songselect: Add cache for shadows

This commit is contained in:
LoveEevee
2018-10-09 16:07:53 +03:00
parent a5f2f2b8de
commit 190beb224d
8 changed files with 391 additions and 175 deletions

View File

@@ -8,6 +8,7 @@ class CanvasTest{
this.canvas.height = height
this.ctx = this.canvas.getContext("2d")
this.ctx.scale(pixelRatio, pixelRatio)
this.ratio = pixelRatio
this.draw = new CanvasDraw()
this.font = "serif"
@@ -60,6 +61,7 @@ class CanvasTest{
innerBorder: this.songAsset.innerBorder,
background: "#efb058",
borderStyle: ["#ffe7bd", "#c68229"],
ratio: this.ratio,
innerContent: () => {}
})
}
@@ -138,6 +140,7 @@ class CanvasTest{
this.ctx.fillText(text, x, y)
}
clean(){
this.draw.clean()
delete this.ctx
delete this.canvas
}