Skip to content

Commit e64294f

Browse files
committed
Initial commit
0 parents  commit e64294f

31 files changed

Lines changed: 121438 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.DS_Store

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Three.js boilerplate
2+
This is a simple three.js boilerplate for new projects, feel free to contribute!
3+
4+
### Setup
5+
Run the setup script to make the repository your own!
6+
7+
```bash
8+
$ ./setup
9+
```
10+
11+
Install dependencies and start your engines! This ships with a simple express.js server so we can run three.js properly without cross-origin issues.
12+
13+
```bash
14+
$ npm install
15+
$ npm run start
16+
```
17+
18+
Open http://localhost:8080 to view your project.

index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var express = require('express'),
2+
path = require('path'),
3+
app = express();
4+
5+
app.set('port', (process.env.PORT || 8080));
6+
7+
app.use(express.static('public'));
8+
9+
app.listen(app.get('port'), function(err) {
10+
if (err) {
11+
console.log(err);
12+
} else {
13+
console.log('Running on port: ' + app.get('port')); }
14+
});

package-lock.json

Lines changed: 357 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)