-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
40 lines (35 loc) · 760 Bytes
/
types.ts
File metadata and controls
40 lines (35 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Vector3 } from 'three';
export interface Driver {
id: string;
name: string;
team: string;
color: string;
shortName: string;
}
export interface TyreStrategy {
compound: 'SOFT' | 'MEDIUM' | 'HARD' | 'INTER' | 'WET';
age: number;
condition: number; // 0-100%
}
export interface CarState {
driverId: string;
position: Vector3;
rotation: number; // Y-axis rotation (yaw) in radians
lap: number;
lapProgress: number; // 0 to 1
speed: number; // km/h
strategy: TyreStrategy;
nextPitWindow: string;
}
export interface RaceSession {
id: string;
name: string;
location: string;
totalLaps: number;
date: string;
}
export enum CameraMode {
TV_BROADCAST = 'TV_BROADCAST',
FOLLOW = 'FOLLOW',
MAP_2D = 'MAP_2D',
}