0

here's my code for parallax scrolling. See http://violetoeuvre.com/Exp_4.html.

Whenever I add more than 4 layers, the page won't load. Is this just a bandwidth problem? I know I've seen websites with more than four layers...

Should I use a different code?

<script type="text/javascript">
var wf_pbb_object = [
{bc:"rgba(0, 0, 0, 0)"},
{img:"images/Exp_4/bluediamond.png", mm:false, ms:true, mms:1, mss:30, mmd:1, mso:"v", msd:1, im:"image", pr:"both", mma:"both", ofs:{x:0, y:0}, zi:4, sr:false, sb:false, isr:false, isb:false},
{img:"images/Exp_4/bluestripe.png", mm:false, ms:true, mms:1, mss:40, mmd:1, mso:"v", msd:-1, im:"image", pr:"both", mma:"both", ofs:{x:0, y:0}, zi:1, sr:false, sb:false, isr:false, isb:false},
{img:"images/Exp_4/greenlock.png", mm:false, ms:true, mms:1, mss:50, mmd:1, mso:"v", msd:1, im:"image", pr:"both", mma:"both", ofs:{x:0, y:0}, zi:2, sr:false, sb:false, isr:false, isb:false},
{img:"images/Exp_4/silversq.png", mm:false, ms:true, mms:1, mss:60, mmd:1, mso:"v", msd:1, im:"image", pr:"both", mma:"both", ofs:{x:0, y:0}, zi:2, sr:false, sb:false, isr:false, isb:false}
];
</script>

Thanks in advance!

Claire
  • 159
  • 1
  • 4
  • 15

1 Answers1

0

The re-paints on scrolling are taking 0.5s+, now to get smooth animation you should be aiming for 60fps!

I suspect part of the problem might be the size of the images but I've not looked in more depth that that.

If you use Chrome developer tools, go to timeline, turn on recording, scroll the page and you'll see the length of time the paints are taking.

Andy Davies
  • 5,794
  • 2
  • 26
  • 21