@immugio/three-math-extensions 0.2.35 → 0.2.36
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 +7 -1
- package/package.json +1 -1
- package/src/Polygon.ts +1 -1
- package/types/Polygon.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,13 @@ 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.2.
|
|
10
|
+
## [0.2.36](https://github.com/Immugio/three-math-extensions/compare/0.2.35...0.2.36)
|
|
11
|
+
|
|
12
|
+
### Commits
|
|
13
|
+
|
|
14
|
+
- Polygon.containsPoint should accept Point2 [`73e766c`](https://github.com/Immugio/three-math-extensions/commit/73e766c9f03903224c0634947b116aa3e0f6f9bd)
|
|
15
|
+
|
|
16
|
+
## [0.2.35](https://github.com/Immugio/three-math-extensions/compare/0.2.34...0.2.35) - 2024-10-24
|
|
11
17
|
|
|
12
18
|
### Commits
|
|
13
19
|
|
package/package.json
CHANGED
package/src/Polygon.ts
CHANGED
|
@@ -139,7 +139,7 @@ export class Polygon {
|
|
|
139
139
|
return this;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
public containsPoint(...points:
|
|
142
|
+
public containsPoint(...points: Point2[]): boolean {
|
|
143
143
|
return points.every(point => containsPoint(this.contour, point)) &&
|
|
144
144
|
(this.holes || []).every(hole => !points.some(point => containsPoint(hole, point)));
|
|
145
145
|
}
|
package/types/Polygon.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class Polygon {
|
|
|
20
20
|
perimeter(): number;
|
|
21
21
|
get isClockwise(): boolean;
|
|
22
22
|
ensureClockwise(): this;
|
|
23
|
-
containsPoint(...points:
|
|
23
|
+
containsPoint(...points: Point2[]): boolean;
|
|
24
24
|
private flipSingle;
|
|
25
25
|
translate(translate: Vec2): this;
|
|
26
26
|
/**
|