Jump to content
Search Community

sdad2

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by sdad2

  1. What I am asking for is if I can do this:

    I want a function that given the inputs of an existing path, end state, duration, and current point in time, (and optionally a tween); will output the path at the stated time.
    
    Assuming:
    // start <path d="0 0 L 50 50"  id="path1"
    // end   <path d="0 0 L 100 100"
    
    If the animation takes 2 seconds 
      at the end of second 2 I would get "0 0 L 100 100",
      at the end of second 1 I would get "0 0 L 75 75"
      at the end of second 0.001 I might get "0 0 L 51 51"
    
    What I want is a function that will input: the total number of seconds to take, the end state,  the current time, [Optional tween]
    
    So perhaps: 
    var someObj = new SomeGreenSockObject("#path1")
    someObj.getPathAtTime( "0 0 L 100 100", 1, 2 ) //returns a string "0 0 L 75 75"
    
    someObj.getPathAtTime( "0 0 L 100 100", 2, 2 ) //returns a string "0 0 L 100 100"
    
    someObj.getPathAtTime( "0 0 L 100 100", 0.001, 2 ) //returns a string "0 0 L 51 51"
    
    I do not want an animation nor a change to the path, I want the output of the path's string

     

  2. I need an algorithm to convert one path  <path d="x y z..."  to another <path d="a b c d e... " at a given point in time. 

    Tweening would be a nice to have that I can live without.

    Can this library do that?

     

×
×
  • Create New...