Skip to main content

Function: createRuntime()

createRuntime(adapter, initialSpec): GeoVisRuntime

Defined in: runtime/createRuntime.ts:410

Creates a new, isolated GeoVis runtime that mediates between a VisualizationSpec and a concrete EngineAdapter. Spec updates are immutable (spread + replace) so adapters and hooks can use reference equality as a cheap change-detection signal.

update/applyPatch validate the candidate spec against validateSpec (using the adapter's declared CapabilitySet) before touching the adapter or state.spec — on failure, nothing renders and nothing mutates: the adapter is never called, spec keeps its last accepted value, and the caller gets a GeoVisResult describing why (ADR-0001).

Parameters

ParameterType
adapterEngineAdapter
initialSpecVisualizationSpec

Returns

GeoVisRuntime