Live data from Hacker News

My favourite animation trick: exponential smoothing (2023)

lisyarus.github.io

261–270 of 390 posts

Re: My favourite animation trick: exponential smoothing (2023)

#262
post #111
post #110

Earlier quoted context omitted.

I agree with that; animations can be OK, but when I have a configuration setting, I usually disable them because input latency drives me crazy. My post replied to "checkboxes vs UI toggles", and replying to that aspect was my main point. That's slightly off-topic, of course. It has to do with animations only because checkboxes wouldn't really benefit from animation, whereas toggles are an obscure visual representatio…

> what does toggle "left" and "right" really mean? Nothing, because that's not the point of the article. It's weird to me that this is such a big point here. In an actual UI, you will have labels or indicators telling you what the toggle means and what the options are - "Safety door unlatched" vs "Control motors engaged". That's a toggle between two choices and having it a toggle like that would be safer than checkbo…

For toggling between mutually exclusive choices please use radio buttons. Checkboxes, and less obvious variants, are for enabling/disabling clearly labeled options that are not mutually exclusive.

That used to be Interaction Design 101 back in the olden days, ie. 1990s.

Re: My favourite animation trick: exponential smoothing (2023)

#263

Earlier quoted context omitted.

> even "feel" does matter to most users And I think most users would prefer software that does stuff instantly. Attaching little animations to everything is just silly and distracting. It only happens because someone had nothing better to do but still had to look busy. These things almost universally degrade the interface and I've yet to see the actual benefit of them, aside from the fact that they draw attention to…

Almost no Apple interactions are without animation. It's actually hard to find something that's NOT animated on Android AND iPhone. For most users, the iPhone is one of the gold standards for "good feel". Some people like the unrealistic jumping of no animation, which is totally fine. Some people want it to "feel like a computer" not how things actually behave in the real world. It's taste. Animations that are too lo…

There are not many animations on iOS nor MacOS. What they are is movement that corresponds to the users movements. Like opening exposé with the touchpad on MacOS is not an animation, the windows follows the movement of your fingers. Likewise scrolling is not an animation, because it follows the users movements.

Re: My favourite animation trick: exponential smoothing (2023)

#264
post #214

Earlier quoted context omitted.

Who is stuck waiting for a toggle or checkbox to finish animating? It's not blocking anything.

The user is. You usually wait for visual confirmation before you determine that the action you performed was indeed performed.

The user isn't actually blocked from doing anything, a box is ticking, it's not a whole-screen state transition where you have to wait for things to settle before moving on. The box doesn't have to settle before you can recognize "oh, good, it accepted my input."

Re: My favourite animation trick: exponential smoothing (2023)

#265
Love this article. I wrote basically the exact same technique almost 10 years ago. At the time I called it `lazy-easy` and still use it today. Sometimes you just want some nice smooth animation without all the state management: https://www.hailpixel.com/articles/lazy-animation-with-lazy-...

Re: My favourite animation trick: exponential smoothing (2023)

#267
post #180

Earlier quoted context omitted.

Beauty is often worth a little extra time. I'd rather walk a beautiful trail than a paved sidewalk beside 6 lanes of fast traffic. It's cool to choose the tools that appeal to your values. It's not cool to advocate for paving the planet in your quest for single-minded efficiency.

> Beauty is often worth a little extra time. I'd rather walk a beautiful trail than a paved sidewalk beside 6 lanes of fast traffic Beauty can be expressed with the toggle's design, with the window decoration, with the colors, with the wallpaper, choice of font, and so on. No need to be expressed with an animation. If your car did a little "song and dance" everytime you started it up that you had to wait to be able t…

Nobody's waiting on a checkbox to finish filling on before moving onto the next.

Re: My favourite animation trick: exponential smoothing (2023)

#268
As a game developer, I find eased tweens with a preset duration better for most UI use cases. However, this other type of animation is extremely useful when you want to smooth a movement that is continuous/unpredictable, with no definite start/end point. Think for example a tile being dragged-dropped on a grid, snapping to the grid as the player moves the mouse, or indeed, the article's example of moving a camera around.

For these cases, the exponential lerp trick is very useful, and not universally known. There are many games (some of mine included!) that use the less correct linear lerp and run into trouble with their animations feeling completely off once somebody runs the game on a 240 Hz monitor, or anything different from the 60fps that used to be standard.

For this reason, I appreciate the article. It's usually hard to access this type of hyper-specific knowledge, as it is most often passed as an "apprentice-style" oral tradition from the senior people on a team to the more junior members.

Re: My favourite animation trick: exponential smoothing (2023)

#270
I don't want to be a party breaker, and the article is nicely written, but why are these animations pervasive these days? When I click a button in the real world, it changes the state instantaneously. It gives me an instantaneous feedback. Imagine you click the mouse button, and it slowly goes down and up.

UI is becoming an art, but most people use computers to get their jobs done. And, to be honest, I still prefer checkboxes.

Post reply on HN