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

Re: Animation Modes

Expand Messages
  • zuccaralloo
    Hi Alex, for keySplines I recommend the neat tool from http://pilat.free.fr/english/animer/ with that you can determine the speed (set of Bezier control
    Message 1 of 4 , Jun 1, 2004
    • 0 Attachment
      Hi Alex,

      for keySplines I recommend the neat tool from

      http://pilat.free.fr/english/animer/

      with that you can determine the speed (set of Bezier control points)
      of each interval. Here is the modified example:

      -- start ---

      <svg>

      <rect x="40" y="40" width="120" height="120" fill="red" >

      <animateColor attributeName="fill"
      begin="0s" dur="10s"
      calcMode="discrete"
      values="#f0f;#004;#004"
      keyTimes="0;.7;1"
      fill="freeze"/>

      </rect>

      <rect x="70" y="70" width="60" height="60" fill="red" >

      <animateColor attributeName="fill"
      begin="0s" dur="10s"
      calcMode="spline"
      values="#a00;#f0f;#f0f;#00f;#004"
      keyTimes="0;.3;.7;.7;1"
      keySplines="0 0 0 1;0 0 1 1;0 0 1 1;.195 0 1 .685"
      fill="freeze"/>

      </rect>

      </svg>

      --- end ---

      When nothing happens or on an immediate change I used points 0 0 1 1.
      You could use any values (between 0 and 1) though.

      Then there was a little mistake in my example yesterday. In the
      second animation (dur 15s) you need to add an extra "blue" to the end
      of the value-list and "1" to the end of the keyTimes-list, since -
      according to the spec - the last value must be "1".

      Regards,
      Heiko




      --- In svg-developers@yahoogroups.com, "Alexander Adam"
      <evolgrafix_aadam@y...> wrote:
      > Heiko,
      >
      > >
      > > you can achieve what you want with one animation:
      > > [..]
      >
      > Thanks a lot. Do you also have any idea how to calculate the right
      > values for making an "ease in/ease out" effect? Means that at one
      or
      > more values the value is interpolated "faster" in and "faster out",
      > something like
      >
      > value time ease in? ease out
      > red----0s-------no--------no---
      > blue---3s-------yes-------no---
      > green--5s-------no--------yes--
      > black--10s------yes-------yes--
      > white--12s------no--------no---
      >
      > I know I have to use KeySplines for that but I am not sure how to
      > calculate the right values for it to fit e.g. the scheme shown
      > before, any idea?
      >
      > thanks,
      > alex
    Your message has been successfully submitted and would be delivered to recipients shortly.