Redesign login scene with neon 3D card table
CI / test (push) Has been cancelled Details

This commit is contained in:
MpakobecEx 2026-10-21 18:07:39 +05:00
parent 53ceb0255c
commit 42445eb075
4 changed files with 98 additions and 26 deletions

View File

@ -4,6 +4,7 @@ using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using Vanguard.App;
using Vanguard.Auth;
namespace Vanguard.Editor
{
@ -20,6 +21,7 @@ namespace Vanguard.Editor
[MenuItem("Vanguard/Play Scene Smoke")]
public static void Run()
{
new TokenStore().Clear();
EditorSceneManager.OpenScene("Assets/Scenes/Boot.unity");
_started = EditorApplication.timeSinceStartup;
_checks = 0;

View File

@ -53,12 +53,15 @@ namespace Vanguard.App
camera.clearFlags = CameraClearFlags.SolidColor;
camera.backgroundColor = palette.Background;
camera.fieldOfView = 52f;
camera.transform.position = theme == SceneTheme.Battle
? new Vector3(0f, 7.5f, -13f)
: new Vector3(0f, 3.2f, -10f);
camera.transform.position = theme switch
{
SceneTheme.Battle => new Vector3(0f, 7.5f, -13f),
SceneTheme.Login => new Vector3(0f, 2.4f, -9.5f),
_ => new Vector3(0f, 3.2f, -10f),
};
camera.transform.rotation = theme == SceneTheme.Battle
? Quaternion.Euler(28f, 0f, 0f)
: Quaternion.Euler(12f, 0f, 0f);
: Quaternion.Euler(8f, 0f, 0f);
}
private static void SetLight(SceneTheme theme, ScenePalette palette)
@ -75,6 +78,24 @@ namespace Vanguard.App
light.intensity = theme == SceneTheme.Battle ? 1.15f : 0.9f;
light.transform.rotation = Quaternion.Euler(48f, -32f, 0f);
light.shadows = LightShadows.Soft;
if (theme == SceneTheme.Login)
{
PointLight("Neon Blue", new Vector3(-6f, 2.2f, 0f), new Color(0.16f, 0.42f, 1f), 2.4f, 11f);
PointLight("Neon Magenta", new Vector3(6f, 2.2f, 0f), new Color(0.72f, 0.18f, 0.95f), 1.8f, 10f);
}
}
private static void PointLight(string name, Vector3 position, Color color, float intensity, float range)
{
var go = new GameObject(name);
var light = go.AddComponent<Light>();
light.type = LightType.Point;
light.color = color;
light.intensity = intensity;
light.range = range;
light.shadows = LightShadows.None;
go.transform.position = position;
}
private static void CreateFloor(Transform root, ScenePalette palette)
@ -94,8 +115,22 @@ namespace Vanguard.App
case SceneTheme.Login:
Cube(root, "Column L", new Vector3(-5.5f, 2.4f, 2f), new Vector3(1f, 5f, 1f), palette.Structure);
Cube(root, "Column R", new Vector3(5.5f, 2.4f, 2f), new Vector3(1f, 5f, 1f), palette.Structure);
Cube(root, "Neon L", new Vector3(-4.95f, 2.4f, 2f), new Vector3(0.08f, 4.4f, 0.08f), palette.Accent, 2.2f);
Cube(root, "Neon R", new Vector3(4.95f, 2.4f, 2f), new Vector3(0.08f, 4.4f, 0.08f), palette.Accent, 2.2f);
Cube(root, "Backdrop", new Vector3(0f, 3.2f, 8f), new Vector3(16f, 7f, 0.4f), palette.Structure);
Cube(root, "Emblem", new Vector3(0f, 3.4f, 7.7f), new Vector3(2.4f, 2.4f, 0.2f), palette.Accent, 1.6f);
// Карточный стол и несколько карт — нижний план, форма остаётся по центру.
Cube(root, "Card Table", new Vector3(0f, -0.55f, 1.5f), new Vector3(11f, 0.5f, 5.5f), palette.Structure);
Cube(root, "Table Neon", new Vector3(0f, -0.28f, 1.5f), new Vector3(10.4f, 0.03f, 0.08f), palette.Accent, 1.8f);
Cube(root, "Card A", new Vector3(-3.4f, -0.22f, 2.2f), new Vector3(1.35f, 0.05f, 2.0f), new Color(0.10f, 0.18f, 0.38f), 0.6f);
Cube(root, "Card B", new Vector3(-1.8f, -0.18f, 2.7f), new Vector3(1.35f, 0.05f, 2.0f), new Color(0.30f, 0.08f, 0.16f), 0.5f);
Cube(root, "Card C", new Vector3(3.0f, -0.18f, 2.5f), new Vector3(1.35f, 0.05f, 2.0f), new Color(0.08f, 0.22f, 0.28f), 0.5f);
Cube(root, "Card D", new Vector3(4.4f, -0.22f, 2.0f), new Vector3(1.35f, 0.05f, 2.0f), new Color(0.22f, 0.16f, 0.36f), 0.6f);
// Парящие карты по краям — рамка вокруг центральной панели.
Cube(root, "Float L", new Vector3(-7.2f, 2.9f, 1.0f), new Vector3(1.5f, 0.06f, 2.2f), new Color(0.10f, 0.16f, 0.34f), 0.8f);
Cube(root, "Float R", new Vector3(7.2f, 2.4f, 1.2f), new Vector3(1.5f, 0.06f, 2.2f), new Color(0.28f, 0.08f, 0.18f), 0.8f);
break;
case SceneTheme.Lobby:

View File

@ -35,25 +35,41 @@ namespace Vanguard.UI
_auth = auth;
_onAuthenticated = onAuthenticated;
_root = UiKit.CreatePanel(parent, "LoginScreen", new Color(0.035f, 0.045f, 0.065f, 1f));
_root = UiKit.CreatePanel(parent, "LoginScreen", new Color(0.01f, 0.02f, 0.04f, 0.28f));
// Мягкое неоновое свечение за панелью; 3D-стол остаётся виден по краям.
UiKit.CreateCenteredCard(
_root,
"LoginGlow",
new Vector2(760f, 900f),
new Color(0.04f, 0.22f, 0.80f, 0.12f));
var card = UiKit.CreateCenteredCard(
_root,
"LoginCard",
new Vector2(640f, 790f),
new Color(0.07f, 0.085f, 0.115f, 1f));
new Vector2(620f, 820f),
new Color(0.018f, 0.032f, 0.065f, 0.92f));
UiKit.AddVerticalLayout(card, 36, 10);
var layout = UiKit.AddVerticalLayout(card, 32, 10);
layout.childAlignment = TextAnchor.MiddleCenter;
var eyebrow = UiKit.CreateText(
card, "Eyebrow", "VANGUARD // NETWORK", 13,
new Color(0.35f, 0.72f, 1f));
UiKit.SetPreferredHeight(eyebrow, 20f);
var title = UiKit.CreateText(
card, "Title", "VANGUARD", 54, new Color(0.86f, 0.90f, 1f));
card, "Title", "VANGUARD", 56, new Color(0.88f, 0.94f, 1f));
title.fontStyle = FontStyle.Bold;
UiKit.SetPreferredHeight(title, 64f);
UiKit.SetPreferredHeight(title, 66f);
var subtitle = UiKit.CreateText(
card, "Subtitle", "ReMaster · сетевой клиент", 20,
new Color(0.62f, 0.68f, 0.82f));
UiKit.SetPreferredHeight(subtitle, 34f);
card, "Subtitle", "RE:MASTER · СЕТЕВОЙ КЛИЕНТ", 18,
new Color(0.52f, 0.64f, 0.86f));
UiKit.SetPreferredHeight(subtitle, 30f);
var accent = UiKit.CreatePanel(card, "Accent", new Color(0.12f, 0.52f, 1f, 0.9f));
UiKit.SetPreferredHeight(accent, 3f);
AddCaption(card, "Сервер");
_serverUrl = UiKit.CreateInput(card, "ServerUrl", "http://192.168.31.158:18080");
@ -68,26 +84,32 @@ namespace Vanguard.UI
_password = UiKit.CreateInput(card, "Password", "8–128 символов", password: true);
UiKit.SetPreferredHeight(_password, 54f);
_loginButton = UiKit.CreateButton(card, "LoginButton", "Войти", OnLoginClicked);
_loginButton = UiKit.CreateButton(card, "LoginButton", "ВОЙТИ", OnLoginClicked, 22);
TintButton(_loginButton, new Color(0.10f, 0.42f, 0.95f, 1f), Color.white);
UiKit.SetPreferredHeight(_loginButton, 56f);
_registerButton = UiKit.CreateButton(card, "RegisterButton", "Создать аккаунт", OnRegisterClicked, 21);
UiKit.SetPreferredHeight(_registerButton, 50f);
_registerButton = UiKit.CreateButton(
card, "RegisterButton", "СОЗДАТЬ АККАУНТ", OnRegisterClicked, 19);
TintButton(
_registerButton,
new Color(0.05f, 0.10f, 0.18f, 0.95f),
new Color(0.48f, 0.76f, 1f));
UiKit.SetPreferredHeight(_registerButton, 48f);
_status = UiKit.CreateText(
card, "Status", string.Empty, 18,
new Color(0.70f, 0.75f, 0.86f),
card, "Status", string.Empty, 17,
new Color(0.66f, 0.74f, 0.90f),
TextAnchor.UpperCenter);
_status.horizontalOverflow = HorizontalWrapMode.Wrap;
UiKit.SetPreferredHeight(_status, 72f);
UiKit.SetPreferredHeight(_status, 64f);
var footer = UiKit.CreateText(
card,
"Footer",
"Стенд: 192.168.31.158:18080 · локально: localhost:5080",
15,
new Color(0.45f, 0.50f, 0.62f));
UiKit.SetPreferredHeight(footer, 26f);
"v" + Application.version + " · стенд 192.168.31.158:18080 · localhost:5080",
14,
new Color(0.38f, 0.46f, 0.62f));
UiKit.SetPreferredHeight(footer, 24f);
}
public void Show(string status = null)
@ -105,10 +127,21 @@ namespace Vanguard.UI
parent,
"Caption_" + text,
text,
17,
new Color(0.62f, 0.68f, 0.82f),
16,
new Color(0.55f, 0.65f, 0.82f),
TextAnchor.MiddleLeft);
UiKit.SetPreferredHeight(caption, 24f);
UiKit.SetPreferredHeight(caption, 22f);
}
private static void TintButton(Button button, Color background, Color label)
{
var image = button.GetComponent<Image>();
if (image != null)
image.color = background;
var text = button.GetComponentInChildren<Text>();
if (text != null)
text.color = label;
}
private async void OnLoginClicked()

View File

@ -34,6 +34,8 @@
- Переходы — `SceneFlow`; очередь/онбординг — оверлеи **Lobby**.
- 3D-окружение сейчас из примитивов (`SceneEnvironment`): камера, свет,
пол, тематические кубы. UI — code-generated uGUI, пока gray-box.
- Login: тёмный неон + 3D-карточный стол, форма по центру на
полупрозрачной панели.
- Сервисы: `ApiClient`, `AuthService`, `MetaService`, `TokenStore`,
`PlayerState`, `GameConnection`.
- Работает: логин/регистрация/refresh, онбординг, коллекция с разбором,