From 7595b07285f349637c66eef588236a6110808de9 Mon Sep 17 00:00:00 2001 From: Ib Green Date: Thu, 25 Jul 2024 10:52:10 -0400 Subject: [PATCH] docs --- docs/whats-new.md | 15 +++++++++++++++ modules/core/src/classes/matrix3.ts | 2 +- modules/core/src/classes/matrix4.ts | 4 ++-- modules/core/src/classes/vector2.ts | 2 +- modules/core/src/index.ts | 1 - modules/types/src/array-types.ts | 2 +- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/whats-new.md b/docs/whats-new.md index c2e5851f..d78b7405 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -45,6 +45,21 @@ +## v4.1 + +Release Date: Q3, 2024. + +- [SPDX](https://spdx.org/licenses/) license headers. + +**`@math.gl/core`** + +- New `Vector2Like` - `Matrix4Like` types to specify numeric inputs of a specific length. + +**`@math.gl/types`** + +- New `NumberArray2` - `NumberArray16` types to specify numeric arrays of a specific length. +- `isTypedArray()` and `isNumericArray()` utilities now support typescript type narrowing. + ## v4.0 Release Date: Oct 14, 2023. diff --git a/modules/core/src/classes/matrix3.ts b/modules/core/src/classes/matrix3.ts index f57e2afd..8d8b9476 100644 --- a/modules/core/src/classes/matrix3.ts +++ b/modules/core/src/classes/matrix3.ts @@ -39,7 +39,7 @@ const IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 1, 0, 0, 0, 1]); /** Helper type that captures array length for a 3x3 matrix */ export type Matrix3Like = Matrix3 | NumberArray9; -/** +/** * A 3x3 matrix with common linear algebra operations * Subclass of Array meaning that it is highly compatible with other libraries */ diff --git a/modules/core/src/classes/matrix4.ts b/modules/core/src/classes/matrix4.ts index fbf4d679..234e3286 100644 --- a/modules/core/src/classes/matrix4.ts +++ b/modules/core/src/classes/matrix4.ts @@ -60,8 +60,8 @@ const IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, /** Helper type that captures array length for a 4x4 matrix */ export type Matrix4Like = Matrix4 | NumberArray16; -/** - * A 4x4 matrix with common linear algebra operations +/** + * A 4x4 matrix with common linear algebra operations * Subclass of Array meaning that it is highly compatible with other libraries */ export class Matrix4 extends Matrix { diff --git a/modules/core/src/classes/vector2.ts b/modules/core/src/classes/vector2.ts index 6160b517..cdbf698e 100644 --- a/modules/core/src/classes/vector2.ts +++ b/modules/core/src/classes/vector2.ts @@ -20,7 +20,7 @@ import {vec2_transformMat4AsVector} from '../lib/gl-matrix-extras'; export type Vector2Like = Vector2 | NumberArray2; /** - * Two-element vector class with common linear algebra operations. + * Two-element vector class with common linear algebra operations. * Subclass of Array meaning that it is highly compatible with other libraries */ export class Vector2 extends Vector { diff --git a/modules/core/src/index.ts b/modules/core/src/index.ts index 7e51c2b8..8b5be8eb 100644 --- a/modules/core/src/index.ts +++ b/modules/core/src/index.ts @@ -21,7 +21,6 @@ export type {Vector4Like} from './classes/vector4'; export type {Matrix3Like} from './classes/matrix3'; export type {Matrix4Like} from './classes/matrix4'; - // experimental export {SphericalCoordinates} from './classes/spherical-coordinates'; export {Pose} from './classes/pose'; diff --git a/modules/types/src/array-types.ts b/modules/types/src/array-types.ts index 762d9cad..bbd3063a 100644 --- a/modules/types/src/array-types.ts +++ b/modules/types/src/array-types.ts @@ -190,4 +190,4 @@ declare type ReadonlyQuat2 = declare type ReadonlyVec2 = readonly [number, number] | IndexedCollection; declare type ReadonlyVec3 = readonly [number, number, number] | IndexedCollection; declare type ReadonlyVec4 = readonly [number, number, number, number] | IndexedCollection; - */ \ No newline at end of file + */