Author Topic: algorithms  (Read 1469 times)

STAiNLESS

  • Newbie
  • *
  • Posts: 43
  • Karma: +39/-13
  • CORE
    • View Profile
algorithms
« 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">
       <onEnter>
          <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"/>
         </set>
      </onEnter>

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, from top left corner to bottom right, 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?
« Last Edit: April 03, 2022, 10:28:30 PM by STAiNLESS »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +45/-4
    • View Profile
    • Towel 42
Re: algorithms
« Reply #1 on: February 18, 2021, 06:14:25 PM »
It might be that the names are case sensitive, defaulting to linear.

STAiNLESS

  • Newbie
  • *
  • Posts: 43
  • Karma: +39/-13
  • CORE
    • View Profile
Re: algorithms
« Reply #2 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)

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +45/-4
    • View Profile
    • Towel 42
Re: algorithms
« Reply #3 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;

STAiNLESS

  • Newbie
  • *
  • Posts: 43
  • Karma: +39/-13
  • CORE
    • View Profile
Re: algorithms
« Reply #4 on: April 07, 2022, 05:49:18 AM »
I see this is fixed now.
I can confirm I have tested and is working.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1494
  • Karma: +45/-4
    • View Profile
    • Towel 42
Re: algorithms
« Reply #5 on: April 07, 2022, 05:55:38 AM »
Yes. Canít believe the issue was right under my nose, and I missed it before.