Jump to content
Search Community

maki3000

Premium
  • Posts

    7
  • Joined

  • Last visited

Posts posted by maki3000

  1. UPDATE:

    I checked my code again and found out that my scale x-positioning didn't work all the time. Here's a new version of my pen:

    See the Pen bGxBNBe by maki3000 (@maki3000) on CodePen

     

    Also, I decided to use the overflow: visible!important;, because I like the result better, when it's overflowing and I do the width animations now also with a tween (for simplicity it don't use timeline, because I want to be the keepInViewBox as it is).

  2. Hey! Thanks to all of you! And thank you very much @Jack for your detailed explanations. This is very helpful 👍

     

    Based on Jacks CodePen, I added scaling, because I also have a letter morphing from "K" to "I" and because I scale, I decided to have transformOrigin: 'center'

     

    I also added containers around my SVGs, so I can CSS transform their widths and have a container with letters that doesn't change in size.

     

    Here we go:

    See the Pen oNPzgqN by maki3000 (@maki3000) on CodePen

     

    One and a half day later I'm pretty happy with the result 😀

  3. Hey there!

     

    A lot of the times, when morphing SVG, the size of SVGs changed and when in a fixed sized container, the viewBox may needs to be changed.

     

    Check my pen code, where you can see two morphing letters.

     

    So I created a animateSvgViewBox function to also animate the viewBox, but it becomes kind of jerky, especially when used with many elements.

     

    So: feature request -> implement animate viewBox in MorphSVGPlugin.

     

    Or ist there a better option to do that?

    See the Pen xxaOYqE by maki3000 (@maki3000) on CodePen

  4. When I use morphSVG with shapeIndex duration the duration is ignored.

     

    I do:

    morphSVG.convertToPath('#letter-k-polygon, #letter-ki-svg-morph-rect')
    gsap.to('#letter-k-polygon', { morphSVG: { shape: '#letter-ki-svg-morph-rect', shapeIndex: 12, duration: 10 } })

    Like this the animation goes quite fast.

     

    But when I do:

    gsap.to('#letter-k-polygon', { morphSVG: '#letter-ki-svg-morph-rect', duration: 10 })

    The animation duration is 10 seconds.

     

    What am I doing wrong?

     

    Sorry, I can't add a CodePen, because I don't know how to get around restricted use of morphSVG...

×
×
  • Create New...