{"repo":"charmbracelet/harmonica","free":true,"listed":false,"github":"https://github.com/charmbracelet/harmonica","clone":"git clone https://github.com/charmbracelet/harmonica.git","description":"A simple, physics-based animation library 🎼","language":"Go","stars":1595,"topics":["go","animation","physics","golang","game-development","hacktoberfest"],"license":"MIT","category":"game-templates","readme_excerpt":"Harmonica ========= A simple, efficient spring animation library for smooth, natural motion. It even works well on the command line. [examples]: https://github.com/charmbracelet/harmonica/tree/master/examples [docs]: https://pkg.go.dev/github.com/charmbracelet/harmonica?tab=doc Usage Harmonica is framework-agnostic and works well in 2D and 3D contexts. Simply call [ NewSpring ][newspring] with your settings to initialize and [ Update ][update] on each frame to animate. For details, see the [examples][examples] and the [docs][docs]. [newspring]: https://pkg.go.dev/github.com/charmbracelet/harmonica#NewSpring [update]: https://pkg.go.dev/github.com/charmbracelet/harmonica#Update Settings [ NewSpring ][newspring] takes three values: Time Delta: the time step to operate on. Game engines typically provide a way to determine the time delta, however if that's not available you can simply set the framerate with the included FPS(int) utility function. Make sure the framerate you set here matches your actual framerate. Angular Velocity: this translates roughly to the speed. Higher values are faster. Damping Ratio: the springiness of the animation, generally between 0 and 1 , though it can go higher. Lower values are springier. For details, see below. Damping Ratios The damping ratio affects the motion in one of three different ways depending on how it's set. Under-Damping A spring is under-damped when its damping ratio is less than 1 . An under-damped spring reaches equilibrium the fas","default_branch":null,"files":null,"tree":[],"storefront":"/r/charmbracelet","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/charmbracelet/harmonica/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}