New advertisers: 50% off your first month with code FIRSTMONTHSee slots
cloudai-x avatar

Threejs Geometry

Built-in and custom three.js geometry, from primitive shapes and text through BufferGeometry, instancing, and point clouds.

skills.sh installs
20.7K
GitHub stars
4.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers primitive shapes, path-based shapes (lathe, extrude, tube), 3D text, and custom BufferGeometry with attributes and indices
  • Includes attribute type choices (Float32, Uint16, normalized Uint8), in-place vertex updates, and interleaved buffers
  • Enforces a Uint16 index limit of 65535 vertices, and requires needsUpdate plus recomputed normals after edits
  • Designed for developers building 3D shapes, custom meshes, instanced meshes, or point clouds in WebGL or WebGPU

Install

$ npx -y skills add cloudai-x/threejs-skills --skill threejs-geometry -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Three.js Geometry

Targets three.js r186. Examples use WebGLRenderer; the WebGPU and TSL section uses WebGPURenderer.

Quick Start

import * as THREE from "three";

const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

const scene = new THREE.Scene();

const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100);
camera.position.set(0, 0, 5);

// A geometry is the shape; many meshes can share one geometry instance
const mesh = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), new THREE.MeshNormalMaterial());
scene.add(mesh);

renderer.setAnimationLoop(animate);

function animate() {
  mesh.rotation.y += 0.01;
  renderer.render(scene, camera);
}

Built-in Geometries

Basic Shapes

Details

Repository
github.com/cloudai-x/threejs-skills
Categories
3D, CAD & Modeling, Frontend & UI Code

More from cloudai-x/threejs-skills

All 10

Similar to Threejs Geometry

More 3D, CAD & Modeling