Giter VIP home page Giter VIP logo

collada2gltf-web-service's Introduction

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.

collada2gltf-web-service's People

Contributors

analyticalgraphics avatar pjcozzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

collada2gltf-web-service's Issues

Window.alert with page source on 500 error

During progress of file upload, if a 500 error is returned, the HTML response body is printed as content of a window.alert.

gltf_model_converter

52_4_31_236_says_and_gltf_model_converter

Unfortunately, I'm not allowed to provide the .dae file to reproduce the issue at the moment. I remain available will more info be needed.

Use Cesium sun as lightsource for material

When converting Collada models to glTF via the web service you provide and then displaying the model in Cesium makes the model unaffected by the lighting direction of the sun. I saw that the obj2gltf library added a --cesium flag to address this issue. Would it be possible for the web service to provide a similar feature?

As a side note, it is not possible for us to use obj2gltf because of limitations in storing model hierarchies in the obj format, which are needed for rotating parts of the models we use.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.