mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 03:32:19 +00:00
Merge main (624c229b): STATION and LIVE sit in the Inspector tab after the entity card
Main split Context into Inspector and Properties tabs and renders the Inspector only while Context is open; the two sections join it there, after the entity card. Locales, same-as-english and package boundaries keep both sides, deduplicated (the branch had added 54 duplicate module entries).
This commit is contained in:
commit
71d57481b7
209 files changed
+36213
-980
No files matched your search
Vendored
+5
@@ -73,6 +73,11 @@ export interface FramePort {
|
||||
requestRender(reason: string): void;
|
||||
/** Keep drawing every frame until released. Holds are counted. */
|
||||
holdContinuous(reason: string): Release;
|
||||
/**
|
||||
* Hear the loop start drawing every frame (its first hold, whoever took
|
||||
* it) and stop (its last released): `true` held, `false` not.
|
||||
*/
|
||||
onHeldChange(cb: (held: boolean) => void): Off;
|
||||
mode(): 'demand' | 'continuous';
|
||||
diagnostics(): FrameDiagnostics;
|
||||
/** Stop ticking while the page is hidden; resume on `false`. */
|
||||
|
||||
@@ -118,6 +118,7 @@ export const PORTS = deepFreeze({
|
||||
'on',
|
||||
'requestRender',
|
||||
'holdContinuous',
|
||||
'onHeldChange',
|
||||
'mode',
|
||||
'diagnostics',
|
||||
'suspend',
|
||||
|
||||
Vendored
+69
@@ -67,6 +67,75 @@ export interface ApplicationHooks {
|
||||
allowReload: boolean;
|
||||
store: RenderFailureStore;
|
||||
}): () => void;
|
||||
/** The Context card's previews of a picked aircraft. */
|
||||
cardPreviews?: CardPreviews;
|
||||
}
|
||||
|
||||
/**
|
||||
* Previews the Context card draws into an element of its own. Each returns
|
||||
* at once; one that cannot be made calls its `onFailed`.
|
||||
*/
|
||||
export interface CardPreviews {
|
||||
/**
|
||||
* A model turning on its own, from its GLB's bytes, starting to face
|
||||
* `heading` (degrees); `viewRange` is the camera's distance in bounding
|
||||
* radii. `onPhase` says when it turns to wire for its scan and back;
|
||||
* `onCycle` when a look and its scan end, with the drawing time they took.
|
||||
*/
|
||||
model(
|
||||
container: HTMLElement,
|
||||
model: {
|
||||
gltf: Uint8Array | ArrayBuffer;
|
||||
basePath?: string;
|
||||
heading?: number;
|
||||
viewRange?: number;
|
||||
},
|
||||
events?: {
|
||||
onPhase?(phase: 'plain' | 'scan'): void;
|
||||
onCycle?(ms: number): void;
|
||||
onFailed?(): void;
|
||||
},
|
||||
): CardPreview<void>;
|
||||
/** A flight's route from `from` to `to` on a small globe, the craft `at`. */
|
||||
route(
|
||||
container: HTMLElement,
|
||||
route: CardRoute,
|
||||
events?: { onFailed?(): void },
|
||||
): CardPreview<CardRoute>;
|
||||
/** The view ahead from an aircraft's position, height and heading. */
|
||||
cockpit(
|
||||
container: HTMLElement,
|
||||
craft: CardCraft,
|
||||
events?: { onFailed?(): void },
|
||||
): CardPreview<CardCraft>;
|
||||
}
|
||||
|
||||
/** A place on a card's route: an airport's code and position, degrees. */
|
||||
export interface CardPlace {
|
||||
code?: string;
|
||||
lat: number;
|
||||
lon: number;
|
||||
}
|
||||
|
||||
export interface CardRoute {
|
||||
from: CardPlace;
|
||||
to: CardPlace;
|
||||
at?: { lat: number; lon: number } | null;
|
||||
}
|
||||
|
||||
/** An aircraft's position (degrees), height (metres) and heading (degrees). */
|
||||
export interface CardCraft {
|
||||
lat: number;
|
||||
lon: number;
|
||||
altitudeM?: number | null;
|
||||
heading?: number | null;
|
||||
}
|
||||
|
||||
/** One preview: hidden, it rests on its last frame. */
|
||||
export interface CardPreview<Values> {
|
||||
setActive(active: boolean): void;
|
||||
update(values: Values): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
/** Where a renderer's failure notice is published for the application to show. */
|
||||
|
||||
Reference in new issue
Block a user