danprince / 0x55

⬛️ Image editor for 5x5 binary sprites

Home Page:https://0x55.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0x55 is an image editor for 5x5 binary sprites.

The pixels of the images are encoded as bits in row-major order. This makes them ideal for embedding directly into source code for emulators, games, and retro user interfaces.

Unlike conventional images, you'll need to write some code to render these sprites.

let sprite = 0x7FF8FEBF;

for (let y = 0; y < 5; y++) {
  for (let x = 0; x < 5; x++) {
    let bit = 1 & (sprite >> x + y * 5);
    setPixel(x, y, bit);
  }
}

For a canvas setPixel could call ctx.fillRect, or perhaps set pixels directly on imageData.

About

⬛️ Image editor for 5x5 binary sprites

https://0x55.netlify.app


Languages

Language:JavaScript 48.5%Language:HTML 40.6%Language:CSS 10.8%