Jump to content
Search Community

splitText visibility, opacity, autoAlph

Winslow test
Moderator Tag

Recommended Posts

Trying to get an additional splitText animation in and somewhat confused on what the defaults are and also what the correct  process is for visibility, opacity, and autoAlph. I have read most off what I could about this but still unclear. My current situation seems to have mixed attributes in the Chars div. The first char is absolute, hidden, opacity:0. The remaining are inherit but various ranges of opacity from 0 to .8 and I am not even using opacity. Also is absolute the default position? Of course it's late, I've been at it way too long, and I just can't seem to quit tinkering with my animations. Everytime I read more the more I want to do. Oh well, if and when I (we) are quarantined I'll have plenty to do.

 

Regards

 

Added Codepen and like stated, my troubles went away.

 

What I am trying to do is add an animation at the end of another, to make it look like taking a breath, expanding and deflating. What I have now is just the expanding portion but it would not be difficult to reverse it. How would I make the letters on either side expand less than the middle ones? I am using splitText because the other animation uses it and it's available and not opposed to using something else. I might be able to change the tween amounts to variables based on position and use the char array to tween each char??? Thoughts?

See the Pen zYGaeOx by B0nef1sh (@B0nef1sh) on CodePen

Edited by B0nef!sh
added codepen +
Link to comment
Share on other sites

ok, now that this is done (simplifying in codepen corrected my issue as mentioned in the doc) and many iterations later... I have the text scaling up, fontSize, height  and even  (super) text shadowing (not in this code pen).  The question now is "best way to add 3D perspective" to this. I came up with a formula to apply Y rotation to each char proportionally so that less scale occurs in the middle and more on the ends. How do I incorporate chars{i} processing so I can compute a factor to use for scaling in the standard gsap.to processing .   gsap.to(split.chars, {scaleY: (factor * 5deg)}  where factor = (centerIndex-i). I have 13 or so characters in the title.  I might even use proportionality for the scaling. Will a (for) loop  produce the same as gsap.to(array)? I'll play with it for a while and see. If there is a better way I'd appreciate some insight. 

 

Regards

Link to comment
Share on other sites

On 3/22/2020 at 2:51 AM, B0nef!sh said:

How do I incorporate chars{i} processing so I can compute a factor to use for scaling in the standard gsap.to processing .   gsap.to(split.chars, {scaleY: (factor * 5deg)}  where factor = (centerIndex-i)

You can use functions as the value, no problem:

gsap.to(split.chars, {scaleY: i => {
  return (centerIndex - i) * 5;
}});

Also note that no scaleZ property exists on DOM elements.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...