{"TotalCount":149,"Files":[{"Ident":"xaz.fps-starter-kit","Path":"Animation/SmoothVector2.cs","FileName":"SmoothVector2.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\nusing Sandbox;\n\nnamespace Goo.Animation;\n\npublic record struct SmoothVector2\n{\n    public Vector2 Current;\n    public Vector2 Target;\n    public Vector2 Velocity;\n    public float SmoothTime;\n\n    public SmoothVector2(Vector2 initial, float smoothTime)\n    {\n        Current = initial;\n        Target = initial;\n        Velocity = default;\n        SmoothTime = smoothTime;\n    }\n\n    public void Update(float dt)\n    {\n        float vx = Velocity.x, vy = Velocity.y;\n        Current = new Vector2(\n            MathX.SmoothDamp(Current.x, Target.x, ref vx, SmoothTime, dt),\n            MathX.SmoothDamp(Current.y, Target.y, ref vy, SmoothTime, dt));\n        Velocity = new Vector2(vx, vy);\n    }\n\n    public bool IsSettled =\u003E\n        MathF.Abs(Target.x - Current.x) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Target.y - Current.y) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.x) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.y) \u003C 0.0001f;\n\n    /// \u003Csummary\u003EAdvances by dt and returns true while still moving; chain calls with | (not ||) so every damper advances each frame.\u003C/summary\u003E\n    public bool Tick(float dt) { Update(dt); return !IsSettled; }\n}\n"},{"Ident":"xaz.fps-starter-kit","Path":"Core/StyleAccumulator.cs","FileName":"StyleAccumulator.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using Sandbox;\nusing Sandbox.Rendering;\nusing Sandbox.UI;\n\nnamespace Goo;\n\n// Style helpers hoisted so generated Blob facades share them. Keep the early-return form: an engine-type ternary that resolves bare null via an implicit string operator silently produces magenta (Color.Parse fallback) instead of the intended absent-property. See engine-fact memories.\n\ninternal static class StyleAccumulator\n{\n    static StyleList Rent(StyleList current)\n        =\u003E ReferenceEquals(current, StyleList.Empty)\n            ? BuildContext.Current.RentStyleList()\n            : current;\n\n    public static StyleList Add(StyleList current, StyleField field, Length? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromLength(value.Value));\n        return list;\n    }\n\n    public static StyleList Add\u003CTEnum\u003E(StyleList current, StyleField field, TEnum? value, System.Func\u003CTEnum, StyleValue\u003E wrap) where TEnum : struct\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, wrap(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, Color? value, System.Func\u003CColor, StyleValue\u003E wrap)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, wrap(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, string? value)\n    {\n        if (value is null) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromString(value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, float? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromSingle(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, bool? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromBoolean(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, int? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromInt32(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, Texture? value)\n    {\n        if (value is null) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromTexture(value));\n        return list;\n    }\n}\n"},{"Ident":"xaz.fps-starter-kit","Path":"FpsUI/FpsDemo.cs","FileName":"FpsDemo.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing Sandbox;\r\n\r\nnamespace Goo.FpsUI;\r\n\r\n// ============================================================================\r\n//  ALL demo / self-preview behaviour for the FPS UI pack lives in this ONE file.\r\n//\r\n//  DELETE THIS FILE to remove demo functionality.\r\n//  deleting this file makes every Demo inspector toggle disappear\r\n// ============================================================================\r\nstatic class FpsDemo\r\n{\r\n    static readonly string[] Names = { \u0022Vex\u0022, \u0022Korr\u0022, \u0022Juno\u0022, \u0022Rhys\u0022, \u0022Mara\u0022, \u0022Dane\u0022, \u0022Iko\u0022, \u0022Sol\u0022 };\r\n    static readonly (int Amount, string Action)[] Grants =\r\n    {\r\n        (100, \u0022Kill\u0022), (125, \u0022Headshot\u0022), (50, \u0022Assist\u0022), (200, \u0022Double Kill\u0022), (25, \u0022Hitmarker\u0022),\r\n    };\r\n\r\n    public static void Health( HealthModel m, ref float t, float dt )  // bleed in chunks, big heal when low\r\n    {\r\n        t \u002B= dt;\r\n        if ( t \u003C 2.4f ) return;\r\n        t = 0f;\r\n        if ( m.Health \u003C= m.MaxHealth * 0.3f ) m.Heal( m.MaxHealth * 0.65f );\r\n        else m.Damage( m.MaxHealth * 0.22f );\r\n    }\r\n\r\n    public static void Stamina( StaminaModel m, ref float t, float dt )  // sprint on/off cycle\r\n    {\r\n        t \u002B= dt;\r\n        if ( t \u003E= 3.1f ) { t = 0f; m.SetSprinting( !m.Sprinting ); }\r\n        if ( m.Stamina \u003C= 0f ) m.SetSprinting( false );\r\n    }\r\n\r\n    public static void Ammo( AmmoModel m, ref float t, float dt )  // steady fire, auto-reload on empty\r\n    {\r\n        t \u002B= dt;\r\n        if ( m.Reloading ) return;\r\n        if ( m.Mag \u003C= 0 ) { m.Reload(); return; }\r\n        if ( t \u003E= 0.18f ) { t = 0f; m.Fire(); }\r\n    }\r\n\r\n    public static void Crosshair( CrosshairModel m, ref float t, float dt )  // steady fire cadence\r\n    {\r\n        t \u002B= dt;\r\n        if ( t \u003E= 0.18f ) { t = 0f; m.Fire(); }\r\n    }\r\n\r\n    public static void Hitmarker( HitmarkerModel m, ref float t, float dt )  // periodic pop\r\n    {\r\n        t \u002B= dt;\r\n        if ( t \u003E= 0.5f ) { t = 0f; m.Pop( false ); }\r\n    }\r\n\r\n    public static void Killfeed( KillfeedModel m, ref float t, ref int pick, float dt )  // periodic fake kills\r\n    {\r\n        t \u002B= dt;\r\n        if ( t \u003C 2.2f ) return;\r\n        t = 0f;\r\n        string a = Names[pick % Names.Length];\r\n        string v = Names[(pick \u002B 3) % Names.Length];\r\n        // Alternate teams, occasionally make the local player the killer so the preview shows both.\r\n        bool youKill = pick % 3 == 0;\r\n        KillTeam at = youKill || pick % 2 == 0 ? KillTeam.Friendly : KillTeam.Enemy;\r\n        KillTeam vt = at == KillTeam.Friendly ? KillTeam.Enemy : KillTeam.Friendly;\r\n        pick\u002B\u002B;\r\n        m.Add( a, at, v, vt, attackerLocal: youKill );\r\n    }\r\n\r\n    public static void Xp( XpModel m, ref float t, ref int pick, float dt )  // periodic grants\r\n    {\r\n        t \u002B= dt;\r\n        if ( t \u003C 1.6f ) return;\r\n        t = 0f;\r\n        var g = Grants[pick % Grants.Length];\r\n        pick\u002B\u002B;\r\n        m.Add( g.Amount, g.Action );\r\n    }\r\n\r\n    public static void Scoreboard( ScoreboardModel m, ref float t, float dt )  // loop the clock, nudge scores, cycle variant\r\n    {\r\n        if ( m.TimeRemaining \u003C= 0f ) m.TimeRemaining = 600f;\r\n        t \u002B= dt;\r\n        if ( t \u003C 4f ) return;\r\n        t = 0f;\r\n        m.Mode = m.Mode switch\r\n        {\r\n            ScoreboardMode.Tdm        =\u003E ScoreboardMode.Domination,\r\n            ScoreboardMode.Domination =\u003E ScoreboardMode.Ffa,\r\n            _                         =\u003E ScoreboardMode.Tdm,\r\n        };\r\n        m.FriendlyScore = (m.FriendlyScore \u002B 7) % (m.ScoreLimit \u002B 1);\r\n        m.EnemyScore    = (m.EnemyScore \u002B 5) % (m.ScoreLimit \u002B 1);\r\n        m.PlayerScore  \u002B= 150;\r\n        m.LeaderScore   = Math.Max( m.LeaderScore, m.PlayerScore ) \u002B 50;\r\n        for ( int i = 0; i \u003C m.Points.Length; i\u002B\u002B )  // rotate cap ownership\r\n            m.Points[i] = (CapOwner)(((int)m.Points[i] \u002B 1) % 3);\r\n    }\r\n}\r\n\r\n// ---- per-widget demo hooks (the [Property] Demo toggle \u002B timers \u002B StepDemo body) ----\r\n\r\npublic sealed partial class HealthWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // self-animate in editor\r\n    float _demoT;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Health( _m, ref _demoT, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class StaminaWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // self-animate in editor\r\n    float _demoT;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Stamina( _m, ref _demoT, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class AmmoWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // self-fire in editor\r\n    float _demoT;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Ammo( _m, ref _demoT, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class CrosshairWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // self-fire in editor\r\n    float _demoT;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Crosshair( _m, ref _demoT, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class HitmarkerWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // periodic pop in editor\r\n    float _demoT;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Hitmarker( _m, ref _demoT, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class KillfeedWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // fake kills in editor\r\n    float _demoT;\r\n    int _demoPick;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Killfeed( _m, ref _demoT, ref _demoPick, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class XpWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // fake grants in editor\r\n    float _demoT;\r\n    int _demoPick;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Xp( _m, ref _demoT, ref _demoPick, dt );\r\n    }\r\n}\r\n\r\npublic sealed partial class ScoreboardWidget\r\n{\r\n    [Property] public bool Demo { get; set; } = true;  // self-animate in editor\r\n    float _demoT;\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n        FpsDemo.Scoreboard( _m, ref _demoT, dt );\r\n    }\r\n}\r\n\r\n// ---- the assembled HUD: one coordinated synthetic firefight ----\r\n\r\npublic sealed partial class FpsHud\r\n{\r\n    [Property, Group( \u0022General\u0022 )] public bool Demo { get; set; } = true;  // self-run a synthetic firefight in editor\r\n\r\n    readonly Random _demoRng = new();\r\n    float _hpT, _stT, _kfT, _xpT, _sbT;  // per-subsystem demo timers\r\n    int _kfPick, _xpPick;                // demo name / grant cursors\r\n    float _triggerT, _modeT;             // synthetic trigger square-wave \u002B fire-mode cycle\r\n\r\n    partial void StepDemo( float dt, ref bool active )\r\n    {\r\n        if ( !Demo ) return;\r\n        active = true;\r\n\r\n        // Cycle the fire mode every few seconds, then drive a synthetic trigger square-wave (held ~1s,\r\n        // released ~0.4s) through the real fire control so each mode visibly fires differently.\r\n        _modeT -= dt;\r\n        if ( _modeT \u003C= 0f ) { _modeT = 3.0f; CycleFireMode(); }\r\n        _fire.Mode = FireMode; _fire.BurstCount = BurstCount; _fire.Rpm = RoundsPerMinute;\r\n        _triggerT \u002B= dt;\r\n        bool trigger = _triggerT % 1.4f \u003C 1.0f;\r\n        if ( !_ammo.Reloading )\r\n        {\r\n            if ( _ammo.Mag \u003C= 0 ) _ammo.Reload();\r\n            else if ( _fire.Tick( trigger, dt ) )\r\n            {\r\n                _ammo.Fire(); _crosshair.Fire();\r\n                if ( _demoRng.NextSingle() \u003C 0.5f ) _hitmarker.Pop( _demoRng.NextSingle() \u003C 0.15f );\r\n            }\r\n        }\r\n\r\n        FpsDemo.Health( _health, ref _hpT, dt );\r\n        FpsDemo.Stamina( _stamina, ref _stT, dt );\r\n        FpsDemo.Killfeed( _killfeed, ref _kfT, ref _kfPick, dt );\r\n        FpsDemo.Xp( _xp, ref _xpT, ref _xpPick, dt );\r\n        if ( ShowScoreboard ) FpsDemo.Scoreboard( _scoreboard, ref _sbT, dt );\r\n    }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"FpsUI/FpsTarget.cs","FileName":"FpsTarget.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing Sandbox;\r\n\r\nnamespace Goo.FpsUI;\r\n\r\n// A drop-in shootable target for the FPS pack. Attach to any GameObject that has a Collider; the HUD\u0027s\r\n// hitscan damages it through the engine\u0027s Component.IDamageable interface (the same path TriggerHurt uses).\r\n// Exposes Health / IsDead / Name so FpsHud can drive the hitmarker, killfeed, and XP on a hit or kill.\r\n// Engine-side component, not a Goo panel.\r\n[Title( \u0022FPS Target\u0022 ), Category( \u0022FPS UI\u0022 ), Icon( \u0022my_location\u0022 )]\r\npublic sealed class FpsTarget : Component, Component.IDamageable\r\n{\r\n    [Property] public string Name { get; set; } = \u0022Target\u0022;                          // shown as the victim in the killfeed\r\n    [Property, Range( 1f, 1000f )] public float MaxHealth { get; set; } = 100f;       // health restored on enable / respawn\r\n    [Property] public bool RespawnOnDeath { get; set; } = true;                       // refill health a moment after dying\r\n    [Property, Range( 0.5f, 10f )] public float RespawnDelay { get; set; } = 3f;      // seconds dead before respawning\r\n\r\n    public float Health { get; private set; }\r\n    public bool IsDead =\u003E Health \u003C= 0f;\r\n\r\n    float _respawnAt;\r\n\r\n    protected override void OnEnabled() =\u003E Health = MaxHealth;\r\n\r\n    // Engine damage entry point: TriggerHurt volumes and the HUD\u0027s hitscan both call this.\r\n    public void OnDamage( in DamageInfo damage )\r\n    {\r\n        if ( IsDead ) return;                                       // already down, ignore extra hits\r\n        Health = Math.Max( 0f, Health - damage.Damage );\r\n        if ( IsDead \u0026\u0026 RespawnOnDeath ) _respawnAt = Time.Now \u002B RespawnDelay;\r\n    }\r\n\r\n    protected override void OnUpdate()\r\n    {\r\n        if ( IsDead \u0026\u0026 RespawnOnDeath \u0026\u0026 Time.Now \u003E= _respawnAt ) Health = MaxHealth;\r\n    }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"FpsUI/Models/CompassModel.cs","FileName":"CompassModel.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\n\r\nnamespace Goo.FpsUI;\r\n\r\n// Compass logic: a 0..360 heading plus the shortest signed angular delta the view uses to\r\n// place cardinal ticks. Engine-free.\r\npublic sealed class CompassModel\r\n{\r\n    public float Heading { get; private set; }  // current yaw, normalized 0..360\r\n\r\n    public void SetHeading( float yawDeg )       // set heading from game code (any range)\r\n        =\u003E Heading = ((yawDeg % 360f) \u002B 360f) % 360f;\r\n\r\n    // Signed delta from \u0060from\u0060 to \u0060to\u0060, in (-180, 180]. Used to position ticks around center.\r\n    public static float ShortestDelta( float from, float to ) =\u003E ((to - from \u002B 540f) % 360f) - 180f;\r\n\r\n    public bool Tick( float dt ) =\u003E false;  // heading changes drive rebuilds, not the damper\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"FpsUI/Widgets/Parts.cs","FileName":"Parts.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing Goo;\r\nusing Sandbox;\r\nusing Sandbox.UI;\r\nusing PanelTransform = Goo.PanelTransform;   // rule 18: ambiguous with Sandbox.UI otherwise\r\n\r\nnamespace Goo.FpsUI;\r\n\r\n// Shared, stateless view helpers. Each returns a fresh Container (never cache a Container).\r\nstatic class Parts\r\n{\r\n    public enum Corner { TopLeft, TopCenter, TopRight, BottomLeft, BottomRight, Center }\r\n\r\n    // Absolute fill spanning \u0060frac\u0060 (0..1) of its Relative parent\u0027s width, full height.\r\n    public static Container FillRect( string key, float frac, Color color, float radius ) =\u003E new()\r\n    {\r\n        Key = key, Position = PositionMode.Absolute, Top = 0, Left = 0,\r\n        Height = Length.Percent( 100 ),\r\n        Width = Length.Percent( Math.Clamp( frac, 0f, 1f ) * 100f ),\r\n        BorderRadius = radius, BackgroundColor = color,\r\n    };\r\n\r\n    // Absolute full-cover tint at a given opacity (flashes, warnings).\r\n    public static Container Overlay( string key, Color color, float opacity, float radius ) =\u003E new()\r\n    {\r\n        Key = key, Position = PositionMode.Absolute, Top = 0, Left = 0,\r\n        Width = Length.Percent( 100 ), Height = Length.Percent( 100 ),\r\n        BorderRadius = radius, BackgroundColor = color, Opacity = opacity,\r\n    };\r\n\r\n    // Pin \u0060child\u0060 to a screen corner/center inside a Relative, full-size root. \u0060m\u0060 is the edge inset.\r\n    // Container properties are init-only (record struct), so we use \u0060with\u0060 expressions per corner.\r\n    public static Container Anchor( string key, Corner c, float m, Container child )\r\n    {\r\n        var box = new Container\r\n        {\r\n            Key = key, Position = PositionMode.Absolute, PointerEvents = PointerEvents.None,\r\n            Children = { child },\r\n        };\r\n        return c switch\r\n        {\r\n            Corner.TopLeft     =\u003E box with { Top = m, Left = m },\r\n            Corner.TopRight    =\u003E box with { Top = m, Right = m },\r\n            Corner.BottomLeft  =\u003E box with { Bottom = m, Left = m },\r\n            Corner.BottomRight =\u003E box with { Bottom = m, Right = m },\r\n            Corner.TopCenter   =\u003E box with\r\n            {\r\n                Top = m, Left = Length.Percent( 50 ),\r\n                Transform = PanelTransform.Translate( Length.Percent( -50 ) ?? default, Length.Percent( 0 ) ?? default ),\r\n            },\r\n            _ =\u003E box with  // Center\r\n            {\r\n                Top = Length.Percent( 50 ), Left = Length.Percent( 50 ),\r\n                Transform = PanelTransform.Translate( Length.Percent( -50 ) ?? default, Length.Percent( -50 ) ?? default ),\r\n            },\r\n        };\r\n    }\r\n\r\n    // Pin \u0060child\u0060 horizontally centered, offset \u0060dy\u0060 px from the screen center (positive = down, negative = up).\r\n    public static Container CenterOffset( string key, float dy, Container child ) =\u003E new()\r\n    {\r\n        Key = key, Position = PositionMode.Absolute, PointerEvents = PointerEvents.None,\r\n        Top = Length.Percent( 50 ), Left = Length.Percent( 50 ),\r\n        Transform = PanelTransform.Translate( Length.Percent( -50 ) ?? default, Px.Of( dy ) ),\r\n        Children = { child },\r\n    };\r\n\r\n    // Pin \u0060child\u0060\u0027s top-left corner at a pixel offset from the screen center (positive dx = right, positive dy = down).\r\n    public static Container Offset( string key, float dx, float dy, Container child ) =\u003E new()\r\n    {\r\n        Key = key, Position = PositionMode.Absolute, PointerEvents = PointerEvents.None,\r\n        Top = Length.Percent( 50 ), Left = Length.Percent( 50 ),\r\n        Transform = PanelTransform.Translate( Px.Of( dx ), Px.Of( dy ) ),\r\n        Children = { child },\r\n    };\r\n\r\n    // Semi-opaque rounded backing behind a HUD readout, so text/bars stay legible over the world.\r\n    // Wraps one child and sizes to it, all card styling comes from the theme.\r\n    public static Container Panel( string key, FpsTheme t, Container child ) =\u003E new()\r\n    {\r\n        Key = key, Position = PositionMode.Relative,\r\n        Padding = t.PanelPad, BorderRadius = t.PanelRadius,\r\n        BackgroundColor = t.BackingBg,\r\n        Children = { child },\r\n    };\r\n\r\n    // A full-size, pointer-through, Relative root used by every standalone widget and the FpsHud.\r\n    public static Container Root( string key ) =\u003E new()\r\n    {\r\n        Key = key, Width = Length.Percent( 100 ), Height = Length.Percent( 100 ),\r\n        Position = PositionMode.Relative, PointerEvents = PointerEvents.None,\r\n    };\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"FpsUI/Widgets/StaminaWidget.cs","FileName":"StaminaWidget.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing Goo;\r\nusing Sandbox;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo.FpsUI;\r\n\r\n// Stateless presenter: the secondary (stamina/armor) bar.\r\nstatic class StaminaView\r\n{\r\n    public const float TrackW = 320f, TrackH = 10f;\r\n\r\n    public static Container Build( StaminaModel m, FpsTheme t )\r\n    {\r\n        float frac = m.ShownFraction;\r\n        Color fill = Color.Lerp( t.Warn, t.Good, frac );\r\n\r\n        var track = new Container\r\n        {\r\n            Key = \u0022stTrack\u0022, Position = PositionMode.Relative,\r\n            Width = TrackW, Height = TrackH, BackgroundColor = t.TrackBg,\r\n            BorderRadius = t.Radius, Overflow = OverflowMode.Hidden,\r\n            Children = { Parts.FillRect( \u0022fill\u0022, frac, fill, t.Radius ) },\r\n        };\r\n        if ( m.Flash \u003E 0.001f ) track.Children.Add( Parts.Overlay( \u0022flash\u0022, Color.White, m.Flash * 0.8f, t.Radius ) );\r\n        return track;\r\n    }\r\n}\r\n\r\n// Standalone stamina bar. Call Sprinting(bool) from your movement code each frame.\r\npublic sealed partial class StaminaWidget : GooPanel\u003CContainer\u003E\r\n{\r\n    [Property, Range( 1f, 1000f )] public float MaxStamina { get; set; } = 100f; // full-bar value\r\n    [Property, Range( 0.05f, 2f )] public float DrainRate { get; set; } = 0.55f;  // fraction of max drained per second while sprinting\r\n    [Property] public PlayerController? Player { get; set; }                      // player to gate sprint on when stamina is empty (null = skip gating)\r\n\r\n    readonly StaminaModel _m = new();\r\n    readonly FpsTheme _t = new();\r\n    bool _booted;\r\n    bool _sprintBlocked;\r\n    float _cachedRunSpeed;\r\n\r\n    void Boot() { _m.MaxStamina = MaxStamina; _m.Reset(); _booted = true; }\r\n\r\n    public void Sprinting( bool on ) =\u003E _m.SetSprinting( on ); // toggle sprint drain\r\n\r\n    // Demo-only seam: implemented in FpsDemo.cs, compiles out when that file is deleted.\r\n    partial void StepDemo( float dt, ref bool active );\r\n\r\n    protected override bool Tick( float dt )\r\n    {\r\n        if ( !_booted ) Boot();\r\n        _m.DrainRate = DrainRate;  // live-tunable\r\n        bool demo = false;\r\n        StepDemo( dt, ref demo );\r\n        if ( !demo )\r\n        {\r\n            Sprinting( Sandbox.Input.Down( \u0022run\u0022 ) );\r\n            FpsInput.ApplySprintGate( Player, _m.Stamina, ref _sprintBlocked, ref _cachedRunSpeed );\r\n        }\r\n        bool moving = _m.Tick( dt );\r\n        return demo || moving;\r\n    }\r\n\r\n    protected override Container Build()\r\n    {\r\n        if ( !_booted ) Boot();\r\n        var root = Parts.Root( \u0022fpsStamina\u0022 );\r\n        // Sits just above where the health bar would be (health height \u002B gap).\r\n        root.Children.Add( Parts.Anchor( \u0022a\u0022, Parts.Corner.BottomLeft, _t.Margin \u002B HealthView.TrackH \u002B 10f, Parts.Panel( \u0022bg\u0022, _t, StaminaView.Build( _m, _t ) ) ) );\r\n        return root;\r\n    }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"Internal/StatefulShapePanel.cs","FileName":"StatefulShapePanel.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing Sandbox;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo.Internal;\r\n\r\ninternal sealed class StatefulShapePanel : Panel, IStatefulEventHost\r\n{\r\n    internal Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n    internal bool    _userSetPointerEvents;\r\n    internal Action? _requestRebuild;\r\n    public Action? RequestRebuild { set =\u003E _requestRebuild = value; }\r\n\r\n    public void ApplyEvents(in BlobEvents events)\r\n    {\r\n        _onClick      = events.OnClick;\r\n        _onRightClick = events.OnRightClick;\r\n        _onMiddleClick = events.OnMiddleClick;\r\n        _onMouseEnter = events.OnMouseEnter;\r\n        _onMouseLeave = events.OnMouseLeave;\r\n        _onMouseDown  = events.OnMouseDown;\r\n        _onMouseUp    = events.OnMouseUp;\r\n        _onMouseMove  = events.OnMouseMove;\r\n    }\r\n\r\n    public bool HasEventHandlers =\u003E\r\n        _onClick != null || _onRightClick != null || _onMiddleClick != null || _onMouseEnter != null || _onMouseLeave != null ||\r\n        _onMouseDown != null || _onMouseUp != null || _onMouseMove != null;\r\n\r\n    public bool UserSetPointerEvents\r\n    {\r\n        get =\u003E _userSetPointerEvents;\r\n        set =\u003E _userSetPointerEvents = value;\r\n    }\r\n\r\n    // Apply a baked alpha texture as BackgroundImage. The shape color comes from\r\n    // BackgroundColor flowing through the engine\u0027s BgTint multiplier; this method\r\n    // is only responsible for the alpha mask.\r\n    public void ApplyShape(BlobKind kind, in ShapeParams shape)\r\n    {\r\n        Style.BackgroundImage = ShapeTextureCache.GetOrBake(kind, in shape);\r\n        Style.BackgroundSizeX = Length.Percent(100);\r\n        Style.BackgroundSizeY = Length.Percent(100);\r\n    }\r\n\r\n    public void ApplyPolygon(Vector2[] points)\r\n    {\r\n        Style.BackgroundImage = ShapeTextureCache.GetOrBakePolygon(points);\r\n        Style.BackgroundSizeX = Length.Percent(100);\r\n        Style.BackgroundSizeY = Length.Percent(100);\r\n    }\r\n\r\n    protected override void OnClick(MousePanelEvent e)       { base.OnClick(e);       EventDispatch.Fire(_onClick, e, _requestRebuild); }\r\n    protected override void OnRightClick(MousePanelEvent e)  { base.OnRightClick(e);  EventDispatch.Fire(_onRightClick, e, _requestRebuild); }\r\n    protected override void OnMiddleClick(MousePanelEvent e) { base.OnMiddleClick(e); EventDispatch.Fire(_onMiddleClick, e, _requestRebuild); }\r\n    protected override void OnMouseOver(MousePanelEvent e)   { base.OnMouseOver(e);   EventDispatch.Fire(_onMouseEnter, e, _requestRebuild); }\r\n    protected override void OnMouseOut(MousePanelEvent e)    { base.OnMouseOut(e);    EventDispatch.Fire(_onMouseLeave, e, _requestRebuild); }\r\n    protected override void OnMouseDown(MousePanelEvent e)   { base.OnMouseDown(e);   EventDispatch.Fire(_onMouseDown, e, _requestRebuild); }\r\n    protected override void OnMouseUp(MousePanelEvent e)     { base.OnMouseUp(e);     EventDispatch.Fire(_onMouseUp, e, _requestRebuild); }\r\n    protected override void OnMouseMove(MousePanelEvent e)   { base.OnMouseMove(e);   EventDispatch.Fire(_onMouseMove, e, _requestRebuild); }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"Internal/StatefulSvgPanel.cs","FileName":"StatefulSvgPanel.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo.Internal;\r\n\r\ninternal sealed class StatefulSvgPanel : Sandbox.UI.SvgPanel, IStatefulEventHost\r\n{\r\n    internal Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n    internal bool    _userSetPointerEvents;\r\n    internal Action? _requestRebuild;\r\n    public Action? RequestRebuild { set =\u003E _requestRebuild = value; }\r\n\r\n    public void ApplyEvents(in BlobEvents events)\r\n    {\r\n        _onClick      = events.OnClick;\r\n        _onRightClick = events.OnRightClick;\r\n        _onMiddleClick = events.OnMiddleClick;\r\n        _onMouseEnter = events.OnMouseEnter;\r\n        _onMouseLeave = events.OnMouseLeave;\r\n        _onMouseDown  = events.OnMouseDown;\r\n        _onMouseUp    = events.OnMouseUp;\r\n        _onMouseMove  = events.OnMouseMove;\r\n    }\r\n\r\n    public bool HasEventHandlers =\u003E\r\n        _onClick != null || _onRightClick != null || _onMiddleClick != null || _onMouseEnter != null || _onMouseLeave != null ||\r\n        _onMouseDown != null || _onMouseUp != null || _onMouseMove != null;\r\n\r\n    public bool UserSetPointerEvents\r\n    {\r\n        get =\u003E _userSetPointerEvents;\r\n        set =\u003E _userSetPointerEvents = value;\r\n    }\r\n\r\n    protected override void OnClick(MousePanelEvent e)       { base.OnClick(e);       EventDispatch.Fire(_onClick, e, _requestRebuild); }\r\n    protected override void OnRightClick(MousePanelEvent e)  { base.OnRightClick(e);  EventDispatch.Fire(_onRightClick, e, _requestRebuild); }\r\n    protected override void OnMiddleClick(MousePanelEvent e) { base.OnMiddleClick(e); EventDispatch.Fire(_onMiddleClick, e, _requestRebuild); }\r\n    protected override void OnMouseOver(MousePanelEvent e)   { base.OnMouseOver(e);   EventDispatch.Fire(_onMouseEnter, e, _requestRebuild); }\r\n    protected override void OnMouseOut(MousePanelEvent e)    { base.OnMouseOut(e);    EventDispatch.Fire(_onMouseLeave, e, _requestRebuild); }\r\n    protected override void OnMouseDown(MousePanelEvent e)   { base.OnMouseDown(e);   EventDispatch.Fire(_onMouseDown, e, _requestRebuild); }\r\n    protected override void OnMouseUp(MousePanelEvent e)     { base.OnMouseUp(e);     EventDispatch.Fire(_onMouseUp, e, _requestRebuild); }\r\n    protected override void OnMouseMove(MousePanelEvent e)   { base.OnMouseMove(e);   EventDispatch.Fire(_onMouseMove, e, _requestRebuild); }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"styles/form/_dropdown.scss","FileName":"_dropdown.scss","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"\r\n$primary: red !default;\r\n$primary-alt: white !default;\r\n\r\n$switch-padding: 6px !default;\r\n\r\n.button.popupbutton.dropdown\r\n{\r\n\tcursor: pointer;\r\n\ttransition: all .1s ease-out;\r\n\tposition: relative;\r\n\r\n\t\u003E .dropdown_indicator\r\n\t{\r\n\t\tposition: absolute;\r\n\t\tright: 8px;\r\n\t}\r\n\r\n\t\u0026.open\r\n\t{\r\n\t\tborder-bottom-left-radius: 1px;\r\n\t\tborder-bottom-right-radius: 1px;\r\n\t\ttransition: border-radius 0.2s ease-out;\r\n\t}\r\n}\r\n\r\nselect\r\n{\r\n\tmin-height: 40px;\r\n\r\n\t\u003E option\r\n\t{\r\n\t\tdisplay: none;\r\n\t}\r\n}"},{"Ident":"xaz.fps-starter-kit","Path":"styles/base/_navigator.scss","FileName":"_navigator.scss","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":".navigator-body\r\n{\r\n\t\u0026.hidden\r\n\t{\r\n\t\tdisplay: none;\r\n\t}\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"styles/base.scss","FileName":"base.scss","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"@import \u0022base/_splitcontainer.scss\u0022;\r\n@import \u0022base/_navigator.scss\u0022;\r\n\r\nbutton\r\n{\r\n\tcursor: pointer;\r\n}\r\n\r\nIconPanel\r\n{\r\n\tfont-family: Material Icons;\r\n}\r\n\r\n.is-half\r\n{\r\n\twidth: 50%;\r\n}\r\n\r\n.is-third\r\n{\r\n\twidth: 33%;\r\n}\r\n\r\n.is-quarter\r\n{\r\n\twidth: 25%;\r\n}\r\n\r\nbutton.has-subtitle\r\n{\r\n\tposition: relative;\r\n\tflex-direction: column;\r\n\tjustify-content: flex-start;\r\n\talign-items: flex-start;\r\n\tpadding-left: 40px; // icon space\r\n\r\n\t.iconpanel\r\n\t{\r\n\t\tposition: absolute;\r\n\t\tleft: 5px;\r\n\t\ttop: 0;\r\n\t\tbottom: 0;\r\n\t\talign-items: center;\r\n\t}\r\n\r\n\t.button-label\r\n\t{\r\n\t\tfont-weight: bold;\r\n\t}\r\n\r\n\t.button-subtitle\r\n\t{\r\n\t\tfont-size: 12px;\r\n\t\topacity: 0.5;\r\n\t\tmix-blend-mode: lighten;\r\n\t}\r\n}"},{"Ident":"xaz.fps-starter-kit","Path":"ui/components/packagelist.razor.scss","FileName":"packagelist.razor.scss","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":".package-list\r\n{\r\n    flex-shrink: 1;\r\n    flex-wrap: wrap;\r\n    flex-grow: 1;\r\n\r\n    h1\r\n    {\r\n        width: 100%;\r\n        margin-top: 50px;\r\n        font-size: 40px;\r\n    }\r\n\r\n    PackageCard\r\n    {\r\n        \u0026:hover\r\n        {\r\n            sound-in: \u0022ui.button.over\u0022;\r\n        }\r\n    }\r\n\r\n    VirtualGrid\r\n    {\r\n        width: 100%;\r\n        height: 100%;\r\n\r\n        .cell\r\n        {\r\n            \r\n        }\r\n    }\r\n}"},{"Ident":"xaz.fps-starter-kit","Path":".obj/__compiler_extra.cs","FileName":"__compiler_extra.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"global using static Sandbox.Internal.GlobalGameNamespace;\r\nglobal using Microsoft.AspNetCore.Components;\r\nglobal using Microsoft.AspNetCore.Components.Rendering;\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022AddonTitle\u0022, \u0022FPS Starter Kit\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022AddonIdent\u0022, \u0022fps-starter-kit\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022OrgIdent\u0022, \u0022xaz\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022Ident\u0022, \u0022xaz.fps-starter-kit\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022CompileTime\u0022, \u00226/15/2026 5:36:58 AM\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022EngineVersion\u0022, \u002225\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022EngineMinorVersion\u0022, \u00221\u0022 )]\r\n\r\n[assembly: System.Runtime.Versioning.TargetFramework( \u0022.NETCoreApp,Version=v9.0\u0022, FrameworkDisplayName = \u0022.NET 9.0\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyVersion(\u00220.0.119.0\u0022)]\r\n[assembly: global::System.Reflection.AssemblyFileVersion(\u00220.0.119.0\u0022)]"},{"Ident":"xaz.fps-starter-kit","Path":"Animation/Easing.cs","FileName":"Easing.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"namespace Goo.Animation;\n\npublic static class Easing\n{\n    public static readonly Sandbox.Utility.Easing.Function Linear      = Sandbox.Utility.Easing.Linear;\n    // CSS \u0022ease\u0022 is cubic-bezier(0.25,0.1,0.25,1.0); the engine exposes it via name lookup only.\n    public static readonly Sandbox.Utility.Easing.Function Ease        = Sandbox.Utility.Easing.GetFunction(\u0022ease\u0022);\n    public static readonly Sandbox.Utility.Easing.Function EaseIn      = Sandbox.Utility.Easing.EaseIn;\n    public static readonly Sandbox.Utility.Easing.Function EaseOut     = Sandbox.Utility.Easing.EaseOut;\n    public static readonly Sandbox.Utility.Easing.Function EaseInOut   = Sandbox.Utility.Easing.EaseInOut;\n    public static readonly Sandbox.Utility.Easing.Function ExpoIn      = Sandbox.Utility.Easing.ExpoIn;\n    public static readonly Sandbox.Utility.Easing.Function ExpoOut     = Sandbox.Utility.Easing.ExpoOut;\n    public static readonly Sandbox.Utility.Easing.Function ExpoInOut   = Sandbox.Utility.Easing.ExpoInOut;\n    public static readonly Sandbox.Utility.Easing.Function BounceIn    = Sandbox.Utility.Easing.BounceIn;\n    public static readonly Sandbox.Utility.Easing.Function BounceOut   = Sandbox.Utility.Easing.BounceOut;\n    public static readonly Sandbox.Utility.Easing.Function BounceInOut = Sandbox.Utility.Easing.BounceInOut;\n    public static readonly Sandbox.Utility.Easing.Function SineIn      = Sandbox.Utility.Easing.SineEaseIn;\n    public static readonly Sandbox.Utility.Easing.Function SineOut     = Sandbox.Utility.Easing.SineEaseOut;\n    public static readonly Sandbox.Utility.Easing.Function SineInOut   = Sandbox.Utility.Easing.SineEaseInOut;\n    public static readonly Sandbox.Utility.Easing.Function StepStart   = Sandbox.Utility.Easing.StepStart;\n    public static readonly Sandbox.Utility.Easing.Function StepEnd     = Sandbox.Utility.Easing.StepEnd;\n\n    public static Sandbox.Utility.Easing.Function? FromName(string name) =\u003E\n        Sandbox.Utility.Easing.TryGetFunction(name, out var fn) ? fn : null;\n\n    public static Sandbox.Utility.Easing.Function Steps(int count, bool atStart) =\u003E\n        Sandbox.Utility.Easing.Steps(count, atStart);\n\n    public static Sandbox.Utility.Easing.Function CubicBezier(float x1, float y1, float x2, float y2) =\u003E\n        Sandbox.Utility.Easing.CubicBezier(x1, y1, x2, y2);\n}\n"},{"Ident":"xaz.fps-starter-kit","Path":"Animation/Timeline.cs","FileName":"Timeline.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\nusing System.Collections.Immutable;\n\nnamespace Goo.Animation;\n\npublic readonly record struct Segment\n{\n    public float StartTime { get; init; }\n    public float Duration  { get; init; }\n    public Tween Tween     { get; init; }\n}\n\npublic readonly record struct TimelineSample\n{\n    public int   SegmentIndex { get; init; }\n    public float Value        { get; init; }\n}\n\npublic readonly record struct Timeline\n{\n    public ImmutableArray\u003CSegment\u003E Segments { get; init; }\n    public int   Iterations { get; init; }\n    public float Duration   { get; init; }\n\n    /// \u003Csummary\u003EAuto-concatenated: segment N starts where N-1 ends. Skips the internal sort because the input is ascending by construction.\u003C/summary\u003E\n    public static Timeline Sequence(params Tween[] tweens)\n    {\n        if (tweens == null || tweens.Length == 0)\n            throw new ArgumentException(\u0022Timeline requires at least one segment.\u0022, nameof(tweens));\n\n        var builder  = ImmutableArray.CreateBuilder\u003CSegment\u003E(tweens.Length);\n        float cursor = 0f;\n        for (int i = 0; i \u003C tweens.Length; i\u002B\u002B)\n        {\n            if (tweens[i].Duration \u003C= 0f)\n                throw new ArgumentException(\n                    $\u0022Timeline segment {i} has duration {tweens[i].Duration}; durations must be \u003E 0.\u0022,\n                    nameof(tweens));\n            builder.Add(new Segment\n            {\n                StartTime = cursor,\n                Duration  = tweens[i].Duration,\n                Tween     = tweens[i],\n            });\n            cursor \u002B= tweens[i].Duration;\n        }\n        return new Timeline\n        {\n            Segments   = builder.MoveToImmutable(),\n            Iterations = 1,\n            Duration   = cursor,\n        };\n    }\n\n    /// \u003Csummary\u003EExplicit timing: each entry is (absolute startTime, tween), gaps allowed; sorts internally so stored Segments are ascending by StartTime.\u003C/summary\u003E\n    public static Timeline At(params (float startTime, Tween tween)[] entries)\n    {\n        if (entries == null || entries.Length == 0)\n            throw new ArgumentException(\u0022Timeline requires at least one segment.\u0022, nameof(entries));\n\n        var arr = new Segment[entries.Length];\n        for (int i = 0; i \u003C entries.Length; i\u002B\u002B)\n        {\n            if (entries[i].startTime \u003C 0f)\n                throw new ArgumentException(\n                    $\u0022Timeline segment {i} has StartTime {entries[i].startTime}; StartTime must be \u003E= 0.\u0022,\n                    nameof(entries));\n            if (entries[i].tween.Duration \u003C= 0f)\n                throw new ArgumentException(\n                    $\u0022Timeline segment {i} has duration {entries[i].tween.Duration}; durations must be \u003E 0.\u0022,\n                    nameof(entries));\n            arr[i] = new Segment\n            {\n                StartTime = entries[i].startTime,\n                Duration  = entries[i].tween.Duration,\n                Tween     = entries[i].tween,\n            };\n        }\n        Array.Sort(arr, static (x, y) =\u003E x.StartTime.CompareTo(y.StartTime));\n\n        for (int i = 1; i \u003C arr.Length; i\u002B\u002B)\n        {\n            float prevEnd = arr[i - 1].StartTime \u002B arr[i - 1].Duration;\n            if (prevEnd \u003E arr[i].StartTime)\n                throw new ArgumentException(\n                    $\u0022Timeline segments {i - 1} and {i} overlap: segment {i - 1} ends at {prevEnd} but segment {i} starts at {arr[i].StartTime}.\u0022,\n                    nameof(entries));\n        }\n\n        float duration = arr[arr.Length - 1].StartTime \u002B arr[arr.Length - 1].Duration;\n        return new Timeline\n        {\n            Segments   = ImmutableArray.Create(arr),\n            Iterations = 1,\n            Duration   = duration,\n        };\n    }\n\n    public TimelineSample Eval(float elapsedSec)\n    {\n        if (Iterations \u003C= 0)\n        {\n            // Loop forever. Wrap into [0, Duration) using positive-result modulo.\n            if (elapsedSec \u003C 0f) elapsedSec = 0f;\n            elapsedSec %= Duration;\n        }\n        else\n        {\n            float totalPlayTime = Duration * Iterations;\n            if (elapsedSec \u003E= totalPlayTime) elapsedSec = Duration;\n            else if (elapsedSec \u003E Duration)\n            {\n                // Mid-play, cycle 2..Iterations: wrap into the canonical [0, Duration) range.\n                elapsedSec %= Duration;\n            }\n        }\n\n        int idx = -1;\n        for (int i = 0; i \u003C Segments.Length; i\u002B\u002B)\n        {\n            if (Segments[i].StartTime \u003C= elapsedSec) idx = i;\n            else break;\n        }\n\n        if (idx \u003C 0)\n            return new TimelineSample { SegmentIndex = -1, Value = 0f };\n\n        var seg     = Segments[idx];\n        float local = elapsedSec - seg.StartTime;\n        if (local \u003E seg.Duration) local = seg.Duration;\n\n        return new TimelineSample\n        {\n            SegmentIndex = idx,\n            Value        = seg.Tween.Eval(local),\n        };\n    }\n}\n\npublic static class TimelineExtensions\n{\n    public static Timeline Loop(this Timeline tl)         =\u003E tl with { Iterations = -1 };\n    public static Timeline Times(this Timeline tl, int n) =\u003E tl with { Iterations = n };\n}\n"},{"Ident":"xaz.fps-starter-kit","Path":"Core/Arc.Style.g.cs","FileName":"Arc.Style.g.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"// \u003Cauto-generated /\u003E\r\n// Generated by tools/StyleFacadeEmit. Do not edit by hand.\r\n// Source of truth: tools/StyleFacadeEmit/style-manifest.json\r\nusing Sandbox;\r\nusing Sandbox.Rendering;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\npublic readonly partial record struct Arc\r\n{\r\n    public Length? Width { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Width, value); }\r\n    public Length? Height { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Height, value); }\r\n    public Length? Margin { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Margin, value); }\r\n    public Length? MarginLeft { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginLeft, value); }\r\n    public Length? MarginTop { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginTop, value); }\r\n    public Length? MarginRight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginRight, value); }\r\n    public Length? MarginBottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginBottom, value); }\r\n    public Color? BackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? BackgroundTint { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundTint, value, StyleValue.FromColor); }\r\n    public Length? Bottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Bottom, value); }\r\n    public Length? Left { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Left, value); }\r\n    public Length? Right { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Right, value); }\r\n    public Length? Top { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Top, value); }\r\n    public Length? FlexBasis { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexBasis, value); }\r\n    public float? FlexGrow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexGrow, value); }\r\n    public float? FlexShrink { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexShrink, value); }\r\n    public Length? MaxHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxHeight, value); }\r\n    public Length? MaxWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxWidth, value); }\r\n    public Length? MinHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinHeight, value); }\r\n    public Length? MinWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinWidth, value); }\r\n    public float? Opacity { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Opacity, value); }\r\n    public PointerEvents? PointerEvents { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PointerEvents, value, StyleValue.FromPointerEvents); }\r\n    public PositionMode? Position { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Position, value, StyleValue.FromPositionMode); }\r\n    public Goo.PanelTransform? Transform { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Transform, value, StyleValue.FromPanelTransform); }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"Core/Blob.cs","FileName":"Blob.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing System.Collections;\r\nusing System.Collections.Immutable;\r\nusing Sandbox;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\n/// \u003Csummary\u003ERenders a run of text. Style it with the text and common style properties.\u003C/summary\u003E\r\npublic readonly partial record struct Text : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.Text;\r\n    /// \u003Csummary\u003EThe text to display.\u003C/summary\u003E\r\n    public string Content { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public Text(string content)\r\n    {\r\n        Content = content;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(Text other)\r\n        =\u003E Content == other.Content \u0026\u0026 Key == other.Key \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Content, Key);\r\n    // _style and event handlers intentionally excluded; mirrors Container per StructIntentEqualityTests.\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.Text;\r\n        frame.Key = Key;\r\n        frame.Content = Content;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Path = null;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003E\r\n/// The general-purpose layout blob. Holds children and exposes the full style surface:\r\n/// layout, flex, spacing, border, background, filters, transforms, and state variants.\r\n/// \u003C/summary\u003E\r\npublic readonly partial record struct Container : IBlob, IEnumerable\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.Container;\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key { get; init; }\r\n    internal readonly StyleList _style;\r\n    internal readonly Children _children;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n    internal readonly Action\u003CVector2\u003E?         _onMouseWheel;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n    /// \u003Csummary\u003ECalled when the mouse wheel scrolls over it. The argument is the wheel delta (y positive = scroll down). Setting this consumes the wheel so it does not bubble to an ancestor scroll container.\u003C/summary\u003E\r\n    public Action\u003CVector2\u003E? OnMouseWheel { init =\u003E _onMouseWheel = value; }\r\n\r\n    internal readonly Action\u003CDragEvent\u003E?  _onDragStart;\r\n    internal readonly Action\u003CDragEvent\u003E?  _onDrag;\r\n    internal readonly Action\u003CDragEvent\u003E?  _onDragEnd;\r\n    internal readonly Action\u003CPanelEvent\u003E? _onDragEnter;\r\n    internal readonly Action\u003CPanelEvent\u003E? _onDragLeave;\r\n    internal readonly Action\u003CPanelEvent\u003E? _onDrop;\r\n\r\n    /// \u003Csummary\u003ECalled when a drag begins on this blob.\u003C/summary\u003E\r\n    public Action\u003CDragEvent\u003E?  OnDragStart { init =\u003E _onDragStart = value; }\r\n    /// \u003Csummary\u003ECalled on each frame of an in-flight drag.\u003C/summary\u003E\r\n    public Action\u003CDragEvent\u003E?  OnDrag      { init =\u003E _onDrag      = value; }\r\n    /// \u003Csummary\u003ECalled when a drag started on this blob ends.\u003C/summary\u003E\r\n    public Action\u003CDragEvent\u003E?  OnDragEnd   { init =\u003E _onDragEnd   = value; }\r\n    /// \u003Csummary\u003ECalled when a dragged item enters this blob as a drop target.\u003C/summary\u003E\r\n    public Action\u003CPanelEvent\u003E? OnDragEnter { init =\u003E _onDragEnter = value; }\r\n    /// \u003Csummary\u003ECalled when a dragged item leaves this blob as a drop target.\u003C/summary\u003E\r\n    public Action\u003CPanelEvent\u003E? OnDragLeave { init =\u003E _onDragLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a dragged item is dropped on this blob.\u003C/summary\u003E\r\n    public Action\u003CPanelEvent\u003E? OnDrop      { init =\u003E _onDrop      = value; }\r\n\r\n    internal readonly ShaderEffect? _effect;\r\n    internal readonly DrawCallback? _draw;\r\n    internal readonly LayoutTransition? _layoutTransition;\r\n\r\n    /// \u003Csummary\u003EA custom shader effect to render this blob with (FrostedGlass, Spotlight, Particles, or a custom ShaderEffect). Drawn via IPanelDraw; coexists with Draw.\u003C/summary\u003E\r\n    public ShaderEffect? Effect { get =\u003E _effect; init =\u003E _effect = value; }\r\n    /// \u003Csummary\u003EA custom immediate-mode draw callback. Receives a \u003Csee cref=\u0022Canvas\u0022/\u003E for issuing batched primitive draws (rects, text, shadows, ...).\u003C/summary\u003E\r\n    public DrawCallback? Draw { get =\u003E _draw; init =\u003E _draw = value; }\r\n    /// \u003Csummary\u003EDeclared transition for layout position moves. When this blob\u0027s flex slot changes (pop, insert, reorder, reflow), it glides to the new position instead of snapping. Declare per child; survivors must be keyed.\u003C/summary\u003E\r\n    public LayoutTransition? LayoutTransition { get =\u003E _layoutTransition; init =\u003E _layoutTransition = value; }\r\n    /// \u003Csummary\u003EGlobal effect-addressing tag. When set and no inline \u003Csee cref=\u0022Effect\u0022/\u003E is given, the effect resolves from the host\u0027s effect manifest. May repeat across the tree; distinct from \u003Csee cref=\u0022Key\u0022/\u003E (sibling-local reconciliation identity).\u003C/summary\u003E\r\n    public string? Tag { get; init; }\r\n\r\n    /// \u003Csummary\u003EWhen true, a left click stops propagating before reaching a parent handler. Use on the content panel inside a scrim or popover so clicks inside do not dismiss the overlay.\u003C/summary\u003E\r\n    public bool SwallowClick { get; init; }\r\n\r\n    static readonly Action\u003CMousePanelEvent\u003E _swallowDelegate = e =\u003E e.StopPropagation();\r\n\r\n    public Container()\r\n    {\r\n        if (BuildContext._current == null)\r\n            throw new InvalidOperationException(\r\n                \u0022Container constructed outside Build(). Containers are short-lived: \u0022 \u002B\r\n                \u0022build them inside your Build() method, or in a helper function called from Build(). \u0022 \u002B\r\n                \u0022Static Container fields and instances held across rebuilds are not supported.\u0022);\r\n        _children = BuildContext._current.RentChildren();\r\n        _style = StyleList.Empty;\r\n        Key = null;\r\n        Tag = null;\r\n        _effect = null;\r\n        _draw = null;\r\n        _layoutTransition = null;\r\n    }\r\n\r\n    /// \u003Csummary\u003EThe child blobs added to this container during Build().\u003C/summary\u003E\r\n    public Children Children =\u003E _children;\r\n\r\n    /// \u003Csummary\u003EAdds a child blob. Called by collection-initializer syntax inside Build().\u003C/summary\u003E\r\n    public void Add\u003CT\u003E(in T child) where T : struct, IBlob =\u003E _children.Add(in child);\r\n\r\n    // IEnumerable is required by C# collection-initializer syntax; iteration is not a\r\n    // use case for Container, so this returns an empty enumerator.\r\n    IEnumerator IEnumerable.GetEnumerator() =\u003E Array.Empty\u003Cobject\u003E().GetEnumerator();\r\n\r\n\r\n    public bool Equals(Container other)\r\n        =\u003E Key == other.Key\r\n        \u0026\u0026 Tag == other.Tag\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style)\r\n        \u0026\u0026 ReferenceEquals(_draw, other._draw)\r\n        \u0026\u0026 Equals(_effect, other._effect)\r\n        \u0026\u0026 Nullable.Equals(_layoutTransition, other._layoutTransition);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E Key?.GetHashCode() ?? 0;\r\n    // _style, _children, event handlers, _draw, _effect, and _layoutTransition intentionally excluded\r\n    // from GetHashCode; Equals governs correctness -- see StructIntentEqualityTests.\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.Container;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = _children;\r\n        frame.Texture = null;\r\n        frame.Path = null;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = _effect;\r\n        frame.Tag = Tag;\r\n        frame.Draw = _draw;\r\n        frame.LayoutTransition = _layoutTransition;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        if (SwallowClick)\r\n        {\r\n            var onClick = _onClick;\r\n            frame.Events.OnClick = onClick is null\r\n                ? _swallowDelegate\r\n                : e =\u003E { e.StopPropagation(); onClick(e); };\r\n        }\r\n        else\r\n        {\r\n            frame.Events.OnClick = _onClick;\r\n        }\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n        frame.Events.OnMouseWheel = _onMouseWheel;\r\n        frame.Events.OnDragStart  = _onDragStart;\r\n        frame.Events.OnDrag       = _onDrag;\r\n        frame.Events.OnDragEnd    = _onDragEnd;\r\n        frame.Events.OnDragEnter  = _onDragEnter;\r\n        frame.Events.OnDragLeave  = _onDragLeave;\r\n        frame.Events.OnDrop       = _onDrop;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003E\r\n/// Displays an image from a live \u003Csee cref=\u0022T:Sandbox.Texture\u0022/\u003E or an asset path. Set one source, never both.\r\n/// Wrap in a \u003Csee cref=\u0022T:Goo.Container\u0022/\u003E for layout, background, border, or other styles it does not expose.\r\n/// \u003C/summary\u003E\r\npublic readonly partial record struct Image : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.Image;\r\n    /// \u003Csummary\u003EA live texture to display. Set this or \u003Csee cref=\u0022Path\u0022/\u003E, never both. Setting both renders nothing and warns.\u003C/summary\u003E\r\n    public Texture? Texture { get; init; }\r\n    /// \u003Csummary\u003EPath to an image asset, for example \u0022ui/logo.png\u0022. Set this or \u003Csee cref=\u0022Texture\u0022/\u003E, never both. Setting both renders nothing and warns.\u003C/summary\u003E\r\n    public string?  Path    { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string?  Key     { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public Image()\r\n    {\r\n        Texture = null;\r\n        Path = null;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(Image other)\r\n        =\u003E ReferenceEquals(Texture, other.Texture)\r\n        \u0026\u0026 Path == other.Path\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Texture, Path, Key);\r\n    // _style and event handlers intentionally excluded; mirrors Text/Container per StructIntentEqualityTests.\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.Image;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = Texture;\r\n        frame.Path = Path;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003ERenders a 3D \u003Csee cref=\u0022T:Sandbox.Scene\u0022/\u003E into the UI. Provide a live scene or a scene path.\u003C/summary\u003E\r\npublic readonly partial record struct ScenePanel : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.ScenePanel;\r\n    /// \u003Csummary\u003EA live scene to render. Set this or \u003Csee cref=\u0022ScenePath\u0022/\u003E.\u003C/summary\u003E\r\n    public Scene?  Scene      { get; init; }\r\n    /// \u003Csummary\u003EPath to a scene asset to render. Set this or \u003Csee cref=\u0022Scene\u0022/\u003E.\u003C/summary\u003E\r\n    public string? ScenePath  { get; init; }\r\n    /// \u003Csummary\u003EWhen true, renders the scene a single frame instead of every frame. Use for static previews.\u003C/summary\u003E\r\n    public bool    RenderOnce { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key        { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public ScenePanel()\r\n    {\r\n        Scene = null;\r\n        ScenePath = null;\r\n        RenderOnce = false;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(ScenePanel other)\r\n        =\u003E ReferenceEquals(Scene, other.Scene)\r\n        \u0026\u0026 ScenePath == other.ScenePath\r\n        \u0026\u0026 RenderOnce == other.RenderOnce\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Scene, ScenePath, RenderOnce, Key);\r\n    // _style and event handlers intentionally excluded; mirrors Image per StructIntentEqualityTests.\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.ScenePanel;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Scene = Scene;\r\n        frame.Path = ScenePath;\r\n        frame.RenderOnce = RenderOnce;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003ERenders an SVG asset, with an optional color override.\u003C/summary\u003E\r\npublic readonly partial record struct SvgPanel : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.SvgPanel;\r\n    /// \u003Csummary\u003EPath to the SVG asset to render, for example \u0022ui/icon.svg\u0022.\u003C/summary\u003E\r\n    public string? Path  { get; init; }\r\n    /// \u003Csummary\u003EOptional color to tint the SVG, as a CSS color string. Leave null to use the SVG\u0027s own colors.\u003C/summary\u003E\r\n    public string? Color { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key   { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public SvgPanel()\r\n    {\r\n        Path = null;\r\n        Color = null;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(SvgPanel other)\r\n        =\u003E Path == other.Path\r\n        \u0026\u0026 Color == other.Color\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Path, Color, Key);\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.SvgPanel;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Path = Path;\r\n        frame.Color = Color;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003EA pie wedge or ring segment. Spans from \u003Csee cref=\u0022StartAngle\u0022/\u003E to \u003Csee cref=\u0022EndAngle\u0022/\u003E, between \u003Csee cref=\u0022InnerRadius\u0022/\u003E and \u003Csee cref=\u0022OuterRadius\u0022/\u003E.\u003C/summary\u003E\r\npublic readonly partial record struct Sector : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.Sector;\r\n    /// \u003Csummary\u003EAngle where the wedge begins, in degrees.\u003C/summary\u003E\r\n    public float   StartAngle  { get; init; }\r\n    /// \u003Csummary\u003EAngle where the wedge ends, in degrees.\u003C/summary\u003E\r\n    public float   EndAngle    { get; init; }\r\n    /// \u003Csummary\u003EInner edge of the ring, as a fraction (0 to 1) of the frame box. 0 gives a solid wedge.\u003C/summary\u003E\r\n    public float   InnerRadius { get; init; }\r\n    /// \u003Csummary\u003EOuter edge of the ring, as a fraction (0 to 1) of the frame box.\u003C/summary\u003E\r\n    public float   OuterRadius { get; init; }\r\n    /// \u003Csummary\u003ECorner rounding, as a fraction (0 to 1) of the outer radius. 0 gives sharp corners.\u003C/summary\u003E\r\n    public float   CornerRadius { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key         { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public Sector()\r\n    {\r\n        StartAngle = 0f;\r\n        EndAngle = 0f;\r\n        InnerRadius = 0f;\r\n        OuterRadius = 0f;\r\n        CornerRadius = 0f;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(Sector other)\r\n        =\u003E StartAngle == other.StartAngle\r\n        \u0026\u0026 EndAngle == other.EndAngle\r\n        \u0026\u0026 InnerRadius == other.InnerRadius\r\n        \u0026\u0026 OuterRadius == other.OuterRadius\r\n        \u0026\u0026 CornerRadius == other.CornerRadius\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(StartAngle, EndAngle, InnerRadius, OuterRadius, CornerRadius, Key);\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.Sector;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Path = null;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = new ShapeParams { A = StartAngle, B = EndAngle, C = InnerRadius, D = OuterRadius, E = CornerRadius };\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003EA stroked arc line. Sweeps from \u003Csee cref=\u0022StartAngle\u0022/\u003E to \u003Csee cref=\u0022EndAngle\u0022/\u003E at a fixed \u003Csee cref=\u0022Radius\u0022/\u003E.\u003C/summary\u003E\r\npublic readonly partial record struct Arc : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.Arc;\r\n    /// \u003Csummary\u003EAngle where the arc begins, in degrees.\u003C/summary\u003E\r\n    public float   StartAngle  { get; init; }\r\n    /// \u003Csummary\u003EAngle where the arc ends, in degrees.\u003C/summary\u003E\r\n    public float   EndAngle    { get; init; }\r\n    /// \u003Csummary\u003ERadius of the arc, as a fraction (0 to 1) of the frame box.\u003C/summary\u003E\r\n    public float   Radius      { get; init; }\r\n    /// \u003Csummary\u003EThickness of the arc stroke.\u003C/summary\u003E\r\n    public float   StrokeWidth { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key         { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public Arc()\r\n    {\r\n        StartAngle = 0f;\r\n        EndAngle = 0f;\r\n        Radius = 0f;\r\n        StrokeWidth = 0f;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(Arc other)\r\n        =\u003E StartAngle == other.StartAngle\r\n        \u0026\u0026 EndAngle == other.EndAngle\r\n        \u0026\u0026 Radius == other.Radius\r\n        \u0026\u0026 StrokeWidth == other.StrokeWidth\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(StartAngle, EndAngle, Radius, StrokeWidth, Key);\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.Arc;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Path = null;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = new ShapeParams { A = StartAngle, B = EndAngle, C = Radius, D = StrokeWidth };\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n// Polygon: arbitrary-vertex filled shape baked into a 512x512 alpha mask. Unit coords in [0,1], treated as immutable (the cache key holds the reference). Click hit-testing uses the bounding rect (engine limitation).\r\n/// \u003Csummary\u003EA filled shape defined by arbitrary vertices in unit coordinates.\u003C/summary\u003E\r\npublic readonly partial record struct Polygon : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.Polygon;\r\n    /// \u003Csummary\u003EThe vertices, in unit coordinates from 0 to 1 (origin top-left, x right, y down). Treated as immutable: do not mutate the array after assigning it.\u003C/summary\u003E\r\n    public Vector2[]? Points { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string?    Key    { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public Polygon()\r\n    {\r\n        Points = null;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(Polygon other)\r\n        =\u003E ReferenceEquals(Points, other.Points)\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Points, Key);\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.Polygon;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Path = null;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = Points;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n// WebPanel: embeds an engine Chromium webview. The Url is the only content surface;\r\n// background-image and cursor are owned by the engine WebPanel itself per frame, so\r\n// the common-only facade keeps both out by construction.\r\n/// \u003Csummary\u003EEmbeds a web view via the engine\u0027s Chromium webview. \u003Csee cref=\u0022Url\u0022/\u003E is its only content surface.\u003C/summary\u003E\r\npublic readonly partial record struct WebPanel : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.WebPanel;\r\n    /// \u003Csummary\u003EThe URL to load in the web view.\u003C/summary\u003E\r\n    public string? Url { get; init; }\r\n    // Maps to engine WebSurface.InBackgroundMode.\r\n    /// \u003Csummary\u003EWhen true, throttles the view\u0027s script and repaint and pauses its media. Use for offscreen or hidden views.\u003C/summary\u003E\r\n    public bool Paused { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key { get; init; }\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E? OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public WebPanel()\r\n    {\r\n        Url = null;\r\n        Paused = false;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(WebPanel other)\r\n        =\u003E Url == other.Url\r\n        \u0026\u0026 Paused == other.Paused\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Url, Paused, Key);\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.WebPanel;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        frame.Path = Url;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = Paused;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder   = null;\r\n        frame.MaxLength     = null;\r\n        frame.Disabled      = false;\r\n        frame.Numeric       = false;\r\n        frame.MinValue      = null;\r\n        frame.MaxValue      = null;\r\n        frame.NumberFormat  = null;\r\n        frame.Multiline     = false;\r\n        frame.OnChange      = null;\r\n        frame.OnSubmit      = null;\r\n        frame.OnFocus       = null;\r\n        frame.OnBlur        = null;\r\n        frame.OnCancel      = null;\r\n        frame.MinLength     = null;\r\n        frame.CharacterRegex = null;\r\n        frame.StringRegex   = null;\r\n        frame.CanEnterChar  = null;\r\n        frame.Validate      = null;\r\n        frame.OnValidationChanged = null;\r\n        frame.IsControlled  = false;\r\n        frame.ValueAndInitialTextBothSet = false;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n\r\n/// \u003Csummary\u003EA text input wrapping the engine\u0027s TextEntry. Set \u003Csee cref=\u0022Value\u0022/\u003E for a controlled field driven by your state, or \u003Csee cref=\u0022InitialText\u0022/\u003E for an uncontrolled one; never both.\u003C/summary\u003E\r\npublic readonly partial record struct TextEntry : IBlob\r\n{\r\n    public static BlobKind Kind =\u003E BlobKind.TextEntry;\r\n\r\n    /// \u003Csummary\u003EThe field text in controlled mode, re-emitted each render to track your state. Set this or \u003Csee cref=\u0022InitialText\u0022/\u003E, never both.\u003C/summary\u003E\r\n    public string? Value        { get; init; }\r\n    /// \u003Csummary\u003EThe starting text in uncontrolled mode, set once when the field is created. Set this or \u003Csee cref=\u0022Value\u0022/\u003E, never both.\u003C/summary\u003E\r\n    public string? InitialText  { get; init; }\r\n    /// \u003Csummary\u003EHint text shown when the field is empty.\u003C/summary\u003E\r\n    public string? Placeholder  { get; init; }\r\n    /// \u003Csummary\u003EMaximum number of characters allowed. Null for no limit.\u003C/summary\u003E\r\n    public int?    MaxLength    { get; init; }\r\n    /// \u003Csummary\u003EWhen true, the field is read-only and does not accept input.\u003C/summary\u003E\r\n    public bool    Disabled     { get; init; }\r\n    /// \u003Csummary\u003EWhen true, the field accepts and wraps multiple lines.\u003C/summary\u003E\r\n    public bool    Multiline    { get; init; }\r\n    /// \u003Csummary\u003EWhen true, the field accepts numeric input only.\u003C/summary\u003E\r\n    public bool    Numeric      { get; init; }\r\n    /// \u003Csummary\u003EMinimum number of characters; shorter input is flagged invalid. Null for no minimum.\u003C/summary\u003E\r\n    public int?    MinLength    { get; init; }\r\n    /// \u003Csummary\u003ERegex each typed character must match; non-matching keystrokes are blocked. Null to allow any character.\u003C/summary\u003E\r\n    public string? CharacterRegex { get; init; }\r\n    /// \u003Csummary\u003ERegex the whole text must match to be valid. Null for no whole-text check.\u003C/summary\u003E\r\n    public string? StringRegex  { get; init; }\r\n    /// \u003Csummary\u003ESmallest accepted value when \u003Csee cref=\u0022Numeric\u0022/\u003E is true.\u003C/summary\u003E\r\n    public float?  MinValue     { get; init; }\r\n    /// \u003Csummary\u003ELargest accepted value when \u003Csee cref=\u0022Numeric\u0022/\u003E is true.\u003C/summary\u003E\r\n    public float?  MaxValue     { get; init; }\r\n    /// \u003Csummary\u003EFormat string applied to the value when \u003Csee cref=\u0022Numeric\u0022/\u003E is true.\u003C/summary\u003E\r\n    public string? NumberFormat { get; init; }\r\n    /// \u003Csummary\u003EStable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.\u003C/summary\u003E\r\n    public string? Key          { get; init; }\r\n\r\n    internal readonly StyleList _style;\r\n\r\n    internal readonly Action\u003Cstring\u003E? _onChange;\r\n    internal readonly Action\u003Cstring\u003E? _onSubmit;\r\n    internal readonly Action? _onFocus;\r\n    internal readonly Action\u003Cstring\u003E? _onBlur;\r\n    internal readonly Action? _onCancel;\r\n    internal readonly Func\u003Cchar, bool\u003E?   _canEnterChar;\r\n    internal readonly Func\u003Cstring, bool\u003E? _validate;\r\n    internal readonly Action\u003Cbool\u003E?       _onValidationChanged;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal readonly Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n\r\n    /// \u003Csummary\u003ECalled on each edit, with the new text.\u003C/summary\u003E\r\n    public Action\u003Cstring\u003E?           OnChange     { init =\u003E _onChange     = value; }\r\n    /// \u003Csummary\u003ECalled when the user submits the field, for example by pressing Enter, with the text.\u003C/summary\u003E\r\n    public Action\u003Cstring\u003E?           OnSubmit     { init =\u003E _onSubmit     = value; }\r\n    /// \u003Csummary\u003ECalled when the field gains focus.\u003C/summary\u003E\r\n    public Action?                   OnFocus      { init =\u003E _onFocus      = value; }\r\n    /// \u003Csummary\u003ECalled when the field loses focus, with its final text.\u003C/summary\u003E\r\n    public Action\u003Cstring\u003E?           OnBlur       { init =\u003E _onBlur       = value; }\r\n    /// \u003Csummary\u003ECalled when the user cancels editing, for example by pressing Escape.\u003C/summary\u003E\r\n    public Action?                   OnCancel     { init =\u003E _onCancel     = value; }\r\n    /// \u003Csummary\u003EPredicate gating each typed character; return false to block it. Composed with \u003Csee cref=\u0022CharacterRegex\u0022/\u003E and the engine\u0027s numeric/multiline rules.\u003C/summary\u003E\r\n    public Func\u003Cchar, bool\u003E?   CanEnterChar { init =\u003E _canEnterChar = value; }\r\n    /// \u003Csummary\u003EPredicate validating the whole text; return false to mark the field invalid. Can only tighten validity, never loosen engine rules.\u003C/summary\u003E\r\n    public Func\u003Cstring, bool\u003E? Validate     { init =\u003E _validate     = value; }\r\n    /// \u003Csummary\u003ECalled when the field\u0027s validity flips, with the current error state (true = invalid).\u003C/summary\u003E\r\n    public Action\u003Cbool\u003E?       OnValidationChanged { init =\u003E _onValidationChanged = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the left mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnClick      { init =\u003E _onClick      = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the right mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnRightClick { init =\u003E _onRightClick = value; }\r\n    /// \u003Csummary\u003ECalled when clicked with the middle mouse button.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnMiddleClick { init =\u003E _onMiddleClick = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer enters.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnMouseEnter { init =\u003E _onMouseEnter = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer leaves.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnMouseLeave { init =\u003E _onMouseLeave = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is pressed.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnMouseDown  { init =\u003E _onMouseDown  = value; }\r\n    /// \u003Csummary\u003ECalled when a mouse button is released.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnMouseUp    { init =\u003E _onMouseUp    = value; }\r\n    /// \u003Csummary\u003ECalled when the pointer moves over it.\u003C/summary\u003E\r\n    public Action\u003CMousePanelEvent\u003E?  OnMouseMove  { init =\u003E _onMouseMove  = value; }\r\n\r\n    public TextEntry()\r\n    {\r\n        Value = null;\r\n        InitialText = null;\r\n        Placeholder = null;\r\n        MaxLength = null;\r\n        Disabled = false;\r\n        Multiline = false;\r\n        Numeric = false;\r\n        MinLength = null;\r\n        CharacterRegex = null;\r\n        StringRegex = null;\r\n        MinValue = null;\r\n        MaxValue = null;\r\n        NumberFormat = null;\r\n        Key = null;\r\n        _style = StyleList.Empty;\r\n    }\r\n\r\n    public bool Equals(TextEntry other)\r\n        =\u003E Value == other.Value\r\n        \u0026\u0026 InitialText == other.InitialText\r\n        \u0026\u0026 Placeholder == other.Placeholder\r\n        \u0026\u0026 MaxLength == other.MaxLength\r\n        \u0026\u0026 Disabled == other.Disabled\r\n        \u0026\u0026 Multiline == other.Multiline\r\n        \u0026\u0026 Numeric == other.Numeric\r\n        \u0026\u0026 MinLength == other.MinLength\r\n        \u0026\u0026 CharacterRegex == other.CharacterRegex\r\n        \u0026\u0026 StringRegex == other.StringRegex\r\n        \u0026\u0026 MinValue == other.MinValue\r\n        \u0026\u0026 MaxValue == other.MaxValue\r\n        \u0026\u0026 NumberFormat == other.NumberFormat\r\n        \u0026\u0026 Key == other.Key\r\n        \u0026\u0026 StyleList.ContentsEqual(_style, other._style);\r\n\r\n    public override int GetHashCode()\r\n        =\u003E HashCode.Combine(Value, InitialText, Placeholder, MaxLength, Disabled, Numeric, Multiline, Key);\r\n\r\n    void IBlob.WriteTo(ref Frame frame)\r\n    {\r\n        frame.Kind = BlobKind.TextEntry;\r\n        frame.Key = Key;\r\n        frame.Content = \u0022\u0022;\r\n        frame.Style = _style;\r\n        frame.Children = null;\r\n        frame.Texture = null;\r\n        // Path slot carries the text value (controlled-or-initial). Reconciler reads\r\n        // IsControlled to decide whether to re-emit on Update.\r\n        frame.Path = Value ?? InitialText;\r\n        frame.IsControlled = Value is not null;\r\n        frame.ValueAndInitialTextBothSet = Value is not null \u0026\u0026 InitialText is not null;\r\n        frame.Scene = null;\r\n        frame.RenderOnce = false;\r\n        frame.Paused = false;\r\n        frame.Color = null;\r\n        frame.Shape = default;\r\n        frame.Points = null;\r\n        frame.Effect = null;\r\n        frame.Tag = null;\r\n        frame.Draw = null;\r\n        frame.LayoutTransition = null;\r\n        frame.Placeholder = Placeholder;\r\n        frame.MaxLength = MaxLength;\r\n        frame.Disabled = Disabled;\r\n        frame.Numeric = Numeric;\r\n        frame.MinLength = MinLength;\r\n        frame.CharacterRegex = CharacterRegex;\r\n        frame.StringRegex = StringRegex;\r\n        frame.MinValue = MinValue;\r\n        frame.MaxValue = MaxValue;\r\n        frame.NumberFormat = NumberFormat;\r\n        frame.Multiline = Multiline;\r\n        frame.OnChange = _onChange;\r\n        frame.OnSubmit = _onSubmit;\r\n        frame.OnFocus = _onFocus;\r\n        frame.OnBlur = _onBlur;\r\n        frame.OnCancel = _onCancel;\r\n        frame.CanEnterChar = _canEnterChar;\r\n        frame.Validate = _validate;\r\n        frame.OnValidationChanged = _onValidationChanged;\r\n        frame.Events.OnClick      = _onClick;\r\n        frame.Events.OnRightClick = _onRightClick;\r\n        frame.Events.OnMiddleClick = _onMiddleClick;\r\n        frame.Events.OnMouseEnter = _onMouseEnter;\r\n        frame.Events.OnMouseLeave = _onMouseLeave;\r\n        frame.Events.OnMouseDown  = _onMouseDown;\r\n        frame.Events.OnMouseUp    = _onMouseUp;\r\n        frame.Events.OnMouseMove  = _onMouseMove;\r\n    }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"Core/ChildrenExtensions.cs","FileName":"ChildrenExtensions.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace Goo;\r\n\r\n// Auto-keying loop helper: AddRange runs the builder once per item and keys by index when the builder leaves Key == null. User-supplied keys win.\r\npublic static class ChildrenExtensions\r\n{\r\n    // TBlob is generic over all blob kinds (Polygon, Text, ... not just Container). A \u0060with\u0060\r\n    // expression cannot key a generic struct, so the key is written into the Frame slot after\r\n    // Add \u2014 same assembly, same effect, no boxing.\r\n    public static void AddRange\u003CTItem, TBlob\u003E(\r\n        this Children                children,\r\n        IReadOnlyList\u003CTItem\u003E         items,\r\n        Func\u003Cint, TItem, TBlob\u003E      builder ) where TBlob : struct, IBlob\r\n    {\r\n        for ( int i = 0; i \u003C items.Count; i\u002B\u002B )\r\n        {\r\n            var child = builder( i, items[i] );\r\n            children.Add( in child );\r\n            ref Frame slot = ref children[children.Count - 1];\r\n            slot.Key ??= $\u0022_idx:{i}\u0022;\r\n        }\r\n    }\r\n\r\n    // Child argument is always evaluated; pass default(T) or a prebuilt local when condition is false (default skips the Container ctor).\r\n    public static void AddIf\u003CT\u003E( this Children children, bool condition, in T child ) where T : struct, IBlob\r\n    {\r\n        if ( condition ) children.Add( in child );\r\n    }\r\n}\r\n"},{"Ident":"xaz.fps-starter-kit","Path":"Core/Frame.cs","FileName":"Frame.cs","PackageType":"game","CodeKind":"Game","AssetVersionId":281557,"IsPrivate":false,"Code":"using System;\r\nusing System.Collections.Immutable;\r\nusing Sandbox;\r\n\r\nnamespace Goo;\r\n\r\n// Geometry payload for Sector / Arc Blobs.\r\n// Field meaning by BlobKind:\r\n//   Sector: A=StartAngle (deg, 0=up, cw\u002B), B=EndAngle, C=InnerRadius (0..1), D=OuterRadius (0..1), E=CornerRadius (0..1, fraction of outer radius)\r\n//   Arc:    A=StartAngle,                  B=EndAngle,  C=Radius (0..1, centerline), D=StrokeWidth (0..1), E=unused\r\npublic struct ShapeParams : System.IEquatable\u003CShapeParams\u003E\r\n{\r\n    public float A;\r\n    public float B;\r\n    public float C;\r\n    public float D;\r\n    public float E;   // Sector: CornerRadius (0..1 fraction of outer radius). Arc: unused (0).\r\n\r\n    public bool Equals(ShapeParams other) =\u003E A == other.A \u0026\u0026 B == other.B \u0026\u0026 C == other.C \u0026\u0026 D == other.D \u0026\u0026 E == other.E;\r\n    public override bool Equals(object? obj) =\u003E obj is ShapeParams p \u0026\u0026 Equals(p);\r\n    public override int GetHashCode() =\u003E System.HashCode.Combine(A, B, C, D, E);\r\n    public static bool operator ==(ShapeParams a, ShapeParams b) =\u003E a.Equals(b);\r\n    public static bool operator !=(ShapeParams a, ShapeParams b) =\u003E !a.Equals(b);\r\n\r\n    // Stable 64-bit hash of (kind, A, B, C, D) -- excludes E; used as a debug-name suffix only.\r\n    public long PackKey(BlobKind kind)\r\n    {\r\n        long qAngle(float deg)\r\n        {\r\n            float wrapped = deg - 360f * System.MathF.Floor(deg / 360f);\r\n            int n = (int)System.MathF.Round(wrapped * (16384f / 360f));\r\n            if (n == 16384) n = 0;\r\n            return (long)n;\r\n        }\r\n        long qUnit(float u)\r\n        {\r\n            int n = (int)System.MathF.Round(u * 16384f);\r\n            if (n \u003C 0) n = 0;\r\n            if (n \u003E 16383) n = 16383;\r\n            return (long)n;\r\n        }\r\n        return ((long)(byte)kind)\r\n             | (qAngle(A) \u003C\u003C 8)\r\n             | (qAngle(B) \u003C\u003C 22)\r\n             | (qUnit(C) \u003C\u003C 36)\r\n             | (qUnit(D) \u003C\u003C 50);\r\n    }\r\n}\r\n\r\ninternal struct Frame\r\n{\r\n    public BlobKind Kind;\r\n    public string? Key;\r\n    public string Content;     // Text-only; empty for non-Text\r\n    public StyleList Style;    // Container-only; null until StyleList added\r\n    public Children? Children; // Container-only; null otherwise\r\n    public BlobEvents Events;  // Container/Text/Image/ScenePanel; default = all null\r\n    public Texture? Texture;   // Image-only; null for non-Image\r\n    public string? Path;       // Image (texture path), ScenePanel (.scene path), SvgPanel (svg path), or WebPanel (URL); null otherwise\r\n    public Scene? Scene;       // ScenePanel-only; null for non-ScenePanel\r\n    public bool RenderOnce;    // ScenePanel-only; false for non-ScenePanel\r\n    public bool Paused;        // WebPanel-only; false for non-WebPanel\r\n    public string? Color;     // SvgPanel-only; null for non-SvgPanel\r\n    // TextEntry-only carry-fields. Path slot is reused for the text value via\r\n    // the Op.Text alias; these are the additional control-surface fields.\r\n    public string? Placeholder;\r\n    public int?    MaxLength;\r\n    public bool    Disabled;\r\n    public bool    Numeric;\r\n    public float?  MinValue;\r\n    public float?  MaxValue;\r\n    public string? NumberFormat;\r\n    public bool    Multiline;\r\n    public int?    MinLength;\r\n    public string? CharacterRegex;\r\n    public string? StringRegex;\r\n    public Func\u003Cchar, bool\u003E?   CanEnterChar;\r\n    public Func\u003Cstring, bool\u003E? Validate;\r\n    public Action\u003Cbool\u003E?       OnValidationChanged;\r\n    public Action\u003Cstring\u003E? OnChange;\r\n    public Action\u003Cstring\u003E? OnSubmit;\r\n    public Action?         OnFocus;\r\n    public Action\u003Cstring\u003E? OnBlur;\r\n    public Action?         OnCancel;\r\n    public bool    IsControlled;\r\n    public bool    ValueAndInitialTextBothSet;\r\n    public ShapeParams Shape;       // Sector / Arc only; default for non-shape kinds\r\n    public Vector2[]? Points;       // Polygon-only; null for non-Polygon kinds\r\n    // Custom-shader channel (Container only): a self-applying ShaderEffect, drawn via IPanelDraw.\r\n    public ShaderEffect? Effect;\r\n    // Global effect-addressing tag (Container only): resolves an effect from the host manifest.\r\n    public string? Tag;\r\n    // Custom-draw callback (Container only). Invoked from StatefulDrawPanel.OnDraw via the Canvas facade.\r\n    public DrawCallback? Draw;\r\n    // Declared layout-move transition (Container only); null = snap.\r\n    public LayoutTransition? LayoutTransition;\r\n    // Cell-only carry-fields; null/default for non-Cell kinds.\r\n    public Func\u003CCell\u003E?    CellFactory;   // first-mount path (new TCell())\r\n    public Action\u003CCell\u003E?  Seed;          // applied once at first mount only, in the fresh-create branch of DiffCell\r\n    public Action\u003CCell\u003E?  Configure;     // refresh props on the persistent instance each rebuild\r\n    public Type?          CellType;      // typeof(TCell): reuse-vs-fresh match check\r\n}\r\n"}]}