threejs-geometry

Create and optimize Three.js geometry with BufferGeometry and InstancedMesh.

Updated May 18, 2026
One-click install
npx skills add https://github.com/afovea/game-dev-skills --skill threejs-geometry-afovea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-geometry
Source: https://github.com/afovea/game-dev-skills/tree/main/plugins/game-tech/skills/threejs-geometry
Command: npx skills add https://github.com/afovea/game-dev-skills --skill threejs-geometry-afovea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of managing 3D geometry in Three.js, helping developers optimize draw calls and implement procedural meshes without manual trial and error.

Core Features & Use Cases

  • Geometry Optimization: Provides patterns for InstancedMesh and geometry merging to maintain high frame rates.
  • Procedural Generation: Offers templates for custom BufferGeometry, morph targets, and path-based shapes.
  • Use Case: Use this skill to convert thousands of individual static props into a single InstancedMesh to reduce GPU overhead in a web-based game.

Quick Start

Use the threejs-geometry skill to generate a custom BufferGeometry with specific vertex positions and normals for a procedural mesh.

Frequently Asked Questions about threejs-geometry

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Three.js geometry to reduce draw calls and GPU overhead?

Optimizing Three.js geometry involves using InstancedMesh and geometry merging to batch static objects into a single draw call. This approach minimizes GPU overhead and maintains high frame rates for performance-critical rendering.

How do I create custom procedural meshes using Three.js BufferGeometry?

Creating procedural meshes with BufferGeometry involves directly manipulating vertex positions and normals data. This skill provides templates for custom BufferGeometry, morph targets, and path-based shapes to generate procedural 3D assets programmatically.

What is the best way to handle thousands of static props in a Three.js web game?

The best way to handle thousands of static props is converting them into a single InstancedMesh. This technique drastically reduces draw calls and GPU overhead, ensuring performance-critical web-based game rendering stays smooth.

When do I need to use InstancedMesh instead of individual meshes for web rendering?

You need InstancedMesh when managing numerous identical or static 3D objects in Three.js environments. It is essential for efficient draw-call management and GPU-accelerated mesh rendering when individual meshes would cause performance bottlenecks.

Does this approach support morph targets and path-based shapes for procedural generation?

Yes, this approach supports procedural generation through custom BufferGeometry templates that include morph targets and path-based shapes. It allows for detailed vertex data manipulation required for complex procedural asset generation.