diff --git a/PHYレイヤー.md b/PHYレイヤー.md index 15e165a..66aec14 100644 --- a/PHYレイヤー.md +++ b/PHYレイヤー.md @@ -150,7 +150,8 @@ Transform は回転と平行移動だけを持つ剛体変換であり、合成 ## 保存形式 -各ノードは親から見た変換を持つ。キーとクラスターを混在させた木構造として保持する。 +各ノードは親から見た変換を持つ。キー・クラスター・部品ノードを混在させた木構造として保持する。 +各ノードはIDを持つ。木の中のノードを一意に指すために持ち、キーのIDは他レイヤーからの参照にも使う。 `phase1-json-schema.md` のPHYスキーマは、この節の Key 型(x2〜h2, decal, ghost, labels, switchOffset, partGroup, orientation, perKeyLED)と Component 型にまだ追従していない。 @@ -169,6 +170,7 @@ type Size = { h2?: number } type Key = { + id: string, transform: Transform, size: Size, profile: Profile, @@ -181,10 +183,12 @@ type Key = { perKeyLED?: boolean // per-key LEDの有無。省略時はfalse } type Component = { + id: string, transform: Transform, partGroup?: string // `@` 始まりは描画用の予約名 } type Cluster = { + id: string, transform: Transform, children: (Key | Cluster | Component)[] }