Contour

A topographic map that breathes.

isomer.sh/effects/contour

Knobs

Continue on iPhone
Preset
#F2ECDD
#69684F
25.0
1.00
Colour1
0.22
Light2
0.35
-45
Shape2
5.00
0.80
Motion1
0.35
Texture1
0.25
Still frame

What reduced motion shows: 6 s.

Install

Code

components/isomer/contour.tsx
'use client';
// Generated by isomer. Do not edit by hand; run `isomer add` again to update. (from packages/react/src/Contour.tsx)
// generated by packages/react/scripts/gen-components.mjs, do not edit
import type { CSSProperties } from 'react';
import { useIsomerCanvas, type Mount, type ImageInput, type ImageSource } from './useIsomerCanvas';
// @ts-ignore: the runtime is plain JS with no type declarations
import * as runtime from './contour.js';
// @ts-ignore: the baked atlas as a PNG data URL
import atlas from './contour.image.js';

const { DEFAULTS, mount, loadImage } = runtime as { DEFAULTS: ContourKnobs; mount: Mount; loadImage: (url: string) => Promise<ImageSource> };

export interface ContourKnobs {
  paper: string;
  line: string;
  tint: number;
  hillShade: number;
  lightAngle: number;
  interval: number;
  terrainScale: number;
  indexEvery: number;
  lineWeight: number;
  driftSpeed: number;
  grain: number;
}

export interface ContourProps extends Partial<ContourKnobs> {
  className?: string;
  style?: CSSProperties;
  /** Render this one frame (seconds) and run no clock. Used by the parity tests. */
  time?: number;
  paused?: boolean;
  /** Draw t = 6 once while driftSpeed is 0, and when the user prefers reduced motion. Default true. */
  respectReducedMotion?: boolean;
  /** Keep each frame readable after it is shown, for canvas.toDataURL or readPixels. Read at mount. Default false. */
  preserveDrawingBuffer?: boolean;
  /** The image the shader reads. Default: the baked glyph atlas of "0123456789". */
  image?: ImageInput;
}

export const contourDefaults: Readonly<ContourKnobs> = DEFAULTS;

export function Contour({ className, style, time, paused, respectReducedMotion, preserveDrawingBuffer, image, ...props }: ContourProps) {
  const knobs = { ...DEFAULTS };
  for (const k of Object.keys(DEFAULTS) as (keyof ContourKnobs)[]) {
    const v = props[k];
    if (v !== undefined) (knobs as Record<string, unknown>)[k] = v;
  }
  const ref = useIsomerCanvas({ mount, knobs, time, paused, respectReducedMotion, preserveDrawingBuffer, posterTime: 6.0, clock: knobs.driftSpeed !== 0, image: image ?? atlas, loadImage });
  return <canvas ref={ref} className={className} style={{ display: 'block', width: '100%', height: '100%', ...style }} />;
}

Parity

iPhone 17 Pro simulator, iOS 26.3.1 against Chromium headless + SwiftShader, 15 October 2026.