tparisi / Vizi

A Component-Based Framework for Visual Web Applications
MIT License
103 stars 30 forks source link

Vizi.Loader detect type of Mesh or manually assign type #3

Open tranek opened 10 years ago

tranek commented 10 years ago

The Vizi.Loader currently creates all meshes of type THREE.Mesh. I'd like support for THREE.SkinnedMesh. So is it possible to detect the type of mesh that should be used based on the file? For example, if there are bones/animations, it should be a THREE.SkinnedMesh otherwise default to basic THREE.Mesh.

If that doesn't sound feasible or appropriate, then how would you feel about adding a parameter designating the type of mesh that gets passed into the Loader's constructor and propagated to the Vizi.Loader.prototype.handleModelLoaded function? Would doing that break anything?