Hacker News new | past | comments | ask | show | jobs | submit login

Yes, it has full interactivity support: https://p5js.org/learn/interactivity.html

P5 has an imperative/immediate mode style of graphics API so you have to code the result of your interactivity (moving a point, etc.) yourself. Something like three.js, which has a full scene graph for rendering and interactivity, might be a better choice if you want a lot of interactivity out of the box.

I'm kinda scratching my head at g9 as it seems to be a mish mash of scene graph that's implicitly generated and imperative rendering APIs. It's not exactly clear to me why you'd want this mix except for very specific scenarios the author created support for with their implicit scene graph generation for interactivity.

In my mind you either want something that's like three.js with a full scene graph style of rendering and interactivity, or a p5 style imperative API for both. This seems to be some in-between thing to scratch some itches.




Have you tried dragging one of points?


Yes, I understand what is happening here with interactivity. Like I said I don't follow why I want some implicit generation of an interactivity scene graph (i.e. what points are connected or move relative to other points) when I can just be explicit about the scene graph interactivity with other similar libraries.


Because it's a fast way to get that interactivity, rather than having to explicitly code it yourself.

A good example are modern math videos on youtube, like this one (not saying that they're using G9.js in particular): https://www.youtube.com/watch?v=spUNpyF58BY

It's 20 minutes of changing graphics. You could code all of that with P5, and it would be an excruciatingly long process. G9.js would get you there in a fraction of the time.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: