First of all I want to say a big thanks to the away team. You guys are amazing!
Many people are asking for the MovieClipMaterial these days.
Now I´m happy to give something back to the community.
Don´t expect to much…it´s not an interactive MovieClipMaterial.
When I was working with Sprite3D, there was definitely something missing…some animation.
So I was thinking about Spritesheets, which seemed to much work for a little animation. So i came up with something different, as a Flash IDE user:
timeline animation, captured in bitmapdata.
Feel free to use and modify this class.
Here is how you use it:
// private variables
private var timelineAnimation:TimelineAnimation;
private var animatedSprite3D:Sprite3D;
// instantiate your movieclip from the library (export for actionscript)
var mc:MovieClip = new HotspotMovieClip();
// pass your movieclip to the class
timelineAnimation = new TimelineAnimation(mc);
// take a mesh (or Sprite3D) and pass the material from TimelineAnimation
animatedSprite3D = new Sprite3D(timelineAnimation.material, 500, 500);
// position and add
animatedSprite3D.z = 9000;
scene.addChild(animatedSprite3D);
// call the playOn method in your render loop and pass in an array of your meshes
timelineAnimation.playOn(arrayHotspots);
// or if you have only 1 mesh
timelineAnimation.playOn([animatedSprite3D]);
Big thanks for the code snippets from JohnBrookes and Quasimodo.