arch-inc / fabricjs-psbrush

Fabric.js用の感圧ブラシ実装 / A lightweight pressure-sensitive brush implementation for Fabric.js
https://arch-inc.github.io/fabricjs-psbrush/
Other
62 stars 24 forks source link

Support for Fabric 5.0 #48

Open marcohamersma opened 2 years ago

marcohamersma commented 2 years ago

Here's some fixes to support Fabric 5.0, based on some of the issues in #43.

It:

  1. moves fabric to a peerDependency
  2. allows v5 as a dependency version (I haven't done this before, so if there's a better way to do this feel free to fix)
  3. passes along context to setBrushStyles. This should not have any effect for people on Fabric v4

Additionally, I removed sharp as a dependency for two reasons:

  1. it seemed like it wasn't used directly.
  2. I ran into issues while running npm install while it was still in the dependencies.

I could not recreate the brush color issue I mentioned in #43. Not sure what was up.

Feel free to comment or make any changes