Rotate logic gate sprites based on direction.

This commit is contained in:
Juliana Sims 2024-05-23 16:08:25 -04:00 committed by David Thompson
parent 00df10dc12
commit bb4d2df5f5
5 changed files with 33 additions and 5 deletions

View file

@ -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)
},