@stroke-stabilizer/vue 0.2.13 → 0.2.14
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 +11 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,12 +32,17 @@ const { process, reset, pointer } = useStabilizedPointer({
|
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
function handlePointerMove(e: PointerEvent) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
// IMPORTANT: Use getCoalescedEvents() for smoother input
|
|
36
|
+
const events = e.getCoalescedEvents?.() ?? [e]
|
|
37
|
+
|
|
38
|
+
for (const ce of events) {
|
|
39
|
+
process({
|
|
40
|
+
x: ce.offsetX,
|
|
41
|
+
y: ce.offsetY,
|
|
42
|
+
pressure: ce.pressure,
|
|
43
|
+
timestamp: ce.timeStamp,
|
|
44
|
+
})
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
function handlePointerUp() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stroke-stabilizer/vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Vue composables for stroke stabilization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typecheck": "tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@stroke-stabilizer/core": "^0.2.
|
|
25
|
+
"@stroke-stabilizer/core": "^0.2.14"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"vue": ">=3.0.0"
|