@thi.ng/boids 1.1.2 → 1.1.3
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/behaviors/cohesion.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-05-
|
|
3
|
+
- **Last updated**: 2025-05-09T10:26:34Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [1.1.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.3) (2025-05-09)
|
|
15
|
+
|
|
16
|
+
#### 🩹 Bug fixes
|
|
17
|
+
|
|
18
|
+
- off-by-one error in cohesion() ([e93b66c](https://github.com/thi-ng/umbrella/commit/e93b66c))
|
|
19
|
+
|
|
14
20
|
### [1.1.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/boids@1.1.2) (2025-05-08)
|
|
15
21
|
|
|
16
22
|
#### 🩹 Bug fixes
|
package/behaviors/cohesion.js
CHANGED
|
@@ -17,7 +17,7 @@ const cohesion = (maxDist, weight = 1, pred = () => true) => {
|
|
|
17
17
|
used++;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
return used >
|
|
20
|
+
return used > 0 ? boid.steerTowards(mulN(centroid, centroid, 1 / used)) : centroid;
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/boids",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "n-dimensional boids simulation with modular behavior system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
"status": "alpha",
|
|
148
148
|
"year": 2023
|
|
149
149
|
},
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "131482d456dca3b0a1e839f4ecad1f83cb6ada8e\n"
|
|
151
151
|
}
|