forked from JeremyHeleine/Photo-Sphere-Viewer
-
-
Notifications
You must be signed in to change notification settings - Fork 634
/
model.ts
90 lines (86 loc) · 2.08 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import type { Cubemap, CubemapAdapterConfig, CubemapPanorama } from '@photo-sphere-viewer/cubemap-adapter';
/**
* Configuration of a tiled cubemap
*/
export type CubemapTilesPanorama = {
/**
* low resolution panorama loaded before tiles
*/
baseUrl?: CubemapPanorama;
/**
* size of a face in pixels
*/
faceSize: number;
/**
* number of tiles on a side of a face
*/
nbTiles: number;
/**
* function to build a tile url
*/
tileUrl: (face: keyof Cubemap, col: number, row: number) => string | null;
/**
* Set to true if the top and bottom faces are not correctly oriented
* @default false
*/
flipTopBottom?: boolean;
};
export type CubemapTileLevel = {
/**
* Lower and upper zoom levels (0-100)
*/
zoomRange: [number, number];
/**
* size of a face in pixels
*/
faceSize: number;
/**
* number of tiles on a side of a face
*/
nbTiles: number;
};
/**
* Configuration of a tiled cubemap with multiple tiles configurations
*/
export type CubemapMultiTilesPanorama = {
/**
* low resolution panorama loaded before tiles
*/
baseUrl?: CubemapPanorama;
/**
* Configuration of tiles by zoom level
*/
levels: CubemapTileLevel[];
/**
* function to build a tile url
*/
tileUrl: (face: keyof Cubemap, col: number, row: number, level: number) => string | null;
/**
* Set to true if the top and bottom faces are not correctly oriented
* @default false
*/
flipTopBottom?: boolean;
};
export type CubemapTilesAdapterConfig = CubemapAdapterConfig & {
/**
* shows a warning sign on tiles that cannot be loaded
* @default true
*/
showErrorTile?: boolean;
/**
* applies a blur effect to the low resolution panorama
* @default true
*/
baseBlur?: boolean;
/**
* applies antialiasing to high resolutions tiles
* @default true
*/
antialias?: boolean;
/**
* shows debug helpers
* @default false
* @internal
*/
debug?: boolean;
};