Skip to content
Back to skills

Webgl Phaser Threejs Mastery

ASecurity

Enforce professional standards for browser-based gaming and interactive 3D experiences. This skill covers **Phaser** (2D) and **Three.js** (3D) to maximize performance across desktop and mobile browsers.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
developmentgoperformance

Works with

  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill webgl-phaser-threejs-mastery --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Webgl Phaser Threejs Mastery?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Webgl Phaser Threejs Mastery
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/idorgham-webgl-phaser-threejs-mastery/badge)](https://www.skillsdirectory.com/skills/idorgham-webgl-phaser-threejs-mastery)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
type: Skill
subagents: [core-validator, integrity-bot]
agents: [master-guide, swarm-router]
dependencies: [core-orchestration, global-sync]
version: 1.0.0
---



# 🌐 Web Gaming & Interactive Mastery (WebGL)

## Purpose
Enforce professional standards for browser-based gaming and interactive 3D experiences. This skill covers **Phaser** (2D) and **Three.js** (3D) to maximize performance across desktop and mobile browsers.

---

## Technique 1 β€” Three.js & WebGL Optimization

### Draw Call Reduction
- **Rule**: Minimize draw calls by using `BufferGeometry` and `InstancedMesh` for repeated assets (e.g., forest trees, asteroid fields).
- **Protocol**: Batch textures into **Texture Atlases** to reduce GPU state changes.

### Texture Compression
- **Rule**: Do not serve raw PNG/JPG for heavy 3D assets.
- **Correction**: Use **KTX2 / Basis Universal** compression for GPU-native texture decoding without CPU overhead.

---

## Technique 2 β€” Phaser (2D Games)

### Physics & Collision
- **Arcade Physics**: Use for simple 2D games with square/circle hitboxes.
- **Matter.js**: Use for complex 2D physics with non-uniform polygons.

### Sound Management
- **Rule**: Audio must be user-triggered (Browser Autoplay Policy).
- **Implementation**: Cache audio assets in `Preload()` to avoid clicking/lag during gameplay.

---

## πŸ›‘οΈ Critical Failure Modes (Anti-Patterns)

| Anti-Pattern | Result | Correction |
| :--- | :--- | :--- |
| **High Polygon Count** | Tab Crashes / Lag | Keep mobile target poly-count < 100k per scene. |
| **No "Loss of Context" Handling** | Black screen on resume | Implement `webglcontextlost` and `webglcontextrestored` listeners. |
| **Heavy Main Thread** | Input lag | Move non-rendering logic (Pathfinding, Worker-heavy math) to **Web Workers**. |

---

## Success Criteria (Web Gaming QA)
- [ ] Render loop achieves solid 60FPS on mid-range mobile browsers.
- [ ] Asset bundle size is optimized (Initial load < 5MB).
- [ ] Responsive design works for Portrait/Landscape orientations.
- [ ] GPU memory usage verified via `three-perf` or browser devtools.

Files in this skill

  • SKILL.md2.1 KB
  • core.py391 B
  • manifest.yaml204 B
  • tests/test_core.py329 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development β†’

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.