Jump to content
Search Community

hello21

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by hello21

  1. 8 hours ago, OSUblake said:

    Check out the docs. You can provide your own coordinates.

    https://greensock.com/docs/v3/Plugins/MotionPathPlugin

     

    // plot a curve through these coordinates. The target's current coordinates will automatically be added to the start:
    motionPath: [{x:100, y:50}, {x:200, y:0}, {x:300, y:100}]
    
    // cubic bezier coordinates (anchor, two control points, anchor, two control points, etc.):
    motionPath: {
      path: [{x:0, y:0}, {x:20, y:0}, {x:30, y:50}, {x:50, y:50}],
      type: "cubic"
    }

     

    Or you can manipulate the path data string if you understand path commands.

    https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d

     

     

    Hi @OSUblake i have done the same thing , please check my codepen

     

    See the Pen ExXGEMJ by gaurav501 (@gaurav501) on CodePen

     

    I want to move the first element through each green box and stop exactly at the position of the last green box

×
×
  • Create New...