 Hello, and welcome to this supercharged Q&A. I'm Paul. And I'm Serma. Now today, we're going to answer another question. And as usual, it seems Serma has chosen one. What have you chosen? I have chosen a question once again. And this week is going to be, I'm in general very interested in gesture-driven animations that use physics-based equations. Would be great to hear about that. OK, cool. Well, actually, as a side note, I was playing with this Firetech preview. And they've just recently added the spring timing function. Have you seen this? Yeah, I heard about it. I haven't actually looked at what it looks like. So basically, what they do is instead of saying the timing function is out, you can say spring. And then it's like mass, the dampening factor, the initial velocity, and a bunch of other supplies. It sounds really physics-based. It is. The weird thing is, at the moment, you can actually put a duration on it. And after that time, it'll just snap to the final location, which kind of felt a bit strange. Does not sound very physics-based. No, it doesn't. It sounds kind of weird hybrid. But nonetheless, it's an interesting proposal to introduce physics-based stuff to existing CSS animations. But how that's going to pan out, I do not know. What are your thoughts on the whole area? Something that you actually taught me, I guess, or told me was when it looks right, it is right. Which is something that we've been employing in Colt's author. And for example, with the swipeable cards that you wrote, you just went with a formula which said current position minus end position, or the other way around, divided by 4 every frame, will have a really nice smooth-out effect, which is not physics-based at all. It isn't even frame-rate independent. But in 99% of the time, it's going to feel right to the user. And that is the only thing that actually counts. I think, yeah, because I got that from one of my teachers at school, when we were doing some drawing work. Basically, it was like, if it looks right, it is right. And it's kind of stuck with me. And yeah, I think there's two parts to this, firstly, if somebody's interacting with something on screen, it's got to feel like it's sticking to their finger, assuming that's the kind of feel you're actually going for. After that, you can get away with quite a lot, because it's not a real thing that they're interacting with. I mean, this is the whole idea behind material design, is it's kind of these layers that sort of respond sort of like a real world thing, but also kind of magical as well. It's a metaphor, and it stops there, I think. Even with skeuomorphic stuff of, yes, it was kind of realistic, but also kind of not as well. And I think so long as it, as you say, so long as it looks right, or apparently is what I say, so long as it looks right, I think it is right. And the thing about doing something that's physics based, generally, is there's increased computational cost of doing the physics calculation. Or a real gain. For arguably questionable gain. I think that's better phrasing. Yeah, I mean, in some cases, it's going to be right. It's going to be the right thing to do, depending on the UI that you're making. But in other cases, I think if you can fake it and you get close to it, absolutely do that. And especially if it's going to mean that you're spending less time on the CPU and you're much more likely to hit like a 60 frames a second later. And things get unwieldy when you go physics based really fast because you have to basically pretend that a certain item has a weight so you can kind of figure out how fast it's going to go off skin, all these kind of things that get really annoying because you're like, I have a diff. Let's pretend it weighs five kilograms. And then you get more variables. You can tune and it gets really hard to juggle all these things in your head. And I think most of the time, especially when we're talking about simple UI, that is not worth the effort or the computational time that comes with it. Exactly. So there you have it. I think if you can do it, great. Don't stress out about it. And just give it your best shot. And I think that most of the time, so long as you're doing 60 frames, I can stick to finger and everything kind of plays out generally quite nicely with eases and so forth. Most of the time, that'll actually cover you pretty well. So thank you very much for joining us. Don't forget to subscribe and we will catch you next time. See ya.