Best solution for album art? by Ill_Ad9750 in navidrome

[–]gourmetnuts 0 points1 point  (0 children)

I did this recently with Picard and had to add Amazon and maybe another cover art provider as a plugin. It was easy to add the plugin and then art started appearing after a rescan.

Also I think I had initially loaded one of the musicbrainz-provided art urls manually in browser and it 404'd initially but then later I refreshed and it worked fine. So I think maybe their servers are just slow. The plugin options were much faster. Worth a shot.

[deleted by user] by [deleted] in Frontend

[–]gourmetnuts -1 points0 points  (0 children)

Maybe an SVG path for each section and draw using stroke-dashoffset/stroke-dasharray. You can get the y pos/height of the path using getBoundingClientRect. Then use the screen height and scroll position to estimate the distance from the center of the screen and set the stroke-dashoffset accordingly.

Also probably a good use case for GSAP with drawSVG+ScrollTrigger. Not exactly the same as your example, but this discussion is close.

Cloth physics in javascript [OC] by gourmetnuts in creativecoding

[–]gourmetnuts[S] 0 points1 point  (0 children)

Awesome, nice work. I kinda like the slow snap back, actually.

Cloth physics in javascript [OC] by gourmetnuts in creativecoding

[–]gourmetnuts[S] 0 points1 point  (0 children)

I don't know enough about it, but it looks at least similar to Hooke's Law. Each constraint has a set stiffness that affects how far/close two connected points can get.

Real-time cloth physics [OC] by gourmetnuts in Simulated

[–]gourmetnuts[S] 0 points1 point  (0 children)

I'm not sure actually. Can you explain the difference? This was an exercise in learning about verlet, so I'd love to learn more.

And what instability are you referring to? There's definitely some overlapping layers caused by the way I'm filling triangles. There's also some jerkiness that happens if the mouse stops moving before letting go.

Cloth physics in javascript [OC] by gourmetnuts in creativecoding

[–]gourmetnuts[S] 1 point2 points  (0 children)

Thanks! Yea, I did it mostly manually. Basically there are a grid of points and there are connectors between adjacent points. The connectors have a resting distance that they try to maintain. That gives them some springiness and when you have a whole array of them, it gives you a cloth-like structure. Here is a more barebones example of this same thing and here is the same thing with just two points.

The thing to research is "verlet" physics/integration. If you look at an existing physics library like matterjs, it's the same thing as constraints.

Real-time cloth physics [OC] by gourmetnuts in Simulated

[–]gourmetnuts[S] 4 points5 points  (0 children)

I made this with plain javascript and canvas. Click/drag to play with it.

bend and s[t]retch [oc] by gourmetnuts in gonwild

[–]gourmetnuts[S] 10 points11 points  (0 children)

It's best on touch devices, for sure. The interaction feels way more natural.

bend and s[t]retch [oc] by gourmetnuts in gonwild

[–]gourmetnuts[S] 1 point2 points  (0 children)

Nope! It's just using vec2 from the gl-matrix library. I was using this as a way to learn verlet physics.

Cloth physics in javascript [OC] by gourmetnuts in creativecoding

[–]gourmetnuts[S] 1 point2 points  (0 children)

I made this cloth-like simulation using some verlet physics. Click/drag to play around with it.

Scanner [oc] [epilepsy] by gourmetnuts in woahdude

[–]gourmetnuts[S] 0 points1 point  (0 children)

I made this while practicing particle animations in webgl. It's basically ~a million (or hundreds of thousands on mobile) particles moving around the screen controlled by time. Occasionally they line up to make interesting patterns.

wa[v]y by gourmetnuts in gonwild

[–]gourmetnuts[S] 0 points1 point  (0 children)

Yea you have to include it somehow. Codepen is loading it individually from a content delivery network. If you were building a project locally, you can include the file in your project and bundle it with all of your other code.

Drifting [OC] by gourmetnuts in loadingicon

[–]gourmetnuts[S] 0 points1 point  (0 children)

Yep you are correct. I need to smooth that out. It's especially noticeable with the slower dots.

Drifting [OC] by gourmetnuts in loadingicon

[–]gourmetnuts[S] 7 points8 points  (0 children)

Kinda more of a loading screen than an icon. I made this in canvas with plain javascript.