Go to file
Thomas FORGIONE 412f413e96 Struggled to correct a bug with my conf... this should work 2015-06-26 15:09:28 +02:00
controllers Added form 2015-06-25 18:07:19 +02:00
geo I'm too good, progressive streaming with only frustum sent, and if 2015-06-26 09:22:32 +02:00
js Corrected bug in stream 2015-06-26 10:55:39 +02:00
lib Removed log for deploy (optimize space on the cloud) 2015-06-25 17:21:19 +02:00
my_modules Initial commit of nodejs 2015-05-05 11:56:35 +02:00
posts Improved database 2015-06-22 09:41:59 +02:00
sql Changed coeffs and did stuff 2015-06-22 10:09:52 +02:00
static Favicon transparent 2015-06-26 11:09:28 +02:00
views Corrected mistake in metadadata 2015-06-26 11:13:30 +02:00
.gitignore Added sql init 2015-05-18 09:52:04 +02:00
README.md Changed stuff and added doc 2015-06-23 15:31:23 +02:00
npm-shrinkwrap.json Struggled to correct a bug with my conf... this should work 2015-06-26 15:09:28 +02:00
package.json Struggled to correct a bug with my conf... this should work 2015-06-26 15:09:28 +02:00
server.js Added favicon 2015-06-26 10:50:01 +02:00
socket.js Struggled to correct a bug with my conf... this should work 2015-06-26 15:09:28 +02:00
urls.js Added link to sponza 2015-06-19 16:04:03 +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

There are two ways to compile the static js files :

  • either you don't mind not minifying the code, and you can use compiler.sh to compile
  • or you absolutely want to minify the code, and you'll need closure-compiler

Compiling without minifying

To compile without minifying, simply run

make

in static/js.

Compiling and minifying

To compile and minify the js files, you have to run

make TYPE=RELEASE

If it doesn't work, check in the Makefile that the path to closure-compiler.jar is correct.

Check if it worked

If it worked, you should see lots of files in *.min.js in your static/js directory.

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).