forked from JeremyHeleine/Photo-Sphere-Viewer
-
-
Notifications
You must be signed in to change notification settings - Fork 634
/
model.ts
73 lines (65 loc) · 1.59 KB
/
model.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
export type CubemapFaces = 'left' | 'front' | 'right' | 'back' | 'top' | 'bottom';
/**
* Object defining a cubemap as separated files
*/
export type Cubemap = { [K in CubemapFaces]: string };
/**
* Object defining a cubemap as separated files
* @description images order is : left, front, right, back, top, bottom
*/
export type CubemapArray = string[6];
/**
* Object defining a cubemap as separated files
*/
export type CubemapSeparate = {
type: 'separate';
paths: Cubemap | CubemapArray;
/**
* Set to true if the top and bottom faces are not correctly oriented
* @default false
*/
flipTopBottom?: boolean;
};
/**
* Object defining a cubemap as a single stripe file
*/
export type CubemapStripe = {
type: 'stripe';
path: string;
/**
* Set to true if the top and bottom faces are not correctly oriented
* @default false
*/
flipTopBottom?: boolean;
/**
* Order of the faces in the file
* @default 'left, front, right, back, top, bottom'
*/
order?: CubemapFaces[];
};
/**
* Object defining a cubemap as a single net file (cross arrangement)
*/
export type CubemapNet = {
type: 'net';
path: string;
};
/**
* Configuration of a cubemap
*/
export type CubemapPanorama = Cubemap | CubemapArray | CubemapSeparate | CubemapStripe | CubemapNet;
/**
* Size information of a cubemap panorama
*/
export type CubemapData = {
isCubemap: true;
flipTopBottom: boolean;
faceSize: number;
};
export type CubemapAdapterConfig = {
/**
* used for cubemap tiles adapter
* @internal
*/
blur?: boolean;
};