Skip to content

A library for converting COLLADA files to a format suitable for WebGL

Notifications You must be signed in to change notification settings

rmx/collada-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collada converter

Loads and converts COLLADA files into a format more usable for WebGL.

User interface

The converter comes with a simple user interface in the form of an local web page. You don't need any web server to use this page - simply download and build the project, then open examples/convert.html from the project folder. If you do not want to build the project yourself, there is a live preview here.

Building

There are several ways of building the library:

  • Using the command line
    • Make sure you have Node.js installed
    • Navigate to the project root
    • Type npm update (only need to do this once)
    • Type make.bat (Windows) or make (Unix)
  • Using Microsoft Visual Studio

Architecture

COLLADA files are text files, with their content structured as an XML document. This converter transforms such files into documents that are suitable for loading in a WebGL engine. This conversion is performed in 4 stages, implemented by the following modules:

  1. DOMParser (built in in all browsers), to convert the text file into an XML document.
  2. ColladaLoader (from this library), to convert the XML document into a corresponding COLLADA javascript object. The resulting object is just easier to work with than a generic XML document and provides some convenience functionality for navigating the COLLADA document.
  3. ColladaConverter (from this library), to extract all geometries, materials, and animations from the COLLADA javascript object and transform them into a representation that is suitable for realtime rendering on the GPU.
  4. ColladaExporter (from this library), to pack the converted data into a file that is suitable for extremely fast loading in WebGL.

About

A library for converting COLLADA files to a format suitable for WebGL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages