kwakseongjae/oh-my-design / skills/omd-3d-hero
omd-3d-hero
VerifiedA rendered 3D hero from the project's DESIGN.md: a soft-lit studio (cyclorama, contact shadows, ambient occlusion) with a floating pile of brand-colored objects shaped by the radius tokens, and the headline in real DOM text. On desktop the pile is live (the cursor pushes it, a click scatters it, setSpec() morphs it into another brand or between the light and dark schemes) and a hard plane keeps every object out of the copy column. Two engines from one spec: three.js in the browser (default) or headless Blender (Cycles poster + EEVEE loop) from the same settled poses. Poster first: phones, reduced motion and no-WebGL get the still. Never invents colors or shapes; verifies five paths on a real GPU, including a pointer sweep that measures contrast and clearance. Use for a launch page, product hero, campaign or showcase first screen that should look rendered, not drawn. Triggers: '3D 히어로', '블렌더 느낌 배경', '3D 배경 만들어줘', 'three.js 히어로', '렌더 느낌 첫 화면', '클레이 렌더 배경', 'Blender style hero', '3D hero from DESIGN.md', 'three.js background', 'studio render hero', '3Dヒーロー', 'Blender風の背景', '3D 主視覺'. Two flat brand inks instead of light and depth → omd-shader-hero. A CJK headline effect → omd-cjk-type-shader. Product renders from a parts list are out of scope. No DESIGN.md → omd-init first.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 23.0 KB |
| engines/blender/scene.py | script | 9.8 KB |
| engines/three/pile.js | script | 12.6 KB |
| engines/three/scene.js | script | 19.2 KB |
| examples/hero.html | other | 6.2 KB |
| scripts/blender.mjs | script | 3.1 KB |
| scripts/spec.mjs | script | 15.2 KB |
| scripts/verify.mjs | script | 16.7 KB |
scripts/blender.mjs
View on GitHub#!/usr/bin/env node
// Blender branch driver: spec.json -> poster.png (Cycles) [+ loop.webm / loop.mp4 (EEVEE frames -> ffmpeg)].
//
// node blender.mjs <spec.json> <outDir> [--loop] [--fps 24] [--loop-width 1280] [--blender /path/to/blender]
//
// Detection order for the binary: --blender, $BLENDER, `blender` on PATH, /Applications/Blender.app (macOS).
// No Blender -> exit 4 with a message; the three.js branch needs nothing installed, so the skill falls back to it.
// Then encode the poster: node verify.mjs --encode <outDir>/poster.png <outDir>/poster.webp
import { execFileSync, spawnSync } from 'node:child_process';
import { existsSync, readFileSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const args = process.argv.slice(2);
const flag = (n, d) => { const i = args.indexOf(`--${n}`); return i >= 0 ? args[i + 1] : d; };
const [spec, out] = args.filter((a, i) => !a.startsWith('--') && !['--fps', '--loop-width', '--blender'].includes(args[i - 1]));
if (!spec || !out) { console.error('usage: node blender.mjs <spec.json> <outDir> [--loop] [--fps 24] [--loop-width 1280]'); process.exit(2); }
const here = path.dirname(fileURLToPath(import.meta.url));
const script = path.join(here, '..', 'engines', 'blender', 'scene.py');
const which = (b) => spawnSync('sh', ['-c', `command -v ${b}`], { encoding: 'utf8' }).stdout.trim();
const bin = [flag('blender'), process.env.BLENDER, which('blender'), '/Applications/Blender.app/Contents/MacOS/Blender'].find((p) => p && existsSync(p));
if (!bin) { console.error('Blender not found. Use the three.js branch (no install), or install Blender 4.2+ and pass --blender.'); process.exit(4); }
const ver = execFileSync(bin, ['-b', '--version'], { encoding: 'utf8' }).split('\n')[0];
const loop = args.includes('--loop');
const bl = spawnSync(bin, ['-b', '--factory-startup', '-P', script, '--', '--spec', path.resolve(spec), '--out', path.resolve(out), '--poster',
...(loop ? ['--loop', '--fps', flag('fps', '24'), '--loop-width', flag('loop-width', '1280')] : [])], { encoding: 'utf8', maxBuffer: 64 << 20 });
const line = bl.stdout.split('\n').find((l) => l.startsWith('OMD3D '));
if (bl.status !== 0 || !line) { console.error(bl.stdout.slice(-3000), bl.stderr.slice(-3000)); process.exit(1); }
const report = { blender: ver, ...JSON.parse(line.slice(6)) };
if (loop) {
const fps = flag('fps', '24');
const frames = path.join(out, 'frames', '%04d.png');
const ff = (a) => { const r = spawnSync('ffmpeg', ['-y', '-loglevel', 'error', '-framerate', fps, '-i', frames, ...a], { encoding: 'utf8' }); if (r.status) throw new Error(r.stderr); };
// Both encodes loop seamlessly: the motion is sin-based with one full period in the frame range.
ff(['-c:v', 'libvpx-vp9', '-b:v', '0', '-crf', '36', '-row-mt', '1', '-pix_fmt', 'yuv420p', path.join(out, 'loop.webm')]);
ff(['-c:v', 'libx264', '-crf', '24', '-preset', 'slow', '-pix_fmt', 'yuv420p', '-movflags', '+faststart', path.join(out, 'loop.mp4')]);
const kb = (f) => Math.round(readFileSync(path.join(out, f)).length / 1024);
report.video = { webmKiB: kb('loop.webm'), mp4KiB: kb('loop.mp4') };
}
console.log(JSON.stringify(report));
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |