Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split by line? #2

Open
jesserosenfield opened this issue Dec 20, 2021 · 1 comment
Open

Split by line? #2

jesserosenfield opened this issue Dec 20, 2021 · 1 comment

Comments

@jesserosenfield
Copy link

Thanks for the awesome plugin!

Would be awesome to include support for splitting text by line.

Many thanks

@loganliffick
Copy link
Owner

Thanks for the kind words, Jesse!

I've had a few ideas around splitting between different layouts: characters (the basis of the V1 build), words, and lines.

The issue I've had when calculating for lines is responsiveness of a page breaking the animation. Splt takes what's initially rendered as text and spits back out the same render as individual characters which is totally fine from a responsive standpoint given you can resize the page and those characters will break line accordingly, however once you start playing around with lines as the basis —as opposed to characters, resizing creates some weird effects. From what I've seen, all of the other text-splitting libraries (splitting, and gsap) run into the same issue.

Definitely working on a fix, but for now in V1.1.0 you can target a line's characters individually to mimic line splitting. Not optimal for larger pieces of text, I know, but it does work until I'm able to solve for the line problem.

Thanks again for using splt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants