@thi.ng/imgui 2.3.0 → 2.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-09-05T12:23:14Z
3
+ - **Last updated**: 2024-09-05T17:30:06Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [2.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/imgui@2.3.1) (2024-09-05)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - update ramp(), clamp mouse pos ([420b41a](https://github.com/thi-ng/umbrella/commit/420b41a))
17
+
12
18
  ## [2.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/imgui@2.3.0) (2024-09-05)
13
19
 
14
20
  #### 🚀 Features
@@ -7,6 +7,7 @@ import { mix } from "@thi.ng/math/mix";
7
7
  import { roundTo } from "@thi.ng/math/prec";
8
8
  import { map } from "@thi.ng/transducers/map";
9
9
  import { ONE2, ZERO2 } from "@thi.ng/vectors/api";
10
+ import { clamp01_2 } from "@thi.ng/vectors/clamp";
10
11
  import { fit2 } from "@thi.ng/vectors/fit";
11
12
  import { hash } from "@thi.ng/vectors/hash";
12
13
  import { mix2 } from "@thi.ng/vectors/mix";
@@ -31,7 +32,7 @@ const ramp = (gui, layout, id, ramp2, rampMode = 0, info) => {
31
32
  let res;
32
33
  const focused = gui.requestFocus(id);
33
34
  if (hover) {
34
- sel = fit2([], gui.mouse, pos, maxPos, ZERO2, ONE2);
35
+ sel = clamp01_2(null, fit2([], gui.mouse, pos, maxPos, ZERO2, ONE2));
35
36
  selID = ramp2.closestIndex(sel[0], 0.05);
36
37
  if (gui.isMouseDown()) {
37
38
  gui.activeID = id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/imgui",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Immediate mode GUI with flexible state handling & data only shape output",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -160,5 +160,5 @@
160
160
  ],
161
161
  "year": 2019
162
162
  },
163
- "gitHead": "9f71f7f82fed2a980078a96bdafd2e706f526c75\n"
163
+ "gitHead": "36be8faf9fa2ccb1597b348cb3bc70ff08ed65d3\n"
164
164
  }