Search the Community
Showing results for tags 'optimize'.
-
how is a best way to generate animate and kill then for memory optimize? im include tweenmax ang generate animation but is continued trigger and jsheap increase all time. see screen capture
-
I have a prize wheel, i am trying to get the winning prize slot to highlight....i have tried several schemes, transit JS, full blown jquery, and now finally tweenmax...best results with tweenmax, for sure, but is this a limit that I cant expect to defeat? Im changing only opacity and rotation, not supposed to be calling draws, and so Im forced to believe that the lag happens in the switch or in the class select which im calling every tick...which is my problem i guess... I suppose the concept could use a brand new architecture from the ground up, maybe im doing something obviously dumb, maybe I can eliminate the jquery lib and get down to tweenlite and tweencss....minify....but beyond that, im out of ideas. i have seen sooo many sweet animations, this one seems trivial, but apparently its too clunky. Im open to any and all ideas. thanks so much in advance!
-
Hi, I'm new in gsap and need a little help. I have an animation that triggers on each scroll event and sometimes the animation stutters badly. The fps meter shows values from 9 to 55. (I'm trying to animate divs with png background). Rough version of my code: var scrollPosition = 0, lastScrollTop = 0; $(window).scroll(function(){ scrollPosition = $myWindow.scrollTop(); if (scrollPosition > lastScrollTop){ // --- scroll down TweenLite.to($('.boxes'), 2.5, {top: "+=50px", force3D:true, ease:Quad.easeInOut}, 0.25); } else { // --- scroll up TweenLite.to($('.boxes'), 2.5, {top: "-=50px", force3D:true, ease:Quad.easeInOut}, 0.25); } // --- update last scroll lastScrollTop = scrollPosition; }); Is there something that I could optimize, must I use timelines etc.? Any help would be greatly appreciated p.s. sorry for my bad English