@al-engine/scale

Scale for Al-engine, minimalistic game engine, for pixel perfect games

Usage no npm install needed!

<script type="module">
  import alEngineScale from 'https://cdn.skypack.dev/@al-engine/scale';
</script>

README

Al engine

Scale

This is module for scaling for Al engine.

  const from = {
    width: 100,
    height: 100,
  };
  const to = {
    width: 200,
    height: 200,
  };
  const scale = createFramedUpscale(from, to);
  const setPixel = scale(pixels);

  setPixel(0, 0, 1);

After this code calling setPixel will call functions from original pixels but twice in size, as 200x200 is twice as 100x100.