Last active
August 29, 2015 14:16
-
-
Save gidili/56c9cdcb51dec20852f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scene = new THREE.Scene(); | |
// setup lighting etc. | |
load('/org.wormsim.frontend/resources/files/cuticleNotBent.dae'); | |
load("/org.wormsim.frontend/resources/files/muscles.dae"); | |
load("/org.wormsim.frontend/resources/files/neurons.dae"); | |
function load(daeLocation){ | |
var manager = new THREE.LoadingManager(); | |
manager.onProgress = function(item, loaded, total) { | |
console.log(item, loaded, total); | |
}; | |
var loader = new THREE.ColladaLoader(manager); | |
loader.options.convertUpAxis = true; | |
loader.load(daeLocation, function(collada) { | |
dae = collada.scene; | |
dae.position.set(0, 0, 0); | |
dae.scale.set(0.7, 0.7, 0.7); | |
dae.rotation.set(0.2, -0.2, 0.2); | |
scene.add(dae); | |
setProgressBar(100); | |
render(); | |
}, function(progress) { | |
// show some progress | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment