-
Notifications
You must be signed in to change notification settings - Fork 0
/
contextProperties.ts
74 lines (70 loc) · 2.06 KB
/
contextProperties.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
import {
CelestialMoveEvent,
CelestialSelectEvent,
CelestialZoomEvent,
Degree,
InteractionProps,
InternationalizationProps,
ObservationAzAltTargetProps,
ObservationProps,
RepresentationProps,
StarMarkerProps,
UniverseProps,
} from "..";
export type CelestialEngineContextProps = UniverseProps &
InternationalizationProps &
ContextRepresentationProps &
ContextObservationProps &
ContextInteractionProps;
export interface ContextRepresentationProps
extends Omit<RepresentationProps, "starMarkers"> {
starMarkerTemplate?: Omit<StarMarkerProps, "starNumber">;
}
export interface ContextObservationProps
extends Omit<ObservationProps, "target" | "cameraProps">,
ObservationAzAltTargetProps {
/**
* camera fov when targeting the star, in degree.
*/
targetFov: Degree;
/**
* targeting star number.
*/
targetStarNumber: number | null;
/**
* maximum zoom factor.
* @defaultvalue 10.0
*/
maxZoom?: number;
}
export interface ContextInteractionProps
extends Pick<InteractionProps, "reactiveButtons"> {
/**
* enable automatic control handling (like OrbitControls).
* @defaultvalue true
*/
controllable?: boolean;
/**
* enable automatic selection handling.
* @defaultvalue true
*/
selectable?: boolean;
/**
* handle selection of the celestial entities.
* this handler will be fired before firing the default event, and
* default event will be cancelled when you returns `false` in the handler.
*/
previewOnSelect?: (event: CelestialSelectEvent) => boolean;
/**
* handle move of the sight in the celestial canvas.
* this handler will be fired before firing the default event, and
* default event will be cancelled when you returns `false` in the handler.
*/
previewOnMove?: (event: CelestialMoveEvent) => boolean;
/**
* handle zoom changes on the celestial canvas.
* this handler will be fired before firing the default event, and
* default event will be cancelled when you returns `false` in the handler.
*/
previewOnZoom?: (event: CelestialZoomEvent) => boolean;
}