daledesilva / obsidian_ink

Other
417 stars 10 forks source link

✍️ Pen smoothing & lag/latency issues in Windows & Android tablets #41

Open daledesilva opened 4 months ago

daledesilva commented 4 months ago

The bug

In some Windows and Android tablets, moderate to fast writing can appear a bit jagged or overly smoothed. This is usually due to the stylus detecting as a mouse type pointer. This means that Tldraw, the framework this is built on, applies the wrong smoothing.

Affected devices: Windows / Android devices Plugin version: v0.2 and below Obsidian version: All

Unfortunately, the Tldraw team don't have a clear way to fix this and don't yet have a roadmap to allow customising the smoothing. That being said, Tldraw is open source, so fix it at my end is in the works.

Expected fix

Two fixes are possible and I'll likely attempt them in this order at different times:

  1. Allow turning off easing.
  2. Better detect easing as well.

Additional context

Several posts have already been made for this issue. This is the issue for this specific bug. The other posts are linked below.


**How to add to this thread...*** Please follow the below format if also reporting the same issue here, and thank you for taking the time to do so — Without a clear understanding of the issues it's difficult to find solutions.

Copy the below template:

**The bug**
A clear and concise description of the lag you've noticed and when it's occuring (Especially if it's a writing section or drawing section, file or embed).

**Video or screenshots**
If your're not sure if your issue is the same, please add a quick video screen capture demonstrating the what you're experiencing. Record it, then delete this paragraph and drag in the file. It's often easier and clearer with a video than trying to describe.

>You can capture a video fairly easily for free with an app called [Kap](https://getkap.co/) (Mac), or [Loom](https://chromewebstore.google.com/detail/loom-%E2%80%93-screen-recorder-sc/liecbddmkiiihnedobmlmillhodjkdmb
) (Windows/Mac).

- **Device & OS**: [Fill this in... e.g. Surface Pro 10, Windows]
joshtownley commented 4 months ago

I'm using a fairly old Wacom Intuos tablet on Mac, and thought I was experiencing unavoidable lag with this plugin due to the age of the tablet (had the same issue with drawing/writing in Excalidraw). I would get smooth writing most of the time, but what looked like lag when doing short strokes (e.g. the dot on the letter i), which made quick writing impossible.

After disabling 'Tip Double Click Distance' in the tablet pen settings, the lag vanished. Just thought I'd add this tip here incase anyone else has the same issue. SCR-20240517-nemh

daledesilva commented 4 months ago

Thanks @joshtownley I'm glad you were able to make it work well for you!

I'll add this tip to the settings screen so others can find it easily.

daledesilva commented 3 months ago

Lenovo Smart Paper has an "inking" feature but doesn't solve low latency in ink either. As discussed here: https://github.com/daledesilva/obsidian_ink/issues/24#issuecomment-2141620593