Skip to content

data/aircraftCategories

Type Aliases

AircraftCategory

type AircraftCategory = "bizjet" | "regional" | "narrow" | "widebody_twin" | "widebody_quad";

Defined in: data/aircraftCategories.ts:23

Variables

AUTO_MODEL_SENTINEL

const AUTO_MODEL_SENTINEL: "__auto__" = '__auto__';

Defined in: data/aircraftCategories.ts:21

Sentinel value for selectedAircraftModel that enables per-type automatic model selection. Any other value forces every aircraft to be rendered with that exact model file.


ICAO_TO_CATEGORY

const ICAO_TO_CATEGORY: Readonly<Record<string, AircraftCategory>>;

Defined in: data/aircraftCategories.ts:30


CATEGORY_TO_MODEL

const CATEGORY_TO_MODEL: Readonly<Record<AircraftCategory, string>>;

Defined in: data/aircraftCategories.ts:68

Default GLTF/GLB filename per category. Files live under /static/models/aircraft/. Categories without a bespoke asset fall back to a representative of an adjacent size class.


MODEL_DIR

const MODEL_DIR: "/static/models/aircraft/" = '/static/models/aircraft/';

Defined in: data/aircraftCategories.ts:95

Directory under which all aircraft GLB models are served.


DEFAULT_FALLBACK_MODEL

const DEFAULT_FALLBACK_MODEL: "A320.glb" = 'A320.glb';

Defined in: data/aircraftCategories.ts:97

Model used when an aircraft's type is unknown and no model is forced.

Functions

getAircraftCategory()

function getAircraftCategory(actype): AircraftCategory | null;

Defined in: data/aircraftCategories.ts:76

Parameters

actype

string | null | undefined

Returns

AircraftCategory | null


getModelForAircraftType()

function getModelForAircraftType(actype, fallbackModel): string;

Defined in: data/aircraftCategories.ts:85

Resolve the 3D model filename for an aircraft type, falling back to fallbackModel when the type is unknown or missing.

Parameters

actype

string | null | undefined

fallbackModel

string

Returns

string


resolveAircraftModelPath()

function resolveAircraftModelPath(
   selectedModel, 
   actype, 
   override?): string;

Defined in: data/aircraftCategories.ts:106

Resolve the full model path an aircraft should render with, honoring (highest priority first): 1. an explicit per-aircraft override file, 2. a globally forced selectedModel (anything but the AUTO sentinel), 3. automatic per-type selection from the aircraft's ICAO actype.

Parameters

selectedModel

string | null | undefined

actype

string | null | undefined

override?

string | null

Returns

string