使い方
- インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
- 必要なツール、認証情報、対応環境を原文で確認します。
- 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/cesartevisual/threejs-skills --skill threejs-geometry開始前の確認
- 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
- スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。
Geometry and Instancing
Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions.
Choose built-in geometry for simple shapes, BufferGeometry for custom topology, and instancing for repeated geometry/material combinations. Keep topology density tied to silhouette and deformation, not arbitrary high segment counts.
Define indexed versus non-indexed data deliberately. Attribute vertex counts must agree; triangle winding controls front faces. UV seams and hard normals can require duplicated vertices. Recompute normals after topology changes when appropriate; normals alone do not create missing UVs or tangents.
For dynamic attributes, allocate capacity up front, choose usage before first rendering, mutate typed arrays, and flag needsUpdate. Use supported update ranges for partial writes. Refresh bounding volumes after changes that invalidate culling or picking. A bounding box is not automatically a precise collision shape.
With InstancedMesh, maintain a stable instance ID to application ID mapping. Update instance matrices/colors and their needsUpdate flags; recompute bounds after instance transforms change. Split large instance sets spatially when one enormous bound defeats culling. Plan selection/highlighting without cloning a material for every instance.
Keep generated geometry ownership explicit, reuse immutable assets, and dispose geometry only when its last consumer releases it. Verify normals under directional lighting, seams under a checker texture, culling at camera edges, and per-instance picking after updates.
API reference
Consult the official documentation for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.
