From 8bd1d9c2f67568309bfd079e864cff45d69c4930 Mon Sep 17 00:00:00 2001 From: Ib Green Date: Sat, 3 Aug 2024 08:11:09 -0400 Subject: [PATCH] wip --- .eslintrc.cjs | 1 + .../culling/src/lib/bounding-volumes/oriented-bounding-box.ts | 3 ++- modules/culling/src/lib/perspective-frustum.ts | 3 ++- modules/culling/src/lib/perspective-off-center-frustum.ts | 2 +- .../geospatial/src/ellipsoid/helpers/ellipsoid-transform.ts | 3 ++- modules/web-mercator/src/web-mercator-utils.ts | 1 + 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a3025020..5c42c102 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -25,6 +25,7 @@ module.exports = getESLintConfig({ { files: ['modules/**/*.ts', 'modules/**/*.js'], rules: { + 'no-use-before-define': 0, 'import/no-unresolved': 0, '@typescript-eslint/ban-ts-comment': 0 // We do need our ts-ignores } diff --git a/modules/culling/src/lib/bounding-volumes/oriented-bounding-box.ts b/modules/culling/src/lib/bounding-volumes/oriented-bounding-box.ts index 7325264b..6f47c189 100644 --- a/modules/culling/src/lib/bounding-volumes/oriented-bounding-box.ts +++ b/modules/culling/src/lib/bounding-volumes/oriented-bounding-box.ts @@ -1,7 +1,8 @@ // This file is derived from the Cesium math library under Apache 2 license // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md -import {Vector3, Matrix3, Matrix4, Quaternion, NumericArray} from '@math.gl/core'; +import {NumericArray} from '@math.gl/types'; +import {Vector3, Matrix3, Matrix4, Quaternion} from '@math.gl/core'; import type {BoundingVolume} from './bounding-volume'; import {BoundingSphere} from './bounding-sphere'; import type {Plane} from '../plane'; diff --git a/modules/culling/src/lib/perspective-frustum.ts b/modules/culling/src/lib/perspective-frustum.ts index ea83d7f7..7b0ebaae 100644 --- a/modules/culling/src/lib/perspective-frustum.ts +++ b/modules/culling/src/lib/perspective-frustum.ts @@ -5,7 +5,8 @@ // - It has not been fully adapted to math.gl conventions // - Documentation has not been ported -import {assert, Matrix4, NumericArray, Vector2} from '@math.gl/core'; +import {NumericArray} from '@math.gl/types'; +import {assert, Matrix4, Vector2} from '@math.gl/core'; import {PerspectiveOffCenterFrustum} from './perspective-off-center-frustum'; import {CullingVolume} from './culling-volume'; diff --git a/modules/culling/src/lib/perspective-off-center-frustum.ts b/modules/culling/src/lib/perspective-off-center-frustum.ts index 97362586..6dc3f9a7 100644 --- a/modules/culling/src/lib/perspective-off-center-frustum.ts +++ b/modules/culling/src/lib/perspective-off-center-frustum.ts @@ -5,7 +5,7 @@ // - It has not been fully adapted to math.gl conventions // - Documentation has not been ported -import {Vector3, Vector2, Matrix4, assert, NumericArray} from '@math.gl/core'; +import {Vector3, Vector2, Matrix4, assert, NumberArray} from '@math.gl/core'; import {CullingVolume} from './culling-volume'; import {Plane} from './plane'; diff --git a/modules/geospatial/src/ellipsoid/helpers/ellipsoid-transform.ts b/modules/geospatial/src/ellipsoid/helpers/ellipsoid-transform.ts index 0143c281..16298e4a 100644 --- a/modules/geospatial/src/ellipsoid/helpers/ellipsoid-transform.ts +++ b/modules/geospatial/src/ellipsoid/helpers/ellipsoid-transform.ts @@ -1,4 +1,5 @@ -import {NumericArray, Vector3, assert, equals as equalsEpsilon} from '@math.gl/core'; +import {NumericArray} from '@math.gl/types'; +import {Vector3, assert, equals as equalsEpsilon} from '@math.gl/core'; import type {Ellipsoid} from '../ellipsoid'; diff --git a/modules/web-mercator/src/web-mercator-utils.ts b/modules/web-mercator/src/web-mercator-utils.ts index a15bedf5..034a3bcc 100644 --- a/modules/web-mercator/src/web-mercator-utils.ts +++ b/modules/web-mercator/src/web-mercator-utils.ts @@ -190,6 +190,7 @@ export function addMetersToLngLat(lngLatZ: number[], xyz: number[]): number[] { const [longitude, latitude, z0] = lngLatZ; const [x, y, z] = xyz; + // eslint-disable-next-line no-shadow const {unitsPerMeter, unitsPerMeter2} = getDistanceScales({ longitude, latitude,