Skip to content

fabric.js添加擦除画笔支持,来源于官方自定义构建(Erasing)作为npm包;fabric.js adds erasing brush support, sourced from the official custom build (Erasing) as an npm package;

Notifications You must be signed in to change notification settings

KID-1912/fabric-eraser-brush

Repository files navigation

fabric-eraser-brush

fabric.js添加擦除画笔支持,来源于官方自定义构建(Erasing)作为npm包; fabric.js adds erasing brush support, sourced from the official custom build (Erasing) as an npm package.



NPM URL version

Install

npm install fabric-eraser-brush -S

Usage

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

About

fabric.js添加擦除画笔支持,来源于官方自定义构建(Erasing)作为npm包;fabric.js adds erasing brush support, sourced from the official custom build (Erasing) as an npm package;

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published