diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd
index f11ff3f..e8ac24b 100644
--- a/Client/origin-client/scenes/game/game_screen.gd
+++ b/Client/origin-client/scenes/game/game_screen.gd
@@ -157,6 +157,12 @@ var _unit_bodies : Dictionary = {} # instanceId → StaticBody3D
var _anim_players : Dictionary = {} # instanceId → AnimationPlayer (null if none)
var _unit_def_ids : Dictionary = {} # instanceId → card definition ID string
+# ── Skybox state ───────────────────────────────────────────────────────────────
+var _skybox_sky : Sky = null # the Sky object created in _setup_environment
+var _skybox_frames : Array = [] # Array[ImageTexture] for animated skybox frames
+var _skybox_frame_idx : int = 0
+var _skybox_timer : Timer = null
+
# ── Animation / facing state ───────────────────────────────────────────────────
var _local_is_p1 : bool = false # true when Auth.user_id == playerOneAccountId
var _prev_unit_hp : Dictionary = {} # instanceId → int, HP snapshot for damage detection
@@ -294,18 +300,121 @@ func _setup_spectator_ui() -> void:
func _setup_environment() -> void:
var env := Environment.new()
- var sky := Sky.new()
+ _skybox_sky = Sky.new()
var proc := ProceduralSkyMaterial.new()
proc.sky_top_color = Color(0.08, 0.10, 0.20)
proc.sky_horizon_color = Color(0.28, 0.38, 0.55)
proc.ground_bottom_color = Color(0.373, 0.374, 0.484, 1.0)
proc.ground_horizon_color = Color(0.20, 0.28, 0.38)
- sky.sky_material = proc
+ _skybox_sky.sky_material = proc
env.background_mode = Environment.BG_SKY
- env.sky = sky
+ env.sky = _skybox_sky
env.ambient_light_source = Environment.AMBIENT_SOURCE_SKY
env.ambient_light_energy = 0.6
$WorldEnvironment.environment = env
+ _fetch_skybox()
+
+func _fetch_skybox() -> void:
+ Network.request("content.get_skybox_config", {},
+ func(_type: String, resp: Variant) -> void:
+ var d := resp as Dictionary
+ var skybox := d.get("skybox", null)
+ if skybox == null:
+ return # no active skybox — keep procedural sky
+ var cdn_path : String = str(skybox.get("cdnPath", ""))
+ var is_animated : bool = bool(skybox.get("isAnimated", false))
+ var frame_count : int = int(skybox.get("frameCount", 1))
+ var fps : float = float(skybox.get("fps", 24.0))
+ if cdn_path.is_empty():
+ return
+ if is_animated:
+ _load_animated_skybox(cdn_path, frame_count, fps)
+ else:
+ _load_static_skybox(cdn_path),
+ func(code: String, msg: String) -> void:
+ push_warning("[GameScreen] Skybox fetch failed — %s: %s" % [code, msg]))
+
+func _load_static_skybox(url: String) -> void:
+ var http := HTTPRequest.new()
+ add_child(http)
+ http.request_completed.connect(
+ func(_result: int, code: int, _headers: PackedStringArray, data: PackedByteArray) -> void:
+ http.queue_free()
+ if code < 200 or code >= 300 or data.is_empty():
+ push_warning("[GameScreen] Failed to download skybox: HTTP %d" % code)
+ return
+ var img := Image.new()
+ var ext := url.get_extension().to_lower()
+ var err : int
+ if ext in ["jpg", "jpeg"]:
+ err = img.load_jpg_from_buffer(data)
+ elif ext == "webp":
+ err = img.load_webp_from_buffer(data)
+ else:
+ err = img.load_png_from_buffer(data)
+ if err != OK:
+ push_warning("[GameScreen] Failed to decode skybox image")
+ return
+ var tex := ImageTexture.create_from_image(img)
+ var mat := PanoramaSkyMaterial.new()
+ mat.panorama = tex
+ if is_instance_valid(_skybox_sky):
+ _skybox_sky.sky_material = mat)
+ http.request(url)
+
+func _load_animated_skybox(base_url: String, frame_count: int, fps: float) -> void:
+ _skybox_frames.clear()
+ _skybox_frame_idx = 0
+ var loaded : int = 0
+ var frames_arr: Array = []
+ frames_arr.resize(frame_count)
+
+ for i in frame_count:
+ var url := "%s/%d.png" % [base_url, i]
+ var http := HTTPRequest.new()
+ var frame_idx := i
+ add_child(http)
+ http.request_completed.connect(
+ func(_result: int, code: int, _headers: PackedStringArray, data: PackedByteArray) -> void:
+ http.queue_free()
+ loaded += 1
+ if code >= 200 and code < 300 and not data.is_empty():
+ var img := Image.new()
+ if img.load_png_from_buffer(data) == OK:
+ frames_arr[frame_idx] = ImageTexture.create_from_image(img)
+ if loaded == frame_count:
+ _skybox_frames = frames_arr.filter(func(f: Variant) -> bool: return f != null)
+ if not _skybox_frames.is_empty():
+ _start_skybox_animation(fps))
+ http.request(url)
+
+func _start_skybox_animation(fps: float) -> void:
+ _apply_skybox_frame(0)
+ if _skybox_frames.size() <= 1:
+ return
+ if _skybox_timer != null:
+ _skybox_timer.queue_free()
+ _skybox_timer = Timer.new()
+ _skybox_timer.wait_time = 1.0 / maxf(fps, 1.0)
+ _skybox_timer.autostart = true
+ _skybox_timer.timeout.connect(_on_skybox_frame_tick)
+ add_child(_skybox_timer)
+
+func _apply_skybox_frame(idx: int) -> void:
+ if _skybox_frames.is_empty() or not is_instance_valid(_skybox_sky):
+ return
+ var tex : ImageTexture = _skybox_frames[idx % _skybox_frames.size()]
+ if tex == null:
+ return
+ var mat := _skybox_sky.sky_material
+ if not (mat is PanoramaSkyMaterial):
+ mat = PanoramaSkyMaterial.new()
+ _skybox_sky.sky_material = mat
+ (mat as PanoramaSkyMaterial).panorama = tex
+
+func _on_skybox_frame_tick() -> void:
+ _skybox_frame_idx = (_skybox_frame_idx + 1) % _skybox_frames.size()
+ _apply_skybox_frame(_skybox_frame_idx)
# ── Camera ────────────────────────────────────────────────────────────────────
@@ -375,10 +484,10 @@ func _unhandled_input(event: InputEvent) -> void:
_apply_camera()
if _pan_active:
var ps := _cam_distance * 0.0015
- var right := _camera_rig.global_basis.x * -delta.x * ps
+ var right := _camera_rig.global_basis.x * delta.x * ps
var fwd := Vector3(_camera_rig.global_basis.z.x, 0,
_camera_rig.global_basis.z.z).normalized()
- _cam_pivot += right + fwd * delta.y * ps
+ _cam_pivot += right + fwd * -delta.y * ps
_cam_pivot.x = clampf(_cam_pivot.x, -6.0, 6.0)
_cam_pivot.z = clampf(_cam_pivot.z, -6.0, 6.0)
_apply_camera()
diff --git a/Server/src/SOR.Admin/Components/Layout/NavMenu.razor b/Server/src/SOR.Admin/Components/Layout/NavMenu.razor
index 1841a5a..9525470 100644
--- a/Server/src/SOR.Admin/Components/Layout/NavMenu.razor
+++ b/Server/src/SOR.Admin/Components/Layout/NavMenu.razor
@@ -122,6 +122,11 @@
Audio Config
+
+
+ Skyboxes
+
+
diff --git a/Server/src/SOR.Admin/Components/Pages/Content/SkyboxManagerPage.razor b/Server/src/SOR.Admin/Components/Pages/Content/SkyboxManagerPage.razor
new file mode 100644
index 0000000..8fe31f2
--- /dev/null
+++ b/Server/src/SOR.Admin/Components/Pages/Content/SkyboxManagerPage.razor
@@ -0,0 +1,304 @@
+@page "/content/skyboxes"
+@attribute [Authorize(Roles = "Admin,SuperAdmin")]
+@using Microsoft.EntityFrameworkCore
+@using SOR.Database.Contexts
+@using SOR.Database.Entities.Catalog
+@inject CatalogDbContext Db
+
+Skyboxes – SOR Admin
+
+
+
+
Skyboxes
+
+ Configure 3D environment skyboxes displayed in gameplay scenes.
+ Only the active skybox is sent to clients.
+
+
+
+ Refresh
+
+
+
+@if (_message is not null)
+{
+
+ @_message
+ _message = null">
+
+}
+
+
+
+
+ @if (_loading)
+ {
+
Loading…
+ }
+ else if (_skyboxes.Count == 0)
+ {
+
No skyboxes defined yet. Add one below.
+ }
+ else
+ {
+
+ }
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+ CDN Path
+ @if (_newIsAnimated)
+ {
+ (base folder — frames at /0.png, /1.png …)
+ }
+ else
+ {
+ (full URL to panoramic image)
+ }
+
+
+
+ @if (_newIsAnimated)
+ {
+
+ Frames
+
+
+
+ FPS
+
+
+ }
+
+
+ Add
+
+
+
+
+ Static : Set CDN path to a single panoramic/equirectangular image (PNG/JPG recommended).
+ Animated : Upload frames as /0.png, /1.png, … /{FrameCount-1}.png
+ inside the base folder, then set CDN path to that folder URL.
+
+
+
+
+@code {
+ private List _skyboxes = new();
+ private bool _loading;
+ private string? _message;
+ private bool _isError;
+
+ private string _newName = "";
+ private bool _newIsAnimated = false;
+ private string _newCdnPath = "";
+ private int _newFrameCount = 1;
+ private float _newFps = 24f;
+
+ protected override async Task OnInitializedAsync() => await LoadAsync();
+
+ private async Task LoadAsync()
+ {
+ _loading = true;
+ _skyboxes = await Db.SkyboxDefinitions.OrderBy(s => s.CreatedAt).ToListAsync();
+ _loading = false;
+ }
+
+ private async Task SaveAsync(SkyboxDefinition skybox)
+ {
+ if (!skybox.IsAnimated) { skybox.FrameCount = 1; skybox.Fps = 0f; }
+ try
+ {
+ await Db.SaveChangesAsync();
+ _message = $"Skybox \"{skybox.Name}\" saved.";
+ _isError = false;
+ }
+ catch (Exception ex)
+ {
+ _message = $"Save failed: {ex.Message}";
+ _isError = true;
+ }
+ }
+
+ private async Task SetActiveAsync(SkyboxDefinition skybox)
+ {
+ // Deactivate all, then activate the chosen one.
+ foreach (var s in _skyboxes)
+ s.IsActive = false;
+ skybox.IsActive = true;
+ try
+ {
+ await Db.SaveChangesAsync();
+ _message = $"\"{skybox.Name}\" is now the active skybox.";
+ _isError = false;
+ }
+ catch (Exception ex)
+ {
+ _message = $"Activate failed: {ex.Message}";
+ _isError = true;
+ }
+ }
+
+ private async Task DeactivateAsync(SkyboxDefinition skybox)
+ {
+ skybox.IsActive = false;
+ try
+ {
+ await Db.SaveChangesAsync();
+ _message = $"\"{skybox.Name}\" deactivated. No skybox is now active (clients use procedural sky).";
+ _isError = false;
+ }
+ catch (Exception ex)
+ {
+ _message = $"Deactivate failed: {ex.Message}";
+ _isError = true;
+ }
+ }
+
+ private async Task DeleteAsync(SkyboxDefinition skybox)
+ {
+ Db.SkyboxDefinitions.Remove(skybox);
+ try
+ {
+ await Db.SaveChangesAsync();
+ _skyboxes.Remove(skybox);
+ _message = $"Skybox \"{skybox.Name}\" deleted.";
+ _isError = false;
+ }
+ catch (Exception ex)
+ {
+ _message = $"Delete failed: {ex.Message}";
+ _isError = true;
+ }
+ }
+
+ private async Task AddAsync()
+ {
+ var s = new SkyboxDefinition
+ {
+ Id = Guid.NewGuid(),
+ Name = _newName.Trim(),
+ IsAnimated = _newIsAnimated,
+ CdnPath = _newCdnPath.Trim(),
+ FrameCount = _newIsAnimated ? Math.Max(1, _newFrameCount) : 1,
+ Fps = _newIsAnimated ? Math.Max(1f, _newFps) : 0f,
+ IsActive = false,
+ CreatedAt = DateTimeOffset.UtcNow,
+ };
+ Db.SkyboxDefinitions.Add(s);
+ try
+ {
+ await Db.SaveChangesAsync();
+ _skyboxes.Add(s);
+ _newName = _newCdnPath = "";
+ _newIsAnimated = false;
+ _newFrameCount = 1;
+ _newFps = 24f;
+ _message = $"Skybox \"{s.Name}\" added.";
+ _isError = false;
+ }
+ catch (Exception ex)
+ {
+ _message = $"Add failed: {ex.Message}";
+ _isError = true;
+ }
+ }
+}
diff --git a/Server/src/SOR.Content/ContentMessages.cs b/Server/src/SOR.Content/ContentMessages.cs
index 92d1d7b..3631e87 100644
--- a/Server/src/SOR.Content/ContentMessages.cs
+++ b/Server/src/SOR.Content/ContentMessages.cs
@@ -132,6 +132,31 @@ public sealed record CardAnimationBindingDto(
string? CastSoundCdnUrl,
string? ImpactSoundCdnUrl);
+// ── Skybox config ─────────────────────────────────────────────────────────────
+
+/// Fetch the currently active skybox definition (if any).
+public sealed record GetSkyboxConfigRequest;
+
+///
+/// Response for content.get_skybox_config.
+/// Skybox is null when no skybox is active (client keeps the default procedural sky).
+///
+public sealed record GetSkyboxConfigResponse(SkyboxDefinitionDto? Skybox);
+
+///
+/// Describes one skybox for use in the 3D gameplay scene.
+///
+/// Static: CdnPath is the full URL to a panoramic image (PNG/JPG).
+/// Animated: CdnPath is the base folder URL; frames are at {CdnPath}/0.png, /1.png, etc.
+///
+public sealed record SkyboxDefinitionDto(
+ Guid Id,
+ string Name,
+ bool IsAnimated,
+ string CdnPath,
+ int FrameCount,
+ float Fps);
+
// ── BGM config ───────────────────────────────────────────────────────────────
/// Fetch all active background music tracks (keyed by game context).
diff --git a/Server/src/SOR.Content/Handlers/ContentGetSkyboxConfigHandler.cs b/Server/src/SOR.Content/Handlers/ContentGetSkyboxConfigHandler.cs
new file mode 100644
index 0000000..566dd55
--- /dev/null
+++ b/Server/src/SOR.Content/Handlers/ContentGetSkyboxConfigHandler.cs
@@ -0,0 +1,39 @@
+namespace SOR.Content.Handlers;
+
+using Microsoft.EntityFrameworkCore;
+using SOR.Database.Contexts;
+using SOR.Networking.Abstractions.Messaging;
+using SOR.Networking.Abstractions.Transport;
+using SOR.Shared.Networking;
+
+///
+/// content.get_skybox_config — returns the currently active skybox definition, or null if none.
+/// The client applies it to the WorldEnvironment in the gameplay scene.
+///
+internal sealed class ContentGetSkyboxConfigHandler : IMessageHandler
+{
+ private readonly CatalogDbContext _catalogDb;
+
+ public ContentGetSkyboxConfigHandler(CatalogDbContext catalogDb)
+ {
+ _catalogDb = catalogDb;
+ }
+
+ public string MessageType => "content.get_skybox_config";
+
+ public async Task HandleAsync(
+ IClientMessage message,
+ AuthenticatedConnection connection,
+ CancellationToken ct)
+ {
+ var skybox = await _catalogDb.SkyboxDefinitions
+ .AsNoTracking()
+ .Where(s => s.IsActive)
+ .OrderByDescending(s => s.CreatedAt)
+ .Select(s => new SkyboxDefinitionDto(s.Id, s.Name, s.IsAnimated, s.CdnPath, s.FrameCount, s.Fps))
+ .FirstOrDefaultAsync(ct);
+
+ return ServerMessage.Reply("content.get_skybox_config.ack", message.Seq,
+ new GetSkyboxConfigResponse(skybox));
+ }
+}
diff --git a/Server/src/SOR.Content/ServiceRegistration.cs b/Server/src/SOR.Content/ServiceRegistration.cs
index 267ad70..7d6191e 100644
--- a/Server/src/SOR.Content/ServiceRegistration.cs
+++ b/Server/src/SOR.Content/ServiceRegistration.cs
@@ -24,6 +24,7 @@ public static class ServiceRegistration
services.AddTransient();
services.AddTransient();
services.AddTransient();
+ services.AddTransient();
return services;
}
diff --git a/Server/src/SOR.Database/Contexts/CatalogDbContext.cs b/Server/src/SOR.Database/Contexts/CatalogDbContext.cs
index 1877a29..246de7f 100644
--- a/Server/src/SOR.Database/Contexts/CatalogDbContext.cs
+++ b/Server/src/SOR.Database/Contexts/CatalogDbContext.cs
@@ -28,7 +28,8 @@ public sealed class CatalogDbContext : DbContext
public DbSet CdnUploadRecords => Set();
public DbSet TileModelBindings => Set();
public DbSet TileBottomModels => Set();
- public DbSet AudioConfigs => Set();
+ public DbSet AudioConfigs => Set();
+ public DbSet SkyboxDefinitions => Set();
protected override void OnModelCreating(ModelBuilder builder)
{
@@ -162,5 +163,14 @@ public sealed class CatalogDbContext : DbContext
e.HasIndex(g => g.Context);
e.HasIndex(g => g.IsActive);
});
+
+ builder.Entity(e =>
+ {
+ e.ToTable("skybox_definitions");
+ e.HasKey(s => s.Id);
+ e.Property(s => s.Name).IsRequired();
+ e.Property(s => s.CdnPath).IsRequired();
+ e.HasIndex(s => s.IsActive);
+ });
}
}
diff --git a/Server/src/SOR.Database/Entities/Catalog/SkyboxDefinition.cs b/Server/src/SOR.Database/Entities/Catalog/SkyboxDefinition.cs
new file mode 100644
index 0000000..d5838d2
--- /dev/null
+++ b/Server/src/SOR.Database/Entities/Catalog/SkyboxDefinition.cs
@@ -0,0 +1,49 @@
+namespace SOR.Database.Entities.Catalog;
+
+///
+/// Defines a skybox displayed in the 3D gameplay scene.
+///
+/// Static skyboxes: CdnPath is the full URL to a single panoramic image (PNG/JPG/HDR).
+/// Animated skyboxes: CdnPath is the base URL of a frame folder.
+/// Frames are named {CdnPath}/0.png, {CdnPath}/1.png, … {CdnPath}/{FrameCount-1}.png.
+/// The client downloads all frames and cycles through them at Fps frames per second.
+///
+/// Only the skybox with IsActive = true is served to clients.
+/// At most one skybox should be active at a time; the admin panel enforces this.
+///
+public sealed class SkyboxDefinition
+{
+ public Guid Id { get; set; } = Guid.NewGuid();
+
+ /// Human-readable display name shown in the admin panel.
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// When false: CdnPath is a direct URL to a single panoramic image.
+ /// When true: CdnPath is a base folder URL; frames are sequential PNGs starting at /0.png.
+ ///
+ public bool IsAnimated { get; set; }
+
+ ///
+ /// For static: full CDN URL to the panoramic image (e.g. https://cdn.sor.gg/skyboxes/night.png).
+ /// For animated: base folder URL without trailing slash (e.g. https://cdn.sor.gg/skyboxes/aurora).
+ ///
+ public string CdnPath { get; set; } = string.Empty;
+
+ ///
+ /// Number of animation frames. Always 1 for static skyboxes.
+ /// Animated frames are expected at {CdnPath}/0.png … {CdnPath}/{FrameCount-1}.png.
+ ///
+ public int FrameCount { get; set; } = 1;
+
+ /// Playback speed in frames per second. Ignored for static skyboxes.
+ public float Fps { get; set; } = 24f;
+
+ ///
+ /// When true, this skybox is served to game clients.
+ /// Deactivate all others before activating a new one.
+ ///
+ public bool IsActive { get; set; }
+
+ public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
+}
diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260321114732_AddSkyboxDefinitions.Designer.cs b/Server/src/SOR.Database/Migrations/Catalog/20260321114732_AddSkyboxDefinitions.Designer.cs
new file mode 100644
index 0000000..b9c7c43
--- /dev/null
+++ b/Server/src/SOR.Database/Migrations/Catalog/20260321114732_AddSkyboxDefinitions.Designer.cs
@@ -0,0 +1,541 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using SOR.Database.Contexts;
+
+#nullable disable
+
+namespace SOR.Database.Migrations.Catalog
+{
+ [DbContext(typeof(CatalogDbContext))]
+ [Migration("20260321114732_AddSkyboxDefinitions")]
+ partial class AddSkyboxDefinitions
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasDefaultSchema("catalog")
+ .HasAnnotation("ProductVersion", "8.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("ActionName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AnimationCdnUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AnimationTrackName")
+ .HasColumnType("text");
+
+ b.Property("CardDefinitionId")
+ .HasColumnType("uuid");
+
+ b.Property("CastSoundCdnUrl")
+ .HasColumnType("text");
+
+ b.Property("ImpactSoundCdnUrl")
+ .HasColumnType("text");
+
+ b.Property("IsAiGenerated")
+ .HasColumnType("boolean");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CardDefinitionId", "ActionName")
+ .IsUnique();
+
+ b.ToTable("card_animation_bindings", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AssetType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CardDefinitionId")
+ .HasColumnType("uuid");
+
+ b.Property("CdnUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ContentETag")
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("IsAiGenerated")
+ .HasColumnType("boolean");
+
+ b.Property("MimeType")
+ .HasColumnType("text");
+
+ b.Property("ModelFacingDirection")
+ .HasColumnType("text");
+
+ b.Property("ModelTintMaskUrl")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CardDefinitionId", "AssetType");
+
+ b.ToTable("card_assets", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AbilitiesJson")
+ .HasColumnType("jsonb")
+ .HasColumnName("abilities");
+
+ b.Property("Affinity")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AttackSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("AttackType")
+ .HasColumnType("text");
+
+ b.Property("BlockedSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("CanAttack")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeAttacked")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeBlocked")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeObstructed")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeSacrificed")
+ .HasColumnType("boolean");
+
+ b.Property("CanDefend")
+ .HasColumnType("boolean");
+
+ b.Property("CanMove")
+ .HasColumnType("boolean");
+
+ b.Property("CanUseAbility")
+ .HasColumnType("boolean");
+
+ b.Property("CardType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CollectorNumber")
+ .HasColumnType("integer");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Damage")
+ .HasColumnType("integer");
+
+ b.Property("DamagedSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("DeathSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("DefinitionVersion")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint")
+ .HasDefaultValue(0L);
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("EffectsJson")
+ .HasColumnType("jsonb")
+ .HasColumnName("effects");
+
+ b.Property("Genus")
+ .HasColumnType("text[]");
+
+ b.Property("IsPublished")
+ .HasColumnType("boolean");
+
+ b.Property("IsRetired")
+ .HasColumnType("boolean");
+
+ b.Property("MaxAttackRange")
+ .HasColumnType("integer");
+
+ b.Property("MaxChannelRange")
+ .HasColumnType("integer");
+
+ b.Property("MaxDefense")
+ .HasColumnType("integer");
+
+ b.Property("MaxHealth")
+ .HasColumnType("integer");
+
+ b.Property("MinAttackRange")
+ .HasColumnType("integer");
+
+ b.Property("MinChannelRange")
+ .HasColumnType("integer");
+
+ b.Property("ModelScale")
+ .HasColumnType("real");
+
+ b.Property("ModelTintColor")
+ .HasColumnType("text");
+
+ b.Property("MoveSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("MovementPoints")
+ .HasColumnType("integer");
+
+ b.Property("MovementType")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("OtherCostsJson")
+ .HasColumnType("jsonb")
+ .HasColumnName("other_costs");
+
+ b.Property("PreviousTierId")
+ .HasColumnType("uuid");
+
+ b.Property("Rarity")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("RequiresLos")
+ .HasColumnType("boolean");
+
+ b.Property("RetiredAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("SetId")
+ .HasColumnType("uuid");
+
+ b.Property("SpCost")
+ .HasColumnType("integer");
+
+ b.Property("StCost")
+ .HasColumnType("integer");
+
+ b.Property("TerramorphaMode")
+ .HasColumnType("text");
+
+ b.Property("Tier")
+ .HasColumnType("integer");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Affinity");
+
+ b.HasIndex("CardType");
+
+ b.HasIndex("DefinitionVersion");
+
+ b.HasIndex("Name");
+
+ b.HasIndex("PreviousTierId");
+
+ b.HasIndex("Rarity");
+
+ b.HasIndex("SetId");
+
+ b.HasIndex("IsPublished", "SetId");
+
+ b.ToTable("card_definitions", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code")
+ .IsUnique();
+
+ b.ToTable("card_sets", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CdnUploadRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("ContentType")
+ .HasColumnType("text");
+
+ b.Property("IsAiGenerated")
+ .HasColumnType("boolean");
+
+ b.Property("ObjectKey")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Prefix")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("PublicUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UploadedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsAiGenerated");
+
+ b.HasIndex("ObjectKey")
+ .IsUnique();
+
+ b.HasIndex("Prefix");
+
+ b.ToTable("cdn_upload_records", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Context")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("TrackCdnUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TrackName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Context");
+
+ b.HasIndex("IsActive");
+
+ b.ToTable("game_audio_configs", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.SkyboxDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CdnPath")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Fps")
+ .HasColumnType("real");
+
+ b.Property("FrameCount")
+ .HasColumnType("integer");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("IsAnimated")
+ .HasColumnType("boolean");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsActive");
+
+ b.ToTable("skybox_definitions", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.TileBottomModel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CdnKey")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("PublicUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsActive");
+
+ b.ToTable("tile_bottom_models", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.TileModelBinding", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Affinity")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ModelCdnKey")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ModelPublicUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Shape")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TexturePublicUrl")
+ .HasColumnType("text");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Affinity", "Shape")
+ .IsUnique();
+
+ b.ToTable("tile_model_bindings", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b =>
+ {
+ b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition")
+ .WithMany("AnimationBindings")
+ .HasForeignKey("CardDefinitionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("CardDefinition");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b =>
+ {
+ b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition")
+ .WithMany("Assets")
+ .HasForeignKey("CardDefinitionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("CardDefinition");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
+ {
+ b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "PreviousTier")
+ .WithMany()
+ .HasForeignKey("PreviousTierId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("SOR.Database.Entities.Catalog.CardSet", "Set")
+ .WithMany("Cards")
+ .HasForeignKey("SetId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.Navigation("PreviousTier");
+
+ b.Navigation("Set");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
+ {
+ b.Navigation("AnimationBindings");
+
+ b.Navigation("Assets");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b =>
+ {
+ b.Navigation("Cards");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260321114732_AddSkyboxDefinitions.cs b/Server/src/SOR.Database/Migrations/Catalog/20260321114732_AddSkyboxDefinitions.cs
new file mode 100644
index 0000000..be3afdf
--- /dev/null
+++ b/Server/src/SOR.Database/Migrations/Catalog/20260321114732_AddSkyboxDefinitions.cs
@@ -0,0 +1,48 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace SOR.Database.Migrations.Catalog
+{
+ ///
+ public partial class AddSkyboxDefinitions : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "skybox_definitions",
+ schema: "catalog",
+ columns: table => new
+ {
+ Id = table.Column(type: "uuid", nullable: false),
+ Name = table.Column(type: "text", nullable: false),
+ IsAnimated = table.Column(type: "boolean", nullable: false),
+ CdnPath = table.Column(type: "text", nullable: false),
+ FrameCount = table.Column(type: "integer", nullable: false),
+ Fps = table.Column(type: "real", nullable: false),
+ IsActive = table.Column(type: "boolean", nullable: false),
+ CreatedAt = table.Column(type: "timestamp with time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_skybox_definitions", x => x.Id);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_skybox_definitions_IsActive",
+ schema: "catalog",
+ table: "skybox_definitions",
+ column: "IsActive");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "skybox_definitions",
+ schema: "catalog");
+ }
+ }
+}
diff --git a/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs b/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs
index dfd7594..17de611 100644
--- a/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs
+++ b/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs
@@ -383,6 +383,42 @@ namespace SOR.Database.Migrations.Catalog
b.ToTable("game_audio_configs", "catalog");
});
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.SkyboxDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CdnPath")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Fps")
+ .HasColumnType("real");
+
+ b.Property("FrameCount")
+ .HasColumnType("integer");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("IsAnimated")
+ .HasColumnType("boolean");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsActive");
+
+ b.ToTable("skybox_definitions", "catalog");
+ });
+
modelBuilder.Entity("SOR.Database.Entities.Catalog.TileBottomModel", b =>
{
b.Property("Id")