@immugio/three-math-extensions 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,7 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
9
9
 
10
- ## [0.0.16](https://github.com/Immugio/three-math-extensions/compare/0.0.15...0.0.16)
10
+ ## [0.0.17](https://github.com/Immugio/three-math-extensions/compare/16.15.10...0.0.17)
11
+
12
+ ### Commits
13
+
14
+ - Vec2.fromPoint and Vec3.fromPoint should accept null [`4b871af`](https://github.com/Immugio/three-math-extensions/commit/4b871af297bdcbe8584f1e2b99d602247b77687c)
15
+
16
+ ## [16.15.10](https://github.com/Immugio/three-math-extensions/compare/0.0.16...16.15.10) - 2023-01-02
17
+
18
+ ## [0.0.16](https://github.com/Immugio/three-math-extensions/compare/0.0.15...0.0.16) - 2022-12-28
11
19
 
12
20
  ### Commits
13
21
 
package/cjs/Vec2.js CHANGED
@@ -13,7 +13,7 @@ class Vec2 extends three_1.Vector2 {
13
13
  * @returns A new Vec2 instance.
14
14
  */
15
15
  static fromPoint(point) {
16
- return new Vec2(point.x, point.y);
16
+ return new Vec2(point?.x, point?.y);
17
17
  }
18
18
  /**
19
19
  * Moves this Vec2 instance towards the target Vec2 by the given amount.
package/cjs/Vec3.js CHANGED
@@ -14,7 +14,7 @@ class Vec3 extends three_1.Vector3 {
14
14
  * @returns A new Vec3 instance.
15
15
  */
16
16
  static fromPoint(point) {
17
- return new Vec3(point.x, point.y, point.z);
17
+ return new Vec3(point?.x, point?.y, point?.z);
18
18
  }
19
19
  /**
20
20
  * Moves this Vec3 instance towards the target Vec3 by the given amount.
package/esm/Vec2.js CHANGED
@@ -10,7 +10,7 @@ export class Vec2 extends Vector2 {
10
10
  * @returns A new Vec2 instance.
11
11
  */
12
12
  static fromPoint(point) {
13
- return new Vec2(point.x, point.y);
13
+ return new Vec2(point?.x, point?.y);
14
14
  }
15
15
  /**
16
16
  * Moves this Vec2 instance towards the target Vec2 by the given amount.
package/esm/Vec3.js CHANGED
@@ -11,7 +11,7 @@ export class Vec3 extends Vector3 {
11
11
  * @returns A new Vec3 instance.
12
12
  */
13
13
  static fromPoint(point) {
14
- return new Vec3(point.x, point.y, point.z);
14
+ return new Vec3(point?.x, point?.y, point?.z);
15
15
  }
16
16
  /**
17
17
  * Moves this Vec3 instance towards the target Vec3 by the given amount.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immugio/three-math-extensions",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Set of utilities for 2d and 3d line math built on top of three.js",
5
5
  "author": "Jan Mikeska <janmikeska@gmail.com>",
6
6
  "license": "ISC",
package/src/Vec2.ts CHANGED
@@ -13,7 +13,7 @@ export class Vec2 extends Vector2 {
13
13
  * @returns A new Vec2 instance.
14
14
  */
15
15
  public static fromPoint(point: Point2): Vec2 {
16
- return new Vec2(point.x, point.y);
16
+ return new Vec2(point?.x, point?.y);
17
17
  }
18
18
 
19
19
  /**
package/src/Vec3.ts CHANGED
@@ -15,7 +15,7 @@ export class Vec3 extends Vector3 {
15
15
  * @returns A new Vec3 instance.
16
16
  */
17
17
  public static fromPoint(point: Point3): Vec3 {
18
- return new Vec3(point.x, point.y, point.z);
18
+ return new Vec3(point?.x, point?.y, point?.z);
19
19
  }
20
20
 
21
21
  /**