I need to draw animated gif with KineticJS, however, I failed when I followed the image tutorial. Is there any way to draw animated gif?
相关问题
- KineticJS layer index when dragging
- KineticJS animation with JQuery
- HTML5 Canvas - Saving and Restoring drag and drop
- Jquery Image Lens - Kinetic JS image id
- Canvas Image editor
相关文章
- Constrained/Proportional Scaling in KineticJS
- Canvas tooltip to appear outside canvas?
- Detecting a Click on Stage but not on Shape in Kin
- Using jquery draggable UI with kineticJs to make e
- KineticJS - Scaling stage to viewport
- Kinetic JS - how do you hide all the anchors for a
- Get a point inside bezier curve
- How to cache a whole layer right before dragstart
Use a KineticJS Sprite.
Animated GIF is the (very) old way of doing this. It doesn't work very well, it's very flaky performance-wise and inconsistent in different browsers. It also eats memory when lots of animated GIFs are displayed at once and slows everything down. Believe it or not it's better to handle the animation with code instead of within the image file.
I recommend using the PNG format. You should use a single PNG file (sprite sheet) containing all the animation frames together. Then load them into an array and use a KineticJS Sprite to display it. It is fairly straightforward. You have a sprite containing all you need. There is a great example here:
kineticjs animated sprite tutorial
Not directly.
You can do this however: