Loading ...
Sorry, an error occurred while loading the content.

Control of Easing Effects

Expand Messages
  • ae3interactive
    Hi, Sorry, I m sure this has been asked before in here, but I can t seem to find an answer: What s the easiest interface for control of Easing methods? Is it
    Message 1 of 5 , Aug 1 8:22 AM
    • 0 Attachment
      Hi,

      Sorry, I'm sure this has been asked before in here, but I can't seem to find an answer:

      What's the easiest interface for control of Easing methods?
      Is it simply to override the method in your code and set constant values for the arguments, or
      is there some way to pass values to the Easing method's constructor when instantiating an
      Anim? For example, can I pass a value for "s" in the list of attributes passed to Anim?

      I'd like to change the overshoot on backIn and the number of bounces on bounceOut, but
      can't seem to do it without overriding the methods, which seems inelegant.

      Thanks for your help!
    • Frank Dietrich
      ... You can define Your own easing methods. the Anim receives a parameter like YAHOO.util.Easing.easeOut But You could create Your own easing-object and pass
      Message 2 of 5 , Aug 1 8:55 AM
      • 0 Attachment
        >...I'd like to change the overshoot on backIn and the number of bounces on
        >bounceOut, but
        >can't seem to do it without overriding the methods, which seems inelegant.
        >


        You can define Your own easing methods. the Anim receives a parameter like
        YAHOO.util.Easing.easeOut

        But You could create Your own easing-object and pass this instead.
        Download the YAHOO js files and have a look in the non "-min" versions.

        You should be able to do

        var ddTech = new Object();

        ddTech.Easing ={
        easeInWithMyKindOfBounce: function(t, b, c, d) {
        return (t==0) ? b : c * Math.pow(.......
        },
        superEasyEasing: function(t, b, c, d) {
        return bla....
        }
        };


        then You should be able to call the Anim-instance with

        easing: ddTech.easeWithMyKindOfBounce


        HTH

        Frank
      • Frank Dietrich
        ..... Dav Glass has a lot of easing samples on his page. I currently have no Link at hand but You ll find it here easily ....... here it is:
        Message 3 of 5 , Aug 1 8:58 AM
        • 0 Attachment
          ..... Dav Glass has a lot of easing samples on his page. I currently have no Link at hand but You'll find it here easily


          ....... here it is:

          http://blog.davglass.com/files/yui/effects
        • ae3interactive
          ... You ll find it here easily ... Thanks for both responses, they re exactly what I was looking for.
          Message 4 of 5 , Aug 1 10:25 AM
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, "Frank Dietrich" <fdietrich@...> wrote:
            >
            >
            >
            > ..... Dav Glass has a lot of easing samples on his page. I currently have no Link at hand but
            You'll find it here easily
            >
            >
            > ....... here it is:
            >
            > http://blog.davglass.com/files/yui/effects
            >
            Thanks for both responses, they're exactly what I was looking for.
          • Frank Dietrich
            ... perfect!
            Message 5 of 5 , Aug 1 12:45 PM
            • 0 Attachment
              >Thanks for both responses, they're exactly what I was looking for.
              >

              perfect!
            Your message has been successfully submitted and would be delivered to recipients shortly.