Go to file
Thomas FORGIONE 58f6caca40 Corrected some bugs in analysis 2015-10-14 10:30:18 +02:00
403 Fixed reload that doesn't work 😢 2015-06-30 09:42:24 +02:00
analysis Corrected some bugs in analysis 2015-10-14 10:30:18 +02:00
controllers Corrected problem 2015-10-09 10:01:53 +02:00
geo JSDoc 2015-10-13 16:32:36 +02:00
js Last corrections before micro workers 2015-10-07 14:13:20 +02:00
lib JSHint cleaning 2015-10-06 16:58:04 +02:00
posts Better mail (easier to treat automatically) 2015-10-06 13:48:58 +02:00
sql Corrected long last page with dynamic reloading 2015-10-05 09:50:04 +02:00
static Added check.sh, and gitignores 2015-10-06 16:50:45 +02:00
utils Preparing for local demo 2015-10-13 16:29:41 +02:00
views Remove link 2015-10-13 08:48:48 +02:00
.gitignore Added check.sh, and gitignores 2015-10-06 16:50:45 +02:00
README.md Inotifywait 2015-10-06 15:00:22 +02:00
npm-shrinkwrap.json Continuing on micro workers, and corrected some bugs 2015-09-29 17:22:48 +02:00
package.json Continuing on micro workers, and corrected some bugs 2015-09-29 17:22:48 +02:00
server.js Avoid error if package ip is not installed 2015-10-13 16:38:40 +02:00
socket.js Added log module 2015-07-03 13:27:05 +02:00
urls.js From mixed convetion (_, and camel case) to all camel case 2015-08-28 21:34:29 +02:00

README.md

3D Interface

A prototype for a user-friendly 3D interface allowing to browse 3D scenes / models written with Node.js.

It is hosted by OpenShift at 3dinterface.no-ip.org.

Database setup

First you need to configure the database. You can create a postgres database where you want, and you can initialize it by running the script sql/backup.pgsql.

Nodejs configuration

Then, you have to set up nodejs to access to your database. Basically, you have to create a file private.js at the root of the repository looking like this :

module.exports.url = ... // the url to connect to your database

module.exports.secret = ... // A secret string used to hash stuff

Compiling the static js files

First, cd to utils/. Here you'll find a script build_all.sh that, as its name suggests, builds all. By default, it minifies the code, but you can pass the option --dev to avoid minifying (which is a quite long operation).

If it worked, you should see lots of files in *.min.js in your static/js directory, and a geo.min.js in your lib (at the root of the repository).

Running the server

As usual with NodeJS, it's quite easy to test. Just ensure you have node installed on your machine, clone this repo somewhere, and then, in the repo do

npm install
node server.js

You should be able to go to localhost:4000 and see the result.

Please note that some static files (some meshes / textures) are not on this repository (especially the heavy ones).

Developping

If you want to dev on this project, the utils/demon.sh may help you : it is based on nodemon (that basically restarts the server everytime there is a change in the code) and inotifywait (that basically recompiles everything when there is a modification). To use it, just cd to utils and run demon.sh (note that it doesn't minify the code since this operation is heavy and too long to redo everytime there is a change).