cosmetic syntax tweaks

This commit is contained in:
Tomáš Mládek 2018-01-29 15:47:11 +01:00 committed by Tomáš Mládek
parent 3c40ccb6ce
commit a9a37f9ad3

View file

@ -152,10 +152,7 @@
$render: function () { $render: function () {
let frame = this.frame_sequence[this.position] let frame = this.frame_sequence[this.position]
if (frame === undefined) return if (frame === undefined) return
let x = frame[0] let [x, y, w, h] = frame
let y = frame[1]
let w = frame[2]
let h = frame[3]
if (w !== this.width || h !== this.height) this.clear('black') if (w !== this.width || h !== this.height) this.clear('black')
this.tmp_ctx.drawImage(this.image, this.tmp_ctx.drawImage(this.image,
x, y, w, h, x, y, w, h,