FSBar.Viz Namespace
| Type/Module | Description |
|
Categories for grouping attributes in the configurator panel. |
|
|
A single configurable visual attribute with metadata for panel rendering. |
|
|
Typed attribute-value DU mirroring the gRPC `VizAttributeValue` oneof (feature 040). Used by the scripting path to move values losslessly between wire and F# without resorting to `obj`. The existing `AttributeDescriptor.Get` / `Set` helpers still marshal via `obj` for backwards compatibility. |
|
|
|
|
|
Maps a normalized float32 value in [0..1] to a color. |
|
|
|
|
|
Static attribute descriptor registry — the single source of truth for what's configurable in the Viz style configurator. |
|
|
Configurator side panel — renders UI and handles input. |
|
|
High-level action emitted by the panel for the host (GameViz) to execute. |
|
|
Result of `ConfigPanel.handleInput`: updated panel state, optional updated config, and an optional action to execute on the host. |
|
|
State for the configurator side panel (feature 033-viz-style-configurator). ExpandedSections uses string names of AttributeCategory cases (kept as strings here so VizTypes remains independent of ConfigDescriptors). |
|
|
Resource economy snapshot for HUD display. |
|
|
BarData-derived per-unit encyclopedia entries. Shared between the Hub's Units-tab encyclopedia (`FSBar.Hub.App.Tabs.EncyclopediaTab`) and the feature-038 `UnitDisplayAdapter.ofEncyclopediaEntry` that builds static `UnitDisplay` previews from these entries. The record is intentionally flat / immutable so both the Hub UI and downstream adapters can consume it without threading a `BarData.UnitDef` pointer through their render paths. |
|
|
|
|
|
|
|
|
Transient visual effect with lifecycle. |
|
|
Transient visual event types for animated indicators. |
|
|
|
|
|
|
|
|
Complete game state for one rendered frame. |
|
|
Live REPL visualization API. Thread-safe, single viewer instance. |
|
|
Describes the type of input control rendered for an attribute. |
|
|
Selects which map data layer to render as the base. |
|
|
Renders map data layers to SKBitmap with caching. |
|
|
Engine-to-GameViz orchestration. |
|
|
Manages the lifecycle of a live visualization session connected to the BAR engine. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Toggle-able visual overlays rendered on top of the base layer. |
|
|
A serialized attribute value for preset storage. |
|
|
Offline preview and playback via SkiaViewer. |
|
|
Builds declarative Scene trees from game snapshots. |
|
|
|
|
|
Preset file I/O (JSON format). |
|
|
A named collection of visual attribute values. |
|
|
Adapter from `FSBar.SyntheticData` scenes to the renderer's `UnitDisplay` input. Feature 028-unit-viz-language — MVP data source is synthetic only; a live-game adapter consuming `FSBar.Client.TrackedUnit` is a follow-up. The adapter uses a small lookup table over the known synthetic DefIds to populate `Shape`, `Faction`, `Tier`, and `LabelCode`. Unknown DefIds fall back to `Bot`/`Neutral`/`T1` with a `??` label and no hard failure. |
|
|
|
|
|
|
|
|
|
|
|
Single source of truth for translating upstream unit shapes into `UnitDisplay` records before handing them to `UnitGlyph.buildUnit`. FR-002 ("single shared code path") relies on every caller going through this module instead of synthesising `UnitDisplay` values inline. |
|
|
Renders units and buildings using the information-dense visual language specified in feature 028-unit-viz-language. Consumers supply per-frame `UnitDisplay` values (MVP: `FSBar.SyntheticData`), and this module produces a `SkiaViewer.Scene` subtree suitable for composition into the main `SceneBuilder.buildScene` output. Classification, tier derivation, faction derivation, and label lookup happen inside this module and are cached per `DefId` — callers do not need to know about `BarData` at all. |
|
|
Default palettes and style values for the unit-glyph renderer (feature 028-unit-viz-language). Faction and team colors are kept in separate tables so identity information is never carried by a single color channel alone. |
|
|
|
|
|
Generated unit-label lookup table mapping each `BarData` unit internal name to a 1- or 2-character display code. Uniqueness is guaranteed per `(MovementShape, FactionId)` bucket — the rendered glyph's shape and stroke colour already distinguish factions and movement classes, so two units can share a label iff they differ in at least one of those two dimensions. Feature 028-unit-viz-language. |
|
Pure, deterministic label generator used at build time by
`scripts/gen-unit-labels.fsx` to produce `UnitLabels.generated.fs`.
Feature 028-unit-viz-language.
Unit labels are partitioned by `(MovementShape, FactionId)` and only
required to be unique *within* that bucket — the rendered glyph's
shape + stroke colour already distinguishes factions and movement
types, so a one-glyph label reads unambiguously alongside them.
Allocation order per bucket:
1. Preserve any label from `previous` that is still unique within
the bucket (SC-006 stability).
2. For each remaining name, propose a single-character label
derived from the internal name (first consonant → any letter
→ name digit), then sweep the global single-char pool (upper
Latin → lower Latin → digits → unique Greek letters).
3. When the single-char pool is exhausted in a bucket, fall back
to the two-char pool (`Aa` style) using the same name-derived
→ exhaustive sweep policy. Only the densest shape+faction
tails of `BarData` should ever reach this path.
|
|
|
Tracked unit snapshot for visualization. |
|
|
Camera/viewport state controlling the current view. |
|
|
User interaction commands. |
|
|
Visualization configuration record. |
|
|
Default values for visualization state. Lives in its own file (after UnitGlyphPalettes) so `defaultConfig.GlyphStyle` can reference `UnitGlyphPalettes.defaults` without a forward reference. |
FSBarV1_Archived