Jump to content
Search Community

Convert Flash customease

Paul_30419 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,

 

I am trying to convert a customease from a Flash animation to JS but having difficulties using the visual tool because the Flash tool I found here https://greensock.com/customease-as doesn't let me enter the values I have in my code. I spent 3 hours trying to manage the curves but it's a nightmare!

Is there any other tool available to do the conversion I need?

 

What I have is CustomEase.create("accelEase",[{s:0,cp:0.07199,e:0.242},{s:0.242,cp:0.412,e:0.588},{s:0.588,cp:0.764,e:1}]);

 

Thank you

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Are you saying that the ease you need to use too difficult to draw in the JavaScript Ease Visualizer?

 

https://greensock.com/customease

 

If so, can you provide an image of the curve you are trying to replicate?

 

The cool thing about the JS version is that you can literally draw an ease path in Illustrator and paste it into the Ease Visualizer.

 

I'm doubtful we have any tools around that will do the conversion you need. We no longer support the AS3 tools, but perhaps @GreenSock has a suggestion.

 

 

 

 

Link to comment
Share on other sites

Hi, 

 

Thanks a lot for the quick reply!

The problem is I don't know how the curve looks like. All I have is the data from the .as code.

I tried to use the Flash tool (https://greensock.com/customease-as) to replicate the curve by examining the values in real time and comparing to the values I have, but I am not sure if I am doing the right thing and even if I could precisely adapt them, I am not sure what "M", "C" etc is all about, compared to the Flash array.

Link to comment
Share on other sites

We completely rewrote CustomEase from the ground up for the JavaScript version. It's much more powerful and accurate now. There isn't really a direct conversion tool, but I whipped together some code that should (in theory at least) replicate that ease:

 

CustomEase.create("custom", "M0,0,C0,0,0.106,0.053,0.165,0.095,0.225,0.138,0.26,0.169,0.315,0.223,0.479,0.387,0.576,0.482,0.73,0.657,0.841,0.783,1,1,1,1");

 

And here's a codepen that does all the work of estimating that conversion: 

See the Pen ?editors=0010 by GreenSock (@GreenSock) on CodePen

 

If it doesn't look/act like what you expected, let me know.

 

Does that help? 

 

  • Like 2
Link to comment
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.
×
×
  • Create New...