Skip to content


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation


Painter app in JavaScript.


Notes on tablet support:

  • Pen pressure works on Linux with google chrome. But doesn't work with firefox
  • Firefox users on Windows need to set dom.w3c_pointer_events.dispatch_by_pointer_messages to true in about:config to fix scrolling issues and enable pressure support

  // when the user clicks on Finish
  onDone: function() {
    var w ='');
    // Tegaki.flatten() returns a <canvas>
      function(b) { w.location = URL.createObjectURL(b); },
  // when the user clicks on Cancel
  onCancel: function() { console.log('Closing...')},
  // initial canvas size
  width: 380,
  height: 380

It's possible to generate animated replays of drawings alongside the image itself.
To do so, pass the saveReplay: true parameter to
To get the replay data, call Tegaki.replayRecorder.toBlob() in your onDone callback.

To watch a replay, start tegaki.js in replay mode:{
  replayMode: true,
  replayURL: 'https://path/to/replay.tgkr' // Store replay files preferably with the .tgkr extension


Pre-built releases are here.

To build from source yourself:
rake concat will concatenate JS source files to produce tegaki.js
rake minify:js will compress tegaki.js to produce tegaki.min.js

The TEGAKI_LANG environment variable controls which translation file will be used during concatenation:
rake concat TEGAKI_LANG=xx would use strings from js/strings/xx.js

To build without replay support:
rake concat TEGAKI_NO_REPLAY=1