Skip to content

Canvas animations/transitions, how to do it? #198

Answered by GitNoise
GitNoise asked this question in Q&A
Discussion options

You must be logged in to vote

@seblammers
Thanks! I've seen it and his code for a more complex solution: https://github.com/spiegelgraphics/nobel-laureates/tree/main
I was hoping to skip the registering/deregister/invalidate pattern.

@mhkeller
I tried your solution and it looks exactly like what I was hoping to achieve. Unfortunately it doesn't work if you have multiple components that update the context since this triggers some kind of reactivity loop in the functions that are dependent on the canvas context (the browser tab becomes totally unresponsive). Or maybe I did something wrong 😕 .

In the end I used a modified version of Matthias code.
Have a look in my REPL again (I forgot to fork before modifying 😢):
https:…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@seblammers
Comment options

Comment options

You must be logged in to vote
1 reply
@mhkeller
Comment options

Answer selected by mhkeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants