Density-Adaptive Layout
Disperses nodes into open triangle interiors, evaluates smooth radial crowd density, and polishes locally without global shrink.
- Stage 04: Composable Layout
- Built-In Preset
- 2 min read
- Updated 2026-11-15
Key Takeaways
- Use when you want smooth, continuous radial scale gradients from dense hubs out toward sparse fringes without shrinking isolated regions.
- Spreads pockets across open covering triangles first, then evaluates crowd pressure inside crowdRadiusPx and polishes locally.
Visual Mechanism
Factory Signature
@simplex-viz/core, @simplex-viz/svg, and @simplex-viz/reactStage 04 Overview →createLocalAdaptiveLayoutStrategy(options?: DensityAdaptiveLayoutOptions): SimplexLayoutStrategyOptions & Defaults
number
Post-dispersion neighborhood kernel radius in world pixels used to estimate crowd density.
number
Target minimum scale factor assigned to items in high-density hubs.
boolean
Retains settled coordinates for existing items across updates.
Post-Dispersion Smooth Crowd-Density Scaling
Whereas Collision-Local Pocket Layout shrinks strictly those pairs that touch during relaxation, Density-Adaptive Layout pairs createMeshInwardFanSeeder() and createSpaceFillingPbdRelaxer() with createDensityPriorScaleController(). Co-located anchors first fan out across the open interior of their covering mesh triangles at 1.0x; a smooth radial spatial kernel (crowdRadiusPx) then measures true post-dispersion crowding so moderate pockets that fit comfortably stay at 1.0x, while genuinely congested hubs exhibit gradual core-to-fringe size transitions polished locally (0.0 px convex SAT clearance, zero global collateral shrink).
Usage Example
import {
SimplexTopicGraph,
createLocalAdaptiveLayoutStrategy,
} from '@simplex-viz/react';
<SimplexTopicGraph
items={items}
layoutStrategy={createLocalAdaptiveLayoutStrategy({
crowdRadiusPx: 84,
minLocalScale: 0.35,
})}
/>;