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

Fails on Chrome 62 #22

Closed
liabru opened this issue Jan 10, 2018 · 2 comments
Closed

Fails on Chrome 62 #22

liabru opened this issue Jan 10, 2018 · 2 comments

Comments

@liabru
Copy link

liabru commented Jan 10, 2018

I've had this polyfill working great up until the release of Chrome 62 and above where it no longer works, giving the error message:

 Uncaught TypeError: path.getPathSegAtLength is not a function
 at Object.Svg.pathToVertices (matter-dev.js:7523)
 at SVGPathElement.<anonymous> (Examples.js:14922)

Here is my page showing the error: http://brm.io/matter-js/demo/#terrain
(note that it's only the Terrain and Concave SVG Paths demos that use pathseg).

I've tested older versions of Chrome, plus the latest Firefox and Safari and they work fine.

Thank you for your work!

@progers
Copy link
Owner

progers commented Feb 10, 2018

Hi @liabru , sorry about the long delay, I've been offline caring for a newborn.

It looks like you are using an older version of pathseg.js:
http://brm.io/matter-js/demo/js/lib/pathseg.js

The latest version added support for path.getPathSegAtLength:
https://github.com/progers/pathseg/blob/master/pathseg.js#L336

You should be able to just replace your version of pathseg.js with the latest one (i.e., it should be a drop-in replacement).

I'm going to close this issue but please do comment & reopen if something doesn't work.

@progers progers closed this as completed Feb 10, 2018
@liabru
Copy link
Author

liabru commented Feb 10, 2018

No problem (and congrats!). Sorry I didn't expect that you had already patched the missing getPathSegAtLength before it got removed, so I'll try updating my version. Thanks for looking into it!

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