From e09670282547cba822b200213aab919ae0cbccf6 Mon Sep 17 00:00:00 2001 From: Ib Green Date: Fri, 13 Oct 2023 15:37:05 -0400 Subject: [PATCH] chore: Upgrade to math.gl@4.0.0-beta.1. Remove gl-matrix --- .../3d-tiles-with-cesium/package.json | 4 +- .../3d-tiles-with-three.js/package.json | 2 +- examples/website/3d-tiles/package.json | 4 +- examples/website/gltf/package.json | 2 +- examples/website/i3s/package.json | 7 +- .../website/i3s/src/utils/frustum-utils.js | 3 +- modules/3d-tiles/package.json | 4 +- modules/flatgeobuf/package.json | 2 +- modules/geopackage/package.json | 2 +- modules/gis/package.json | 4 +- modules/gis/src/lib/flat-geojson-to-binary.ts | 1 - modules/gltf/package.json | 2 +- modules/i3s/package.json | 6 +- modules/math/package.json | 2 +- modules/mvt/package.json | 2 +- modules/potree/package.json | 2 +- modules/shapefile/package.json | 2 +- modules/tile-converter/package.json | 8 +- modules/tiles/package.json | 8 +- test/render/test-utils/get-model.js | 3 +- yarn.lock | 78 ++++++++++++------- 21 files changed, 81 insertions(+), 67 deletions(-) diff --git a/examples/experimental/3d-tiles-with-cesium/package.json b/examples/experimental/3d-tiles-with-cesium/package.json index 54fb25c963..1870b4e7c8 100644 --- a/examples/experimental/3d-tiles-with-cesium/package.json +++ b/examples/experimental/3d-tiles-with-cesium/package.json @@ -11,8 +11,8 @@ "dependencies": { "@loaders.gl/3d-tiles": "4.0.0-alpha.23", "@loaders.gl/core": "4.0.0-alpha.23", - "@math.gl/culling": "^3.5.1", - "@math.gl/core": "^3.5.1" + "@math.gl/culling": "4.0.0-beta.1", + "@math.gl/core": "4.0.0-beta.1" }, "devDependencies": { "babel-plugin-inline-import": "^3.0.0", diff --git a/examples/experimental/3d-tiles-with-three.js/package.json b/examples/experimental/3d-tiles-with-three.js/package.json index 38645ee3f8..0a2ed2c3ba 100644 --- a/examples/experimental/3d-tiles-with-three.js/package.json +++ b/examples/experimental/3d-tiles-with-three.js/package.json @@ -13,7 +13,7 @@ "dependencies": { "@loaders.gl/core": "4.0.0-alpha.23", "@loaders.gl/3d-tiles": "4.0.0-alpha.23", - "@math.gl/culling": "^3.5.1", + "@math.gl/culling": "4.0.0-beta.1", "mapbox-gl": "^1.1.1", "three": "^0.106.2" }, diff --git a/examples/website/3d-tiles/package.json b/examples/website/3d-tiles/package.json index 61adeba199..a07382c1bb 100644 --- a/examples/website/3d-tiles/package.json +++ b/examples/website/3d-tiles/package.json @@ -19,8 +19,8 @@ "@loaders.gl/3d-tiles": "4.0.0-alpha.23", "@loaders.gl/core": "4.0.0-alpha.23", "@loaders.gl/gltf": "4.0.0-alpha.23", - "@math.gl/core": "^3.5.1", - "@math.gl/geospatial": "^3.5.1", + "@math.gl/core": "4.0.0-beta.1", + "@math.gl/geospatial": "4.0.0-beta.1", "@probe.gl/stats-widget": "^4.0.2", "maplibre-gl": "^2.4.0", "marked": "^0.7.0", diff --git a/examples/website/gltf/package.json b/examples/website/gltf/package.json index cf2d87cb66..827c398afb 100644 --- a/examples/website/gltf/package.json +++ b/examples/website/gltf/package.json @@ -18,7 +18,7 @@ "@luma.gl/constants": "^8.5.21", "@luma.gl/core": "^8.5.21", "@luma.gl/experimental": "^8.5.21", - "@math.gl/core": "^3.5.1" + "@math.gl/core": "4.0.0-beta.1" }, "devDependencies": { "typescript": "^5.0.4", diff --git a/examples/website/i3s/package.json b/examples/website/i3s/package.json index b78d18085a..73ac138c2b 100644 --- a/examples/website/i3s/package.json +++ b/examples/website/i3s/package.json @@ -29,11 +29,10 @@ "@luma.gl/engine": "^8.5.21", "@luma.gl/shadertools": "^8.5.21", "@luma.gl/webgl": "^8.5.21", - "@math.gl/core": "^3.5.1", - "@math.gl/culling": "^3.5.1", - "@math.gl/geospatial": "^3.5.1", + "@math.gl/core": "4.0.0-beta.1", + "@math.gl/culling": "4.0.0-beta.1", + "@math.gl/geospatial": "4.0.0-beta.1", "@probe.gl/stats-widget": "^4.0.2", - "gl-matrix": "^3.3.0", "mapbox-gl": "npm:empty-npm-package@^1.0.0", "maplibre-gl": "^2.4.0", "prop-types": "^15.7.2", diff --git a/examples/website/i3s/src/utils/frustum-utils.js b/examples/website/i3s/src/utils/frustum-utils.js index 9c1f3e9cc6..2a9a0a1da6 100644 --- a/examples/website/i3s/src/utils/frustum-utils.js +++ b/examples/website/i3s/src/utils/frustum-utils.js @@ -1,5 +1,4 @@ -import {Vector3} from '@math.gl/core'; -import * as mat3 from 'gl-matrix/mat3'; +import {Vector3, mat3} from '@math.gl/core'; const NEAR = [255, 0, 128]; const FAR = [128, 0, 255]; diff --git a/modules/3d-tiles/package.json b/modules/3d-tiles/package.json index d026611adb..08df3a30b7 100644 --- a/modules/3d-tiles/package.json +++ b/modules/3d-tiles/package.json @@ -48,8 +48,8 @@ "@loaders.gl/math": "4.0.0-beta.2", "@loaders.gl/tiles": "4.0.0-beta.2", "@loaders.gl/zip": "4.0.0-beta.2", - "@math.gl/core": "^3.5.1", - "@math.gl/geospatial": "^3.5.1", + "@math.gl/core": "4.0.0-beta.1", + "@math.gl/geospatial": "4.0.0-beta.1", "@probe.gl/log": "^4.0.4", "long": "^5.2.1" }, diff --git a/modules/flatgeobuf/package.json b/modules/flatgeobuf/package.json index 3020dc4fb9..98c8b0aa5c 100644 --- a/modules/flatgeobuf/package.json +++ b/modules/flatgeobuf/package.json @@ -42,7 +42,7 @@ "dependencies": { "@loaders.gl/gis": "4.0.0-beta.2", "@loaders.gl/loader-utils": "4.0.0-beta.2", - "@math.gl/proj4": "^3.3.1", + "@math.gl/proj4": "4.0.0-beta.1", "flatgeobuf": "3.6.5" }, "gitHead": "c95a4ff72512668a93d9041ce8636bac09333fd5" diff --git a/modules/geopackage/package.json b/modules/geopackage/package.json index 91bee77830..52e5956c48 100644 --- a/modules/geopackage/package.json +++ b/modules/geopackage/package.json @@ -36,7 +36,7 @@ "@loaders.gl/gis": "4.0.0-beta.2", "@loaders.gl/schema": "4.0.0-beta.2", "@loaders.gl/wkt": "4.0.0-beta.2", - "@math.gl/proj4": "^3.5.1", + "@math.gl/proj4": "4.0.0-beta.1", "@types/sql.js": "^1.4.2", "sql.js": "1.5.0" }, diff --git a/modules/gis/package.json b/modules/gis/package.json index faad402834..28d357fa42 100644 --- a/modules/gis/package.json +++ b/modules/gis/package.json @@ -35,11 +35,11 @@ "@loaders.gl/loader-utils": "4.0.0-beta.2", "@loaders.gl/schema": "4.0.0-beta.2", "@mapbox/vector-tile": "^1.3.1", - "@math.gl/polygon": "^3.5.1", + "@math.gl/polygon": "4.0.0-beta.1", "pbf": "^3.2.1" }, "devDependencies": { - "@math.gl/proj4": "^3.5.1" + "@math.gl/proj4": "4.0.0-beta.1" }, "gitHead": "c95a4ff72512668a93d9041ce8636bac09333fd5" } diff --git a/modules/gis/src/lib/flat-geojson-to-binary.ts b/modules/gis/src/lib/flat-geojson-to-binary.ts index ed4fa9b133..f897127f10 100644 --- a/modules/gis/src/lib/flat-geojson-to-binary.ts +++ b/modules/gis/src/lib/flat-geojson-to-binary.ts @@ -444,7 +444,6 @@ function triangulatePolygon( const holes = indices.slice(1).map((n: number) => (n - offset) / coordLength); // Compute triangulation - // @ts-expect-error TODO can earcut handle binary arrays? Add tests? const triangles = earcut(polygonPositions, holes, coordLength, areas); // Indices returned by triangulation are relative to start diff --git a/modules/gltf/package.json b/modules/gltf/package.json index ca6a2d52e9..4fc4689594 100644 --- a/modules/gltf/package.json +++ b/modules/gltf/package.json @@ -46,7 +46,7 @@ "@loaders.gl/images": "4.0.0-beta.2", "@loaders.gl/loader-utils": "4.0.0-beta.2", "@loaders.gl/textures": "4.0.0-beta.2", - "@math.gl/core": "^3.5.1" + "@math.gl/core": "4.0.0-beta.1" }, "gitHead": "c95a4ff72512668a93d9041ce8636bac09333fd5" } diff --git a/modules/i3s/package.json b/modules/i3s/package.json index fc4af542f1..6caa55a2a3 100644 --- a/modules/i3s/package.json +++ b/modules/i3s/package.json @@ -50,9 +50,9 @@ "@loaders.gl/textures": "4.0.0-beta.2", "@loaders.gl/tiles": "4.0.0-beta.2", "@luma.gl/constants": "^8.5.4", - "@math.gl/core": "^3.5.1", - "@math.gl/culling": "^3.5.1", - "@math.gl/geospatial": "^3.5.1" + "@math.gl/core": "4.0.0-beta.1", + "@math.gl/culling": "4.0.0-beta.1", + "@math.gl/geospatial": "4.0.0-beta.1" }, "peerDependencies": { "@loaders.gl/core": "^4.0.0-alpha.8" diff --git a/modules/math/package.json b/modules/math/package.json index 87e12f7dbb..e805cb7b2c 100644 --- a/modules/math/package.json +++ b/modules/math/package.json @@ -41,7 +41,7 @@ "dependencies": { "@loaders.gl/images": "4.0.0-beta.2", "@loaders.gl/loader-utils": "4.0.0-beta.2", - "@math.gl/core": "^3.5.1" + "@math.gl/core": "4.0.0-beta.1" }, "gitHead": "c95a4ff72512668a93d9041ce8636bac09333fd5" } diff --git a/modules/mvt/package.json b/modules/mvt/package.json index 72c63c5810..4f25b937b2 100644 --- a/modules/mvt/package.json +++ b/modules/mvt/package.json @@ -44,7 +44,7 @@ "@loaders.gl/images": "4.0.0-beta.2", "@loaders.gl/loader-utils": "4.0.0-beta.2", "@loaders.gl/schema": "4.0.0-beta.2", - "@math.gl/polygon": "^3.5.1", + "@math.gl/polygon": "4.0.0-beta.1", "pbf": "^3.2.1" }, "devDependencies": { diff --git a/modules/potree/package.json b/modules/potree/package.json index b6264536b0..e6cdbde232 100644 --- a/modules/potree/package.json +++ b/modules/potree/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "@loaders.gl/math": "4.0.0-beta.2", - "@math.gl/core": "^3.5.1" + "@math.gl/core": "4.0.0-beta.1" }, "gitHead": "c95a4ff72512668a93d9041ce8636bac09333fd5" } diff --git a/modules/shapefile/package.json b/modules/shapefile/package.json index 1d779c5e14..4c528faa47 100644 --- a/modules/shapefile/package.json +++ b/modules/shapefile/package.json @@ -47,7 +47,7 @@ "@loaders.gl/gis": "4.0.0-beta.2", "@loaders.gl/loader-utils": "4.0.0-beta.2", "@loaders.gl/schema": "4.0.0-beta.2", - "@math.gl/proj4": "^3.5.1" + "@math.gl/proj4": "4.0.0-beta.1" }, "gitHead": "c95a4ff72512668a93d9041ce8636bac09333fd5" } diff --git a/modules/tile-converter/package.json b/modules/tile-converter/package.json index 5ab27ba80b..7c9a3ae071 100644 --- a/modules/tile-converter/package.json +++ b/modules/tile-converter/package.json @@ -64,10 +64,10 @@ "@loaders.gl/tiles": "4.0.0-beta.2", "@loaders.gl/worker-utils": "4.0.0-beta.2", "@loaders.gl/zip": "4.0.0-beta.2", - "@math.gl/core": "^3.5.1", - "@math.gl/culling": "^3.5.1", - "@math.gl/geoid": "^3.5.1", - "@math.gl/geospatial": "^3.5.1", + "@math.gl/core": "4.0.0-beta.1", + "@math.gl/culling": "4.0.0-beta.1", + "@math.gl/geoid": "4.0.0-beta.1", + "@math.gl/geospatial": "4.0.0-beta.1", "archiver": "^5.0.0", "cors": "^2.8.5", "crypt": "^0.0.2", diff --git a/modules/tiles/package.json b/modules/tiles/package.json index c7d6c36da8..505e9ed5af 100644 --- a/modules/tiles/package.json +++ b/modules/tiles/package.json @@ -43,10 +43,10 @@ "dependencies": { "@loaders.gl/loader-utils": "4.0.0-beta.2", "@loaders.gl/math": "4.0.0-beta.2", - "@math.gl/core": "^3.5.1", - "@math.gl/culling": "^3.5.1", - "@math.gl/geospatial": "^3.5.1", - "@math.gl/web-mercator": "^3.5.1", + "@math.gl/core": "4.0.0-beta.1", + "@math.gl/culling": "4.0.0-beta.1", + "@math.gl/geospatial": "4.0.0-beta.1", + "@math.gl/web-mercator": "4.0.0-beta.1", "@probe.gl/stats": "^4.0.2" }, "peerDependencies": { diff --git a/test/render/test-utils/get-model.js b/test/render/test-utils/get-model.js index ab88100201..a73b2785f1 100644 --- a/test/render/test-utils/get-model.js +++ b/test/render/test-utils/get-model.js @@ -1,5 +1,4 @@ -import {Model, Geometry} from '@luma.gl/core'; -import * as mat4 from 'gl-matrix/mat4'; +import {Model, Geometry, mat4} from '@luma.gl/core'; import {normalizeAttributes} from './normalize-attributes'; diff --git a/yarn.lock b/yarn.lock index a71b99b273..dab887c6d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2299,7 +2299,7 @@ dependencies: "@mapbox/point-geometry" "~0.1.0" -"@math.gl/core@3.6.3", "@math.gl/core@^3.5.0", "@math.gl/core@^3.5.1", "@math.gl/core@^3.6.2": +"@math.gl/core@3.6.3", "@math.gl/core@^3.5.0", "@math.gl/core@^3.6.2": version "3.6.3" resolved "https://registry.yarnpkg.com/@math.gl/core/-/core-3.6.3.tgz#a6bf796ed421093099749d609de8d99a3ac20a53" integrity sha512-jBABmDkj5uuuE0dTDmwwss7Cup5ZwQ6Qb7h1pgvtkEutTrhkcv8SuItQNXmF45494yIHeoGue08NlyeY6wxq2A== @@ -2308,46 +2308,52 @@ "@math.gl/types" "3.6.3" gl-matrix "^3.4.0" -"@math.gl/culling@^3.5.1": - version "3.6.3" - resolved "https://registry.yarnpkg.com/@math.gl/culling/-/culling-3.6.3.tgz#91cdfa496748e8873a2e6261415a27a27b6af5f2" - integrity sha512-3UERXHbaPlM6pnTk2MI7LeQ5CoelDZzDzghTTcv+HdQCZsT/EOEuEdYimETHtSxiyiOmsX2Un65UBLYT/rbKZg== +"@math.gl/core@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/core/-/core-4.0.0-beta.1.tgz#22cf5f8bdeb48ca55840bada3cf7513c06c03399" + integrity sha512-FJ4blmrrj+vDiFFw1ErbR7q5JK4SWva2uIdu4OQHo1uZDEY6amJ7nHC3g5UCt4izyQ66Ntirx1B37dLrOJpdlQ== dependencies: "@babel/runtime" "^7.12.0" - "@math.gl/core" "3.6.3" - gl-matrix "^3.4.0" + "@math.gl/types" "4.0.0-beta.1" -"@math.gl/geoid@^3.5.1": - version "3.6.3" - resolved "https://registry.yarnpkg.com/@math.gl/geoid/-/geoid-3.6.3.tgz#fd35e6473cbf91f77a9550831b738ad6d3862c59" - integrity sha512-cZooAG6WHrCtXl4uF+x76Mz0+Fnu7UCx1iqkKlzCxBjA9FpAOVu3vAJlnkgK/Z9NuGfB+i+dJ2rdThDbPXNc1Q== +"@math.gl/culling@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/culling/-/culling-4.0.0-beta.1.tgz#28fdb3e997b1a3662d1fbdc1c1bc30bc918d4cff" + integrity sha512-uPqRnDfqDdqppzdoGwcZJ0Mp5nZG5KWIGgy5DpR8ntIp94DkO3YVwOftRCHZcemxi7Y8NRZPo/i3JD+XlGJiRg== dependencies: "@babel/runtime" "^7.12.0" - "@math.gl/core" "3.6.3" + "@math.gl/core" "4.0.0-beta.1" -"@math.gl/geospatial@^3.5.1": - version "3.6.3" - resolved "https://registry.yarnpkg.com/@math.gl/geospatial/-/geospatial-3.6.3.tgz#011ebbe8d1660ff79020a81ed218886c353a62e1" - integrity sha512-6xf657lJnaecSarSzn02t0cnsCSkWb+39m4+im96v20dZTrLCWZ2glDQVzfuL91meDnDXjH4oyvynp12Mj5MFg== +"@math.gl/geoid@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/geoid/-/geoid-4.0.0-beta.1.tgz#29a4cf2712884a00e495a55dc5dee291dd16dd93" + integrity sha512-p+PeQoKnRpTG2EWvftkVPiJAMzrhjTTGZtq+wC9i+x3kkro/6bXw7rlUvgUV7A2tEQeg/WHoP5b5UbaEIVe24A== dependencies: "@babel/runtime" "^7.12.0" - "@math.gl/core" "3.6.3" - gl-matrix "^3.4.0" + "@math.gl/core" "4.0.0-beta.1" -"@math.gl/polygon@^3.5.1": - version "3.6.3" - resolved "https://registry.yarnpkg.com/@math.gl/polygon/-/polygon-3.6.3.tgz#0c19c0b059cedde1cd760cc3796e9180f75bcbde" - integrity sha512-FivQ1ZnYcAss1wVifOkHP/ZnlfQy1IL/769uzNtiHxwUbW0kZG3yyOZ9I7fwyzR5Hvqt3ErJKHjSYZr0uVlz5g== +"@math.gl/geospatial@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/geospatial/-/geospatial-4.0.0-beta.1.tgz#c6b46edd07f70ed8018664fe1130e0cc3dee457a" + integrity sha512-4PTk4dyHiEKfn2h/cs1Od2jSoSNrWlrw5+Mll9vwBxmqacb1o/Y+qBUQTnMQd1fjwCq+w1rgVFRvzC06IcL2cQ== dependencies: - "@math.gl/core" "3.6.3" + "@babel/runtime" "^7.12.0" + "@math.gl/core" "4.0.0-beta.1" -"@math.gl/proj4@^3.3.1", "@math.gl/proj4@^3.5.1": - version "3.6.3" - resolved "https://registry.yarnpkg.com/@math.gl/proj4/-/proj4-3.6.3.tgz#beb66a0a786f39a9d204892949d414558bc37e44" - integrity sha512-8VC3noTBiLD45VzsOVBb9nniKC+e27n5NWdzwKNOBUiXgl5HtRwNessoUYY0GccABz0OP41wbyfSzukLVAyphw== +"@math.gl/polygon@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/polygon/-/polygon-4.0.0-beta.1.tgz#4fcfcf0035b5f6261c8f570a20aa629cf9a58073" + integrity sha512-r0WAGaUmVgrq//nKnLBQLEomtxBpYrN4+ywO9GHa+XzxgTARLgT7x6vppFB+q94gv2mx/j/MfkMMykhZ2GMc2g== + dependencies: + "@math.gl/core" "4.0.0-beta.1" + +"@math.gl/proj4@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/proj4/-/proj4-4.0.0-beta.1.tgz#2511674aaf5f1bbcb966b0ad4f2ef27c779dbd34" + integrity sha512-3+5E8G2jUZwTiHHJ0+EiP7rTsi87JU41VhB584CyEQBg8LObrYVY5lQcuz3i4QMt6Wmgv5QReJT3CaBVfRN/fQ== dependencies: "@babel/runtime" "^7.12.0" - "@math.gl/core" "3.6.3" + "@math.gl/core" "4.0.0-beta.1" "@types/proj4" "^2.5.0" proj4 "2.6.2" @@ -2363,7 +2369,19 @@ resolved "https://registry.yarnpkg.com/@math.gl/types/-/types-3.6.3.tgz#9fa9866feabcbb76de107d78ff3a89c0243ac374" integrity sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA== -"@math.gl/web-mercator@^3.5.1", "@math.gl/web-mercator@^3.6.2": +"@math.gl/types@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/types/-/types-4.0.0-beta.1.tgz#171174a69846af267812c9643ad66a39c31c644f" + integrity sha512-GUeecEM98AwDgikJl2EFBZPVlCtLUkWj7l/QPMLozMrlg6Ql3o79my1REfW5CiTH3bLNPWXdPS7fCw8Y7BEyyw== + +"@math.gl/web-mercator@4.0.0-beta.1": + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@math.gl/web-mercator/-/web-mercator-4.0.0-beta.1.tgz#c28ceafddd8414873e7c5f9ff7299d182e5eb738" + integrity sha512-BpbJ320os1Rzl10Orrbp35+6823wAVEQe3ol9OxF7DBMU9CkrF1bz05t2nP3g5dW21BtCxXPYaEI8aetZbJ6Bg== + dependencies: + "@babel/runtime" "^7.12.0" + +"@math.gl/web-mercator@^3.6.2": version "3.6.3" resolved "https://registry.yarnpkg.com/@math.gl/web-mercator/-/web-mercator-3.6.3.tgz#ef91168e030eecffc788618d686e8a6c1d7a0bf8" integrity sha512-UVrkSOs02YLehKaehrxhAejYMurehIHPfFQvPFZmdJHglHOU4V2cCUApTVEwOksvCp161ypEqVp+9H6mGhTTcw== @@ -10885,7 +10903,7 @@ tape-promise@^4.0.0: is-promise "^2.1.0" onetime "^2.0.0" -tape@4.16.1, tape@^4.11.0: +tape@^4.11.0: version "4.16.1" resolved "https://registry.yarnpkg.com/tape/-/tape-4.16.1.tgz#8d511b3a0be1a30441885972047c1dac822fd9be" integrity sha512-U4DWOikL5gBYUrlzx+J0oaRedm2vKLFbtA/+BRAXboGWpXO7bMP8ddxlq3Cse2bvXFQ0jZMOj6kk3546mvCdFg==