Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kid-1912/fabric-eraser-brush
fabric.js添加擦除画笔支持,来源于官方自定义构建(Erasing)作为npm包;fabric.js adds erasing brush support, sourced from the official custom build (Erasing) as an npm package;
https://github.com/kid-1912/fabric-eraser-brush
brush canvas eraser fabricjs
Last synced: about 1 month ago
JSON representation
fabric.js添加擦除画笔支持,来源于官方自定义构建(Erasing)作为npm包;fabric.js adds erasing brush support, sourced from the official custom build (Erasing) as an npm package;
- Host: GitHub
- URL: https://github.com/kid-1912/fabric-eraser-brush
- Owner: KID-1912
- Created: 2024-04-25T10:51:57.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-04-28T07:57:55.000Z (7 months ago)
- Last Synced: 2024-10-14T06:22:28.364Z (about 1 month ago)
- Topics: brush, canvas, eraser, fabricjs
- Language: JavaScript
- Homepage: http://fabricjs.com/erasing
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fabric-eraser-brush
fabric.js添加擦除画笔支持,来源于官方自定义构建(Erasing)作为npm包;
fabric.js adds erasing brush support, sourced from the official custom build (Erasing) as an npm package.
![](https://kid-1912.github.io/img/FabricJS.jpg)
---
## Install
```shell
npm install fabric-eraser-brush -S
```## Usage
```js
import { fabric } from "fabric";
import "fabric-eraser-brush";const canvas = new fabric.Canvas("canvas", {
isDrawingMode: true,
});
canvas.freeDrawingBrush = new fabric.EraserBrush(canvas);
canvas.freeDrawingBrush.width = 15; // optional
```more usage see [Erasing with Eraser Brush](http://fabricjs.com/erasing)