mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add cubic bezier curve visual debug
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
77ea537c69
commit
028c397c0a
4 changed files with 85 additions and 8 deletions
|
@ -132,9 +132,11 @@ export type Extent = {
|
|||
_brand: "excalimath_extent";
|
||||
};
|
||||
|
||||
// an ellipse is specified by its center, angle, and its major and minor axes
|
||||
// but for the sake of simplicity, we've used halfWidth and halfHeight instead
|
||||
// in replace of semi major and semi minor axes
|
||||
/**
|
||||
An ellipse is specified by its center, angle, and its major and minor axes
|
||||
but for the sake of simplicity, we've used halfWidth and halfHeight instead
|
||||
in replace of semi major and semi minor axes
|
||||
*/
|
||||
export type Ellipse<Point extends GenericPoint> = {
|
||||
center: Point;
|
||||
halfWidth: number;
|
||||
|
@ -142,3 +144,14 @@ export type Ellipse<Point extends GenericPoint> = {
|
|||
} & {
|
||||
_brand: "excalimath_ellipse";
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents a cubic bezier with 2 control points on the point space of your
|
||||
* choosing.
|
||||
*/
|
||||
export type CubicBezier<P extends GenericPoint> = {
|
||||
start: P;
|
||||
end: P;
|
||||
control1: P;
|
||||
control2: P;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue