@thi.ng/rstream-gestures 5.0.150 → 5.0.152
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/README.md +3 -2
- package/gesture-stream.js +2 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -103,7 +103,7 @@ Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
|
103
103
|
|
|
104
104
|
## Usage examples
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
17 projects in this repo's
|
|
107
107
|
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
|
|
108
108
|
directory are using this package:
|
|
109
109
|
|
|
@@ -124,6 +124,7 @@ directory are using this package:
|
|
|
124
124
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/scenegraph-pan-zoom.avif" width="240"/> | Basic 2D scenegraph example with pan/zoom functionality | [Demo](https://demo.thi.ng/umbrella/scenegraph-pan-zoom/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/scenegraph-pan-zoom) |
|
|
125
125
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-graph.jpg" width="240"/> | Minimal shader graph developed during livestream #2 | [Demo](https://demo.thi.ng/umbrella/shader-graph/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-graph) |
|
|
126
126
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/trace-bitmap.jpg" width="240"/> | Multi-layer vectorization & dithering of bitmap images | [Demo](https://demo.thi.ng/umbrella/trace-bitmap/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/trace-bitmap) |
|
|
127
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-cube.png" width="240"/> | 3D arcball controller to rotate the camera view of a colored cube | [Demo](https://demo.thi.ng/umbrella/webgl-arcball/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-arcball) |
|
|
127
128
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-channel-mixer.jpg" width="240"/> | rdom & WebGL-based image channel editor | [Demo](https://demo.thi.ng/umbrella/webgl-channel-mixer/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-channel-mixer) |
|
|
128
129
|
|
|
129
130
|
## API
|
package/gesture-stream.js
CHANGED
|
@@ -59,7 +59,7 @@ const gestureStream = (el, _opts) => {
|
|
|
59
59
|
opts.preventContextMenu && el.addEventListener("contextmenu", (e) => e.preventDefault());
|
|
60
60
|
const gestureStart = (etype, events, bounds, isTouch) => {
|
|
61
61
|
const isStart = etype === "mousedown" || etype === "touchstart";
|
|
62
|
-
for (
|
|
62
|
+
for (const t of events) {
|
|
63
63
|
const id = t.identifier || 0;
|
|
64
64
|
const pos = __getPos(t, bounds, opts.local, opts.scale);
|
|
65
65
|
let touch = active.find((t2) => t2.id === id);
|
|
@@ -88,7 +88,7 @@ const gestureStream = (el, _opts) => {
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
const gestureEnd = (events) => {
|
|
91
|
-
for (
|
|
91
|
+
for (const t of events) {
|
|
92
92
|
const id = t.identifier || 0;
|
|
93
93
|
const idx = active.findIndex((t2) => t2.id === id);
|
|
94
94
|
if (idx !== -1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream-gestures",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.152",
|
|
4
4
|
"description": "Unified mouse, mouse wheel & multi-touch event stream abstraction",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@thi.ng/api": "^8.12.
|
|
47
|
-
"@thi.ng/checks": "^3.
|
|
48
|
-
"@thi.ng/math": "^5.
|
|
49
|
-
"@thi.ng/rstream": "^9.3.
|
|
50
|
-
"@thi.ng/transducers": "^9.6.
|
|
46
|
+
"@thi.ng/api": "^8.12.10",
|
|
47
|
+
"@thi.ng/checks": "^3.8.0",
|
|
48
|
+
"@thi.ng/math": "^5.14.0",
|
|
49
|
+
"@thi.ng/rstream": "^9.3.9",
|
|
50
|
+
"@thi.ng/transducers": "^9.6.19"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"esbuild": "^0.27.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
],
|
|
99
99
|
"year": 2018
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "8625a1c6383737a8fdbe7a3f96ea3cbabc957fa6\n"
|
|
102
102
|
}
|