Jump to content
GreenSock

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

TweenCore.setDelayType(TweenCore.MILLISECONDS)

Recommended Posts

Hi,

 

Not really sure if it's the right place to put this feature request here, but I would find it great to be able to set the delays you use throughout the applications as milliseconds. I rather use the milliseconds approach rather than the second based.

 

So, what do you think about a method that will set the type of delays used in the Tween* classes. Right now, i do it manually in the code :)

 

TweenCore.setDelayType(TweenCore.MILLISECONDS)

 

Cheers,

Ciprian

Share this post


Link to post
Share on other sites

I understand the desire for such a feature, but there are several down sides:

 

1) It leads to confusion for developers. A consistent "seconds" handling of things prevents issues where a developer dives into a project midway through (or inherits it from others) and doesn't realize the timing was set to milliseconds and then all their tweens appear to instantly reach their end points. It also can cause issues in example code on the internet, etc. I'm a big fan of trying to keep things consistent especially in terms of the API.

 

2) It would bloat the code - this feature would be used by an EXTREMELY small percentage of the user base but everyone would be forced to pay the kb price. Not that it would be massive, but I try very hard to keep things clean and concise. If it was a feature that a LOT of people would use, I'd definitely consider it.

 

I appreciate the suggestion. Keep 'em coming.

Share this post


Link to post
Share on other sites

ok.. i'll keep changing the delays manually in TweenCore then :D

 

If someone's interested:

duration /= 1000;

_delay /= 1000;

Share this post


Link to post
Share on other sites

I for one would really like this feature on the javascript side. All javascript timers and most libraries use milliseconds, having to constantly remember to divide by 1000 is a pain.

  • Like 1

Share this post


Link to post
Share on other sites

^^ what he said. Yes, forcing greensock to always use seconds keeps greensock consistent with itself across different projects, but it makes it inconsistent with all other js libraries, and javascript itself. So the consistency argument is not a good one.

 

So if I'm using javascript timeouts or other animation libraries alongside greensock, now I have to have two duration variables in every scope. Kind of a PITA.

Share this post


Link to post
Share on other sites

Same here. I've come from CSS and now also included Javascript in my workflow. I've just about switched all my CSS code to state `600ms` instead of `.6` and would love to also have this inside Greensock

 

Any word on this?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×