Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting pen force #704

Open
milengg opened this issue Mar 2, 2023 · 4 comments
Open

Detecting pen force #704

milengg opened this issue Mar 2, 2023 · 4 comments

Comments

@milengg
Copy link

milengg commented Mar 2, 2023

I see that there is new API that allow detect force of the pen - touch.force. Is it possible to use such thing to receive more authentic sign?

@UziTech
Copy link
Collaborator

UziTech commented Mar 2, 2023

Pressure is already a property in the data

@UziTech
Copy link
Collaborator

UziTech commented Mar 11, 2023

Currently only the velocity is used to determine the stroke width but we could use the force if we can figure out a good algorithm.

private _strokeWidth(velocity: number, options: PointGroupOptions): number {
return Math.max(options.maxWidth / (velocity + 1), options.minWidth);
}

@BinoDino
Copy link

Hi,
is there any update on this issue?

@UziTech
Copy link
Collaborator

UziTech commented Aug 14, 2023

I don't think anyone has been working this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants