3 ms·
Ask HN: Is there a declarative animation language?
I'm looking for a programming language for graphics. Something like processing.org but more declarative.
for example if I had a circle with center in 0,0 and then I exited to have center in 100,100 then the animation to transform from one to the other should happen automatically.
something that looks like:
(circle 0,0) `animate` (circle 100,100).
or even better animate automatically between scenes, where a scene is a set of other drawings.
so animate from scene to the next would be like:
scene1 `animate` scene2
does something like that exist?
- byoung2 6y agohttp://paperjs.org/about/ http://paperjs.org/about/ might be a good starting point
- hotdox 6y agohttps://github.com/3b1b/manim https://github.com/3b1b/manim
- brudgers 6y agoRacket has universe, https://docs.racket-lang.org/teachpack/2htdpuniverse.html https://docs.racket-lang.org/teachpack/2htdpuniverse.html also "how to design worlds" https://world.cs.brown.edu/ https://world.cs.brown.edu/ sample of HTDW, https://world.cs.brown.edu/1/projects/chicken/v1.gif https://world.cs.brown.edu/1/projects/chicken/v1.gif
- shirogane86x 6y agoHaskell has reanimate (https://reanimate.github.io/ https://reanimate.github.io/), although I don't personally have much experience with it. But it does have an online playground to try out stuff in the browser
- bartvk 6y agoSwiftUI has features like that struct AnimatedCircle: View { @State private var radius: CGFloat = 0 var body: some View { Circle() .frame(width: radius, height: radius) .onAppear { withAnimation { self.radius = 100 } } } }
- Someone 6y agoXML-based, so a bit wordy, but css animations are declarative and can be combined with svg. See for example https://css-tricks.com/guide-svg-animations-smil https://css-tricks.com/guide-svg-animations-smil. https://en.wikipedia.org/wiki/Synchronized_Multimedia_Integration_Language https://en.wikipedia.org/wiki/Synchronized_Multimedia_Integr... takes that a bit further by allowing animation of other things than attributes.