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

SVG rendering? #1

Closed
nhoizey opened this issue Feb 26, 2014 · 5 comments
Closed

SVG rendering? #1

nhoizey opened this issue Feb 26, 2014 · 5 comments

Comments

@nhoizey
Copy link

nhoizey commented Feb 26, 2014

I'm developing a game using SVG ( http://play.esviji.com/ ) and I feel a physics engine could help me on some topics.

All physics engines I've seen use only Canvas rendering, none of them uses SVG.

Is there a way Matter could provide both?

@liabru
Copy link
Owner

liabru commented Feb 26, 2014

From what I've seen, SVG doesn't tend to work well for fast moving scenes (because it is retained mode), it's probably why you don't see it used for physics. It's better for more static or predictable animations. I actually started writing a renderer based on SVG, but soon hit these limitations and had to switch to canvas.

It should be possible though for someone to create a custom renderer based on Render.js using a lib like two.js (that can render to SVG, canvas or webgl using the same API). It's currently possible to pass a custom renderer into Engine.create via the options argument.

@liabru
Copy link
Owner

liabru commented Mar 13, 2014

Closing this for now.

I currently don't intend to implement an SVG renderer, unless I end up using a graphics library that already supports it.

I've just implemented sprite rendering if that's any use:
#7 (comment)

@liabru liabru closed this as completed Mar 13, 2014
@nhoizey
Copy link
Author

nhoizey commented Mar 14, 2014

OK

@DavidSouther
Copy link

d3 seems to perform well with relatively dynamic animations, though on second thought I can't remember seeing any specific box-physics examples.

liabru pushed a commit that referenced this issue Jun 25, 2016
RenderPixi.js - added missing dependencies
@FabricioLayedra
Copy link

Definitely, d3 is not the option if you want interactive physics in your app. DON'T USE FOR IT. It's a wonderful library but not for that.

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

4 participants