← Gallery № 02 · canvas-2d

Topographic Contour Map

Living terrain map with marching squares isolines and elevation labels.

What is Topographic Contour Map?

Topographic Contour Map is a free Canvas 2D web effect in the TappyPrism library. Living terrain map with marching squares isolines and elevation labels. It is drawn with the Canvas 2D API, which trades some GPU efficiency for the widest possible browser and device support. It ships as a single self-contained HTML file (topographic.html) with zero dependencies — no npm package, no framework, no build step. It exposes 2 live parameters — Contour Density, Animation Speed — adjustable in the browser or at runtime.

Parameters

ParameterKeyRangeDefault
Contour DensityNUM_CONTOURS4 – 3014
Animation SpeedTIME_SPEED0 – 0.50.15

How to add Topographic Contour Map to your page

  1. Download the standalone file topographic.html and copy its source into your project.
  2. Or embed it as a background iframe:
    <iframe src="https://prism.tappypotato.com/fx/topographic.html" style="position:fixed;inset:0;width:100%;height:100%;border:0;z-index:-1" title="Topographic Contour Map"></iframe>
  3. Tune it at runtime with postMessage:
    iframe.contentWindow.postMessage({ type: 'param', name: 'NUM_CONTOURS', value: 14 }, '*');

Frequently asked questions

What is Topographic Contour Map?

Topographic Contour Map is a free Canvas 2D web effect in the TappyPrism library. Living terrain map with marching squares isolines and elevation labels. It is drawn with the Canvas 2D API, which trades some GPU efficiency for the widest possible browser and device support. It ships as a single self-contained HTML file (topographic.html) with zero dependencies — no npm package, no framework, no build step. It exposes 2 live parameters — Contour Density, Animation Speed — adjustable in the browser or at runtime.

How do I add Topographic Contour Map to my website?

Download the standalone file at https://prism.tappypotato.com/fx/topographic.html and copy its source into your page, or embed it as a background iframe: <iframe src="https://prism.tappypotato.com/fx/topographic.html" style="position:fixed;inset:0;width:100%;height:100%;border:0;z-index:-1" title="Topographic Contour Map"></iframe>. Tune it live with postMessage, e.g. iframe.contentWindow.postMessage({ type: 'param', name: 'NUM_CONTOURS', value: 14 }, '*').