diff options
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/data/collision.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/model/data/collision.ts b/src/model/data/collision.ts index 5008fa3..29d0879 100644 --- a/src/model/data/collision.ts +++ b/src/model/data/collision.ts @@ -1,6 +1,12 @@ -export interface CollisionPolygon { +export interface PolygonCollision { readonly type: 'polygon'; readonly vertices: Array<[number, number]>; } -export type Collision = CollisionPolygon; +export interface CircleCollision { + readonly type: 'circle'; + readonly center: [number, number]; + readonly radius: number; +} + +export type Collision = PolygonCollision | CircleCollision; |