playcanvas/skills

assemble-scene

Use when composing PlayCanvas entity hierarchies from models, colliders, rigid bodies, and scripts, so each object has one semantic root and clear lifecycle.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/playcanvas/skills --skill assemble-scene

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Scene assembly

Each scene object has one named root. Put position, heading, rigidbody, collision, and scripts on the root, and the calibrated visual from calibrate-model below it. Apply calibration once; if the tuning record is missing, calibrate first.

  • Name roots by role, with predictable names for repeated instances.
  • Size colliders from measured bounds and keep them aligned with render bounds.
  • Space roots by the scaled footprint in the tuning record, not by pivot position. A non-90° yaw

rotates the footprint, so reserve its larger horizontal extent.

  • Keep UI, effects, cameras, and lights outside model hierarchies.
  • Remove the root through its surface's lifecycle and unregister events it owns.
  • Rigid bodies need Ammo loaded first (build-app).

Check placement

After a rendered frame, measure each support or attachment at the object's actual position, using a mount point, raycast, or geometry sample read through inspect-runtime. A positive gap floats; a negative gap penetrates. Overlapping world AABBs between unrelated roots are a failure unless two different views prove the overlap is empty space.

Read only the reference matching the code: direct Engine, React, or Web Components.

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills