Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to p5js ? #8

Open
b2renger opened this issue Aug 21, 2020 · 3 comments
Open

Port to p5js ? #8

b2renger opened this issue Aug 21, 2020 · 3 comments

Comments

@b2renger
Copy link

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 ?

@anuraghazra
Copy link
Owner

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.

@b2renger
Copy link
Author

b2renger commented Sep 6, 2020

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.

@anuraghazra
Copy link
Owner

anuraghazra commented Sep 10, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants