av01d / fabric-brushes

A collection of brushes for fabric.js
MIT License
43 stars 13 forks source link

Simple brush #6

Closed frankrousseau closed 1 year ago

frankrousseau commented 1 year ago

Hello,

Thank you for this beautiful library for Fabric. It seems that your brushes handle the pen pressure. Is it possible to have a simple brush (like the default one) in your library. It would give access to the pressure to the default brush.

If there is a simple way to add it to the code, I would be glad to contribute.

av01d commented 1 year ago

@frankrousseau I don't do anything with pen pressure. Some brushes get thicker when you don't move while keeping the mouse pressed... which might seem like pen pressure, but it is not. I don't know what you imagine by a "pressured" default brush?

frankrousseau commented 1 year ago

I mean something that feels more like a drawing. Something like you can see in this video: https://dist.syncsketch.com/assets/annotations.c14c02c.mp4

When you see writings, they were probably done with a pen pressure mode on a simple brush (probably not with done with Fabric).

av01d commented 1 year ago

This (your video) is definitely not Fabric. I don't know of any pen pressure sensitive brushes for Fabric, this library certainly doesn't have any. Sorry!

frankrousseau commented 1 year ago

There was an attempt there: https://github.com/arch-inc/fabricjs-psbrush/

But I didn't manage to make it work.