anuraghazra/Verly.js

Port to p5js ?

b2renger opened this issue · 3 comments

Hello,

First congrats because this is a very nice library and really easy to use.

I was wondering if it would be interesting to workout a fork to be used with p5js : https://p5js.org/
(I coul help to do this by the way).

The main thing that I see would be to rewrite the render functions with p5 primitives, or maybe to enable people to get a list of points per objects to let them redraw.

This second option might help us to keep everything in this repo, and just write of few examples for p5js on how to get an customize the drawing.

What do you think ?

Hi @b2renger thanks for your question and sorry for the late response.

Yeah good idea, we can have different renderers too, currently all the render logic & behaviour logic is handled by their own respective classes for example Point class handles the render() and the update() both i think we can decouple this to work with p5js.

Great !

So just to be sure : you are suggesting to overload the render function to use p5js primitives in each class ?
If we do this that maybe it would be better to fork ? you probably don't want to have dependencies to p5js in this lib.

Great !

So just to be sure : you are suggesting to overload the render function to use p5js primitives in each class ?
If we do this that maybe it would be better to fork ? you probably don't want to have dependencies to p5js in this lib.

No i'm not suggesting to overload the render function, i was saying that we should extract the rendering logic to a Renderer class which would separate the rendering logic from physics logic, this way users can use any renderer they want.