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

images in experimental-webgl #3

Open
martennilsson opened this issue Apr 25, 2012 · 1 comment
Open

images in experimental-webgl #3

martennilsson opened this issue Apr 25, 2012 · 1 comment

Comments

@martennilsson
Copy link

Hi, this project looks really interesting. I'm trying to use this in a visualisation. I've managed to set up a working physics world, and now I want render images on the location of certain particles. Have you any idea of how to do this? I've tried drawing with a different context that supports drawImag, but it seems its not possible drawing with two different contexts to the same canvas. Anyone done this?

@soulwire
Copy link
Owner

Did you find a solution? You can always access position with particle.pos.x/y and drawImage should work - something like ctx.drawImage(img,p.pos.x,p.pos.y);

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