Hacker News new | ask | show | jobs
by tfsh 1754 days ago
This is a constraint of the APIs provided by MacOS, they allow you to position by (x,y) coordinate and resize by width/height, but there's no way to tween these values...and nor should there be.

What's Tandem are doing here is (interesting, but) atypical behaviour.

3 comments

I don’t think that's entirely correct. While you can't ask the OS to tween the values, nothing prevents you from doing that, other than likely a reduced frame rate.

See this demo: http://stewd.io/pong/

It's still not 100% smooth, but it seems slightly better and demonstrates the ability to manually tween values. Similar performance in both Chrome and Safari.

On Windows, you can update these as often as you want to and the compositor will handle it fine - you can do a lot of cool animations/demos with it.

Is this a macOS specific issue, or is the JS API these guys are providing not able to catch up quickly enough?

Mostly a lack of need-it’s a contrived example I wrote to show a large window count, with child windows spawning nested child windows of their own.

In the actual Tandem app, windows moving like this is uncommon.

It's curious to me, because I've seen compositors in both Linux and Windows handle it perfectly, but I admittedly haven't played with MacOS more than I'm forced to. I'm not very familiar with Quartz, I sorta assumed it would cover x11 functionality by default.