threejs-geometry
Built-in and custom 3D geometry creation with BufferGeometry, instancing, and path-based shapes.
- Includes 15+ built-in geometries: basic shapes (box, sphere, plane, cylinder, cone, torus), polyhedra (dodecahedron, icosahedron), and path-based forms (lathe, extrude, tube, text)
- Custom BufferGeometry with typed arrays for vertices, indices, normals, UVs, and per-vertex colors; supports interleaved buffers for memory efficiency
- InstancedMesh for rendering thousands of identical objects with per-instance transforms and colors; InstancedBufferGeometry for custom per-instance attributes
- Utilities for merging geometries, computing tangents, wireframe/edge visualization, point clouds, and lines; includes morph targets and runtime modification patterns
Three.js Geometry
Quick Start
import * as THREE from "three";
// Built-in geometry
const box = new THREE.BoxGeometry(1, 1, 1);
const sphere = new THREE.SphereGeometry(0.5, 32, 32);
const plane = new THREE.PlaneGeometry(10, 10);
// Create mesh
const material = new THREE.MeshStandardMaterial({ color: 0x00ff00 });
const mesh = new THREE.Mesh(box, material);
scene.add(mesh);
Built-in Geometries
More from cloudai-x/threejs-skills
threejs-animation
Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.
5.3Kthreejs-fundamentals
Three.js scene setup, cameras, renderer, Object3D hierarchy, coordinate systems. Use when setting up 3D scenes, creating cameras, configuring renderers, managing object hierarchies, or working with transforms.
4.3Kthreejs-shaders
Three.js shaders - GLSL, ShaderMaterial, uniforms, custom effects. Use when creating custom visual effects, modifying vertices, writing fragment shaders, or extending built-in materials.
3.6Kthreejs-interaction
Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences.
3.3Kthreejs-materials
Three.js materials - PBR, basic, phong, shader materials, material properties. Use when styling meshes, working with textures, creating custom shaders, or optimizing material performance.
3.2Kthreejs-postprocessing
Three.js post-processing - EffectComposer, bloom, DOF, screen effects. Use when adding visual effects, color grading, blur, glow, or creating custom screen-space shaders.
2.9K