Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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;

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)

---



NPM URL

version

## 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)