geom-center-and-normalize 2.2.0 → 2.2.1
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 +9 -0
- package/index.js +2 -2
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.2.1](https://github.com/vorg/geom-center-and-normalize/compare/v2.2.0...v2.2.1) (2025-09-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* apply centering regardles of normalization ([b0d14a4](https://github.com/vorg/geom-center-and-normalize/commit/b0d14a464da927ec4a320b52ad03e55fb7d9d705)), closes [#11](https://github.com/vorg/geom-center-and-normalize/issues/11)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
5
14
|
# [2.2.0](https://github.com/vorg/geom-center-and-normalize/compare/v2.1.1...v2.2.0) (2024-04-16)
|
|
6
15
|
|
|
7
16
|
|
package/index.js
CHANGED
|
@@ -23,15 +23,15 @@ function centerAndNormalize(
|
|
|
23
23
|
avec3.sub(positions, i, bboxCenter, 0);
|
|
24
24
|
if (normalize) {
|
|
25
25
|
avec3.scale(positions, i, normalizedSize);
|
|
26
|
-
if (!center) avec3.add(positions, i, bboxCenter, 0);
|
|
27
26
|
}
|
|
27
|
+
if (!center) avec3.add(positions, i, bboxCenter, 0);
|
|
28
28
|
} else {
|
|
29
29
|
vec3.set(TEMP_VEC3, positions[i]);
|
|
30
30
|
vec3.sub(TEMP_VEC3, bboxCenter);
|
|
31
31
|
if (normalize) {
|
|
32
32
|
vec3.scale(TEMP_VEC3, normalizedSize);
|
|
33
|
-
if (!center) vec3.add(TEMP_VEC3, bboxCenter);
|
|
34
33
|
}
|
|
34
|
+
if (!center) vec3.add(TEMP_VEC3, bboxCenter);
|
|
35
35
|
vec3.set(positions[i], TEMP_VEC3);
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geom-center-and-normalize",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Center a simplicial complex geometry's positions in place and scale them to fill a defined bounding box.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"geom",
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://github.com/vorg/geom-center-and-normalize",
|
|
17
17
|
"bugs": "https://github.com/vorg/geom-center-and-normalize/issues",
|
|
18
|
-
"repository":
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/vorg/geom-center-and-normalize.git"
|
|
21
|
+
},
|
|
19
22
|
"license": "MIT",
|
|
20
23
|
"author": "Marcin Ignac <marcin.ignac@gmail.com> (https://github.com/vorg)",
|
|
21
24
|
"contributors": [
|