by 19
speedRate = 0.1;// keyFrames f = {}; f.start = 1, f.scrollDown = 5; f.logotype = f.scrollDown + 300; f.limit = f.logotype + 100;// element and style settings = [ { selector: '#inner-wrapper', frame: [ f.start, f.internet, f.media, f.team ], style: { left: [450, '-200', '+200', -800], top: [ 0, -1280, -1700, ' +60'] } }, { selector: '#link-service', frame: [ f.digital, f.team ] }, ]
init:animators = [];animators.push({ root : $(data.selector), style : data.style, frame : frame });animloop:requestAnimFrame( animloop );render();render:// check is_unactive || is_active by keyframe// set classname on element( unactive, active, actived)// set classname on body( xxx-unactive, xxx-active, xxx-actived)// mapping frame to targetStyle// apply (targetStyle - currentStyle) * step
