RiTaJS is designed to an easy-to-use toolkit for experiments in natural language and generative literature, based on the RiTa (http://rednoise.org/rita) library for Java. Like the original RiTa, RiTaJS works alone or in conjunction with Processing(JS) and/or as a NodeJS or Bower module. All RiTa and RiTaJS tools are free/libre/open-source according to the GPL (http://www.gnu.org/licenses/gpl.txt).
- Original Author: Daniel C. Howe (https://rednoise.org/~dhowe)
- Related: RiTa -> https://github.com/dhowe/RiTa
- License: GPL (see included LICENSE file for full license)
- Maintainers: See included AUTHORS file for contributor list
- Web Site: https://rednoise.org/rita
- Github Repo: https://github.com/dhowe/RiTaJS/
- Bug Tracker: https://github.com/dhowe/RiTaJS/issues
Create a new file on your desktop called hello.html, add the following lines, save and drag it into a browser:
<html> <canvas id="canvas" width=200 height=200></canvas> <script src="https://rednoise.org/rita/download/rita-latest.min.js"></script> <script> window.onload = function() { // create a RiText and draw it RiText("HelloWorld").draw(); }; </script> <html>
If you want to use RiTa with ProcessingJS, you can simply open Processing and switch to 'JavaScript' mode. If you don't want to use the Processing IDE, you can cimply create an HTML file like this (assuming you've downloaded both libraries to the current directory):
<html> <meta charset="utf-8"/> <script src="processing-min.js"></script> <script src="rita-latest.min.js"></script> <script type="text/processing" data-processing-target="mycanvas"> size(200,200); background(255); RiText("SIMPLE").fill(200,100,0).draw(); </script> <canvas id="mycanvas"></canvas> <html>
To install: $ npm install rita rita = require('rita'); rs = rita.RiString("The white elephant smiled."); console.log(rs.features());
Please! We are looking for more coders to help out... Just press Fork at the top of this github page and get started, or follow the instructions below...
- Download and install npm. The easiest way to do this is to just install node.
- Fork and clone this library.
a. First, login to github and fork the project
b. Then, from a terminal/shell (substitute your github name for $YOUR_GITHUB_LOGIN):
$ git clone https://github.com/$YOUR_GITHUB_LOGIN/RiTaJS.git
- Now navigate into the project folder and install dependencies via npm.
$ cd RiTaJS; npm install
- To create the library from src, use gulp.
$ gulp build
- Run non-graphical tests in node, use gulp.
$ gulp test.node
- Run all tests (in phantomJS), use gulp.
$ gulp test
- Work on an existing issue, then submit a pull request...