mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
added polybool library
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
"gl-matrix": "^3.4.3",
|
||||
"lz-string": "^1.5.0",
|
||||
"monkey-around": "^2.3.0",
|
||||
"polybooljs": "^1.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"roughjs": "^4.5.2",
|
||||
|
||||
@@ -77,6 +77,7 @@ import { ROUNDNESS } from "src/constants";
|
||||
import { ClipboardData } from "@zsviczian/excalidraw/types/clipboard";
|
||||
import { emulateKeysForLinkClick, KeyEvent, PaneTarget } from "src/utils/ModifierkeyHelper";
|
||||
import { Mutable } from "@zsviczian/excalidraw/types/utility-types";
|
||||
import { Polybool } from "polybooljs";
|
||||
|
||||
extendPlugins([
|
||||
HarmonyPlugin,
|
||||
@@ -2261,6 +2262,16 @@ export class ExcalidrawAutomate {
|
||||
return CM(color);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the class Polybool from https://github.com/velipso/polybooljs
|
||||
* @returns
|
||||
*/
|
||||
getPolybool() {
|
||||
const defaultEpsilon = 0.0000000001;
|
||||
Polybool.epsilon(defaultEpsilon);
|
||||
return Polybool;
|
||||
}
|
||||
|
||||
importSVG(svgString:string):boolean {
|
||||
const res:ConversionResult = svgToExcalidraw(svgString);
|
||||
if(res.hasErrors) {
|
||||
|
||||
1
src/polybooljs.d.ts
vendored
Normal file
1
src/polybooljs.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module "polybooljs";
|
||||
Reference in New Issue
Block a user