Skip to content

Commit cd2ea55

Browse files
committed
Update package changes
1 parent 7b45bf1 commit cd2ea55

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
This is an example of how you can run three.js in your terminal.
44
Sysadmins can now run three.js in remote ssh sessions!
55

6+
### Install and Running
7+
8+
```
9+
npm i -g threejs-term
10+
threejs-term
11+
```
12+
613
### Features
714
- Shows off using three.js in node based environments.
815
- Terminal / ASCII based rendering
@@ -13,11 +20,13 @@ Sysadmins can now run three.js in remote ssh sessions!
1320
### Internals
1421
This is built with some awesome libraries.
1522
- [three.js](https://github.com/mrdoob/three.js/) - Duh!
16-
- [blessed](https://github.com/chjj/blessed) - Loads of terminal goodies!
17-
- [node-canvas](https://github.com/Automattic/node-canvas) - Canvas emulation on node.js
23+
- [blessed](https://github.com/chjj/blessed) - Loads of terminal goodness!
24+
- [node-canvas](https://github.com/Automattic/node-canvas) - Canvas emulation on node.js
1825

1926
### Development
2027

28+
Play with the [source](https://github.com/zz85/threejs-term/blob/master/play.js)
29+
2130
Install dependencies
2231
```
2332
yarn install # or npm install
@@ -30,6 +39,7 @@ node play.js
3039

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

3444
```
3545
node play.js 2>> logs.txt

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
{
2-
"name": "three-blessed",
2+
"name": "threejs-term",
33
"version": "1.0.0",
4-
"main": "index.js",
4+
"main": "play.js",
55
"license": "MIT",
6+
"bin": {
7+
"threejs-term": "play.js"
8+
},
9+
"scripts": {
10+
"start": "node play.js"
11+
},
612
"dependencies": {
713
"blessed": "^0.1.81",
14+
"blessed-contrib": "^4.5.5",
815
"canvas": "^1.6.1",
916
"three": "^0.82.1"
10-
}
17+
},
18+
"url": "https://github.com/zz85/threejs-term"
1119
}

play.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#! /usr/bin/env node
2+
13
THREE = require('three');
24
Canvas = require('canvas');
35

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

810
require('three/examples/js/controls/TrackballControls');
9-
// require('./track');
1011

1112
const fs = require('fs');
1213

0 commit comments

Comments
 (0)