asciify-engine 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -720,7 +720,7 @@ function renderFrameToCanvas(ctx, frame, options, canvasWidth, canvasHeight, tim
720
720
  function serializeFrame(frame, fullColor) {
721
721
  const rows = frame.length;
722
722
  const cols = rows > 0 ? frame[0].length : 0;
723
- const stride = fullColor ? 4 : 2;
723
+ const stride = fullColor ? 3 : 1;
724
724
  const buf = new Uint8Array(1 + rows * cols * stride);
725
725
  buf[0] = stride;
726
726
  let i = 1;
@@ -731,10 +731,8 @@ function serializeFrame(frame, fullColor) {
731
731
  buf[i++] = cell.r;
732
732
  buf[i++] = cell.g;
733
733
  buf[i++] = cell.b;
734
- buf[i++] = cell.a;
735
734
  } else {
736
735
  buf[i++] = Math.round(0.299 * cell.r + 0.587 * cell.g + 0.114 * cell.b);
737
- buf[i++] = cell.a;
738
736
  }
739
737
  }
740
738
  }
@@ -832,7 +830,7 @@ async function asciifyVideo(source, canvas, { fontSize = 10, style = "classic",
832
830
  cancelAnimationFrame(animId);
833
831
  };
834
832
  }
835
- var EMBED_CDN_VERSION = "1.0.9";
833
+ var EMBED_CDN_VERSION = "1.0.10";
836
834
  function buildEmbedOpts(options, rows, cols, width, height, fps, animated) {
837
835
  const o = {
838
836
  r: rows,