ui/map/aircraft/Aircraft3DModelLoader¶
Classes¶
Aircraft3DModelLoader¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:15
Aircraft3DModelLoader - GLTF/GLB model loading and caching for the 3D aircraft layer, extracted from Aircraft3DRenderer.
Loads each model path at most once, normalizes materials/textures for quality at small scales, and records the raw bounding-box extent so per-aircraft scaling can convert GLB units to real-world meters. Animation clips baked into the GLB (e.g. spinning engines/rotors) are kept alongside the scene so each aircraft clone can play them.
Constructors¶
Constructor¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:28
Parameters¶
opts¶
getMaxAnisotropy¶
() => number
Renderer texture-anisotropy limit, queried at normalize time.
onModelLoaded¶
(path) => void
Called after a model finishes loading and is cached.
Returns¶
Methods¶
get()¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:36
Cached model for a path, when loaded.
Parameters¶
path¶
string
Returns¶
Group\<Object3DEventMap> | undefined
rawMaxDim()¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:41
Raw bounding-box max extent recorded when the model loaded.
Parameters¶
path¶
string
Returns¶
number | undefined
animations()¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:46
Animation clips baked into the GLB (empty for static models).
Parameters¶
path¶
string
Returns¶
AnimationClip[]
load()¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:55
Load a GLTF/GLB model by URL, caching it for future clones. Idempotent: returns immediately if the model is already loaded or currently loading.
Parameters¶
path¶
string
Returns¶
void
clearCache()¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:94
Drop cached models so stale assets reload fresh, disposing each model's GPU resources. In-flight loads are kept; their completions re-populate the cache.
Returns¶
void
clearAll()¶
Defined in: ui/map/aircraft/Aircraft3DModelLoader.ts:101
Full teardown: dispose and drop the cache, forget in-flight loads.
Returns¶
void