lookbkdev/lookbk-skills / skills/aperture-reveal-hero
aperture-reveal-hero
VerifiedBuild a website hero that looks through a real lens iris whose aperture lives in the headline - nine curved blades, each turning on its own pin, centred in the counter of an O so that at f/22 the opening fits inside the letter and opened up the scene pours out of it. The scene behind is re-rendered for every f-number (depth of field, bokeh in the iris's own shape, diffraction stars stopped down, exposure), the ring clicks from stop to stop and the pointer turns it. Two scenes: a timber pier with lanterns at night (dark), or a stone cloister at noon. One self-contained HTML page plus a paste-in embed on the Motion Heroes kit v2 lockup or editorial composition, checked at four widths for text size, contrast and clearance, with a baked still picture for WebGL failure and reduced motion, and a 1080p MP4 of one 12 s loop. Use for camera and lens makers, photographers, eyewear, opticians, studios, cafes, hotels or any brand whose promise is seeing clearly or letting the light in.
| File | Kind | Size |
|---|---|---|
| NOTICE.md | markdown | 1.3 KB |
| SKILL.md | skill md | 9.8 KB |
| TESTED.json | config | 962 B |
| examples/corte/hero.json | config | 1.4 KB |
| examples/corte/logo.svg | other | 246 B |
| examples/thale/hero.json | config | 1.2 KB |
| examples/thale/logo.svg | other | 216 B |
| scripts/build.mjs | script | 263 B |
| scripts/check.mjs | script | 179 B |
| scripts/chrome.mjs | script | 3.6 KB |
| scripts/color.mjs | script | 1.4 KB |
| scripts/effect/bake.mjs | script | 1.9 KB |
| scripts/effect/effect.js | script | 50.6 KB |
| scripts/effect/effect.mjs | script | 5.8 KB |
| scripts/effect/stills/aperture-court.jpg | binary | 105.7 KB |
| scripts/effect/stills/aperture-pier.jpg | binary | 91.4 KB |
| scripts/inline.mjs | script | 1.7 KB |
| scripts/kit/KIT.md | markdown | 13.7 KB |
| scripts/kit/build.mjs | script | 47.4 KB |
| scripts/kit/cdp.mjs | script | 5.1 KB |
| scripts/kit/check.mjs | script | 15.7 KB |
| scripts/kit/fonts.json | config | 5.4 KB |
| scripts/kit/record.mjs | script | 8.1 KB |
| scripts/kit/runtime.js | script | 22.5 KB |
| scripts/kit/shell.css | other | 18.7 KB |
| scripts/kit/three.json | config | 6.3 KB |
| scripts/markup.mjs | script | 6.2 KB |
| scripts/record.mjs | script | 255 B |
| scripts/screenshot.mjs | script | 1.8 KB |
scripts/effect/bake.mjs
View on GitHub#!/usr/bin/env node
// Aperture Reveal: bakes the still picture a page shows before its first
// frame and whenever WebGL is unavailable (scripts/effect/stills/*.jpg).
//
// node scripts/effect/bake.mjs out/index.html scripts/effect/stills/aperture-pier.jpg
//
// It opens a built page in headless Chrome with ?ap-bake, which draws the
// scene alone (no headline, no scale): the pier at f/2.8 seen through the
// iris, centred; the courtyard wide open, without the iris, so the real
// headline the page shows in the fallback sits on the light stone. The frame
// is 1600x900 and saved as a JPEG (quality 0.84).
import { writeFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { pathToFileURL } from 'node:url'
import { launch } from '../kit/cdp.mjs'
const [page, out] = process.argv.slice(2)
if (!page || !out) {
console.error('usage: node scripts/effect/bake.mjs out/index.html scripts/effect/stills/<name>.jpg')
process.exit(1)
}
const width = 1600
const height = 900
const chrome = await launch({ width, height })
try {
const tab = await chrome.page()
const send = tab.send
await send('Page.enable')
await send('Runtime.enable')
await send('Emulation.setDeviceMetricsOverride', { width, height, deviceScaleFactor: 1, mobile: false })
const loaded = tab.once('Page.loadEventFired', 60000)
await send('Page.navigate', { url: pathToFileURL(resolve(page)).href + '?mh-record&ap-bake' })
await loaded
const ev = async (e) => (await send('Runtime.evaluate', { expression: e, awaitPromise: true, returnByValue: true })).result.value
const ready = await ev('window.MotionHero.ready')
if (!ready || !ready.ok) throw new Error('the page did not draw: ' + JSON.stringify(ready))
await ev('window.MotionHero.seek(0)')
const url = await ev("document.querySelector('.mh-canvas').toDataURL('image/jpeg', 0.84)")
writeFileSync(out, Buffer.from(url.split(',')[1], 'base64'))
console.log(`baked ${out}`)
} finally {
await chrome.close()
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |