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

Add image to p2.js #338

Open
ghost opened this issue Nov 14, 2018 · 1 comment
Open

Add image to p2.js #338

ghost opened this issue Nov 14, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 14, 2018

Hello,
How can we add image into p2.js and do physics stuff (you know, drag an image, drop there, etc).
There is option to use p2 with phaser but my client want smallest size of project.
Any recommendation or pointers..
Cheers.

@schteppe
Copy link
Owner

Hi,
p2.js is only a physics library. You can use its output to render in whatever way you want.
HTML5 canvas can be used if you want to render an image at a position in a canvas element, and it doesn’t require any library for rendering. See the examples list here: https://github.com/schteppe/p2.js/blob/master/README.md#examples

What kind of drag and drop effect do you have in mind?

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

1 participant