Docs Navigation (Stage 05)›

Continuous Free Camera

Continuous cursor-centered wheel zoom, drag-to-pan, and two-finger touch pinch.

Key Takeaways

  • Built-in default navigation mode for continuous pan-and-zoom map exploration.
  • Use when you want smooth cursor-centered wheel zoom and drag-to-pan without discrete sub-mesh re-solving.

Visual Mechanism

World Space (Fixed Layout Coordinates)Viewport Camera (tx, ty, scale k)
Applies a continuous 2D affine camera transform (cursor-centered wheel zoom k, pointer pan, and two-finger touch pinch) over fixed world coordinates without re-solving sub-meshes.

Factory Signature

Re-exported from @simplex-viz/core, @simplex-viz/svg, and @simplex-viz/reactStage 05 Overview →
createFreeCameraZoomStrategy<TItem, TTagMeta, TClusterMeta>(options?: FreeCameraZoomOptions): SimplexZoomStrategy<TItem, TTagMeta, TClusterMeta>

Options & Defaults

minZoomDefault: 0.35

number

Minimum continuous camera magnification factor.

maxZoomDefault: 6.0

number

Maximum continuous camera magnification factor.

Continuous Affine Camera Navigation

Continuous Free Camera sets mode: 'free-camera', enabling smooth cursor-centered mouse-wheel zoom (onWheel: 'zoom-to-cursor'), click-and-drag panning, two-finger touch pinch-zoom, and single-click cluster/triangle spotlight highlighting without subdividing triangles into child frames.

Usage Example

import {
  SimplexTopicGraph,
  createFreeCameraZoomStrategy,
} from '@simplex-viz/react';

<SimplexTopicGraph
  items={items}
  zoomStrategy={createFreeCameraZoomStrategy({
    minZoom: 0.5,
    maxZoom: 5.0,
  })}
  onWheel="zoom-to-cursor"
/>;