Live data from Hacker News

Jelly UI: Soft-body physics for native HTML form controls

jelly-ui.com

181–190 of 209 posts

Re: Jelly UI: Soft-body physics for native HTML form controls

#182

Earlier quoted context omitted.

The browser and OS does that as well (unless absolute zero updates and you don't even move your pointer around). But many smaht people out there don't know that.

This is just plain false. Retained UIs like the DOM and what your OS uses only ever render when something changes, so the vast majority of the time they sit idle. There's extensive effort throughout the entire stack to do as little work as possible. For instance, the mouse cursor is composited on the GPU during scanout. That means simply moving your cursor requires zero rendering. Another example: When typing only th…

> Another example: When typing only the newly typed character and caret are rendered. The rest of your entire screen is reused.

You're right that they avoid unnecessary painting but it is not this granular anymore. It used to be but rendering is so much faster these days where it is cheaper to just render a bit more than tracking dirty regions. It's easily visible on Android where you can enable "Show view updates" and see the entire textbox view updates when the cursor flashes. The docs say the same thing.

https://developer.android.com/reference/android/view/View#in...

Re: Jelly UI: Soft-body physics for native HTML form controls

#183
post #71
post #38

Saw the window was a bit laggy so thought I'd delve deeper to figure out what was going on. This lib runs a a RAF animation loop every 8ms across every component on the page that causes the entire document to repaint. The comment above appears of the AI generated sort: // One shared animation frame: step every live component, park when idle. // The delta is capped so a background-tab pause never becomes one giant ste…

> This is the kind of thing usually a human notices and says 'dont do that, that is kind of crazy'. It's not crazy. That is literally what 99.99% of video games do. They repaint everything constantly, only limited by either your vsync rate or hardware.

I get what you're saying.

These downvoters act like native JS doesn't do the exact same thing with event listening and observing the DOM. So does React and other FE frameworks.

Philip J Fry is either being disingenuous or genuinely doesn't know that game rendering has often several MB models, is often raycasting, maintaining camera calculus, and a lot more.

Re: Jelly UI: Soft-body physics for native HTML form controls

#184
post #71

Earlier quoted context omitted.

> This is the kind of thing usually a human notices and says 'dont do that, that is kind of crazy'. It's not crazy. That is literally what 99.99% of video games do. They repaint everything constantly, only limited by either your vsync rate or hardware.

> Yes my car is running all night while it stands in front of my house, but it's not really a waste of resources or a nuisance because generators do the same thing.

You know nothing about software if you really think this.

He's right - the DOM also has observers.

The difference is what is rendered, not that observers are involved and the concept of looping.

Millions use React - you want to talk about performance?

Re: Jelly UI: Soft-body physics for native HTML form controls

#185
post #180

Someone clearly had a lot of fun making all of those components. Adorable and whimsy. One nitpick - when writing uppercase letters in text field they should make larger ripples than lowercase.

Another nitpick: why are only the button outlines having a jelly effect and not the texts written on them? This makes them feel physically unconnected.

Re: Jelly UI: Soft-body physics for native HTML form controls

#186
post #95
post #84

Earlier quoted context omitted.

My point was more that rendering a few widgets at 60+ FPS is nothing for anything with a GPU, and everything has a GPU these days. Anyway, something like this only needs to paint when states change or animations are running. That's an easy optimization to make here if it doesn't do it already. And games don't even bother with it, they repaint all UI even if it doesn't change.

Waste the cycles, everyone has too many cycles, is it even waste if the cycles would just go unused, GPUs are expensive, they better do their bit, who's got no GPU, go play somewhere else without your GPU, pal. It's all a game, anyway. Point being: your comment made me sad and I needed to lighten myself up a bit.

> GPUs are expensive

Do you know that regular HTML and CSS use GPU all the time?

Re: Jelly UI: Soft-body physics for native HTML form controls

#187

Earlier quoted context omitted.

The browser and OS does that as well (unless absolute zero updates and you don't even move your pointer around). But many smaht people out there don't know that.

This is just plain false. Retained UIs like the DOM and what your OS uses only ever render when something changes, so the vast majority of the time they sit idle. There's extensive effort throughout the entire stack to do as little work as possible. For instance, the mouse cursor is composited on the GPU during scanout. That means simply moving your cursor requires zero rendering. Another example: When typing only th…

That doesn't mean that the process stops, it runs indefinitely because it has to.

The DOM does this. React does this.

Did you know CSS even invokes the GPU for certain tasks?

You guys really need more experience. I can't believe how many people apparently know nothing at all about web dev and computers.

Re: Jelly UI: Soft-body physics for native HTML form controls

#188
Is it the UI per se or the site that is requiring local storage? Since the examples don't load with cookies blocked, nor do any of the links/buttons work without it.

Ordinarily I wouldn't comment on this (eg: for the plethora of React-using sites that haven't tested without it yet work fine when manually bypassed) but in this case it's intended as a drop-in UI.

Re: Jelly UI: Soft-body physics for native HTML form controls

#189
post #81
post #71

Earlier quoted context omitted.

> This is the kind of thing usually a human notices and says 'dont do that, that is kind of crazy'. It's not crazy. That is literally what 99.99% of video games do. They repaint everything constantly, only limited by either your vsync rate or hardware.

A website isn’t a videogame

Braindead take.

A videogame is expensive to render because of several MB models, constantly moving camera, and other things.

The concept of observing elements is not even new.

Re: Jelly UI: Soft-body physics for native HTML form controls

#190
post #180

Someone clearly had a lot of fun making all of those components. Adorable and whimsy. One nitpick - when writing uppercase letters in text field they should make larger ripples than lowercase.

Another nitpick: why are only the button outlines having a jelly effect and not the texts written on them? This makes them feel physically unconnected.

I had the same nit, but I imagine deforming text / inline content generally would be a much larger effort.
Post reply on HN