-
Notifications
You must be signed in to change notification settings - Fork 2k
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
terrain example not working #548
Comments
Did you try using the pathseg polyfill? Also see #196. |
Oh looks like the pathseg polyfill is broken on Chrome 62 and above. I've left an issue on the author's repo here progers/pathseg#22. Hopefully he can fix. Thanks for reporting this! |
+1 |
+1 |
The solution is to use the latest version of pathseg rather than the one used in the examples. I'll get it updated in the examples soon. |
So do SVGs work with matter.js? |
Check out the SVG example, though support is basic and more a proof of concept than anything. If you need something more, the general idea is to cut the shape into convex parts to form a compound body. |
The terrain example is not working (perhaps due to outdated API call?):
matter.js:7486 Uncaught TypeError: path.getPathSegAtLength is not a function
at Object.Svg.pathToVertices (matter.js:7486)
at SVGPathElement. (terrain.js:43)
at Function.each (jquery-3.1.1.js:368)
at jQuery.fn.init.each (jquery-3.1.1.js:157)
at Object. (terrain.js:42)
at fire (jquery-3.1.1.js:3305)
at Object.fireWith [as resolveWith] (jquery-3.1.1.js:3435)
at done (jquery-3.1.1.js:9242)
at XMLHttpRequest. (jquery-3.1.1.js:9484)
The text was updated successfully, but these errors were encountered: