Adds pressure to pointer data
This commit is contained in:
parent
81141e7bb5
commit
72accc5f44
2 changed files with 8 additions and 8 deletions
|
@ -165,9 +165,9 @@ function renderPath(shape: DrawShape, style: ShapeStyles) {
|
|||
getSvgPathFromStroke(
|
||||
getStroke(shape.points, {
|
||||
size: 1 + +styles.strokeWidth * 2,
|
||||
thinning: 0.83,
|
||||
end: { taper: +styles.strokeWidth * 16 },
|
||||
start: { taper: +styles.strokeWidth * 16 },
|
||||
thinning: 0.85,
|
||||
end: { taper: +styles.strokeWidth * 20 },
|
||||
start: { taper: +styles.strokeWidth * 20 },
|
||||
})
|
||||
)
|
||||
)
|
||||
|
|
|
@ -61,8 +61,8 @@ class Inputs {
|
|||
const info = {
|
||||
target,
|
||||
pointerId: e.pointerId,
|
||||
origin: [e.clientX, e.clientY],
|
||||
point: [e.clientX, e.clientY],
|
||||
origin: [e.clientX, e.clientY, e.pressure],
|
||||
point: [e.clientX, e.clientY, e.pressure],
|
||||
shiftKey,
|
||||
ctrlKey,
|
||||
metaKey: isDarwin() ? metaKey : ctrlKey,
|
||||
|
@ -81,8 +81,8 @@ class Inputs {
|
|||
const info = {
|
||||
target,
|
||||
pointerId: e.pointerId,
|
||||
origin: [e.clientX, e.clientY],
|
||||
point: [e.clientX, e.clientY],
|
||||
origin: [e.clientX, e.clientY, e.pressure],
|
||||
point: [e.clientX, e.clientY, e.pressure],
|
||||
shiftKey,
|
||||
ctrlKey,
|
||||
metaKey: isDarwin() ? metaKey : ctrlKey,
|
||||
|
@ -100,7 +100,7 @@ class Inputs {
|
|||
const info = {
|
||||
...prev,
|
||||
pointerId: e.pointerId,
|
||||
point: [e.clientX, e.clientY],
|
||||
point: [e.clientX, e.clientY, e.pressure],
|
||||
shiftKey,
|
||||
ctrlKey,
|
||||
metaKey: isDarwin() ? metaKey : ctrlKey,
|
||||
|
|
Loading…
Reference in a new issue