feat: add core domain model foundations

This commit is contained in:
syntaxbullet
2026-07-02 23:11:14 +02:00
parent 5f767a6688
commit 02df52c978
14 changed files with 133 additions and 1 deletions

32
core/geometry.ts Normal file
View File

@@ -0,0 +1,32 @@
export type Vec2D = {
x: number;
y: number;
};
export type Size = {
w: number;
h: number;
};
export type Rect = Vec2D & Size;
export type Bounds = Rect;
export type Angle = number;
export type Transform = {
position: Vec2D;
scale: Vec2D;
rotation: Angle;
};
export type Mat2D = {
a: number;
b: number;
c: number;
d: number;
tx: number;
ty: number;
};
export type CoordinateSpace = "document" | "artboard" | "viewport" | "layer";