javascript - Explanation of jQuery animated bubbles script variables -


ischluff provided awesome solution previous question adjusting speed , position of jquery bubbles.

now need understanding each variable in script doing. bubbles contain quotes, i'm trying slow them down enough give people time read them. i've managed slow them down adjusting vertspeed , horispeed. however, i've tried adjusting window.settimeout(callback, 1000 / 60) , omega: 2*math.pi* horispeed/(width*60), //omega= 2pi*frequency random: (math.random()/2+0.5) * * 10000, //random time offset, cannot figure out how increase time between each bubble being generated.

is section below can slow down rate @ bubbles generated? calling whole function , setting interval time? if so, shouldn't decreasing denominator in settimeout slow down bubble generation?

window.requestanimationframe = (function(){  return  window.requestanimationframe       ||     window.webkitrequestanimationframe ||     window.mozrequestanimationframe    ||     function( callback ){      window.settimeout(callback, 1000 / 60);   };})(); 

in counter, correct part checking bounds of #parent bubbles stay within div, , doing after every 10th bubble?

if(check && item.y < -item.elementheight){ //check bounds every 10th iteration

if shed light on me, i'd appreciate it!

http://jsfiddle.net/n63tf/19/


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -