mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(geo): add src/geo, Cesium's vector maths without Cesium
An engine-neutral port of the CesiumJS 1.138 core maths gev uses: angle maths, the WGS84 ellipsoid and geodetic coordinates, 2D/3D vectors, 3x3/4x4 matrices, quaternions and local east-north-up / heading-pitch-roll frames. Formulas and operation order match Cesium, so outputs are bit-identical (golden tests pin the centre, pole, -0 and quaternion branches). - Values are plain-data instances of module-private constructors (own enumerable fields only), so geo's hot functions keep their own V8 hidden classes; matrices are plain column-major arrays Cesium accepts. - Cesium's debug argument checks are ported with the same conditions, order and DeveloperError messages, gated on DEBUG (src/geo/debug.js): on in Node and the dev server, folded away by vite build, as Cesium's Build strips them. A release-parity test compares DEBUG=false geo with Build/Cesium. - The import-direction check forbids cesium and @cesium/* in src/geo; CODE-BOUNDARIES.md and THIRD_PARTY_NOTICES.md document the port.
This commit is contained in:
1 parent
132b9e96dc
commit
4a92ed8377
29 files changed
+4470
-6
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// Engine-neutral geometry (WGS84, vectors, matrices, local frames) ported from
|
||||
// CesiumJS 1.138 (Apache-2.0). Never imports Cesium; see docs/CODE-BOUNDARIES.md.
|
||||
//
|
||||
// import * as geo from '../geo/index.js';
|
||||
// geo.cartesian3.fromDegrees(lon, lat, height);
|
||||
|
||||
export * as math from './math.js';
|
||||
export * as ellipsoid from './ellipsoid.js';
|
||||
export * as cartographic from './cartographic.js';
|
||||
export * as cartesian2 from './cartesian2.js';
|
||||
export * as cartesian3 from './cartesian3.js';
|
||||
export * as matrix3 from './matrix3.js';
|
||||
export * as matrix4 from './matrix4.js';
|
||||
export * as quaternion from './quaternion.js';
|
||||
export * as transforms from './transforms.js';
|
||||
Reference in new issue
Block a user