-
Notifications
You must be signed in to change notification settings - Fork 9
earcut on a worker!! #85
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
Conversation
examples/polygon/app.tsx
Outdated
pickable: true, | ||
autoHighlight: true, | ||
}) | ||
workerUrl: new URL( | ||
"https://gist.githubusercontent.com/kylebarron/0553b763d118bed6bad48407e9729376/raw/698855d8b237b26af65e2199a4f7914af8e203cf/earcut-worker.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting issues around "failed to construct worker, script cannot be accessed from origin", and wasn't sure if I was doing something wrong on localhost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref https://stackoverflow.com/questions/21913673/execute-web-worker-from-different-origin, https://stackoverflow.com/questions/67326425/construct-worker-from-script-loaded-from-different-origin
Apparently you just can't instantiate a worker cross origin...? That's annoying, but we fetch the worker directly now.
Uses geoarrow/geoarrow-js#20; uses a threadpool for earcut by default!