TriMesh
Overview
TriMesh creates custom 3D meshes from numpy arrays, giving you complete control over vertices and faces for procedural generation, real-time updates, and scientific visualization.
Basic Usage
Key Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | ndarray | - | (N, 3) float32 array of XYZ coordinates |
faces | ndarray | - | (M, 3) uint32 array of triangle indices |
colors | ndarray | - | (N, 3 or 4) array of per-vertex colors |
uv | ndarray | - | (N, 2) array of UV texture coordinates |
Learn More
- Loading 3D Meshes - 5 ways for loading meshes and how to update the mesh in real-time.
- Textured TriMesh - Adding textures to triangle meshes
- Materials and Textures - Advanced materials