From b9997f8272af30afe7a9efd003d879a67233f47d Mon Sep 17 00:00:00 2001 From: EwdErna Date: Sun, 20 Sep 2026 14:31:20 +0900 Subject: [PATCH] =?UTF-8?q?PHY:=20=E5=90=84=E3=83=8E=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=8CID=E3=82=92=E6=8C=81=E3=81=A4=E3=81=93=E3=81=A8?= =?UTF-8?q?=E3=82=92=E6=98=8E=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 木の中のノードを一意に指すために必要で、キーのIDはIDXからの参照先に なっている。スキーマ側には元からあったが本文に書いていなかった。 部品ノードも同じ形でIDを持つ。 あわせて木の説明から部品ノードが抜けていたのを補った。 Co-Authored-By: Claude Opus 5 --- PHYレイヤー.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)[] }