Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Andy

Change timing for underpowered device?

Recommended Posts

Hi!

 

(nice new site btw)

 

I've got  a nice quick animation, that works well on desktop (and on my phone), but on an ipad2 it's too quick. Ie it happens before the ipad has chance to render the frames.

 

It's kind of a gratuitous animation, so it'd be nice (but not essential) if it could be seen.

 

So odd request maybe, but is there a way to make a tween slow down for a slower processor? 

 

Thanks,

Andy

Link to post
Share on other sites

Hello Andy and Welcome to the GreenSock Forums!

 

Without seeing your code.. You could try and use immediateRender:false on your from(), fromTo(), staggerFrom(), and staggerFromTo() tweens since from tweens render immediately by default.

 

Taken from GSAP from Docs:

 

NOTE: By default, immediateRender is true in from() tweens, meaning that they immediately render their starting state regardless of any delay that is specified. You can override this behavior by passing immediateRender:false in the vars parameter so that it will wait to render until the tween actually begins (often the desired behavior when inserting into TimelineLite or TimelineMax instances).

 

Also if this does not solve your issue.. please provide a codepen example so we can see your code in a live editable environment.

 

Here is a cool video tut by Greensock on How to create a codpen demo example.

 

Thank You.. does that help? :)

  • Like 1
Link to post
Share on other sites

Hi Andy,

 

Are you using the latest version of GSAP? It should be v 1.13.1, but we added a new lagSmoothing() feature in v.1.12.0 that will make the engine automatically adjust for cpu spikes.

 

In older versions of GSAP if you had a bunch of tweens scheduled to run at a time of 0 seconds and there was 0.5 seconds of CPU lock-up, the first render of the tweens would honor the elapsed time and render all those tweens at 0.5 seconds.

With lagSmoothing(), in such a scenario the first render would only happen at 33ms (or whatever value you specify)

 

More details here: http://greensock.com/gsap-1-12-0

 

Let us know if you have the same behavior with version 1.12.0 or greater. 

 

Thanks!

  • Like 1
Link to post
Share on other sites

Sounds perfect!

 

Will give it a go and let you know, if not, sure ill do a codepen thing..

 

Andy

Link to post
Share on other sites

ok so my codepen works beautifully, seems the issue is with my "real code", where a complex-ish function being called at the same time..

 

See the Pen Dntvz by agsystems (@agsystems) on CodePen

 

If I move that function into a the tweens onComplete, it's all ok.
 
Thanks for the help!
Link to post
Share on other sites

Nice demo! Glad its working for you.

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×