agentleFS
full-stack-skillsfull-stack-skills/threejs-skills/skills/threejs-geometries/SKILL.md

threejs-geometries

Skill9 starsChanged 54 days agoApache-2.0View on GitHub

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.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer built-in primitives when they fit before custom buffers.

    line 27
  2. Distinctive:

    When answering under this skill, prefer responses that:

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 / InstancedMesh geometry side (threejs-objects for mesh wrapper)
  • Extruding Shape along paths, TubeGeometry, LatheGeometry, ExtrudeGeometry
  • Text or decal addon geometries

IMPORTANT: geometries vs math

  • threejs-geometries = GPU-ready triangle data.
  • threejs-math = Box3, Sphere, Ray tests without mesh topology.

Trigger phrases include:

  • "BufferGeometry", "BufferAttribute", "ExtrudeGeometry", "Shape", "Curve"
  • "几何体", "缓冲几何", "挤出", "文字几何"

How to use this skill

  1. Prefer built-in primitives when they fit before custom buffers.
  2. For custom meshes: create BufferGeometry, set position, normal, uv, optional index; compute bounding volumes for culling.
  3. For instancing attributes, align divisor/count with InstancedMesh patterns in threejs-objects.
  4. For 2D profiles: build Shape/Path, extrude or lathe per docs; consult Extras Curve family for path sampling.
  5. For addon NURBS knots, follow Addons Curves pages sparingly—cite docs instead of copying full APIs.
  6. Dispose geometries when replacing meshes to avoid leaks.

See examples/workflow-extrude-shape.md.

Doc map (official)

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:

  1. Link BufferGeometry, a primitive, or ExtrudeGeometry / Shape as appropriate.
  2. Point instancing usage to threejs-objects for InstancedMesh patterns.
  3. Point morph targets and tracks to threejs-animation when deformation is time-driven.
  4. Reference BufferGeometryUtils (Addons Utils) only by name + docs link when merging/splitting.
  5. Emphasize dispose() when replacing large custom buffers.

References

Keywords

English: buffergeometry, extrude, shape, path, curve, primitives, instancing, three.js

中文: 几何体、BufferGeometry、挤出、Shape、曲线、实例化、three.js

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.