I have a div with a background image. Using skrollr, I'm changing the background image, getting sort of an animation (paper airplaine folding up). to prevent interpolation, I use a custom easing function:
easeInt: function(p) {
return Math.floor(p * 13) / 13;
}
My animation looks like this (skrollr-stylesheet):
3528 {
background-image[easeInt]: url("img/plane14/plane0.png");
}
3928 {
background-image[easeInt]: url("img/plane14/plane13.png");
}
When the animation's running, the background image disappears for a bit before the next one appears, causing the animation to flicker. This issue only shows up in Firefox, not in Chrome or Safari. I am preloading all the images using
var img1 = new Image(); img1.src = 'img/plane14/plane1.png';
Preloading all the images using HTML didn't do the job either:
<div style="width:100px; height:100px; position: fixed; top: -100px; left: -100px;">
<!-- loading all images as <img src="imageurl.png"> -->
</div>
I also tried using skrollr's option of preventing interpolation. Already checked my easing function, it should work properly. In firebug I can observe that the background-image is being changed as desired. Still I get this flickering.