Does enybody know how to create effect like this, i don’t know how to split sphear geometry in to separated triangles?
Mesh explode effectSoftware: Away3D 4.x |
||
|
||
Fabrice Closier, Administrator
Posted: 20 March 2014 05:41 PM Total Posts: 1265 [ # 1 ] Uses explode class (The explode class doesn’t “explode” as in your request ) If the original position of the faces matters (for instance to go back to original location), make a copy of the original buffer and use it to calculate the new values. On enter frame, simply loop over the indices by 3, for each of 3 vertices, multiply with a direction vector. update the vertexData, render. This is something that you can do in matter of minutes, but if I may give you a tip if you are not familiar with this kind of code. I would create a simple waveNumber value, and increment it on each render by a small amount. then for each 3 indices, use the face normal that you muliply by the math.sin of this waveNumber. The result will be a pulsing animation that goes from all together to exploded state and back to all together (or imploded if you allow negative wave). Then once you have this pulsing animation, then add a unique direction for each face during the loop, probably using some tweening engine or whatever force that you want. Here a very very old example http://closier.nl/playground/headexploded.swf doing the wave/explode thingy explained above |
||
|
||
Fabrice Closier, Administrator
Posted: 21 March 2014 11:23 AM Total Posts: 1265 [ # 3 ] A code example would mean I did your work and I’m not planning to spoil the pleasure you will get out of this You got the speudo code explained above. Set up your code so it does: Then if you get stuck or have problems, post your code sample here and we’ll take it from there. |