Web canvas rendering

From MRCalderon3D/everything-game-dev-code · View interactive version

Web canvas rendering is an AI agent skill from the GitHub repository MRCalderon3D/everything-game-dev-code. Apply canvas 2D and WebGL rendering conventions for crisp scaling, clean layering, and batched draws.

How to use this skill

Skill file

Web Canvas Rendering

Purpose

Apply canvas 2D and WebGL rendering conventions for crisp scaling, clean layering, and batched draws.

Use When

Inputs

Process

  1. choose the renderer deliberately: canvas 2D for modest sprite counts and simplicity, WebGL (directly or via a framework) when draw volume or effects demand it
  2. size the backing store from the device pixel ratio and scale to CSS pixels, so output is sharp on high-density displays
  3. for pixel art, disable image smoothing, scale by integer factors where possible, and keep camera and sprite positions snapped to whole texture pixels
  4. define a fixed internal resolution with letterboxing or safe-area extension for mismatched aspect ratios, and document the scaling policy
  5. pack sprites into texture atlases and order draws by layer and atlas so state changes and overdraw stay low; use separate canvases or render layers only for content that updates at different rates

Outputs

Quality Bar

Common Failure Modes

Related Agents

Related Commands

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.