Simple Node.js web service to convert 3D models from COLLADA to glTF
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings Initial commit Mar 16, 2015
collada2gltf Initial commit Mar 16, 2015
doc Initial commit Mar 16, 2015
lib Cleanup Mar 16, 2015
routes Initial commit Mar 16, 2015
test Windows fixes Mar 16, 2015
working Added working directory Mar 16, 2015
.gitignore Initial commit Mar 16, 2015
.jshintrc Initial commit Mar 16, 2015
.project Windows fixes Mar 16, 2015
LICENSE.md Fix typo Jun 14, 2017
README.md Update README.md Mar 16, 2015
app.js Added compression Mar 20, 2015
config.json Initial commit Mar 16, 2015
nodemon.json Windows fixes Mar 16, 2015
package.json Added compression Mar 20, 2015
server.js Initial commit Mar 16, 2015

README.md

collada2gltf-web-service

Simple web service to convert 3D models from COLLADA to glTF using COLLADA2GLTF.

Overview

This is a code sample that is a starting point for a Node.js web service that converts COLLADA models to glTF. This version just converts a .dae file to a .gltf with embedded geometry, animations, skins, and shaders. It does not handle textures.

Install

Clone this repo. Install Node.js. From this repo's root directory, run:

npm install

Usage

Start the server:

npm start

Invoke the web service by issuing an HTTP request and providing the COLLADA model with POST:

curl -X POST -H "Content-Type:text/plain" -d @test/data/box.dae localhost:3000/convert

A few settings can be changed by modifying config.json. This is loaded using nconf so environment variables and command-line arguments can override this.

Development and Testing

To automatically restart the server during development, install and run nodemon:

npm install nodemon -g
nodemon server.js

Install and run JSHint:

npm install jshint -g
npm run jshint

Install mocha and run the tests:

npm install mocha -g
npm test

COLLADA2GLTF builds

Build are in the collada2gltf directory. They are currently version 0.8 from here.

Resources


Developed by AGI, founders of the Cesium WebGL engine.