summaryrefslogtreecommitdiffstats
path: root/src/renderer/runtime/model/data/collision.ts
blob: 29d08795849588fc744cf407718a94724977a105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export interface PolygonCollision {
	readonly type: 'polygon';
	readonly vertices: Array<[number, number]>;
}

export interface CircleCollision {
	readonly type: 'circle';
	readonly center: [number, number];
	readonly radius: number;
}

export type Collision = PolygonCollision | CircleCollision;