stuyam / pressure

:point_down::boom: JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure.
https://pressurejs.com
MIT License
2.91k stars 98 forks source link

Can pressure be used on the canvas? #12

Closed stuyam closed 8 years ago

stuyam commented 8 years ago

Should / could support be added to use pressure with the canvas and canvas objects?

stuyam commented 8 years ago

Someone made the suggestion with this to add another closure that would be called on mouse or touch move. Maybe a "move" function. I guess I can see this being useful for the canvas, if you had something along the lines of:

Pressure.set('canvas', {
    move: function(force, event){
        // this would return the current force value whenever the mouse or touch move
    }
});
stuyam commented 8 years ago

Im pretty sure there is no way to connect pressure up to an "object" on the canvas, like a circle for example, I don't think I would have a way of getting just a force value on that circle.

stuyam commented 8 years ago

This will not be added in v0.0.4 but possibly in a future release

stuyam commented 8 years ago

As mentioned above you can attach Pressure to the canvas to handle force values. I'm gonna close this issue for now unless someone has some other needs on the canvas.