Jump to content
Search Community

mercuryN10

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by mercuryN10

  1. ※"typed out" as shorthand for applying typing animation My goal & some details: When hovering over various SVG elements, I want texts to be "typed out" in an empty unordered list. Each SVG "types out" a different number of list items, each with varying lengths. Each item in the list will be "typed" out simultaneously. Say SVG-A list-item-1 has three lines worth of texts, I want list-item-2 to start being "typed out" in the fourth line; if list-item-2 has two lines worth of text, I want list-item-3 to start being "typed out" in the sixth line. Similarly, say SVG-B list-item-1 has two lines worth of texts, I want list-item-2 to start being "typed out" in the third line. What I am trying: I tried "typing" out the texts twice: (1) Firstly, into the empty list, I "typed" the corresponding texts into it with text-color = background-color. (2) Then, I replaced the typed invisible text from (1) with the same texts, but this time using my desired text color, using the same typing animation. Since the invisible texts in (1) already printed out the texts, texts in (2) will be printed out in the correct position. In CodePen and my attached video, I did not use background color in (1) just to show what I'm doing. ?The Problem? When the animation in (2) starts playing, sometimes the texts in (1) disappears. It doesn't always happen. The CodePen code also sometimes works as intended, sometimes it doesn't. This causes the list items to move around when being "typed". I recorded the problem from my work here: https://tempclip.com/en/WwnJbztOnHu3NZX/watch My Question What went wrong? (Probably very hard to tell...) How do I debug this? Is there a better way to achieve my goal? My knowledge/background This is my first time using GSAP. I don't have much tech background, I only sometimes do this for fun. Would appreciate if you can use simple words ;w;
×
×
  • Create New...