Contains the output elements from a text split operation. Provides access to the hierarchical structure of split text elements.
const splitResult = Text.split(myText);// Access individual characterssplitResult.chars.forEach(char => { char.alpha = 0; gsap.to(char, { alpha: 1, duration: 0.5 });});// Access words (groups of characters)splitResult.words.forEach(word => { word.scale.set(0); gsap.to(word.scale, { x: 1, y: 1, duration: 0.5 });});// Access lines (groups of words)splitResult.lines.forEach(line => { line.x = -200; gsap.to(line, { x: 0, duration: 0.5 });}); Copy
const splitResult = Text.split(myText);// Access individual characterssplitResult.chars.forEach(char => { char.alpha = 0; gsap.to(char, { alpha: 1, duration: 0.5 });});// Access words (groups of characters)splitResult.words.forEach(word => { word.scale.set(0); gsap.to(word.scale, { x: 1, y: 1, duration: 0.5 });});// Access lines (groups of words)splitResult.lines.forEach(line => { line.x = -200; gsap.to(line, { x: 0, duration: 0.5 });});
Array of individual character Text objects
Array of line containers, each containing word containers
Array of word containers, each containing character objects
Contains the output elements from a text split operation. Provides access to the hierarchical structure of split text elements.
Example