TeDiGe-2
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:An online Tetris Diagram Generator. Rewrite from Tetris-Diagram-Generator
TeDiGe-2
========
TeDiGe-2 is an online Tetris Diagram Generator.  A bit like [fumen](http://fumen.zui.jp/), a bit like [tage](http://tage.emaame.com/), except the comments are written in english (... sort of) instead of Japanese. It makes heavy use of the < Canvas > element.

Examples / Demo
----------------
See [this](http://petitprince.github.com/TeDiGe-2/example.html) for a practical example. For how to use the editor, see [this wiki page](https://github.com/PetitPrince/TeDiGe-2/wiki/User-manual).

Usage
------
To use TeDiGe-2, you need to generate some TeDiGe-2 code and display it somewhere.
You should have this folder structure similar to this:
|- res
  |---- lot of stuff
|- jquery.js
|- editor.html
|- tedige-editor.css
|- tedige-editor.min.js
|- tedige-inline.min.js
|- tedige-viewer.css
|- tedige-viewer.min.js
|- viewer.html
### Setting up the editor Simply open editor.html . Note that the "get editor/viewer string" function assumes that viewer.html and editor.html are in the same folder. ### Displaying the diagrams in your page In your header place Doing so will convert any div in your page that look like
into the corresponding nicely formatted canvas. UNIQUE_ID is, you guessed it, an unique ID, and TEDIGE_CODE is a mumbo-jumbo of a string generated by the editor. Please note the usage of the custom attribute data-tedigecode. See example.html for some practical example. You can edit viewer.css to style the diagram at your convenience. The canonical html code is:
';
'; '; ';
';
'; '; '; '; '; '; '; '; ';
';
'; ';
';
';
';
';

'; / 1';

'; ';
';
'; ';
'; ';
';
'; loop';
';
';
'; ';
';
Alternatively, you can use an iframe like you did with fumen But iframes generally sucks and can lead to security issues. Don't use it if you can. Documentation --------------- A generated documentation can be found in /doc/ . Otherwise, go take a look at the source ! Contributing & Reporting bug ---------------------------- If you want a particular feature or wish to report a big, please use the github system. TeDiGe-2 uses [uglify-js2](https://github.com/mishoo/UglifyJS2) to compress its code, and [js-doc toolkit](https://code.google.com/p/jsdoc-toolkit/) to generate its documentation. License -------- TeDiGe-2 is under Creative Commons 3 Attribution (CC3 BY) ![CC3 BY Logo](http://i.creativecommons.org/l/by/3.0/ch/88x31.png "CC3 BY Logo") Also, TeDiGe-2 is not affiliated nor endorsed by the Tetris Company (except if they happend to fork it :D). Yes, I know I use your trademark, but don't sue me, it would be stupid and counterproductive.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。