Rotate logic gate sprites based on direction.
This commit is contained in:
parent
00df10dc12
commit
bb4d2df5f5
5 changed files with 33 additions and 5 deletions
3
game.js
3
game.js
|
@ -67,8 +67,11 @@ window.addEventListener("load", async () => {
|
|||
fillRect: (ctx, x, y, w, h) => ctx.fillRect(x, y, w, h),
|
||||
fillText: (ctx, text, x, y) => ctx.fillText(text, x, y),
|
||||
drawImage: (ctx, image, sx, sy, sw, sh, dx, dy, dw, dh) => ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh),
|
||||
restore: (ctx) => ctx.restore(),
|
||||
save: (ctx) => ctx.save(),
|
||||
scale: (ctx, sx, sy) => ctx.scale(sx, sy),
|
||||
translate: (ctx, x, y) => ctx.translate(x, y),
|
||||
rotate: (ctx, angle) => ctx.rotate(angle),
|
||||
setTransform: (ctx, a, b, c, d, e, f) => ctx.setTransform(a, b, c, d, e, f),
|
||||
setImageSmoothingEnabled: (ctx, enabled) => ctx.imageSmoothingEnabled = (enabled == 1)
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue