Skip to main content

What's New

v4.0 S2 (DGGS)

v4.0 GeoHash (DGGS)

v4.0 Quadkey (DGGS)

v3.4 Geoid (Earth Gravity Model)

v3.2 TypeScript

v3.0 WGS84 & Ellipsoid


Release Date: Oct 14, 2023.

  • ESM (ECMAScript modules).
  • Node.js v16, v18, v20.
  • Typescript v5
  • gl-matrix dependency removed.
  • New modules for working with DGGS (Discrete Global Grid System) math. (NEW MODULE)

  • New module with lightweight math for the GeoHash DGGS (Discrete Global Grid System). (NEW MODULE)

  • New module with lightweight math for the quadkey DGGS (Discrete Global Grid System). (NEW MODULE)

  • New module that contains a lightweight implementation of the S2 DGGS (Discrete Global Grid System).

  • config is now truly global (stored on globalThis).
  • gl-matrix dependency removed.

  • New isTypedArray() and isNumericArray() utilities that check values and return properly restricted types to help write clean TypeScript code (e.g. avoids the DataView case when using ArrayBuffer.isView()).


Release Date: June 10, 2022

Codebase has been fully converted to typescript. In general this means that users can expect the types exported from to be considerably improved, however in some function signatures are no longer supported. For details, consult the upgrade guide. (NEW)

  • New module that exports a few typescript types that e.g. generalize handling of numeric arrays. (NEW)

  • Includes earcut 2.2 (various bug fixes for edge cases)
  • The earcut utility supports a new argument plane to calculate tesselation on alternative projection planes.


Release Date: July 14, 2021

  • getBounds() now supports an optional fovy parameter on the WebMercatorViewport object
  • getProjectionMatrix() and getProjectionParameters() now accept a fovy parameter

  • Improve performance of getPolygonSignedArea() by 3x
  • Addition of earcut() method for triangulating polygons

  • New TypeScript interface BoundingVolume with common operations for bounding volumes (BoundingSphere, AxisAlignedBoundingBox, OrientedBoundingBox).
  • BoundingVolume.transform() supported on all bounding volumes.


Release Date: Jan 7, 2021 - New module

  • Support for geoid-based earth gravity models.
  • New Geoid class calculates the height offset (aka "undulation") from the pure ellipsoid for a given lng/lat (using spherical harmonics).
  • Geoid instances can be initialized with PGM-encoded earth gravity model coefficient files from standard sources.

  • Support for flat arrays (e.g. polygons stored in typed arrays)
  • Support for calling polygon utilities directly on arrays, without a Polygon instance.
  • New function modifyPolygonWindingDirection() to modify polygon array winding direction in-place.


Release Date: Oct 9, 2020 - New module

  • A new module supporting conversion between a wide range of geospatial coordinate reference systems specified e.g. using the OGC WKT-CRS specification.


Release Date: July 18, 2020


  • Typescript type definitions (.d.ts files) are now exported for all modules. - New module

  • A new module offering geospatial polygon clipping functions.


Release date: Dec 16, 2019

  • WebMercator projection support is now available through the new npm sub-module.
  • The module is an evolution of the now archived viewport-mercator-project repository.


Release date: Aug 8, 2019

The 3.0 release brings support for geospatial math, culling, performance improvements, and some API consolidation.

A new module (developed in collaboration with the Cesium engineering team) providing WebGL-framework-independent geospatial math classes and algorithms:

  • New class Ellipsoid and constant Ellipsoid.WGS84 for working with WSG84 coordinates

A new module (developed in collaboration with the Cesium engineering team) providing WebGL-framework-independent classesthat support geometric intersection calculations (primarily intended to support frustum culling operations):

  • New class AxisAlignedBoundingBox
  • New class OrientedBoundingBox
  • New class BoundingSphere
  • New class CullingVolume

Transform API Consolidation

The API for transformations (i.e. multiplying vectors with matrices or quaternions) has been extended and made more orthogonal:

  • The transform* methods are now available on all Vector classes, in addition to on the Matrix classes. Among other things, this enables transformations without using Matrix classes.
  • Naming consistency of transform methods across classes (transform, transformAsPoint, transformAsVector).
  • Alternative transform methods added to the Vector classes (transformByMatrix3, transformByMatrix2, transformByMatrix2x3 and transformByQuaternion). Simplifies using the most efficient transformation for the job.

Matrix classes

  • New methods Matrix*.setColumn() and Matrix*.getColumn()
  • New method Matrix*.toString()
  • Improved method: Matrix4.frustum() now supports infinite far plane (parity with Matrix4.perspective, which already supported this).

Utility Functions

  • New: global functions toRadians and toDegrees
  • New: global function exactEqual

Performance Improvements (and Website Benchmarks)

A benchmarking example has been added to the website that makes it easy to assess the performance of the library on your own browser. The library has been carefully tuned based on these benchmarks and performance of the library has been significantly improved over version 2.x.


Release date: Jan 29, 2019

  • New class: Matrix3
  • New: Add scale factor support to Matrix3 and Matrix4
  • Support quaternion to euler conversion
  • Now uses the official gl-matrix@3.0.0 package as dependency instead of forked gl-matrix packages.


Release date: Sep 20, 2018

  • Use @babel/runtime to reduce bundle size
  • equals function fix on arrays


Release date: June 25, 2018

New Naming Convention for Experimental Exports

Experimental exports are now exported with a leading underscore (_), instead of as members of the experimental namespace.

The change was made to make it possible for tree-shaking bundlers to remove unused experimental exports from applications.


Release date: May 4, 2018

  • New lerp utility
  • Experimental Pose class


Release date: April 16, 2018

Matrix4 Improvements

Matrix4.orthographic() - To simplify switching between perspective and orthographic views, now offers an additional method for creating orthographic projection matrix, that takes the same parameters as Matrix4.perspective(), with the addition of one additional parameter, focalDistance. See Matrix4.orthographic({fovy, aspect, focalDistance, near, far})

Bundle Size Reduction has been tuned to have approximately 20% smaller footprint when bundled in applications.

THREE.js Compatibility classes now pass large parts of the THREE.js test suite, which should make it easier to reuse code written for the THREE.js math library.


Release date: Jan 9, 2018

Initial release.