Trim needless comments and fix the picker width

Remove comments that only restate the code, keeping the section banners
and the notes that carry a reason, a measured fact or an external
contract.

ButtonOptions.width claimed to be a fixed width but only set minWidth,
so the Graph and Texture pickers grew with the name they showed. It is
now what it promises, with a separate minWidth for the buttons that have
two forms. Narrow buttons shrink their padding, otherwise a 24px icon
button had 8px left for its glyph and truncate dropped it entirely.

__gm.labelsDropped() guards that class: the overflow guard only saw text
that was too wide, never a label truncated to nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 15:52:05 +02:00
1 parent f16801aef3
commit 4d84231b9f
115 files changed
+707 -1564

No files matched your search

+10 -18
View File
@@ -1,42 +1,34 @@
import { type Position, type PropertyBag, toPosition, type Vec2 } from './Properties';
/**
* An asset placed inside a scene. It links to the asset by id, owns a position
* (assets have none) and may override individual asset properties. Overrides are
* sparse: only keys the user changed are stored; everything else follows the asset.
* An asset placed inside a scene. Overrides are sparse: only keys the user changed are stored,
* everything else follows the asset.
*/
export interface SceneObject {
id: string;
assetId: string;
/** Optional display name; falls back to the asset name when empty. */
/** Falls back to the asset name when empty. */
name: string;
/**
* Position **relative to the parent** (world position when there is no parent) plus the
* draw order `z`, which is relative as well. See `hierarchy.ts` for world coordinates.
*/
/** Relative to the parent, `z` included; see `hierarchy.ts` for world coordinates. */
position: Position;
/**
* Editor-only shift of where this object (and everything below it) is *drawn* in the scene
* view – never part of the game. It exists to pull objects apart that sit on top of each
* other, such as the title/win/lose screens of a game, without moving them for real.
* Editor-only shift of where this object and everything below it is drawn – never part of the
* game. It pulls apart objects that sit on top of each other without moving them for real.
*/
editorOffset: Vec2;
overrides: PropertyBag;
/**
* Parent object of the same scene, empty string = top level. Children move with their
* parent and are removed with it. Behaviors treat their parent as the "owner" the graph
* acts on.
* Parent object of the same scene, empty string = top level. Children move with their parent and
* are removed with it; behaviors treat their parent as the "owner" the graph acts on.
*/
parentId: string;
/**
* For objects that belong to a placed container: the id of the template object (inside
* the container asset) this one was instantiated from. Empty for everything else. This is
* the link that lets template changes reach the instances later on.
* The template object inside the container asset this one was instantiated from, empty for
* everything else – the link that lets template changes reach the instances later on.
*/
templateId: string;
}
/** Creates a scene object; `z` defaults to 0 when the caller only has a 2D point. */
export function createSceneObject(
id: string,
assetId: string,