Live data from Hacker News

Anime.js – A lightweight JavaScript animation library

animejs.com

61–70 of 133 posts

Re: Anime.js – A lightweight JavaScript animation library

#61
post #49

Earlier quoted context omitted.

Does one of these tools support an animation timeline with arbitrary seeking? Essentially I want to be able to have a progress slider representing the current time, and if the user clicks on any time on the slider, all animations should spring to that state, like a YouTube video. I played around with GSAP, anime and some others, but none properly supported playing the animations "backwards" (while jumping back). I wr…

I'd think GSAP timeline is exactly made for that, but you say you've already tried that? https://greensock.com/docs/v3/GSAP/Timeline https://greensock.com/docs/v3/GSAP/Timeline/seek () https://greensock.com/docs/v3/GSAP/Timeline/reverse ()

I thought I did. Maybe I need to have another look, because the examples do seem to be exactly what I wanted. Thank you for the suggestion!

Re: Anime.js – A lightweight JavaScript animation library

#63
post #58
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…

The example is next to useless since it's so primitive. Anything more complex, and you end up developing your own library. Which you did, and linked. So how is anime.js obsolete?

The fundamental building block of the vanilla js snippet and anime.js is the ability to create non-blocking timelines + tweens- which we get for free now.

the optional "lib" is just aliases to make vanilla js less verbose.

Re: Anime.js – A lightweight JavaScript animation library

#64
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…

> Mostly obsolete

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

Re: Anime.js – A lightweight JavaScript animation library

#65
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…

> 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

Re: Anime.js – A lightweight JavaScript animation library

#66

Anyone recommend a good animation library to create 3D builds for watches as an example as I need it to be very detailed? I am about to start investigating and this is looking really interesting for the purpose.

babylonjs - https://www.babylonjs.com/

Re: Anime.js – A lightweight JavaScript animation library

#67
post #27
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…

Wanted to note, htmx's companion project at https://hyperscript.org/ does this naturally out of the box as well due to its async transparency.

This looks interesting, and I _love_ how it takes influence from Hypercard. Even though I'm slightly too young to have really used that system.

Re: Anime.js – A lightweight JavaScript animation library

#68
post #25
post #22

Earlier quoted context omitted.

Isn't the WebAnimations API available in modern browsers?

Sure but in many situations a vanilla async function gives you the same result without the extra layer.

The animation API is likely more efficient/smoother if it lets the browser offload the animation to separate threads without blocking the event loop or having to rerun layout. Any script-triggered CSS change is "unexpected" from a layout engine perspective. Registering your animation in advance makes it an expected change.

Re: Anime.js – A lightweight JavaScript animation library

#69
post #12

Earlier quoted context omitted.

Anime (アニメ) is literally short for animation (アニメーション, animeishon).

literal meaning and widely accepted use meaning do not always align. if I said Anime, would you think Tiny Toons, Family Guy, Toy Story, or Lion King? Or would you think DBZ, Akira, One Piece, etc?

I believe 'literal meaning' and 'widely accepted use meaning' do always align, by definition of 'meaning'.

'Anime' in English means cartoon that is at least partially originates from Japan. Or, a less common usage is cartoon that has the style of the former cartoons (e.g. Avatar). 'Anime' in Japanese or in French can mean different things.

Re: Anime.js – A lightweight JavaScript animation library

#70
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

No, no the browsers deprecated it yesterday.. You are supposed to add a webasm shard, containing the operation system for the animations.
Post reply on HN