Skip to content

Instantly share code, notes, and snippets.

@ygkn
Last active February 7, 2017 14:38
Show Gist options
  • Save ygkn/487e5f108c64d1e028f40df60538568b to your computer and use it in GitHub Desktop.
Save ygkn/487e5f108c64d1e028f40df60538568b to your computer and use it in GitHub Desktop.
小林さんちのメイドラゴンの話数表示ジェネレータのWeb版を作った ref: http://qiita.com/ygkn/items/0d0d5a451a09c8034637
const encoder = new GIFEncoder();
encoder.setRepeat(0);
encoder.setDelay(500);
encoder.start();
// canvasに何か書く
// e,g. 文字 → context.fillText() 画像 → context.drawImage() など
encoder.addFrame(context.getImageData(0, 0, width, height).data);
git submodule add https://github.com/antimatter15/jsgif.git
const encoder = new GIFEncoder();
encoder.setRepeat(0);
encoder.setDelay(500);
encoder.start();
// canvasに何か書く
// e,g. 文字 → context.fillText() 画像 → context.drawImage() など
encoder.addFrame(context.getImageData(0, 0, width, height).data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment