Skip to the page
TACTILE UI

05.2Block 05.2 · Heroes

Camera Launch

A launch hero for a fast prime, where the lens is the Iris. Turn its aperture ring and the photograph beside it follows: round bokeh wide open, nine-sided points stopped down.

Version
0.1.0
Size
82.6 KB gzipped
Access
With a Pass
Needs
camera-launch.mjs + camera-launch.css · Iris
Tests
9 tests · 11 states
On this page
  1. Use it
  2. Options
  3. Methods
  4. States
  5. How it works
  6. Built with
01

Use it

A finished product-launch hero for a lens, a camera or any optical product: the spec that sells it (a fast aperture, round bokeh) becomes the thing the visitor plays with, and the page around it (nav, name, price, preorder, a specification strip) is designed to the same standard.

Copy the camera-launch folder and the iris folder from its package next to your page, link the stylesheets and mount it on an element. Every option has a default; the lab’s Code tab writes the same example at any settings, and for React, Vue, Svelte or a custom element (Using a framework).

<link rel="stylesheet" href="iris/iris.css">
<link rel="stylesheet" href="camera-launch/camera-launch.css">
<div id="camera-launch"></div>

<script type="module">
  import Iris from './iris/iris.mjs';
  import { mount } from './camera-launch/camera-launch.mjs';

  const cameraLaunch = mount(document.getElementById('camera-launch'), {
    brand: 'Holm Optical',
    product: 'Serein 50',
    tagline: 'Nine curved blades, round at every stop that matters.',
  }, { Iris });

  // cameraLaunch.update({ … });   change any option in place
  // cameraLaunch.destroy();        and take it away again
</script>
02

Options

OptionTypeDefaultWhat it does
brandtext'Holm Optical'Maker
producttext'Serein 50'Set large; "f/1.4" follows it.
taglinetext'Nine curved blades, round at every stop that matters.'Tagline
ledetext'A fast standard lens ground and assembled in one workshop. Turn its aperture ring: the sample beside it is shot at whatever stop you choose.'Lede
pricenumber, 1 to 999991290Price
currencyGBP · EUR · USD'GBP'Currency
depositnumber, 0 to 99991000 hides the deposit line.
shiptext'March 2027'Ships
palettestudio · daylight'studio'A black studio sweep, or a white seamless in daylight.
finishgraphite · ink · steel · brass'graphite'Lens finish
bladesnumber, 5 to 169Also the shape of the bokeh once stopped down.
stop1.4 · 2 · 2.8 · 4 · 5.6 · 8 · 11'2.8'The f-stop the ring rests on, and the one the sample is shot at before anyone turns it.
lightnumber, 0 to 345315The lens’s lamp: 0 from above, clockwise.
soundbooleanfalseSynthesised detent clicks, only after the ring is touched.
03

Methods

mount(element, options, { Iris })
Builds the block inside the element and returns its handle. Hand it the Iris it is built with.
handle.update(next = {})
Change options in place.
handle.destroy()
Stops it and cleans up after it.
04

States

  1. At restThe lens rests on f/2.8 on a lit studio sweep; the sample shows f/2.8 · 1/1000 s · ISO 100; the iris is asleep.
  2. IntroThe lens waits shut until a third in view, then opens to its stop through the spring.
  3. Turning the ringDrag the knurled ring (click stops, no lag) or use the arrow keys: the sample's background blur, bokeh size and shape and the exposure line follow, driven by the slider's own value.
  4. Wide openf/1.4 · 1/4000 s: the city lights become large round rim-lit discs, the background blurs and the corners darken slightly; you look into the lens's glass.
  5. Stopped downf/11 · 1/60 s: the discs close to nine-sided points and the street comes sharp.
  6. ShutPast f/22 the ring clicks shut: the sample goes black and the readout says 'Shutter closed: no light'.
  7. PaletteStudio (black sweep, champagne accent, graphite lens) or daylight (white seamless, oxide red, steel lens works well).
  8. TabletOne column: the lens above the copy; the sample and the buy row side by side; specs in three columns.
  9. PhoneThe nav wraps, everything stacks, the button goes full width, specs in two columns.
  10. Reduced motionThe lens rests at its stop, still; turning snaps and the sample follows at once; no transitions.
  11. Off screenThe iris sleeps; the block runs no loop: the sample repaints only when the ring's value changes.
05

How it works

Made of: Iris as product, Slider driven sample, Depth of field by aperture, Aperture shaped bokeh, Exposure reciprocity, Mutation observer wiring, Palette tokens from one table.

Original composition; the maker (Holm Optical), the lens (Serein 50) and all copy and specifications are invented. The sample photograph and the lens's glass are canvas paintings in camera-launch.mjs: no image ships. Faces: Instrument Sans and Red Hat Mono (SIL OFL 1.1), full fonts converted to WOFF2.

06

Built with

More blocks on the same object:

Docs
Finish
Volume