Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Oekaki-style painter app in JavaScript

License

NotificationsYou must be signed in to change notification settings

desuwa/tegaki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Painter app in JavaScript.

Demo

Notes on tablet support:

  • Pen pressure works on Linux with google chrome. But doesn't work with firefox
  • Firefox users on Windows need to setdom.w3c_pointer_events.dispatch_by_pointer_messages totrue inabout:config to fix scrolling issues and enable pressure support

Usage

Tegaki.open({// when the user clicks on FinishonDone:function(){varw=window.open('');// Tegaki.flatten() returns a <canvas>Tegaki.flatten().toBlob(function(b){w.location=URL.createObjectURL(b);},'image/png');},// when the user clicks on CancelonCancel:function(){console.log('Closing...')},// initial canvas sizewidth:380,height:380});

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

To watch a replay, start tegaki.js in replay mode:

Tegaki.open({replayMode:true,replayURL:'https://path/to/replay.tgkr'// Store replay files preferably with the .tgkr extension});

Building

Pre-built releases arehere.

To build from source yourself:
rake concat will concatenate JS source files to producetegaki.js
rake minify:js will compresstegaki.js to producetegaki.min.js

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

To build without replay support:
rake concat TEGAKI_NO_REPLAY=1


[8]ページ先頭

©2009-2025 Movatter.jp