-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.ts
42 lines (34 loc) · 805 Bytes
/
types.ts
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
41
42
import * as THREE from 'three'
export type FaceName = 'U' | 'D' | 'L' | 'R' | 'F' | 'B' | 'M' | 'E' | 'S'
export type SliceName = 'M' | 'S' | 'E'
export type ControlName =
| 'front'
| 'down'
| 'right'
| 'back'
| 'up'
| 'left'
| 'middle'
| 'standing'
| 'equatorial'
export interface PegatineTextures {
red: THREE.Texture
orange: THREE.Texture
blue: THREE.Texture
green: THREE.Texture
white: THREE.Texture
yellow: THREE.Texture
}
export type PegatineColor = keyof PegatineTextures
export interface Move<T = FaceName> {
faceName: T
inversed: boolean
}
export type User = {
[key: string]: any
}
export interface ApiClient {
logIn(email: string, password: string): Promise<void>
logOut(): Promise<void>
onAuth(callback: (u: User | null) => void): () => void
}