This is a web based creative coding library / game engine for ASCII and text art reminiscent of Terminal graphics.
Be sure git and npm (is bundled with node.js) are installed on your machine. Then use:
git clone https://github.com/figraham/terminaltxt-minimal.git
cd terminaltxt-minimal
npm i
npm start
That's all you need to get started playing around. Check out the documentation and examples below to see how to use the library.
After npm init
then run npm i terminaltxt
.
I recommend also using parcel which can be installed with npm i -D parcel
if you plan on writing typescript. Alternatively you could use webpack but it requires considerably more setup.
Create index.html with:
<!DOCTYPE html>
<body>
<script src="index.ts"></script>
</body>
</html>
and index.ts with:
import { OutputTerminal } from 'terminaltxt';
const output = new OutputTerminal();
output.write('minimal example');
Then you can run parcel serve index.html
and your project will be at http://localhost:1234.
Examples are hosted through github pages and you can view live examples by using the links below.
If you'd like to experiment with the examples then it's recommended that you clone the individual repositories. Then change into the root directory of the example and run npm i
then you can run npm start
and the example will be available through a local server at http://localhost:1234. You can change the code within the src directory and the changes will automatically reload.
List of Examples:
- Minimal Project - Repository - See, Using the Minimal Example
- Hello World - Repository - Live Example
Below are some projects that use TerminalTXT. Please feel free to add you own projects to this list by submitting a pull request with your changes to this README.md
file.
- 10PRINT - Repository - Live Example
- Caterpillar AKA clone of Snake - Repository - Live Example
- Unicode Print - Repository - Live Example
- Tron - Repository - Live Example
Documentation is generated with typedoc and is available at terminaltxt.createdby.fi.
Note that documentation isn't always in sync with the npm package. Please refer to release notes and be mindful of the version that you are using. I'm working to include versioning in documentation.