feat: BindableFloat — universal value source binding for all scalar properties
Lint & Test / test (push) Successful in 1m20s

Introduce BindableFloat abstraction that allows any numeric property to be
either a static value or dynamically driven by a ValueSource. Backward-compatible
serialization: plain float when unbound, {value, source_id} dict when bound.

Backend:
- storage/bindable.py — BindableFloat dataclass + bfloat() helper
- 25+ scalar properties converted across all entity types
- Runtime VS acquisition in ColorStripStreamManager for CSS bindings
- All stream hot loops use self.resolve() for live values
- KeyColorsColorStripStream now inherits ColorStripStream

Frontend:
- BindableScalarWidget (slider + VS picker toggle) for all editors
- TypeScript BindableFloat type + helpers
- Graph editor edges for all bindable properties
- Audio source channel IconSelect grid

Fixes: daylight longitude, candlelight wind_strength/candle_type from_dict
This commit is contained in:
2026-03-29 00:33:24 +03:00
parent 5f70302263
commit 8a17bb5caa
48 changed files with 2512 additions and 887 deletions
@@ -1109,3 +1109,69 @@ textarea:focus-visible {
text-align: right;
font-variant-numeric: tabular-nums;
}
/* ── BindableScalarWidget ── */
.bindable-slider-row,
.bindable-vs-row {
display: flex;
align-items: center;
gap: 8px;
}
.bindable-slider-row input[type="range"] {
flex: 1;
min-width: 0;
}
.bindable-vs-row select,
.bindable-vs-row .entity-select-btn {
flex: 1;
min-width: 0;
}
.bindable-value {
min-width: 3.5ch;
text-align: right;
font-variant-numeric: tabular-nums;
color: var(--text-secondary);
font-size: 0.85rem;
}
.bindable-toggle {
flex-shrink: 0;
width: 26px;
height: 26px;
padding: 3px;
border: 1px solid var(--border-color);
border-radius: var(--radius);
background: var(--bg-secondary);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bindable-toggle:hover {
border-color: var(--primary-color);
color: var(--primary-color);
}
.bindable-toggle--active {
background: var(--primary-color);
border-color: var(--primary-color);
color: var(--bg-color);
}
.bindable-toggle--active:hover {
opacity: 0.85;
color: var(--bg-color);
}
.bindable-toggle .icon-xs {
width: 16px;
height: 16px;
fill: currentColor;
}