Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make the script better. The smoke is not smoothing enough

I have created a script to animate smoke. I animate three png files. These png files are files with smoke images.

But sometimes the script is a bit choppy and the smoke animation is not smooth. Sometimes when reloading the Smoke the animation is not smooth.

How can I fix the problem so that the smoke animation runs smoothly.

You can see the script and demo on jsfiddle (editable):

The script on jsfiddle

like image 642
Mike Vierwind Avatar asked Oct 28 '11 06:10

Mike Vierwind


1 Answers

Very cool.

Using transform (-webkit-transform, -moz-transform, and -o-transform) to animate the movement instead of absolute positioning by bottom will get most browsers to kick in hardware acceleration, that should take care of the flickering.

I don't know about IE though...

like image 179
nicholas Avatar answered Oct 06 '22 00:10

nicholas