Skip to content

Commit

Permalink
Update package changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zz85 committed Oct 30, 2016
1 parent 7b45bf1 commit cd2ea55
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This is an example of how you can run three.js in your terminal.
Sysadmins can now run three.js in remote ssh sessions!

### Install and Running

```
npm i -g threejs-term
threejs-term
```

### Features
- Shows off using three.js in node based environments.
- Terminal / ASCII based rendering
Expand All @@ -13,11 +20,13 @@ Sysadmins can now run three.js in remote ssh sessions!
### Internals
This is built with some awesome libraries.
- [three.js](https://github.com/mrdoob/three.js/) - Duh!
- [blessed](https://github.com/chjj/blessed) - Loads of terminal goodies!
- [node-canvas](https://github.com/Automattic/node-canvas) - Canvas emulation on node.js
- [blessed](https://github.com/chjj/blessed) - Loads of terminal goodness!
- [node-canvas](https://github.com/Automattic/node-canvas) - Canvas emulation on node.js

### Development

Play with the [source](https://github.com/zz85/threejs-term/blob/master/play.js)

Install dependencies
```
yarn install # or npm install
Expand All @@ -30,6 +39,7 @@ node play.js

It's tricky to debug blessed apps (since console.log's gonna messup the terminal),
so I'll pipe console.error messages to a log file and tail it elsewhere.
log() helper function can also be used.

```
node play.js 2>> logs.txt
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"name": "three-blessed",
"name": "threejs-term",
"version": "1.0.0",
"main": "index.js",
"main": "play.js",
"license": "MIT",
"bin": {
"threejs-term": "play.js"
},
"scripts": {
"start": "node play.js"
},
"dependencies": {
"blessed": "^0.1.81",
"blessed-contrib": "^4.5.5",
"canvas": "^1.6.1",
"three": "^0.82.1"
}
},
"url": "https://github.com/zz85/threejs-term"
}
3 changes: 2 additions & 1 deletion play.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /usr/bin/env node

THREE = require('three');
Canvas = require('canvas');

Expand All @@ -6,7 +8,6 @@ require('three/examples/js/renderers/SoftwareRenderer');
require('three/examples/js/renderers/CanvasRenderer');

require('three/examples/js/controls/TrackballControls');
// require('./track');

const fs = require('fs');

Expand Down

0 comments on commit cd2ea55

Please sign in to comment.