Web 3d rendering

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

Web 3d rendering is an AI agent skill from the GitHub repository MRCalderon3D/everything-game-dev-code. Build real-time 3D scenes for browser games — scene/camera/light setup, glTF pipeline, GPU budgets, and disposal discipline.

How to use this skill

Skill file

Web 3D Rendering

Purpose

Build real-time 3D scenes for browser games — scene/camera/light setup, glTF pipeline, GPU budgets, and disposal discipline.

Use When

Inputs

Process

  1. wrap the renderer, scene, camera, and resize handling in one rendering module; gameplay code talks to a scene API, never to the framework's globals
  2. integrate with the game loop: simulation updates on the fixed timestep, rendering interpolates and draws once per animation frame; cap devicePixelRatio and resize the drawing buffer explicitly
  3. define camera and unit conventions once (projection, FOV, near/far, meters-per-unit) and document them where asset exporters and gameplay code both see them
  4. load models through one glTF pipeline: a loader wrapper that applies compression decoders (Draco/Meshopt, KTX2 textures when adopted), normalizes scale/orientation, and hands ownership to the scene owner
  5. light deliberately: prefer baked or faked lighting for static content, budget dynamic and shadow-casting lights per scene, and configure tone mapping and color space at project start
  6. keep GPU cost visible: track draw calls, triangles, and texture memory via renderer statistics; use instancing for repeated meshes and share materials/geometries instead of cloning them per entity
  7. give every geometry, material, texture, and render target a disposal owner; scene teardown disposes what it owns, and a repeated enter/leave cycle is verified flat using renderer memory stats

Outputs

Quality Bar

Common Failure Modes

Related Agents

Related Commands

Related Skills

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.