Skip to content

Collada Exporter for Threejs which supports allows for rigged Geometry to be exported to .dae format

License

Notifications You must be signed in to change notification settings

kion-dgl/ThreejsColladaExporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ThreejsColladaExporter

There are many resources for exporting to Threejs but not many resources for exporting files from Threejs to be exported to 3d file editors. This is a simple exporter for Threejs that takes a SkinnedMesh as an argument and exports a rigged .dae model that can be loaded into Blender.

Issues

Still a very early version. Only supports SkinnedMesh, with a single material, a single texture, and must use Geometry and not BufferGeometry.

Sample

Example code using File Saver to download a blob from the browser to the client pc.

// Generate Mesh
  
var mesh = new THREE.SkinnedMesh(geometry, material);
var rootBone = armSkeleton.bones[0];
mesh.add(rootBone);
mesh.bind(armSkeleton);
  
// Export
  
var expt = new THREE.ColladaExporter();
var output = expt.parse(mesh);
var blob = new Blob([output], {
	type: "model/vnd.collada+xml"
});
saveAs(blob, mesh.name + '.dae');

Example

Example implementation where a file format is parsed in the browser using Threejs and exported to .dae format. Live Example. (Note that files from CDDATA/DAT* are required on the client side).

Threejs Collada Exporter

About

Collada Exporter for Threejs which supports allows for rigged Geometry to be exported to .dae format

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published