ecsancho Posted December 4, 2016 Share Posted December 4, 2016 Greetings! I was wondering if there's a way to split text by character or by line? thanks Quote Link to comment Share on other sites More sharing options...
Théo Sabattié Posted December 4, 2016 Share Posted December 4, 2016 Do you want split a string? Or do you want make a line feed on pixi's text? to make a line break you can use breakWords, wordWrap and wordWrapWidth on text style or just write a "\n" in your text "Hello\nworld" will become "Hello world" Quote Link to comment Share on other sites More sharing options...
ecsancho Posted December 4, 2016 Author Share Posted December 4, 2016 Thanks for the replay. Sorry I should of been more detailed. I'm looking for something similar to how gsap split text functions. Where I can take the word 'Hello' and split it each character to its own container where I can manipulate individually while maintaining style and kerning. Thanks again! Quote Link to comment Share on other sites More sharing options...
Théo Sabattié Posted December 5, 2016 Share Posted December 5, 2016 That seems tricky ahah. you have to split each charater : yourString.split(""); Create one text by character and set right position. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.