Manual
Almnck.
Price: 50ⓐ

Almanack Interactive Figures Catalog

Central listing of all interactive figures across Almanack articles.

Articles with Figures

Article Figures Status
Regolith with Latitude three-moons, latitude-picker, moon-timeline Published
Kropotkin’s Funeral video-player, video-annotations, video-scenes Published
John Logie Baird baird-transmitter, baird-signal, baird-receiver Published

Shared Components

Component Location Description
runtime.js assets/js/figures/ (shared) Pub/sub + figure loader (~270 lines)
moon-renderer.js regolith-with-latitude WebGL moon with fallback
video-player.js assets/js/figures/ Video player: media-chrome wrapper, quality picker, capability publisher
video-annotations.js assets/js/figures/ Timed annotations in margins (desktop) or overlay (mobile), SVG shapes
video-scenes.js assets/js/figures/ Chapter TOC margin box, current chapter highlighting
vtt.js assets/js/figures/ Shared WebVTT parsing and formatting utilities

Creating New Figures

See any article’s assets/figures/README.md for local documentation.

General pattern: 1. Create assets/figures/ directory in your article 2. Create manifest.json defining your figures 3. Write figure modules exporting meta and setup() 4. Add <figure data-interactive="name"> elements to article 5. Add <script type="module"> to initialize, importing the shared runtime:

<script type="module">
  const base = location.origin + '/VOLUME/MONTH/DAY/SLUG/assets/figures';
  const { initFigures } = await import('/static/js/figures/runtime.js');
  initFigures({ base });
</script>

The shared runtime.js lives at assets/js/figures/runtime.js. Article-specific figure modules (e.g. latitude-picker.js) live in the article’s own assets/figures/ directory. Shared modules (video-player, video-annotations, video-scenes) live in assets/js/figures/ and are referenced by absolute path in the manifest.

Lazy Loading

Add data-lazy to a <figure> to defer its initialization until it scrolls into view (via IntersectionObserver). Useful for expensive figures below the fold:

<figure data-interactive="baird-receiver" class="figure dingbat" data-lazy>

Video Figures

Video figures use three figure modules that communicate via pub/sub capability topics, loaded by the shared runtime.js:

  • video-player.js — wraps <video> in <media-controller>, publishes seven capability topics (control, overlay, settings, timeline, playback, cues, chapters)
  • video-annotations.js — subscribes to cue transitions, renders text annotations in a single persistent margin box (desktop) or overlay (mobile), draws SVG shape overlays
  • video-scenes.js — subscribes to chapter data, renders chapter TOC margin box with click-to-seek, highlights current chapter during playback

Features: - Multiple <source> elements with data-label for quality tiers - <track kind="metadata"> for timed annotations, <track kind="chapters"> for chapter navigation - JSON cue payloads with annotation text and optional SVG shape overlays - Annotations in margins via Sidenotes.injectMarginBox() (desktop) or displayed as an overlay on the video (mobile) - #t= fragment links for deep-linking to a specific playback time - Settings popover with quality picker, annotation toggle, chapter menu

For the annotation format, markup examples, and fragment link syntax, see the Markdown Guide.

See also: - Video Player Overhaul (current) - Video Figure Decomposition Plan (superseded) - Video Figure Design (superseded)

Design Documentation