Start Using GSAP's ScrambleText with Motion.page for Extra Flair Today! š„
In todayās video, Luke showcases how to create scramble text effects inspired by the game Hackmud using Bricks Builder and Motion.Page. The focus is on enhancing the visual appeal and interactivity of websites by implementing dynamic text animations. He guides viewers through each step, using Bricks Builder for the setup and Motion Page for the animations.
Steps
Setting Up the Page in Bricks Builder:
- Create a New Page: Begin by setting up a new page with text elements and sections.
- Import and Arrange Sections: Add and arrange various sections like titles and cards, preparing the layout for the animation.
- Prepare Elements for Animation: Apply a specific class called āscrambleā to the text elements destined for animation.
Configuring the Scramble Text Animation:
- Set Up Animation Containers: Ensure the elements with the āscrambleā class are properly positioned and ready for animation.
- Create Animation Classes: Assign the āscrambleā class to all text elements where the effect is desired.
Animating with Motion Page:
- Create a New Timeline: Initiate a new timeline named āScramble Text.ā
- Configure Animation Trigger: Set triggers that activate the animation as the page scrolls, aligning the green and red lines to control when the effect starts.
- Apply Scrambling Effects: Implement the scrambling effect using custom JavaScript, targeting text opacity and character settings to create the desired effect.
Enhancing the Animation:
- Customize Character Display: Use various characters and symbols to create a unique scrambling effect.
- Split Text and Apply Staggering: Split the text by characters and apply a staggered effect to enhance visual interest.
- Adjust Animation Speed and Duration: Modify the speed and duration of the scrambling effect to match the design aesthetics.
Conclusion
Lukeās tutorial provides a detailed and accessible guide for incorporating scramble text animations into web designs using Bricks Builder and Motion Page. By following the outlined steps, designers can add an interactive and visually appealing element to their websites. This tutorial not only enhances the aesthetic appeal of web pages but also engages visitors with its creative use of text animation.
Video transcript
Hello guys, welcome back to the channel. My name is Luke, and in todayās video, Iām going to be showing you a unique effect where weāre going to use something called scramble text. I was recently playing a game called Hackmud, which is kind of like a hacking simulator, and this inspired me to create the same effect for a website. Let me show you what Iām talking about.
So, like I said, Hackmud is an online game hacking simulator. If you notice here, when you hit enter, the text comes up on the display with this scrambling effect where it comes in by blocks. Youāll see a better example here. I thought that looked pretty cool and wondered if we could create something similar in Motion Page. Youāll notice here Iām going for a similar effect. This is just a homepage that Iāve created using similar fonts and colors, but thereās no animation applied just yet; itās just a basic page as you can see.
What Iām going to do is go into Bricks and add some classes to the text, and then with those classes, we can target them in Motion Page to add some effects. Before that, Iāll just show you the setup in Bricks real quick. If I just go to Pages, all pages, and edit with Bricks here on the homepage, you can see nothing too special. We just have some text here, a title, and three cards with some text inside, and thatās pretty much it.
What Iām going to do is create a class called āscrambleā and apply it to the text where I want the scrambling effect to take place. Letās do it on this one, āscramble.ā Weāll also add it to this one here, this big chunk here, my main title here, and these elements as well. Iām just going to copy the styles here and paste, and then do the same for the text chunk here.
Alright, so Iāve added the class āscrambleā to every element where I want the effect to take place, and Iām just going to save this over here. Now weāll work our magic once again in Motion Page. Iāve just opened Motion Page, and Iām going to create a new timeline for this, calling it āscramble text.ā If I want this animation to take place on every single page, Iām going to make sure to check this one. For this example, I want this to happen on scroll trigger.
Now, I want the animation to take place instantly as soon as it hits the green line. Iām going to bring these two lines together and put them both at 45%, just above halfway of my display. Next, I want to change this to be ātop,ā and then I want to trigger each iteration individually because each element here has the same class. If one of those classes hits the line, then theyāre all going to take place, which we donāt want. So just make sure this one is toggled on.
For the animation, Iām going to target the class āscramble.ā When I highlight this, you can see the first instance of the class is highlighted, which is good, and now we can add our animation. The first thing I want to control is the opacity. I want all of the text to start out with an opacity of zero. As I scroll down, you can see each iteration is individual of one another until it hits the line, which is perfect.
Next, Iām going to the custom box here, and Iām going to click on this button to add some Gap. This is where weāre going to use scramble text. In this box, we want to type āscrambleTextā with an uppercase āT,ā colon, and then curly braces. We can add some properties here. The first one is going to be the characters that we want to use, ācharsā like this, with speech marks, separated by a comma. We can also have a reveal delay; here Iām using 0.2. We can have a speed; Iām using 0.1 here. And we also have a duration; Iām using 0.2 for this.
For the characters, we can actually use anything. If I type, for example, ā09ā many times, when I scroll down and refresh the builder, you can see the text starts out at ā0909ā like so. Iāve noticed we can also use characters. I went online to find these charactersājust kind of weird symbols that we can use. If I paste them here, you can see we have this full block, a dotted block, a short-sized block, and the same block as we were using at the beginning. Now, as I scroll down and refresh this once more, you can see we get these blocks coming up, which is pretty cool. Weāll just refresh again.
Now, itās quite fast, but there are more animation properties that we can use down here to make this look a little better. The first one Iām going to use is split text. Iām going to split everything up by characters. I also want to use stagger; Iām using 1 second and setting this to be random. Each is taking way too long, so we want this to be a total of 1 second. Click on this to change it to the amount, and now you can see we get this really cool effect happening. If I save the timeline and then look at this on the front end, remember we have a title here. As soon as it hits the green line, we get this effect, and once again, we get this cool effect going on.
In the game itself, Hackmud, the game doesnāt really have these two characters, so if I remove them temporarily, it looks more like this. We can do random; we can even change this to 0.5 to make it much quicker. This looks a little more related to the game now, like soāa pretty cool effect. Once again, this was inspired by the Hackmud video game. I donāt believe weāve done a video on scramble text before, so I thought Iād show you an example of how you could use it.
If you liked this video, please donāt forget to give it a like and a thumbs up. If youāve not already, please do consider subscribing, and weāll be back soon with some more content for Motion Page. Thank you very much, guys.