SVG morphing with anime.js









up vote
0
down vote

favorite












I'm trying to make an SVG animation where first I draw the animation in Adobe illustrator then I get the code and animate it with anime.js.



I'm animating (changing) only the "d" attribute in the SVG.
I encountered a problem as same as the problem in the tutorial I was following:



youtube tutorial (19:20)



Seems my SVG code is not exported properly or I'm doing something wrong with the anchor points.






StartUpTimeline.add(
targets: morph,
d: [
value: 'M0,0,1,360S184,253,440,254c245,1,346,236,520,236,182,0,277-189,559-189,183,0,402,100,402,100V1Z' ,
],
easing: 'easeInQuint',
duration: 1500,
)

<svg id="morph" height="100%" width="100%" viewbox="0 0 1920 1080" preserveAspectRatio="none">	
<path class="morph" fill="#002e3a"
d="M0,0H1S184-1,440,0C685,1,786,0,960,0c182,0,246,1,528,1h433Z"/>
</svg>












share|improve this question



























    up vote
    0
    down vote

    favorite












    I'm trying to make an SVG animation where first I draw the animation in Adobe illustrator then I get the code and animate it with anime.js.



    I'm animating (changing) only the "d" attribute in the SVG.
    I encountered a problem as same as the problem in the tutorial I was following:



    youtube tutorial (19:20)



    Seems my SVG code is not exported properly or I'm doing something wrong with the anchor points.






    StartUpTimeline.add(
    targets: morph,
    d: [
    value: 'M0,0,1,360S184,253,440,254c245,1,346,236,520,236,182,0,277-189,559-189,183,0,402,100,402,100V1Z' ,
    ],
    easing: 'easeInQuint',
    duration: 1500,
    )

    <svg id="morph" height="100%" width="100%" viewbox="0 0 1920 1080" preserveAspectRatio="none">	
    <path class="morph" fill="#002e3a"
    d="M0,0H1S184-1,440,0C685,1,786,0,960,0c182,0,246,1,528,1h433Z"/>
    </svg>












    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to make an SVG animation where first I draw the animation in Adobe illustrator then I get the code and animate it with anime.js.



      I'm animating (changing) only the "d" attribute in the SVG.
      I encountered a problem as same as the problem in the tutorial I was following:



      youtube tutorial (19:20)



      Seems my SVG code is not exported properly or I'm doing something wrong with the anchor points.






      StartUpTimeline.add(
      targets: morph,
      d: [
      value: 'M0,0,1,360S184,253,440,254c245,1,346,236,520,236,182,0,277-189,559-189,183,0,402,100,402,100V1Z' ,
      ],
      easing: 'easeInQuint',
      duration: 1500,
      )

      <svg id="morph" height="100%" width="100%" viewbox="0 0 1920 1080" preserveAspectRatio="none">	
      <path class="morph" fill="#002e3a"
      d="M0,0H1S184-1,440,0C685,1,786,0,960,0c182,0,246,1,528,1h433Z"/>
      </svg>












      share|improve this question















      I'm trying to make an SVG animation where first I draw the animation in Adobe illustrator then I get the code and animate it with anime.js.



      I'm animating (changing) only the "d" attribute in the SVG.
      I encountered a problem as same as the problem in the tutorial I was following:



      youtube tutorial (19:20)



      Seems my SVG code is not exported properly or I'm doing something wrong with the anchor points.






      StartUpTimeline.add(
      targets: morph,
      d: [
      value: 'M0,0,1,360S184,253,440,254c245,1,346,236,520,236,182,0,277-189,559-189,183,0,402,100,402,100V1Z' ,
      ],
      easing: 'easeInQuint',
      duration: 1500,
      )

      <svg id="morph" height="100%" width="100%" viewbox="0 0 1920 1080" preserveAspectRatio="none">	
      <path class="morph" fill="#002e3a"
      d="M0,0H1S184-1,440,0C685,1,786,0,960,0c182,0,246,1,528,1h433Z"/>
      </svg>








      StartUpTimeline.add(
      targets: morph,
      d: [
      value: 'M0,0,1,360S184,253,440,254c245,1,346,236,520,236,182,0,277-189,559-189,183,0,402,100,402,100V1Z' ,
      ],
      easing: 'easeInQuint',
      duration: 1500,
      )

      <svg id="morph" height="100%" width="100%" viewbox="0 0 1920 1080" preserveAspectRatio="none">	
      <path class="morph" fill="#002e3a"
      d="M0,0H1S184-1,440,0C685,1,786,0,960,0c182,0,246,1,528,1h433Z"/>
      </svg>





      StartUpTimeline.add(
      targets: morph,
      d: [
      value: 'M0,0,1,360S184,253,440,254c245,1,346,236,520,236,182,0,277-189,559-189,183,0,402,100,402,100V1Z' ,
      ],
      easing: 'easeInQuint',
      duration: 1500,
      )

      <svg id="morph" height="100%" width="100%" viewbox="0 0 1920 1080" preserveAspectRatio="none">	
      <path class="morph" fill="#002e3a"
      d="M0,0H1S184-1,440,0C685,1,786,0,960,0c182,0,246,1,528,1h433Z"/>
      </svg>






      css svg anime.js






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 10 at 16:55









      Liam Strilchuk

      12515




      12515










      asked Nov 10 at 16:07









      mart cube

      265




      265



























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240802%2fsvg-morphing-with-anime-js%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240802%2fsvg-morphing-with-anime-js%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3

          Museum of Modern and Contemporary Art of Trento and Rovereto