@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.
Files changed (2) hide show
  1. package/README.md +4 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -40,7 +40,9 @@ function DrawingCanvas() {
40
40
  }
41
41
 
42
42
  const handlePointerUp = () => {
43
- reset()
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stroke-stabilizer/react",
3
- "version": "0.1.4",
3
+ "version": "0.2.9",
4
4
  "description": "React hooks for stroke stabilization",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",