how does your effort differ from this example ?
I think you need to have the canvas component be long-lived more-or-less, and all of your live coding pieces are happening in functions that the canvas is using for draw/update state etc.
As an aside, you can use regular SVG from react and animate their properties with ratoms. You can also probably accomplish a lot with CSS animations (yet another web tech to learn , but it can be worthwhile). SVG Sample is an example.
The quil documentation advises the use of the q/defsketch macro instead of q/sketch, but it also doesn’t include Reagent so perhaps I shouldn’t have dismissed q/sketch so readily. Looking at this, it makes sense that the canvas should be controlled within a component instead of floating alongside it. Thank you, I will give something like this a try (and maybe update the documentation while I’m at it). This approach would also help me to better understand Reagent, I think.
Thanks also for the SVG suggestion, I have looked at it a little but not very seriously. Something relatively lightweight that doesn’t require too much stuff to interact with other stuff is always appealing.
I have also been using threeagent recently; although that’s perhaps a much taller order
I mean…I don’t really know much of anything, might as well learn this? Looks a little bit like animation in Racket, could make sense. Thanks
After making games for 2 years I found graphical live coding painful in Clojure/Script, so I ended up making Freja - an editor specifically designed for playing around with graphics. Write some
rl-scalef calls, hit Ctrl+L and see it fly.
Check it out: Making breakout in 1 hour! - YouTube
Wow, this is very cool! I hadn’t heard of Janet either, thanks for the reference
It’s a new language but been using it for a year and it generally works well. Currently employed 50% making games in Freja.
I wouldn’t recommend Janet for corporate stuff, since Clojure has a lot going for it in that space. But if you want to live code graphics I’ve found Janet to be great!
Feel free to PM me if you have any questions.