How to use gif-capture-canvas - 2 common examples

To help you get started, we’ve selected a few gif-capture-canvas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github abagames / rj-10 / src / view.ts View on Github external
export function update() {
  texture.loadContentsOf(canvas);
  fxCanvas
    .draw(texture)
    .colorShift()
    .bulgePinch(canvas.width / 2, canvas.height / 2, canvas.width * 0.8, 0.1)
    .vignette(0.2, 0.5)
    .update();
  if (isCapturing) {
    captureContext.fillRect(0, 0, captureCanvas.width, captureCanvas.height);
    captureContext.drawImage(
      fxCanvas,
      (captureCanvas.width - canvas.width) / 2,
      0
    );
    gcc.capture(captureCanvas);
  }
}
github abagames / rj-10 / src / view.ts View on Github external
fxCanvas.style.width = "95vmin";
    fxCanvas.style.height = `${(95 * size.y) / size.x}vmin`;
  } else {
    fxCanvas.style.width = `${(95 * size.x) / size.y}vmin`;
    fxCanvas.style.height = "95vmin";
  }
  canvas.width = size.x;
  canvas.height = size.y;
  if (isCapturing) {
    captureCanvas = document.createElement("canvas");
    const cw = size.y * 2;
    captureCanvas.width = size.x > cw ? size.x : cw;
    captureCanvas.height = size.y;
    captureContext = captureCanvas.getContext("2d");
    captureContext.fillStyle = "black";
    gcc.setOptions({ scale: 1, capturingFps: 4, appFps: 4 });
  }
}

gif-capture-canvas

Capture a canvas with an animated gif

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis

Popular gif-capture-canvas functions

Similar packages