RetroFE forums

Artwork & Layouts => Help => Topic started by: STAiNLESS on January 30, 2021, 02:12:11 AM

Title: algorithms
Post by: STAiNLESS on January 30, 2021, 02:12:11 AM
Is it something I'm doing wrong, or do algorithms just not work?

<image src="images\RightLeft.png" x="left" y="top" xOrigin="left" yOrigin="top" height="200" width="200" layer="5">
          <set duration="5">
             <animate type="x" to="right" algorithm="easeoutexponential"/>
            <animate type="xOrigin" to="right"/>
            <animate type="y" to="bottom" algorithm="easeinexponential"/>
            <animate type="yOrigin" to="bottom"/>

To me, the above should move a 200px square from top left corner to bottom right over 5 seconds.
But using easeoutexponential on the "x" animation should make it shoot right then slow down severely near the end of the 5 seconds.
Using easeinexponential on the "y" animation should make it very slowly start moving down then increase speed severely near the end of the 5 seconds.

Desired result being the 200px box moves along an arc path and not just a straight line through the middle.
Actual result, the box moves in straight path corner to corner through the middle.

So is my code wrong somewhere?
Title: Re: algorithms
Post by: Pieter Hulshoff on February 18, 2021, 06:14:25 PM
It might be that the names are case sensitive, defaulting to linear.
Title: Re: algorithms
Post by: STAiNLESS on February 20, 2021, 04:25:40 AM
Thanks for the reply,
I did try a lot of combinations of upper/lower case (easeoutexponential, easeoutExponential, easeOutexponential, easeOutExponential) with no luck, even copy pasted from the wiki. Even tried some from other peoples layouts to test.
Could you please show me the correct way to type it? (using example above)
Title: Re: algorithms
Post by: Pieter Hulshoff on February 21, 2021, 08:39:35 PM
This is from the code:
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInquadratic"] = EASE_IN_QUADRATIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutquadratic"] = EASE_INOUT_QUADRATIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeIncubic"] = EASE_IN_CUBIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutcubic"] = EASE_INOUT_CUBIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInquartic"] = EASE_IN_QUARTIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutquartic"] = EASE_INOUT_QUARTIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInquintic"] = EASE_IN_QUINTIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutquintic"] = EASE_INOUT_QUINTIC;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInsine"] = EASE_IN_SINE;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutsine"] = EASE_INOUT_SINE;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInexponential"] = EASE_IN_EXPONENTIAL;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutexponential"] = EASE_INOUT_EXPONENTIAL;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeIncircular"] = EASE_IN_CIRCULAR;
Graphics/Animate/Tween.cpp:        tweenTypeMap_["easeInoutcircular"] = EASE_INOUT_CIRCULAR;