Live data from Hacker News

Anime.js – A lightweight JavaScript animation library

animejs.com

121–130 of 133 posts

Re: Anime.js – A lightweight JavaScript animation library

#121
post #118

Earlier quoted context omitted.

I'm not entirely sure whether you're joking

He is joking because webassembly had been deprecated today in favor of Punch cards

Sorry, but browsers (and thus webassembly) have been deprecated in favor of Bing Chat. There's a W3C draft standard being written up by Sam Altman.

Re: Anime.js – A lightweight JavaScript animation library

#122
post #77

One less known use case for this is creating animated UI demos, which as a dev I find harder to do using video editing software. I used it to create the simple demo on the rcmd frontpage: https://lowtechguys.com/rcmd This is the code, where I'm just animating elements of an SVG I previously created with Sketch: https://github.com/FuzzyIdeas/lowtechguys/blob/main/src/rcmd... I'm also doing the same thing for the Lunar…

After a bit of reluctance to give up my right CMD-key, I decided to try rcmd and it has since disappeared into my workflow like no other app since window snapping.

Unlike similar solutions, unused keys are assigned dynamically based on the first letter of the app. So I can have my main apps on 1,2,3... and the rest will change based on which apps are open.

Re: Anime.js – A lightweight JavaScript animation library

#123

Hi, I'm the creator of Anime.js. Firstly, thank you for the submission. I honestly didn't anticipate being featured on the homepage of HN without any major update to the library! To those wondering why the project hasn't been updated recently, it's simply because I've been working on a new version (V4) for the last two years. The core library has been completely rewritten, I'm currently in the testing and documentati…

Why do your docs use `var` for variable declarations?

Because the docs have been written 4 years ago, and back then const and let weren’t widely used.

The upcoming documentation for V4 has been completely rewritten with up to date JavaScript.

Re: Anime.js – A lightweight JavaScript animation library

#124
post #65

Earlier quoted context omitted.

> Mostly obsolete i'm so f#####g done with web dev.

haha I mean, it's just built into browsers now. Nothing stopping someone from still using anime.js

Browsers are missing a long list of features available in modern JS animation libraries like Anime.js and especially GreenSock. For simple and short transitions/animations CSS will take you a long way though.

Re: Anime.js – A lightweight JavaScript animation library

#125
post #21

Mostly obsolete with CSS tweening. You can do non-blocking animation timelines without any library if you use async javascript. Click me to change color every second, then remove. // Locality of Behavior me = document.currentScript.parentElement; me.addEventListener("click", async event => { me = event.target me.style.transition = "background 1s" await sleep(1000) me.style.background = "red" await sleep(1000) me.styl…

Are you really comparing this to Anime.js? I don't know if it's satire.

Re: Anime.js – A lightweight JavaScript animation library

#126

Anime is nice, however you should likely use Framer Motion these days if using React or Motion One if not (both are by the same creator but for different use cases).

> you should likely use Framer Motion these days if using React or Motion One if not

why are they better choices?

Re: Anime.js – A lightweight JavaScript animation library

#129
My concern is that the CPU usage is very high when you are not actively interacting with the site. So if you leave the tab open, then go do something else, you will be wasting a lot of CPU resources.

The only real way around that would be to put in a 5FPS cap after a minute of idle time (no mouse movements or scrolling), and additional culling for things that have scrolled out of view.

Re: Anime.js – A lightweight JavaScript animation library

#130
post #129

My concern is that the CPU usage is very high when you are not actively interacting with the site. So if you leave the tab open, then go do something else, you will be wasting a lot of CPU resources. The only real way around that would be to put in a 5FPS cap after a minute of idle time (no mouse movements or scrolling), and additional culling for things that have scrolled out of view.

Every browser I've come across suspends `requestAnimationFrame` callbacks when the page is not the focused tab. You won't be wasting resources, the animations will all suspend when you're not looking at them.
Post reply on HN