@zyzgroup/core-web 0.1.52 → 0.1.54
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/dist/zyzgroup_core_web.iife.js +19 -20
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +16639 -14264
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +19 -20
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/canvas/YZCanvas.d.ts +0 -23
- package/types/canvas/YZCanvas.d.ts.map +1 -1
- package/types/canvas/index.d.ts +0 -1
- package/types/canvas/index.d.ts.map +1 -1
- package/types/hooks/index.d.ts +20 -40
- package/types/hooks/index.d.ts.map +1 -1
- package/types/hooks/useActionChannel.d.ts +18 -0
- package/types/hooks/useActionChannel.d.ts.map +1 -0
- package/types/hooks/useAttribute.d.ts +2 -0
- package/types/hooks/useAttribute.d.ts.map +1 -1
- package/types/hooks/useCoords.d.ts +1 -1
- package/types/hooks/useCoords.d.ts.map +1 -1
- package/types/hooks/useDraw/Shape.d.ts +313 -0
- package/types/hooks/useDraw/Shape.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/CustomCanvasContext.d.ts +102 -0
- package/types/hooks/useDraw/canvas/CustomCanvasContext.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/YZCanvasContext.d.ts +84 -0
- package/types/hooks/useDraw/canvas/YZCanvasContext.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/index.d.ts +3 -0
- package/types/hooks/useDraw/canvas/index.d.ts.map +1 -0
- package/types/hooks/useDraw/index.d.ts +4 -0
- package/types/hooks/useDraw/index.d.ts.map +1 -0
- package/types/hooks/useDraw/line/Arc.d.ts +25 -0
- package/types/hooks/useDraw/line/Arc.d.ts.map +1 -0
- package/types/hooks/useDraw/line/CubicBezier.d.ts +62 -0
- package/types/hooks/useDraw/line/CubicBezier.d.ts.map +1 -0
- package/types/hooks/useDraw/line/L.d.ts +33 -0
- package/types/hooks/useDraw/line/L.d.ts.map +1 -0
- package/types/hooks/useDraw/line/PathD.d.ts +66 -0
- package/types/hooks/useDraw/line/PathD.d.ts.map +1 -0
- package/types/hooks/useDraw/line/QuadraticBezier.d.ts +30 -0
- package/types/hooks/useDraw/line/QuadraticBezier.d.ts.map +1 -0
- package/types/hooks/useDraw/line/index.d.ts +6 -0
- package/types/hooks/useDraw/line/index.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/ArrowShape.d.ts +11 -0
- package/types/hooks/useDraw/shapes/ArrowShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts +86 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/CrossShape.d.ts +7 -0
- package/types/hooks/useDraw/shapes/CrossShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/FoxShape.d.ts +11 -0
- package/types/hooks/useDraw/shapes/FoxShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/HeartShape.d.ts +15 -0
- package/types/hooks/useDraw/shapes/HeartShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts +15 -0
- package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts +27 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/RabbitShape.d.ts +9 -0
- package/types/hooks/useDraw/shapes/RabbitShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/RectShape.d.ts +31 -0
- package/types/hooks/useDraw/shapes/RectShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/SegmentShapeCombo.d.ts +23 -0
- package/types/hooks/useDraw/shapes/SegmentShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/ShipShapeCombo.d.ts +12 -0
- package/types/hooks/useDraw/shapes/ShipShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/SliderShapeCombo.d.ts +21 -0
- package/types/hooks/useDraw/shapes/SliderShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/StarShape.d.ts +13 -0
- package/types/hooks/useDraw/shapes/StarShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts +7 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/index.d.ts +15 -0
- package/types/hooks/useDraw/shapes/index.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/SVGParse.d.ts +16 -0
- package/types/hooks/useDraw/svg/SVGParse.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/SVGUtil.d.ts +17 -0
- package/types/hooks/useDraw/svg/SVGUtil.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/index.d.ts +4 -0
- package/types/hooks/useDraw/svg/index.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/line2c.d.ts +5 -0
- package/types/hooks/useDraw/svg/line2c.d.ts.map +1 -0
- package/types/hooks/useDraw/useDraw.d.ts +19 -0
- package/types/hooks/useDraw/useDraw.d.ts.map +1 -0
- package/types/hooks/useElement.d.ts +79 -38
- package/types/hooks/useElement.d.ts.map +1 -1
- package/types/hooks/useElementEventBus.d.ts +21 -1
- package/types/hooks/useElementEventBus.d.ts.map +1 -1
- package/types/hooks/useElementEvents.d.ts +226 -0
- package/types/hooks/useElementEvents.d.ts.map +1 -0
- package/types/hooks/useEventListener.d.ts +9 -4
- package/types/hooks/useEventListener.d.ts.map +1 -1
- package/types/hooks/useIntersection.d.ts +2 -0
- package/types/hooks/useIntersection.d.ts.map +1 -1
- package/types/hooks/useMatchMedia.d.ts +3 -0
- package/types/hooks/useMatchMedia.d.ts.map +1 -0
- package/types/hooks/useMessageChannel.d.ts +17 -0
- package/types/hooks/useMessageChannel.d.ts.map +1 -0
- package/types/hooks/useResize.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +1 -1
- package/types/hooks/useStyle.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +4 -3
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useVisible.d.ts +5 -9
- package/types/hooks/useVisible.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/math/BufferAttribute.d.ts +0 -15
- package/types/math/BufferAttribute.d.ts.map +1 -1
- package/types/math/index.d.ts +0 -4
- package/types/math/index.d.ts.map +1 -1
- package/types/math/line/PathD.d.ts.map +1 -1
- package/types/math/math.d.ts +0 -1
- package/types/math/math.d.ts.map +1 -1
- package/types/svg/YZSVG.d.ts +0 -34
- package/types/svg/YZSVG.d.ts.map +1 -1
- package/types/svg/index.d.ts +0 -1
- package/types/svg/index.d.ts.map +1 -1
- package/types/hooks/onDocumentReady.d.ts +0 -3
- package/types/hooks/onDocumentReady.d.ts.map +0 -1
- package/types/hooks/useClass.d.ts +0 -6
- package/types/hooks/useClass.d.ts.map +0 -1
- package/types/hooks/useClickA.d.ts +0 -2
- package/types/hooks/useClickA.d.ts.map +0 -1
- package/types/hooks/useClipboard.d.ts +0 -2
- package/types/hooks/useClipboard.d.ts.map +0 -1
- package/types/hooks/useDisplay.d.ts +0 -5
- package/types/hooks/useDisplay.d.ts.map +0 -1
- package/types/hooks/useDragDrop.d.ts +0 -12
- package/types/hooks/useDragDrop.d.ts.map +0 -1
- package/types/hooks/useFireEvent.d.ts +0 -7
- package/types/hooks/useFireEvent.d.ts.map +0 -1
- package/types/hooks/useHotKey.d.ts +0 -33
- package/types/hooks/useHotKey.d.ts.map +0 -1
- package/types/hooks/useHotKeyFile.d.ts +0 -8
- package/types/hooks/useHotKeyFile.d.ts.map +0 -1
- package/types/hooks/useIframe.d.ts +0 -2
- package/types/hooks/useIframe.d.ts.map +0 -1
- package/types/hooks/useLoadImage.d.ts +0 -9
- package/types/hooks/useLoadImage.d.ts.map +0 -1
- package/types/hooks/useLoadLink.d.ts +0 -3
- package/types/hooks/useLoadLink.d.ts.map +0 -1
- package/types/hooks/useLoadScript.d.ts +0 -2
- package/types/hooks/useLoadScript.d.ts.map +0 -1
- package/types/hooks/useMedia.d.ts +0 -4
- package/types/hooks/useMedia.d.ts.map +0 -1
- package/types/hooks/useMouse.d.ts +0 -32
- package/types/hooks/useMouse.d.ts.map +0 -1
- package/types/hooks/useObjectURL.d.ts +0 -3
- package/types/hooks/useObjectURL.d.ts.map +0 -1
- package/types/hooks/usePressDownMove.d.ts +0 -13
- package/types/hooks/usePressDownMove.d.ts.map +0 -1
- package/types/hooks/usePull.d.ts +0 -4
- package/types/hooks/usePull.d.ts.map +0 -1
- package/types/hooks/useRunInSandbox.d.ts +0 -2
- package/types/hooks/useRunInSandbox.d.ts.map +0 -1
- package/types/hooks/useScroll.d.ts +0 -4
- package/types/hooks/useScroll.d.ts.map +0 -1
- package/types/hooks/useSelectFile.d.ts +0 -18
- package/types/hooks/useSelectFile.d.ts.map +0 -1
- package/types/hooks/useVibrate.d.ts +0 -2
- package/types/hooks/useVibrate.d.ts.map +0 -1
- package/types/hooks/useWindow.d.ts +0 -5
- package/types/hooks/useWindow.d.ts.map +0 -1
- package/types/position.d.ts +0 -65
- package/types/position.d.ts.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { CustomCanvasContext, CustomCanvasGradient } from "./CustomCanvasContext";
|
|
2
|
+
export declare class YZCanvasContext {
|
|
3
|
+
canvas: HTMLCanvasElement;
|
|
4
|
+
context: CanvasRenderingContext2D;
|
|
5
|
+
customContext?: CustomCanvasContext;
|
|
6
|
+
currentPath2D: Path2D;
|
|
7
|
+
path2Ds: Path2D[];
|
|
8
|
+
currentMatrix: DOMMatrix;
|
|
9
|
+
hasSetCustomStrokeStyle: boolean;
|
|
10
|
+
hasSetCustomFillStyle: boolean;
|
|
11
|
+
constructor(canvas: HTMLCanvasElement, width?: number, height?: number, enableCustomContext?: boolean);
|
|
12
|
+
set lineWidth(lineWidth: number);
|
|
13
|
+
get lineWidth(): number;
|
|
14
|
+
set lineCap(lineCap: CanvasLineCap);
|
|
15
|
+
get lineCap(): CanvasLineCap;
|
|
16
|
+
set lineJoin(lineJoin: CanvasLineJoin);
|
|
17
|
+
get lineJoin(): CanvasLineJoin;
|
|
18
|
+
set lineDashOffset(lineDashOffset: number);
|
|
19
|
+
get lineDashOffset(): number;
|
|
20
|
+
set miterLimit(miterLimit: number);
|
|
21
|
+
get miterLimit(): number;
|
|
22
|
+
set globalAlpha(alpha: number);
|
|
23
|
+
get globalAlpha(): number;
|
|
24
|
+
set fillStyle(style: string | CanvasGradient | CanvasPattern | {
|
|
25
|
+
gradient: CanvasGradient;
|
|
26
|
+
gradientCustom: CustomCanvasGradient;
|
|
27
|
+
});
|
|
28
|
+
get fillStyle(): string | CanvasGradient | CanvasPattern;
|
|
29
|
+
set strokeStyle(style: string | CanvasGradient | CanvasPattern | {
|
|
30
|
+
gradient: CanvasGradient;
|
|
31
|
+
gradientCustom: CustomCanvasGradient;
|
|
32
|
+
});
|
|
33
|
+
get strokeStyle(): string | CanvasGradient | CanvasPattern;
|
|
34
|
+
set font(font: string);
|
|
35
|
+
get font(): string;
|
|
36
|
+
set textBaseline(textBaseline: CanvasTextBaseline);
|
|
37
|
+
get textBaseline(): CanvasTextBaseline;
|
|
38
|
+
set textAlign(textAlign: CanvasTextAlign);
|
|
39
|
+
get textAlign(): CanvasTextAlign;
|
|
40
|
+
fill(path?: Path2D): this;
|
|
41
|
+
fillRect(x: number, y: number, w: number, h: number): this;
|
|
42
|
+
fillText(text: string, x: number, y: number, maxWidth?: number | undefined): this;
|
|
43
|
+
setLineDash(dashArray: number[]): this;
|
|
44
|
+
stroke(path?: Path2D): this;
|
|
45
|
+
strokeText(text: string, x: number, y: number, maxWidth?: number | undefined): this;
|
|
46
|
+
strokeRect(x: number, y: number, w: number, h: number): this;
|
|
47
|
+
measureText(text: string): TextMetrics;
|
|
48
|
+
clearRect(x?: number, y?: number, w?: number, h?: number): this;
|
|
49
|
+
save(): this;
|
|
50
|
+
restore(): this;
|
|
51
|
+
beginPath(): this;
|
|
52
|
+
closePath(): this;
|
|
53
|
+
changePath2D(path?: Path2D, transform?: DOMMatrix): void;
|
|
54
|
+
isPointInStroke(path: Path2D, x: number, y: number): boolean;
|
|
55
|
+
isPointInStroke(x: number, y: number): boolean;
|
|
56
|
+
isPointInPath(path: Path2D, x: number, y: number): boolean;
|
|
57
|
+
isPointInPath(x: number, y: number): boolean;
|
|
58
|
+
translate(x: number, y: number): this;
|
|
59
|
+
rotate(radian: number, centerX?: number, centerY?: number): this;
|
|
60
|
+
scale(x: number, y?: number, centerX?: number, centerY?: number): this;
|
|
61
|
+
moveTo(x: number, y: number): this;
|
|
62
|
+
lineTo(x: number, y: number): this;
|
|
63
|
+
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterClockwise?: boolean): this;
|
|
64
|
+
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;
|
|
65
|
+
ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterClockwise?: boolean): this;
|
|
66
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;
|
|
67
|
+
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;
|
|
68
|
+
rect(x: number, y: number, w: number, h: number): this;
|
|
69
|
+
createLinearGradient(x1: number, y1: number, x2: number, y2: number, colorStops?: Record<number, string>): CanvasGradient;
|
|
70
|
+
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number, colorStops?: Record<number, string>): CanvasGradient;
|
|
71
|
+
drawImage(element: HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas, ...args: number[]): this;
|
|
72
|
+
getImageData(sx?: number, sy?: number, sw?: number, sh?: number, settings?: ImageDataSettings | undefined): ImageData;
|
|
73
|
+
putImageData(imageData: ImageData, dx?: number, dy?: number): void;
|
|
74
|
+
createPattern(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas, repetition: "repeat" | "repeat-x" | "repeat-y" | "no-repeat" | null): CanvasPattern | null;
|
|
75
|
+
toRawSVG(): {
|
|
76
|
+
raw: string;
|
|
77
|
+
element: SVGElement;
|
|
78
|
+
} | {
|
|
79
|
+
raw: string;
|
|
80
|
+
element: null;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export default YZCanvasContext;
|
|
84
|
+
//# sourceMappingURL=YZCanvasContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YZCanvasContext.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/canvas/YZCanvasContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAgD/B,qBAAa,eAAe;IAC1B,MAAM,EAAE,iBAAiB,CAAC;IAE1B,OAAO,EAAE,wBAAwB,CAAC;IAMlC,aAAa,CAAC,EAAE,mBAAmB,CAAC;IAGpC,aAAa,EAAE,MAAM,CAAgB;IACrC,OAAO,EAAE,MAAM,EAAE,CAAM;IAGvB,aAAa,EAAE,SAAS,CAAmB;IAK3C,uBAAuB,UAAS;IAChC,qBAAqB,UAAS;gBAG5B,MAAM,EAAE,iBAAiB,EACzB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,mBAAmB,UAAQ;IAe7B,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,EAI9B;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,aAAa,EAIjC;IAED,IAAI,OAAO,IAAI,aAAa,CAE3B;IAED,IAAI,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAIpC;IAED,IAAI,QAAQ,IAAI,cAAc,CAE7B;IAED,IAAI,cAAc,C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,SAAS,CACP,OAAO,EACH,qBAAqB,GACrB,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,eAAe,EACnB,GAAG,IAAI,EAAE,MAAM,EAAE;IAiCnB,YAAY,CACV,EAAE,SAAI,EACN,EAAE,SAAI,EACN,EAAE,SAAoB,EACtB,EAAE,SAAqB,EACvB,QAAQ,CAAC,EAAE,iBAAiB,GAAG,SAAS,GACvC,SAAS;IAKZ,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,SAAI,EAAE,EAAE,SAAI;IAKjD,aAAa,CACX,KAAK,EACD,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,eAAe,EACnB,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,IAAI,GAClE,aAAa,GAAG,IAAI;IAKvB,QAAQ;;;;;;;CAST;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/canvas/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDraw/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { YZCanvasContext } from "../canvas";
|
|
2
|
+
import { type SVGParsedPathData } from "../svg";
|
|
3
|
+
import { L, LOptions } from "./L";
|
|
4
|
+
export type ArcOptions = {
|
|
5
|
+
rx: number;
|
|
6
|
+
ry: number;
|
|
7
|
+
xAxisRotate?: number;
|
|
8
|
+
largeArcFlag?: number;
|
|
9
|
+
sweepFlag?: number;
|
|
10
|
+
toX: number;
|
|
11
|
+
toY: number;
|
|
12
|
+
} & LOptions;
|
|
13
|
+
export declare class Arc extends L {
|
|
14
|
+
rx: number;
|
|
15
|
+
ry: number;
|
|
16
|
+
xAxisRotate: number;
|
|
17
|
+
largeArcFlag: number;
|
|
18
|
+
sweepFlag: number;
|
|
19
|
+
constructor(options: ArcOptions);
|
|
20
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
21
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
22
|
+
private convert;
|
|
23
|
+
}
|
|
24
|
+
export default Arc;
|
|
25
|
+
//# sourceMappingURL=Arc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arc.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/line/Arc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,QAAQ,CAAC;AAEb,qBAAa,GAAI,SAAQ,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,UAAU;IAexB,aAAa,IAAI,iBAAiB,EAAE;IAepC,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IA0BlD,OAAO,CAAC,OAAO;CA2DhB;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { YZCanvasContext } from "../canvas";
|
|
2
|
+
import { type SVGParsedPathData } from "../svg";
|
|
3
|
+
import { L, LOptions } from "./L";
|
|
4
|
+
export type CubicBezierOptions = {
|
|
5
|
+
c1x: number;
|
|
6
|
+
c1y: number;
|
|
7
|
+
c2x: number;
|
|
8
|
+
c2y: number;
|
|
9
|
+
toX?: number;
|
|
10
|
+
toY?: number;
|
|
11
|
+
} & LOptions;
|
|
12
|
+
export declare class CubicBezier extends L {
|
|
13
|
+
c1x: number;
|
|
14
|
+
c1y: number;
|
|
15
|
+
c2x: number;
|
|
16
|
+
c2y: number;
|
|
17
|
+
constructor(options: CubicBezierOptions);
|
|
18
|
+
clone(): CubicBezier;
|
|
19
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
20
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
21
|
+
getBoundingClientRect(): {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
dots: {
|
|
27
|
+
X: number;
|
|
28
|
+
Y: number;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
31
|
+
interpolate(t: number): {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
static base3(t: number, p1: number, p2: number, p3: number, p4: number): number;
|
|
36
|
+
static bezlen(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, x4: number, y4: number, z?: number): number;
|
|
37
|
+
length(z?: number): number;
|
|
38
|
+
getTatLen(length: number): number;
|
|
39
|
+
getPointAtSegmentLength(length: number): {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
m: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
};
|
|
46
|
+
n: {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
};
|
|
50
|
+
start: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
};
|
|
54
|
+
end: {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
};
|
|
58
|
+
alpha: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export default CubicBezier;
|
|
62
|
+
//# sourceMappingURL=CubicBezier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubicBezier.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/line/CubicBezier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAElC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,QAAQ,CAAC;AAEb,qBAAa,WAAY,SAAQ,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;gBAEP,OAAO,EAAE,kBAAkB;IAQhC,KAAK,IAAI,WAAW;IAepB,aAAa,IAAI,iBAAiB,EAAE;IAIpC,eAAe,CAAC,GAAG,EAAE,eAAe;IAWpC,qBAAqB;;;;;;;;;;IA6IrB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAevD,MAAM,CAAC,KAAK,CACV,CAAC,EAAE,MAAM,EACT,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,MAAM;IAWT,MAAM,CAAC,MAAM,CACX,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,CAAC,SAAI,GACJ,MAAM;IAuBF,MAAM,CAAC,CAAC,SAAI,GAAG,MAAM;IAerB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IA4BjC,uBAAuB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;CA6D9C;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { YZCanvasContext } from "../canvas";
|
|
2
|
+
import { type SVGParsedPathData } from "../svg";
|
|
3
|
+
export type LOptions = {
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
toX?: number;
|
|
7
|
+
toY?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare class L {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
toX: number;
|
|
13
|
+
toY: number;
|
|
14
|
+
constructor(options?: LOptions);
|
|
15
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
16
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
17
|
+
getBoundingClientRect(): {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
interpolate(t: number): {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
intersection(line: L): {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
} | null;
|
|
31
|
+
}
|
|
32
|
+
export default L;
|
|
33
|
+
//# sourceMappingURL=L.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"L.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/line/L.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAGhD,MAAM,MAAM,QAAQ,GAAG;IACrB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,qBAAa,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;gBAEA,OAAO,CAAC,EAAE,QAAQ;IAQvB,aAAa,IAAI,iBAAiB,EAAE;IAKpC,eAAe,CAAC,GAAG,EAAE,eAAe;IAIpC,qBAAqB;;;;;;IA8BrB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAOhD,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CA0B9D;AAED,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { YZCanvasContext } from "../canvas";
|
|
2
|
+
import { type SVGParsedPathData } from "../svg";
|
|
3
|
+
import L from "./L";
|
|
4
|
+
import CubicBezier from "./CubicBezier";
|
|
5
|
+
export declare class PathD {
|
|
6
|
+
startPathX: number;
|
|
7
|
+
startPathY: number;
|
|
8
|
+
prevPathX: number;
|
|
9
|
+
prevPathY: number;
|
|
10
|
+
normalizedLines: CubicBezier[];
|
|
11
|
+
constructor(d?: string | SVGParsedPathData[]);
|
|
12
|
+
private _appendLine;
|
|
13
|
+
static fromPolymorphPoints(points: number[]): PathD;
|
|
14
|
+
static fromLines(lines: L[]): PathD;
|
|
15
|
+
clone(): PathD;
|
|
16
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
17
|
+
toSVGPathD(): string;
|
|
18
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
19
|
+
getBoundingClientRect(dot?: number): {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
center: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
center?: undefined;
|
|
34
|
+
};
|
|
35
|
+
getBoundingClientRectCenter(dot?: number): {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
};
|
|
39
|
+
transform(x: number, y: number, centerX: number, centerY: number, degree: number, scaleX: number, scaleY: number): PathD;
|
|
40
|
+
getTotalLength(): number;
|
|
41
|
+
getPointAtLength(length: number): {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
alpha: number;
|
|
45
|
+
};
|
|
46
|
+
interpolate(t: number): {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
};
|
|
50
|
+
getSubPathD(fromLength: number, toLength: number): PathD;
|
|
51
|
+
private getSubPathDAtLength;
|
|
52
|
+
closestPoint(pointX: number, pointY: number): {
|
|
53
|
+
point: {
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
};
|
|
57
|
+
rotation: number;
|
|
58
|
+
distance: number;
|
|
59
|
+
};
|
|
60
|
+
getPolymorphPoints(): number[];
|
|
61
|
+
getPolymorphPointsPerimeter(): number;
|
|
62
|
+
getExpendedPolymorphPointsPathD(expendedPolymorphPoints: number): PathD;
|
|
63
|
+
static getInterpolator(left: PathD, right: PathD): (t: number) => PathD;
|
|
64
|
+
}
|
|
65
|
+
export default PathD;
|
|
66
|
+
//# sourceMappingURL=PathD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PathD.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/line/PathD.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAKL,KAAK,iBAAiB,EAIvB,MAAM,QAAQ,CAAC;AAChB,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,WAAW,MAAM,eAAe,CAAC;AAKxC,qBAAa,KAAK;IAET,UAAU,SAAK;IACf,UAAU,SAAK;IACf,SAAS,SAAK;IACd,SAAS,SAAK;IAEd,eAAe,EAAE,WAAW,EAAE,CAAM;gBAI/B,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB,EAAE;IA+B5C,OAAO,CAAC,WAAW;WAyEL,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK;WAmB5C,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,KAAK;IAUnC,KAAK,IAAI,KAAK;IAKd,aAAa,IAAI,iBAAiB,EAAE;IAUpC,UAAU,IAAI,MAAM;IAIpB,eAAe,CAAC,GAAG,EAAE,eAAe;IAUpC,qBAAqB,CAAC,GAAG,SAAI;;;;;;;;;;;;;;;;IAwB7B,2BAA2B,CAAC,GAAG,SAAI;;;;IASnC,SAAS,CACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,KAAK;IA+BD,cAAc,IAAI,MAAM;IAMxB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG;QACvC,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;KACf;IAkBM,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAwBhD,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK;IAS/D,OAAO,CAAC,mBAAmB;IAsDpB,YAAY,CACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb;QACD,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;QACF,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB;IAiEM,kBAAkB,IAAI,MAAM,EAAE;IAS9B,2BAA2B,IAAI,MAAM;IAerC,+BAA+B,CACpC,uBAAuB,EAAE,MAAM,GAC9B,KAAK;WA2BM,eAAe,CAC3B,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,KAAK,GACX,CACD,CAAC,EAAE,MAAM,KACN,KAAK;CAaX;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { YZCanvasContext } from "../canvas";
|
|
2
|
+
import { type SVGParsedPathData } from "../svg";
|
|
3
|
+
import { L, LOptions } from "./L";
|
|
4
|
+
export type QuadraticBezierOptions = {
|
|
5
|
+
cx: number;
|
|
6
|
+
cy: number;
|
|
7
|
+
toX?: number;
|
|
8
|
+
toY?: number;
|
|
9
|
+
isLineThrough?: boolean;
|
|
10
|
+
} & LOptions;
|
|
11
|
+
export declare class QuadraticBezier extends L {
|
|
12
|
+
cx: number;
|
|
13
|
+
cy: number;
|
|
14
|
+
isLineThrough: boolean;
|
|
15
|
+
constructor(options: QuadraticBezierOptions);
|
|
16
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
17
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
18
|
+
getBoundingClientRect(): {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
interpolate(t: number): {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export default QuadraticBezier;
|
|
30
|
+
//# sourceMappingURL=QuadraticBezier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuadraticBezier.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/line/QuadraticBezier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAElC,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,GAAG,QAAQ,CAAC;AAEb,qBAAa,eAAgB,SAAQ,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,OAAO,CAAC;gBAElB,OAAO,EAAE,sBAAsB;IAUpC,aAAa,IAAI,iBAAiB,EAAE;IAUpC,eAAe,CAAC,GAAG,EAAE,eAAe;IAUpC,qBAAqB;;;;;;IA6BrB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;CAYxD;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/line/index.ts"],"names":[],"mappings":"AAAA,cAAc,KAAK,CAAC;AACpB,cAAc,OAAO,CAAC;AACtB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
import { YZCanvasContext } from "../canvas";
|
|
4
|
+
export declare class ArrowShape extends Shape {
|
|
5
|
+
constructor(options?: ShapeOptions);
|
|
6
|
+
protected cloneShape(): ArrowShape;
|
|
7
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
8
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
9
|
+
}
|
|
10
|
+
export default ArrowShape;
|
|
11
|
+
//# sourceMappingURL=ArrowShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/ArrowShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,YAAY;IAIlC,SAAS,CAAC,UAAU,IAAI,UAAU;IAO3B,aAAa,IAAI,iBAAiB,EAAE;IAcpC,eAAe,CAAC,GAAG,EAAE,eAAe;CAY5C;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
import { YZCanvasContext } from "../canvas";
|
|
4
|
+
export type BallShapeOptions = {
|
|
5
|
+
ballRadius?: number;
|
|
6
|
+
} & ShapeOptions;
|
|
7
|
+
export declare class BallShape extends Shape {
|
|
8
|
+
radius: number;
|
|
9
|
+
constructor(options?: BallShapeOptions);
|
|
10
|
+
protected cloneShape(): BallShape;
|
|
11
|
+
getBoundingClientRect(): {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
18
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
19
|
+
eq(ball: BallShape): boolean;
|
|
20
|
+
midPointBtw(ball: BallShape): {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
length(): number;
|
|
25
|
+
scalar(scale: number): this;
|
|
26
|
+
normalize(len?: number): BallShape;
|
|
27
|
+
clamp(len: number): this;
|
|
28
|
+
cross(pt: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}): {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
multiply(pt: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
}): {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
};
|
|
42
|
+
div(pt: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
}): {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
};
|
|
49
|
+
add(pt: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
}): {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
};
|
|
56
|
+
sub(pt: {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
}): {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
};
|
|
63
|
+
dot(pt: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
}): number;
|
|
67
|
+
reflect(pt: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
}): {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
checkCollision(target: BallShape): void;
|
|
75
|
+
checkWall(options: {
|
|
76
|
+
wall: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
width: number;
|
|
80
|
+
height: number;
|
|
81
|
+
};
|
|
82
|
+
bounce?: number;
|
|
83
|
+
}): void;
|
|
84
|
+
}
|
|
85
|
+
export default BallShape;
|
|
86
|
+
//# sourceMappingURL=BallShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BallShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/BallShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,YAAY,CAAC;AAEjB,qBAAa,SAAU,SAAQ,KAAK;IAC3B,MAAM,EAAE,MAAM,CAAC;gBAEV,OAAO,CAAC,EAAE,gBAAgB;IAKtC,SAAS,CAAC,UAAU,IAAI,SAAS;IAQ1B,qBAAqB;;;;;;IASrB,aAAa,IAAI,iBAAiB,EAAE;IAapC,eAAe,CAAC,GAAG,EAAE,eAAe;IAMpC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAS5B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.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/CrossShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI/C,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,YAAY;IAKlC,SAAS,CAAC,UAAU,IAAI,UAAU;CAMnC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
import { YZCanvasContext } from "../canvas";
|
|
4
|
+
export declare class FoxShape extends Shape {
|
|
5
|
+
constructor(options?: ShapeOptions);
|
|
6
|
+
protected cloneShape(): FoxShape;
|
|
7
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
8
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
9
|
+
}
|
|
10
|
+
export default FoxShape;
|
|
11
|
+
//# sourceMappingURL=FoxShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FoxShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/FoxShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,CAAC,EAAE,YAAY;IAIlC,SAAS,CAAC,UAAU,IAAI,QAAQ;IAOzB,aAAa,IAAI,iBAAiB,EAAE;IAkBpC,eAAe,CAAC,GAAG,EAAE,eAAe;CAgB5C;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
export type HeartShapeOptions = {
|
|
4
|
+
heartRx?: number;
|
|
5
|
+
heartRy?: number;
|
|
6
|
+
} & ShapeOptions;
|
|
7
|
+
export declare class HeartShape extends Shape {
|
|
8
|
+
rx: number;
|
|
9
|
+
ry: number;
|
|
10
|
+
constructor(options?: HeartShapeOptions);
|
|
11
|
+
protected cloneShape(): HeartShape;
|
|
12
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
13
|
+
}
|
|
14
|
+
export default HeartShape;
|
|
15
|
+
//# sourceMappingURL=HeartShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeartShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/HeartShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAG3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,YAAY,CAAC;AAEjB,qBAAa,UAAW,SAAQ,KAAK;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;gBAEC,OAAO,CAAC,EAAE,iBAAiB;IAMvC,SAAS,CAAC,UAAU,IAAI,UAAU;IAS3B,aAAa,IAAI,iBAAiB,EAAE;CAc5C;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
export type HeartVariantShapeOptions = {
|
|
4
|
+
heartRx?: number;
|
|
5
|
+
heartRy?: number;
|
|
6
|
+
} & ShapeOptions;
|
|
7
|
+
export declare class HeartVariantShape extends Shape {
|
|
8
|
+
rx: number;
|
|
9
|
+
ry: number;
|
|
10
|
+
constructor(options?: HeartVariantShapeOptions);
|
|
11
|
+
protected cloneShape(): HeartVariantShape;
|
|
12
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
13
|
+
}
|
|
14
|
+
export default HeartVariantShape;
|
|
15
|
+
//# sourceMappingURL=HeartVariantShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeartVariantShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/HeartVariantShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAG3C,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,YAAY,CAAC;AAEjB,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;gBAEC,OAAO,CAAC,EAAE,wBAAwB;IAM9C,SAAS,CAAC,UAAU,IAAI,iBAAiB;IASlC,aAAa,IAAI,iBAAiB,EAAE;CA8B5C;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
import { YZCanvasContext } from "../canvas";
|
|
4
|
+
export type LineShapeOptions = {
|
|
5
|
+
lineLength?: number;
|
|
6
|
+
lineDegree?: number;
|
|
7
|
+
lineDx?: number;
|
|
8
|
+
lineDy?: number;
|
|
9
|
+
} & ShapeOptions;
|
|
10
|
+
export declare class LineShape extends Shape {
|
|
11
|
+
dx: number;
|
|
12
|
+
dy: number;
|
|
13
|
+
constructor(options?: LineShapeOptions);
|
|
14
|
+
protected cloneShape(): LineShape;
|
|
15
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
16
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
17
|
+
lineToAbsolutePoint(point: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}): void;
|
|
21
|
+
intersection(line: LineShape): {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
} | null;
|
|
25
|
+
}
|
|
26
|
+
export default LineShape;
|
|
27
|
+
//# sourceMappingURL=LineShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/LineShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,YAAY,CAAC;AAEjB,qBAAa,SAAU,SAAQ,KAAK;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;gBAEN,OAAO,CAAC,EAAE,gBAAgB;IAetC,SAAS,CAAC,UAAU,IAAI,SAAS;IAS1B,aAAa,IAAI,iBAAiB,EAAE;IAOpC,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAO3C,mBAAmB,CAAC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAMnD,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CA2BtE;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
export declare class RabbitShape extends Shape {
|
|
4
|
+
constructor(options?: ShapeOptions);
|
|
5
|
+
protected cloneShape(): RabbitShape;
|
|
6
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
7
|
+
}
|
|
8
|
+
export default RabbitShape;
|
|
9
|
+
//# sourceMappingURL=RabbitShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RabbitShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/RabbitShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAG3C,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,CAAC,EAAE,YAAY;IAIlC,SAAS,CAAC,UAAU,IAAI,WAAW;IAO5B,aAAa,IAAI,iBAAiB,EAAE;CAW5C;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
import { YZCanvasContext } from "../canvas";
|
|
4
|
+
export type RectShapeOptions = {
|
|
5
|
+
rectWidth: number;
|
|
6
|
+
rectHeight: number;
|
|
7
|
+
rectBorderRadius?: number;
|
|
8
|
+
} & ShapeOptions;
|
|
9
|
+
export declare class RectShape extends Shape {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
borderRadius: number;
|
|
13
|
+
constructor(options: RectShapeOptions);
|
|
14
|
+
protected cloneShape(): RectShape;
|
|
15
|
+
static fromCubicBezier(p1x: number, p1y: number, c1x: number, c1y: number, c2x: number, c2y: number, p2x: number, p2y: number): RectShape;
|
|
16
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
17
|
+
toCanvasContext(ctx: YZCanvasContext): void;
|
|
18
|
+
eq(rect: RectShape): boolean;
|
|
19
|
+
isIntersectRect(rect: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
}): boolean;
|
|
25
|
+
isContainPoint(p: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}): boolean;
|
|
29
|
+
}
|
|
30
|
+
export default RectShape;
|
|
31
|
+
//# sourceMappingURL=RectShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RectShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/RectShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,YAAY,CAAC;AAEjB,qBAAa,SAAU,SAAQ,KAAK;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,EAAE,MAAM,CAAC;gBAET,OAAO,EAAE,gBAAgB;IAOrC,SAAS,CAAC,UAAU,IAAI,SAAS;IAUjC,MAAM,CAAC,eAAe,CACpB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,G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