PHY: 各ノードがIDを持つことを明記

木の中のノードを一意に指すために必要で、キーのIDはIDXからの参照先に
なっている。スキーマ側には元からあったが本文に書いていなかった。
部品ノードも同じ形でIDを持つ。
あわせて木の説明から部品ノードが抜けていたのを補った。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 14:31:31 +09:00
co-authored by Claude Opus 5
parent d8db442fd5
commit b9997f8272
+5 -1
View File
@@ -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)[]
}