threejs-geometry

Create and edit Three.js BufferGeometry with attributes, normals, and indices.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/norrbacka/threejs_codex_base --skill threejs-geometry-norrbacka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-geometry
Source: https://github.com/norrbacka/threejs_codex_base/tree/main/.codex/skills/threejs-geometry
Command: npx skills add https://github.com/norrbacka/threejs_codex_base --skill threejs-geometry-norrbacka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create, edit, and optimize Three.js geometry without having to reconstruct BufferGeometry details from memory.

Core Features & Use Cases

  • Build standard primitives such as boxes, spheres, planes, cylinders, and custom path-based shapes.
  • Work directly with BufferGeometry, attributes, normals, uvs, indices, and interleaved buffers for advanced mesh control.
  • Improve runtime performance by merging static meshes, centering and scaling geometry, and using InstancedMesh for repeated objects.
  • Use it when generating procedural terrain, modifying vertices, creating wireframes or point clouds, or preparing assets for efficient rendering.

Quick Start

Ask the skill to create or modify Three.js geometry for your scene, including custom vertices, instanced objects, or merged meshes.

Frequently Asked Questions about threejs-geometry

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

FAQPage Schema
How do I create custom BufferGeometry and manage vertex attributes in Three.js?

To create custom BufferGeometry in Three.js, you define vertex positions, normals, and UVs as attributes, optionally using indexed geometry to avoid duplicating shared vertices. This provides advanced control over procedural shapes and custom meshes without reconstructing BufferGeometry details from memory.

What is the best way to reduce draw calls for repeated objects in a Three.js scene?

The best way to reduce draw calls for repeated objects is using InstancedMesh or merging static meshes. This optimization significantly improves runtime performance by batching geometry, preventing the rendering pipeline from processing individual objects separately.

How do I update normals and UVs after modifying vertices in Three.js?

Updating normals and UVs after modifying vertices requires recalculating the BufferGeometry attributes to maintain correct lighting and texture mapping. This ensures procedural terrain modifications or custom vertex editing render accurately without visual artifacts.

Can I generate procedural terrain and point clouds using Three.js geometry?

Yes, you can generate procedural terrain and point clouds by constructing custom BufferGeometry and manipulating vertex positions directly. This workflow supports creating dynamic landscapes, wireframes, and point-based visualizations for efficient rendering.

Why do I need interleaved buffers and indexed geometry in Three.js meshes?

Interleaved buffers and indexed geometry are needed in Three.js meshes to optimize memory usage and reduce vertex duplication. This attribute setup ensures efficient rendering and correct geometry structure for complex procedural modeling tasks.