worker-visualizer
/worker-visualizer
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 "audio/data visualizer". OpenDesign serves this in powered-preview mode so Workers and SharedArrayBuffer actually work.
- Author
- nexu-io ↗
- Repository
- open-design ↗
- Licence
- Apache-2.0
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
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 "audio/data visualizer". OpenDesign serves this in powered-preview mode so Workers and SharedArrayBuffer actually work.
Triggers from the description
Original author description
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 "audio/data visualizer". OpenDesign serves this in powered-preview mode so Workers and SharedArrayBuffer actually work.
How it works
- Why this is a powered artifact
- Resource map
- Workflow
SKILL.md preview
---
name: worker-visualizer
description: |
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 "audio/data visualizer". OpenDesign serves this in
powered-preview mode so Workers and SharedArrayBuffer actually work.
triggers:
- "web worker"
- "worker"
- "simulation"
- "particle system"
- "physics sim"
- "fractal"
- "off main thread"
- "sharedarraybuffer"
- "real-time compute"
- "visualizer"
- "多线程"
- "粒子"
od:
mode: prototype
platform: web
scenario: design
preview:
type: html
entry: index.html
reload: debounce-100
design_system:
requires: false
sections: [color, typography]
craft:
requires: [animation-discipline, state-coverage]
---
# 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 `ImageData` buffer.
- **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 a `data:` URL.
- **Prefer SharedArrayBuffer** for large per-frame state: allocate on the main thread, pass the `SharedArrayBuffer` to the worker, and read the same `Float32Array`/`Uint8ClampedArray` view while drawing. Guard on `typeof SharedArrayBuffer !== 'undefined' && crossOriginIsolated`.
- **Fallback path**: if not isolated, `postMessage` a transferable `ArrayBuffer` each 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.
- [ ] `SharedArrayBuffer` path engages when `crossOriginIsolated` is true; `postMessage` fallback 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.
Files in this package (3)
- SKILL.md 4 KB
- example.html 5 KB
- open-design.json 11 KB
Versions
The database has no other skills named worker-visualizer.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version bb52a6ce2475 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100webgl-experience
A full-screen, real-time WebGL/WebGL2 experience — animated shaders, 3D scenes, generative visuals, particle fields — rendered live on the GPU with a typographic overlay. Produced as a single self-contained `index.html`. Use when the brief asks for a "WebGL", "shader", "3D",… - 100cross-origin-isolation
Use when reviewing security-sensitive web apps, SharedArrayBuffer usage, worker-heavy apps, editors, or measurement features that require cross-origin isolation. Check both headers and real browser behavior. - 100database-schema-visualizer
Generate database schema visualizer operations. Auto-activating skill for Visual Content. Triggers on: database schema visualizer, database schema visualizer Part of the Visual Content skill category. Use when working with database schema visualizer functionality. Trigger with… - 100fec-web-workers
Use when moving expensive browser work off the main thread with Web Workers, SharedWorker, worker pools, Comlink, transferable objects, Vite/Webpack worker integration, or UI responsiveness fixes. Do not use for lightweight synchronous work or DOM manipulation; Chinese triggers… - 100webgl-liquid-metal
A real-time liquid-metal shader — a domain-warped noise field shaded as molten chrome, with a sweeping specular highlight over an iridescent thin-film (cosine-palette) sheen. No textures. Rendered as a single self-contained `index.html`. Use when the brief asks for "liquid… - 100repo-visualizer
Explain how a repository or feature works as a source-grounded component graph, with an interactive HTML explorer and optional animated GIF or video exports. Use for architecture maps, code walkthroughs, onboarding, dependency explanations, and visual answers to questions like…