threejs-geometries
three.js geometry authoring: BufferGeometry, typed BufferAttribute and interleaved layouts, InstancedBufferGeometry, primitive Geometries (box/sphere/torus/etc.), ExtrudeGeometry and Shape/Path/Curve from Extras, WireframeGeometry, and addon geometries such as TextGeometry, DecalGeometry, RoundedBoxGeometry. Covers merged scope of procedural curves and extrusion formerly split as extras-curves; for animation morph targets see threejs-animation; for merging buffers utilities see official BufferGeometryUtils module in docs Utils addons.
How do I install this agent skill?
npx skills add https://github.com/full-stack-skills/threejs-skills --skill threejs-geometriesIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides technical guidance for using Three.js geometry APIs, including BufferGeometry and ExtrudeGeometry. No security issues were detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
When to use this skill
ALWAYS use this skill when the user mentions:
- Building or modifying
BufferGeometry, attributes, index buffers, draw ranges - Instancing via
InstancedBufferAttribute/InstancedMeshgeometry side (threejs-objects for mesh wrapper) - Extruding
Shapealong paths,TubeGeometry,LatheGeometry,ExtrudeGeometry - Text or decal addon geometries
IMPORTANT: geometries vs math
- threejs-geometries = GPU-ready triangle data.
- threejs-math =
Box3,Sphere,Raytests without mesh topology.
Trigger phrases include:
- "BufferGeometry", "BufferAttribute", "ExtrudeGeometry", "Shape", "Curve"
- "几何体", "缓冲几何", "挤出", "文字几何"
How to use this skill
- Prefer built-in primitives when they fit before custom buffers.
- For custom meshes: create
BufferGeometry, setposition,normal,uv, optionalindex; compute bounding volumes for culling. - For instancing attributes, align divisor/count with
InstancedMeshpatterns in threejs-objects. - For 2D profiles: build
Shape/Path, extrude or lathe per docs; consult Extras Curve family for path sampling. - For addon NURBS knots, follow Addons Curves pages sparingly—cite docs instead of copying full APIs.
- Dispose geometries when replacing meshes to avoid leaks.
See examples/workflow-extrude-shape.md.
Doc map (official)
| Docs section | Representative links |
|---|---|
| Core | https://threejs.org/docs/BufferGeometry.html |
| Geometries | https://threejs.org/docs/BoxGeometry.html |
| Extrude | https://threejs.org/docs/ExtrudeGeometry.html |
| Shape | https://threejs.org/docs/Shape.html |
Scope
- In scope: Core geometries, buffer core, curve/shape/extrusion workflows, selected addon geometries.
- Out of scope: Physics collision mesh baking; full CAD import pipelines.
Common pitfalls and best practices
- Missing normals break lighting; compute or import consistently.
- Wrong winding order flips faces—check side/culling.
- Huge attribute counts need LOD or simplification (modifiers in addons—mention only if user asks).
Documentation and version
Primitives and BufferGeometry live under Geometries and BufferGeometry in three.js docs. Curve, Shape, and extrusion APIs appear under Extras and Geometries—Addons Curves / Geometries document NURBS and text meshes; link those instead of copying long signatures.
Agent response checklist
When answering under this skill, prefer responses that:
- Link
BufferGeometry, a primitive, orExtrudeGeometry/Shapeas appropriate. - Point instancing usage to threejs-objects for
InstancedMeshpatterns. - Point morph targets and tracks to threejs-animation when deformation is time-driven.
- Reference
BufferGeometryUtils(Addons Utils) only by name + docs link when merging/splitting. - Emphasize
dispose()when replacing large custom buffers.
References
- https://threejs.org/docs/#Geometries
- https://threejs.org/docs/BufferGeometry.html
- https://threejs.org/docs/ExtrudeGeometry.html
Keywords
English: buffergeometry, extrude, shape, path, curve, primitives, instancing, three.js
中文: 几何体、BufferGeometry、挤出、Shape、曲线、实例化、three.js
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/full-stack-skills/threejs-skills/threejs-geometries">View threejs-geometries on skillZs</a>