skill-graphics-webgl
Skill0 starsChanged 3 months agoMITView on GitHub
2D/3D graphics, Three.js, WebGL shader optimization, and Canvas rendering. MUST ACTIVATE when building 3D interactive scenes, writing GLSL shaders, animating Canvas elements, or optimizing graphics rendering pipelines.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- core/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- avoid-ai-writingSkill
- c-cpp-systemsSkill
- doubt-driven-developmentSkill
- marketing-copywritingSkill
- mempalace-recallSkill
- mempalaceSkill
- mempalace-taskSkill
- retro-emulation-engineeringSkill
- seo-optimization-and-auditSkill
- skill-ai-mlSkill
- skill-backend-architectSkill
- skill-codebase-onboardingSkill
- skill-code-reviewSkill
- skill-context-engineeringSkill
- skill-creative-designSkill
- skill-data-analysisSkill
- skill-data-scienceSkill
- skill-design-engineeringSkill
- skill-devops-cloudSkill
- skill-emulator-wasmSkill
- skill-frontend-architectSkill
- skill-graph-analyticsSkill
- skill-low-level-programmingSkill
- skill-master-orchestratorSkill
- skill-mcp-builderSkill
- skill-monorepo-architectSkill
- skill-osint-engineeringSkill
- skill-plugin-architectureSkill
- skill-qa-engineerSkill
- skill-researchSkill
- skill-resume-tailorSkill
- skill-stealth-scrapingSkill
- skill-system-diagnosticsSkill
- skill-web-architectureSkill
- skill-web-performanceSkill
- spec-driven-developmentSkill
- spec-minerSkill
- wasm-emscriptenSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Stability: Use translateZ within preserve-3d contexts for depth hierarchy.
- Very specific: line 16
Reflow Protection: Never call getBoundingClientRect() or offsetWidth inside mousemove or scroll handlers.
- Very specific: line 21
Modern Charts: Use BKLit UI (@bklit/* on shadcn/ui) for composable, CSS-variable-themed dashboard charts and telemetry widgets.
- Very specific: line 22
Custom Data Viz: Use SVG + D3.js for custom resolution-independent mathematical transformations.
- Distinctive: line 23
Dynamic Scenes: Use HTML Canvas API for high-object-count scenes.
- Distinctive: line 24
Games: Use PixiJS for WebGL-accelerated 2D sprites and particle effects.
- Very specific: line 27
Source of Truth: Never mix CSS transitions (transition: all) with JS physics engines (Motion).
- Very specific: line 29
SVG Containers: Never animate SVG primitives directly.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Graphics & WebGL Optimization Skill
This skill provides expert patterns for high-performance visual rendering on the web.
1. 3D Graphics (Three.js)
- Core Stack: Three.js + react-three-fiber.
- Stability: Use
translateZwithinpreserve-3dcontexts for depth hierarchy. - Performance: Decouple mouse/touch events from elements undergoing heavy 3D transformations. Use a static 2D "Anchor" element to capture input.
2. WebGL Performance Mandates
- Reflow Protection: Never call
getBoundingClientRect()oroffsetWidthinsidemousemoveorscrollhandlers. Cache dimensions in auseRef. - Interaction-Driven Loading: Load heavy bundles (>100KB, e.g., Three.js) ONLY after user interaction (scroll/move) or via
requestIdleCallback. - Compositor Efficiency: Animations must avoid layout-triggering properties (
top,margin,width). Use exclusivelytransformandopacity.
3. 2D Graphics & Data Viz
- Modern Charts: Use BKLit UI (
@bklit/*on shadcn/ui) for composable, CSS-variable-themed dashboard charts and telemetry widgets. - Custom Data Viz: Use SVG + D3.js for custom resolution-independent mathematical transformations.
- Dynamic Scenes: Use HTML Canvas API for high-object-count scenes.
- Games: Use PixiJS for WebGL-accelerated 2D sprites and particle effects.
4. Animation & 3D Sync Hygiene
- Source of Truth: Never mix CSS transitions (
transition: all) with JS physics engines (Motion). - MotionValues Sync: Bridge UI pointer events to WebGL/Three.js render loops by subscribing to
MotionValues(useMotionValue,useSpring) rather than triggering React component re-renders. - SVG Containers: Never animate SVG primitives directly. Wrap moving parts in
<motion.g>or<motion.path pathLength={...} />to prevent transform conflicts. - Origin Locking: Explicitly set
transformOriginin pixels for SVG scale/rotate animations to ensure cross-browser consistency.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

