Play an animation backward

Create issue
Issue #955 new
Former user created an issue

Automatic migration. Original reporter: "mattekenpis"

Add the possibility to play an xml animation "backward", using the same xml definition that the one used for the "forward" animation.

Reproducibility: always

OS: Seven, OS build: 7, Platform: Windows

Comments (3)

  1. Martin Preisler

    Where would you specify that you want to play the animation backwards?

    Can you propose a concrete specification?

  2. Former user Account Deleted

    Original reporter: mattekenpis

    For inspiration, there is a very nice animation library ( & in Actionscript/Javascript, and the syntax is like this:

    //tween the element with ID of "myID""#myID", 2, {backgroundColor:"#ff0000", width:"50%", top:"100px", ease:Power2.easeInOut});

    This make the element "#myID" fading from current backgroundColor to "#ff0000", and from current width to "50%", in 2 seconds using a Power2.easeInOut function.

    For the current purpose, to avoid to write this (here in lua): g_animationMgr:loadAnimationsFromXML("TopPanels.xml") local menuFoldAnim = g_animationMgr:instantiateAnimation("foldMenu") menuFoldAnim:setTargetWindow(m_layout) local menuUnFoldAnim = g_animationMgr:instantiateAnimation("unfoldMenu") menuUnFoldAnim:setTargetWindow(m_layout)


    We could instanciate only once the animation, and choose the direction when playing: g_animationMgr:loadAnimationsFromXML("TopPanels.xml") local menuFoldAnim = g_animationMgr:instantiateAnimation("UnfoldTopPanel") menuFoldAnim:setTargetWindow(TimeManager.m_layout)

    menuFoldAnim:start()    -- Forward direction (By default)
    menuFoldAnim:start()    -- Backward direction
    menuFoldAnim:start()    -- Forward direction
  3. Martin Preisler

    This is a new feature, so I propose to add it to 1.0.0, we don't want to change XSD schemas in released stable versions.

    I agree that this would be a nice addition.

    We could add RM_OnceBackwards, RM_LoopBackwards to 1.0.0.

    In the meantime you can work around this by stepping the ANimationInstance manually.

  4. Log in to comment