spatial-monorepo / core/src / reloadLevelWithExplodedState
Function: reloadLevelWithExplodedState()
reloadLevelWithExplodedState(
map,levelId,data,level,explodedState,roomType?,wallFill?,beforeId?):void
Defined in: packages/core/src/layers/IMDFFloorLayer.ts:473
Issue #454 — Re-add a single level's IMDF layers when the FloorUnloader's reloadFloor callback fires for a previously idle-unloaded floor, and immediately re-apply the correct exploded-view base offset if exploded view is currently active.
addIMDFLayers always creates the imdf-walls-<levelId> layer with fill-extrusion-base = 0. Without this step a floor reloaded while exploded view is on would render flat for one frame (or indefinitely, until some other code path happens to call applyExplodedView again).
Guarded like rehydrateImdfLayers — skips re-adding if the source already exists (double-fire guard).
Issue #447 — roomType is forwarded to addIMDFLayers (same optional, default-to-light-palette contract) so a floor reloaded by the FloorUnloader doesn't silently revert to the light roomType palette in a dark-themed app.
Issue #474 — wallFill is forwarded the same way for the wall-band layer's colour.
Issue #810 — beforeId is forwarded to addIMDFLayers so a floor reloaded by the FloorUnloader reinserts its layers under route/RTLS/data layers instead of always re-appending them at the top of the style.
Parameters
map
Map$1
levelId
string
data
level
explodedState
explodedView
boolean
gapCm?
number
wallHeightCm?
number
roomType?
ThemeRoomType
wallFill?
string
beforeId?
string
Returns
void
