So how's everyone doing so far? Are you guys enjoying the talk? Nice. Any back end developers here? Making some noise? Any motion designers? Okay, nobody.
So today my topic is animations. Animations in simple word is just a way to communicate motion. So while this concept was introduced into movies first before it was brought into web, but people have been trying to find ways to communicate motion from a very long time. How many of you remember this flip book, where we would draw a bunch of drawings and flip them together really fast to create a perception of motion.
So the idea is that when images are shown fast enough, our brain loses the ability to see individual frames and blends them together into a single moving image. But in digital world, we have frames. Each frame has a drawing and the idea is similar to the flip book, it's just put those frames together really fast to create the perception of motion.
Hello, my name is Ashima. I'm a friend and engineer at Miro, and today I'm particularly going to be talking about animations in Javascript. So all of you must have heard this term, frame rates, frames per second. I first heard about it in movies. So frame rate is the number of frames shown in one second. So if we show 60 frames in one second, it becomes 60 frames per second, and more the frames we show in one second, the smoother the animation gets. In order to render smooth animations on web, we target 60 frames per second. But that depends a lot on the device which you are using. For instance, if you're using a mobile phone, there is a high likely chance that it's running on a frequency lower than 60 hertz. So the frame rate would be like 30 frames per second or whatever the device supports.
In web, we can achieve animations using JavaScript, using CSS, using CSS transitions and animations. In CSS transitions, you usually define two points. One is the starting point and the other one is the ending point. Whatever happens in between is controlled by the browser. So this is what we call interpolation. In CSS transitions, you usually need an action to trigger. So you would use a hover or a click. And you cannot run them in loop. So we have CSS animations. And in CSS animations, you can define intermediate points as well using key frames, apart from just defining the starting and ending point. And yes, the interpolation, again, is controlled by the browser.
Comments