Skip to content

Commit 1219de7

Browse files
authored
earcut on a worker!! (#85)
* bump geoarrow js * build worker with esbuild * working earcut worker! * time earcut * wip * finish docstring * remove esbuild
1 parent 6733639 commit 1219de7

File tree

4 files changed

+735
-497
lines changed

4 files changed

+735
-497
lines changed

examples/polygon/app.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const GEOARROW_POLYGON_DATA = "http://localhost:8080/utah.feather";
1010
const INITIAL_VIEW_STATE = {
1111
latitude: 40.63403641639511,
1212
longitude: -111.91530172951025,
13-
zoom: 11,
13+
zoom: 9,
1414
bearing: 0,
1515
pitch: 0,
1616
};
@@ -53,10 +53,13 @@ function Root() {
5353
new GeoArrowSolidPolygonLayer({
5454
id: "geoarrow-polygons",
5555
data: table,
56-
getFillColor: [0, 100, 60, 160],
56+
getFillColor: [0, 100, 60, 255],
5757
pickable: true,
5858
autoHighlight: true,
59-
})
59+
earcutWorkerUrl: new URL(
60+
"https://cdn.jsdelivr.net/npm/@geoarrow/[email protected]/dist/earcut-worker.min.js",
61+
),
62+
}),
6063
);
6164

6265
return (

0 commit comments

Comments
 (0)