Hacker News new | past | comments | ask | show | jobs | submit login

The current version being shown off here is extremely stuttery, is there a way to smooth the animation yet?



Hey! Author here: this demo is just the most extreme example I could quickly write to show the power of this library.

Realistically, you won’t need to chain window movement like this in most cases (other than our chatbox, I think none of our windows stay open when their parent window is moved). Fast auto-resizing, on the other hand, is more common, and works great.


I'm not the OP but even the demos with the actual software are kinda stuttery. Like the one where you move the outlined spotify window, it's just not great. It's cool that you were able to make it simple to do, and not worry about it, and it's really impressive work, but I guess still feels off a little.


Ah, I know the one you’re referring to—-that purple window actually isn’t using this library.

We can get the position of our _own_ windows easily, but when it comes to getting Spotify’s position, we need to do some more complex polling, which is slower (and only works when the 3rd-party window is in focus).


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: