(ctx_out, ref_time)
| 478 | } |
| 479 | |
| 480 | render(ctx_out, ref_time) { |
| 481 | if (!this.ready) { |
| 482 | return; |
| 483 | } |
| 484 | let f = this.getFrame(ref_time); |
| 485 | if (f) { |
| 486 | let scale = f[2]; |
| 487 | let x = f[0] + this.canvas.width / 2 - this.width / 2; |
| 488 | let y = f[1] + this.canvas.height / 2 - this.height / 2; |
| 489 | this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); |
| 490 | this.ctx.drawImage(this.img, 0, 0, this.width, this.height, x, y, scale * this.width, scale * this.height); |
| 491 | this.drawScaled(this.ctx, ctx_out); |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | class TextLayer extends MoveableLayer { |
nothing calls this directly
no test coverage detected