@stroke-stabilizer/react 0.1.4 → 0.2.9
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 +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,9 @@ function DrawingCanvas() {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
const handlePointerUp = () => {
|
|
43
|
-
|
|
43
|
+
// Get final smoothed points with post-processing
|
|
44
|
+
const finalPoints = pointer.finish()
|
|
45
|
+
drawFinalStroke(finalPoints)
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
return (
|
|
@@ -125,6 +127,7 @@ Creates a stabilized pointer instance.
|
|
|
125
127
|
- `process(point)` - Process a single point
|
|
126
128
|
- `processAll(points)` - Process multiple points
|
|
127
129
|
- `flushBuffer()` - Flush internal buffer
|
|
130
|
+
- `finish()` - Apply post-processing and return final points (auto-appends endpoint)
|
|
128
131
|
- `reset()` - Reset the pointer state
|
|
129
132
|
- `addFilter(filter)` - Add a filter dynamically
|
|
130
133
|
- `removeFilter(type)` - Remove a filter by type
|