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

+1 -8
View File
@@ -12,7 +12,6 @@ export const str = (key: string, label = key): PortDef => ({ key, label, type: '
export const obj = (key: string, label = key): PortDef => ({ key, label, type: 'object' });
export const any = (key: string, label = key): PortDef => ({ key, label, type: 'any' });
/** The same port with an inline value it carries while unconnected. */
export const withDefault = (port: PortDef, value: PropertyValue): PortDef => ({ ...port, default: value });
/** Outputs of the three collision events: the other body, its collider and the own collider. */
@@ -36,15 +35,11 @@ export const variableParam: PropertyDef = {
options: [],
};
/**
* A reference to an asset the node acts on (spawns, compares against). No `assetTypes`: any
* placeable asset is a valid answer, and restricting them would be guessing for the user.
*/
/** No `assetTypes`: any placeable asset is a valid answer here. */
export const assetParam: PropertyDef = { key: 'asset', label: 'Asset', kind: 'asset', default: '' };
// --- node factories --------------------------------------------------------------------------
/** A data node computing one number from `a` and `b`. */
export function binaryMath(type: string, description: string, fn: (a: number, b: number) => number): NodeDef {
return {
type,
@@ -58,7 +53,6 @@ export function binaryMath(type: string, description: string, fn: (a: number, b:
};
}
/** A data node computing one number from `value`. */
export function unaryMath(type: string, description: string, fn: (value: number) => number): NodeDef {
return {
type,
@@ -72,7 +66,6 @@ export function unaryMath(type: string, description: string, fn: (value: number)
};
}
/** A data node combining the booleans `a` and `b`. */
export function binaryLogic(
type: string,
description: string,