0

I'm trying to learn Three.js and one of my idea in my pet learning project, is to animate (or morph it) one 3d object to another.

I had to model from my friend in json file. So I used the ObjectLoader from three.js

var objectLoader = new THREE.ObjectLoader();

objectLoader.load("assets/3dobjects/object1.json", function ( obj ) {
   scene.add( obj ); 
});

It is just the part of my code, but it is rendering the model just fine. So if I had another json object which I will load with the ObjectLoader, then is there a way to animate the first object to this newly loaded object.

If my question is not clear, here is an example with svg animation with Tweenmax. This is the effect I want to achieve.

gman
  • 100,619
  • 31
  • 269
  • 393
cs.matyi
  • 1,204
  • 1
  • 11
  • 21
  • At least, objects have to have the same amount of vertices. – prisoner849 Apr 03 '18 at 13:33
  • Have a look at [this SO question](https://stackoverflow.com/q/44443286/4045502). – prisoner849 Apr 03 '18 at 15:13
  • You'll probably want to learn about [creating morph targets in blender](https://www.youtube.com/watch?v=r0Jlu3mI6v0). To turn one complex object into another, best option is modeling it in Blender and exporting to three.js. Possibly to do some basic effects in three.js directly, per link above, but maybe not the effect you're going for... – Don McCurdy Apr 03 '18 at 22:40

0 Answers0