Jump to content
Search Community

axy2016

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by axy2016

  1. Hello,

     

    I have a square that I want to morph into three circles.

    Is it possible to morph one shape into multiple smaller ones in one transition - versus having it transform into each individual shape?

    The Codepen I've included has a square that transforms into one blue circle - but the actual 'whole' shape is three circles lined up.

     

    Thank you!

     

    tl = new TimelineMax({});
    
    MorphSVGPlugin.convertToPath("circle, rect")
    
    tl.to("#red", 1, {morphSVG:"#blue", fill:"#0000FF", ease:Back.easeOut.config(1), y:0}, "+=0");
    

     

    See the Pen bEmWPe by anon (@anon) on CodePen

    • Like 1
  2. Hi,
     
    After reading the documentation on how to morph more than two objects, it seemed like the code wasn't any much longer.
    However I'm wondering if I'm missing anything within my code that is preventing that, as the shapes only morph from the first to the second and gets stuck there. It doesn't move on to the third shape.
     

     

    Thank you - I really appreciate it!

    TweenMax.to(pink, 2, {morphSVG:"#red", fill:"#ED1C24"}, "+=1")
    .to(pink, 2, {morphSVG:"#black", fill:"#000000"}, "+=1");
    

    See the Pen pgKEQP by anon (@anon) on CodePen

×
×
  • Create New...