02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Redefining the default ease

In this chapter we discovered the capability of controlling animations eases. Now that this concept is clear to us, it is time to take a deeper look into how eases work. In this lesson, will explore the default ease and how we can change it.

Video Transcript

00:00Now we've seen how to work with eases earlier on, but what if we wanted to use the same ease throughout a lot of animations and we didn't want to manually add them in.
00:10Lucky for us, there is a default property that we could change for the ease itself by going into our tween light and we could search for the property default ease.
00:19And in the default ease, I could just put in whatever, for example, if we have here already our elastic ease.
00:24So let me just use that Alaska elastic and I'm going to do an ease in an elastic ease in and that will be my default ease for all all my animations.
00:36So if I run my application one more time, this never going to see a lot of easing, a lot of weird easing going on, obviously, which won't really work for our type of animation.
00:46So we might want to search for maybe a different ease. So let's see what other eases could we use here.
00:50So let me obviously elastic is a little bit too too elastic.
00:55So we're going to let's do let's do let's do let's do cubic.
01:01So I'm going to go here into the cubic, set that.
01:11And obviously, well, for me, usually I wouldn't set a default for all the animations unless you really know that this is a specific animation that the only one you're going to be doing in this stage, what we're doing is the cubic is starts really slow and then speeds up.
01:26So that, yeah, that's something I guess if we wanted to do that in our case, it's it's really context driven.
01:32Personally, I usually just define them directly because it makes it easier for you to tweak it and play around with it as you need to.
01:38But sometimes you'll find that you want to start from a default and maybe that default is the one you're going to use the most, which is not a bad idea.
01:45So it's a nice it's a nice added bonus into our tweens.
01:49So that's it for the basics of tweening as we've seen them in the process that we've done them so far.
01:55Before we wrap up this chapter, there's a few more properties I want to talk about and the properties and methods.
02:02But before I do them, I will.
02:05Well, there's one more thing I want to do before we move on to those properties.
02:08So let's move on to the next lecture where we're going to start talking about how do you do you if you want to create a delay to a call to a specific function.
02:16So we're going to see how you do that in the following lecture.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!