@erase2d/fabric 1.1.8 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/dist/_virtual/_rollupPluginBabelHelpers.js +351 -450
- package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/tsconfig.json +5 -2
- package/types/fabric.d.ts +2 -0
- package/types/index.d.ts +1 -0
- package/dist/core/dist/src/erase.js +0 -36
- package/dist/core/dist/src/erase.js.map +0 -1
- package/dist/fabric/src/ClippingGroup.js +0 -46
- package/dist/fabric/src/ClippingGroup.js.map +0 -1
- package/dist/fabric/src/EraserBrush.js +0 -433
- package/dist/fabric/src/EraserBrush.js.map +0 -1
- package/dist/fabric/src/ErasingEffect.js +0 -117
- package/dist/fabric/src/ErasingEffect.js.map +0 -1
- package/dist/fabric/src/isTransparent.js +0 -52
- package/dist/fabric/src/isTransparent.js.map +0 -1
- package/dist/src/ClippingGroup.d.ts +0 -8
- package/dist/src/ClippingGroup.d.ts.map +0 -1
- package/dist/src/EraserBrush.d.ts +0 -114
- package/dist/src/EraserBrush.d.ts.map +0 -1
- package/dist/src/ErasingEffect.d.ts +0 -27
- package/dist/src/ErasingEffect.d.ts.map +0 -1
- package/dist/src/isTransparent.d.ts +0 -7
- package/dist/src/isTransparent.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -24,10 +24,22 @@ object.clipPath instanceof ClippingGroup
|
|
|
24
24
|
: delete object.clipPath;
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
### Type Caveat
|
|
28
|
+
|
|
29
|
+
The `erasable` property is added by this module.
|
|
30
|
+
In case typescript fails to augment fabric, update your `tsconfig.ts`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
...
|
|
34
|
+
"compilerOptions": {
|
|
35
|
+
"types": ["node_modules/@erase2d/fabric/types"]
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
27
39
|
## Quick Start
|
|
28
40
|
|
|
29
41
|
```bash
|
|
30
|
-
npm i fabric
|
|
42
|
+
npm i fabric @erase2d/fabric --save
|
|
31
43
|
```
|
|
32
44
|
|
|
33
45
|
```typescript
|
|
@@ -61,6 +73,8 @@ canvas.freeDrawingBrush = eraser;
|
|
|
61
73
|
canvas.isDrawingMode = true;
|
|
62
74
|
```
|
|
63
75
|
|
|
76
|
+
Refer to the [example app](../app/pages/index.tsx) for in depth usage.
|
|
77
|
+
|
|
64
78
|
## Sponsors
|
|
65
79
|
|
|
66
80
|
<table>
|
|
@@ -78,15 +92,15 @@ canvas.isDrawingMode = true;
|
|
|
78
92
|
</a>
|
|
79
93
|
</td>
|
|
80
94
|
<td>
|
|
81
|
-
<b>RemBG
|
|
95
|
+
<b>RemBG Background Remover API</b>
|
|
82
96
|
<br />
|
|
83
97
|
<a
|
|
84
|
-
href="https://rembg.com/?utm_source=erase2d&utm_medium=github_readme&utm_campaign=sponsorship"
|
|
85
|
-
>https://rembg.com</a
|
|
98
|
+
href="https://www.rembg.com/?utm_source=erase2d&utm_medium=github_readme&utm_campaign=sponsorship"
|
|
99
|
+
>https://www.rembg.com</a
|
|
86
100
|
>
|
|
87
101
|
<br />
|
|
88
102
|
<p width="200px">
|
|
89
|
-
Accurate and affordable background remover API
|
|
103
|
+
Accurate and affordable background remover API - from 1,90$ per mo
|
|
90
104
|
<br />
|
|
91
105
|
</p>
|
|
92
106
|
</td>
|