worker-visualizer
하는 일
브라우저에서 부드럽게(초당 60프레임) 실행되는 시각 애니메이션을 만듭니다. 무거운 계산은 백그라운드에서 수행해 메인 페이지를 멈추지 않고, 결과는 캔버스에 표시합니다.
사용하는 경우
- ✓실시간 입자나 물리 시뮬레이션을 보고 싶을 때.
- ✓움직이는 프랙털 같은 복잡한 시각 효과를 만들 때.
- ✓인터페이스를 느리게 하지 않고 많은 계산이 필요한 것을 개발할 때.
스킬 링크
https://github.com/nexu-io/open-design/blob/main/design-templates/worker-visualizer/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“서로 끌어당기는 입자 1000개의 시뮬레이션을 만들어 캔버스에 표시해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
코드는 작업을 나눕니다. 한 부분은 별도 영역(Web Worker)에서 무거운 계산을 처리하고, 다른 부분은 결과를 화면에 그립니다. 이렇게 해서 페이지가 계속 반응하도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Worker Visualizer Skill
Produce a single self-contained index.html that moves heavy per-frame compute into a Web Worker and renders the result to a canvas, keeping the main thread at a smooth 60fps.
Why this is a powered artifact
OpenDesign detects new Worker( / SharedArrayBuffer / OffscreenCanvas and renders this file in powered preview — a cross-origin-isolated iframe with allow-same-origin. That means external and blob Web Workers construct successfully, SharedArrayBuffer is defined (crossOriginIsolated === true), and importScripts works. In the old opaque sandbox all three failed; here they just work.
Resource map
worker-visualizer/
├── SKILL.md ← you're reading this
└── example.html ← a working 12k-particle SharedArrayBuffer sim (READ FIRST)
Workflow
Step 0 — Read the reference
Read example.html. Note the split: the worker integrates positions each tick; the main thread only reads + draws. It feature-detects crossOriginIsolated and uses a SharedArrayBuffer for zero-copy when available, falling back to a transferable postMessage copy otherwise. Always ship that fallback so the artifact still animates if isolation is off.
Step 1 — Choose the workload
Pick ONE compute-bound job worth offloading:
- Particle / N-body field (default): thousands of bodies with a cheap force law.
- Fractal: Mandelbrot/Julia escape-time into an
ImageDatabuffer. - Cellular automata / reaction-diffusion: grid updated in the worker.
- Data/audio visualizer: transform a stream into bars/rings each frame.
Step 2 — Build index.html
- One file, zero external requests. Build the worker from a
Blob+URL.createObjectURL(inline its source), or embed it as adata:URL. - Prefer SharedArrayBuffer for large per-frame state: allocate on the main thread, pass the
SharedArrayBufferto the worker, and read the sameFloat32Array/Uint8ClampedArrayview while drawing. Guard ontypeof SharedArrayBuffer !== 'undefined' && crossOriginIsolated. - Fallback path: if not isolated,
postMessagea transferableArrayBuffereach frame. - Consider
OffscreenCanvas+canvas.transferControlToOffscreen()to render inside the worker for the heaviest scenes.
Step 3 — Overlay + brand
- HUD with the title and 2–3 live stat tiles (particle count, transport mode, fps). Map accent color to the active DESIGN.md when present; otherwise a dark ground with one vivid accent.
Step 4 — Self-review (P0)
- Worker constructs with no SecurityError; sim runs.
- Main-thread render holds ~60fps under the full workload.
-
SharedArrayBufferpath engages whencrossOriginIsolatedis true;postMessagefallback engages otherwise — verify BOTH branches degrade cleanly. - No unbounded growth: velocities/positions stay stable over minutes.
- The "Transport" stat truthfully reports which path is live.
자주 묻는 질문
'Web Worker'는 무엇인가요?
메인 화면을 방해하지 않고 무거운 작업을 처리하는, 브라우저 안의 보이지 않는 도우미와 같습니다.
'SharedArrayBuffer'는 무엇인가요?
메인 부분과 도우미(Web Worker) 사이에 매우 큰 데이터를 전부 복사하지 않고 공유하는 고급 방식으로, 더 빠르게 만들어 줍니다.
애니메이션은 왜 60fps로 실행되나요?
계산과 그리기를 최적화해 애니메이션이 부드럽고 보기 좋도록 설계되었으며, 게임처럼 매끄럽게 동작합니다.
상세 정보
작성자의 원본 설명
A real-time data/particle/simulation visualizer whose heavy compute runs in a Web Worker (off the main thread), optionally sharing memory with the UI via SharedArrayBuffer, and renders to a canvas at 60fps. Produced as a single self-contained `index.html`. Use when the brief asks for a "web worker", "simulation", "particle system", "physics", "off-main-thread", "fractal", "real-time compute", or "
repo: nexu-io/open-design
인기도
- GitHub 스타
- 101k
- 순위
- #976
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
sample-plugin
101k에이전트가 테스트용 메타데이터 파일을 만들도록 합니다. 코드가 다양한 상황에서 올바르게 작동하도록 돕습니다.
aster-atelier
101k클래식한 느낌의 예술 웹사이트를 만들도록 에이전트를 돕습니다. 우아한 이미지, 푸른 하늘, 세리프 글꼴로 영화 같은 분위기를 냅니다.
audio-jingle
101k징글(jingle)과 효과음 같은 오디오를 에이전트가 생성하도록 합니다. 음악과 음성을 만들고 결과를 오디오 파일로 저장할 수 있습니다.
blog-post
101k긴 기사나 블로그 글을 쓰도록 에이전트를 돕습니다. 이미지, 인용문, 작성자 정보를 넣을 공간이 포함됩니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.