Skip to content

spatial-monorepo


spatial-monorepo / core/src / WALL_HEIGHT_MIN

Variable: WALL_HEIGHT_MIN

const WALL_HEIGHT_MIN: 0 = 0

Defined in: packages/core/src/layers/wall-paint.ts:30

Issue #480 — Shared wall paint-building helper.

Single source of truth for the wall fill-extrusion paint block (color, height expression, base, opacity) and the height-clamp constants, consumed by BOTH:

  • the core imdf-walls-<levelId> layer (layers/IMDFFloorLayer.ts, #474), rendering IMDF-derived wall bands (layers/wall-bands.ts, #468)
  • the editor's hand-drawn wall-extrusion layer (packages/editor/src/layers/wallExtrusion.ts, #371)

Before this module the two pipelines independently duplicated the height clamp constants and diverged on color (theme token vs. hardcoded #e55), opacity (1.0 vs 0.85) and the height expression (zoom-interpolated grow-in vs a raw ['get', 'wall_height']) — so a hand-drawn wall next to an IMDF-loaded wall read as a visible seam. Both packages now build their fill-extrusion paint via buildWallExtrusionPaint below.

Pure and synchronous — no DOM/MapLibre coupling — safe to import from a Worker as well as the main thread. @diginestai/editor already takes a runtime dependency on @diginestai/core (see its package.json), so re-exporting this module from core's public API is the established cross-package sharing path — no new shared package needed.

Released under commercial licensing.