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.pathToVertices breaking in chrome #262

Closed
nclevine opened this issue Jun 15, 2016 · 6 comments
Closed

Svg.pathToVertices breaking in chrome #262

nclevine opened this issue Jun 15, 2016 · 6 comments

Comments

@nclevine
Copy link

calling Matter.Svg.pathToVertices works fine in mobile safari, but in desktop Chrome it returns the error Uncaught TypeError: Cannot read property 'numberOfItems' of undefined

I haven't tested in all browsers. I'm calling the function using an svg path element and an integer for sampleLength as per the docs

@liabru
Copy link
Owner

liabru commented Jun 15, 2016

You need this polyfill because the browser API Matter.Svg uses has been removed.

@liabru liabru closed this as completed Jun 20, 2016
@janverhulst
Copy link

Hi @liabru Awesome work on the library.
I'm having the exact same problem as described above, using the polyfill. Both in safari and chrome, latest. Is this still supposed to be working?

@marffinn
Copy link

marffinn commented Apr 30, 2017

So I want my SVG to load into scene.
Google Chrome
What do I do ?

@Roar1827
Copy link

Roar1827 commented Oct 3, 2017

@janverhulst @marffinn - did you end up getting this to work?

@johnjoeparrot
Copy link

Looked at the svg example below in chrome and there are no svg's loading.
http://brm.io/matter-js/demo/#svg

Working on a project now using svg's and it loads fine in both Firefox and Safari when using localhost but in Chrome "Cannot read property 'numberOfItems' of undefined".

@liabru
Copy link
Owner

liabru commented Feb 5, 2018

Seems that the polyfill is currently broken in recent versions of Chrome, see my comment in this thread.

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

6 participants