From fae42716a7fedc4486abd932f11b91075a1b850d Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 4 Nov 2026 15:07:28 +0100 Subject: [PATCH] =?UTF-8?q?3D:=20=D0=B7=D0=B5=D0=BC=D0=BB=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=20=D0=BA=D1=80=D0=B0=D0=B5=D0=BC=20=D0=BA=D0=B0=D1=80?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B8=20=D1=83=D1=87=D0=B0=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20--=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE=20=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D1=82=D0=BE=D0=B3=D0=BE=20=D0=BD=D0=B5=D0=B1=D0=B0?= =?UTF-8?q?=20(=D0=BD=D0=B0=20=D0=BA=D0=B0=D1=80=D1=82=D0=B5=20=D1=82?= =?UTF-8?q?=D1=91=D0=BC=D0=BD=D0=B0=D1=8F,=20=D1=83=20=D0=B3=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20--=20=D0=BB=D0=B5=D1=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/City3D/City3DController.cs | 13 +++++++++++++ Assets/Scripts/WorldMap/WorldMapController.cs | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/Assets/Scripts/City3D/City3DController.cs b/Assets/Scripts/City3D/City3DController.cs index 00bde43..cc8c7a0 100644 --- a/Assets/Scripts/City3D/City3DController.cs +++ b/Assets/Scripts/City3D/City3DController.cs @@ -142,6 +142,19 @@ public class City3DController : MonoBehaviour go.AddComponent().sharedMaterial = Map3D.TexturedMat(groundTexture); go.AddComponent().sharedMesh = mesh; + // Лес и луга за краем участка: камера не видит пустого неба + Map3D.Block(transform, "OuterLand", PrimitiveType.Cube, new Color(0.24f, 0.4f, 0.22f), new Vector3(n / 2f, -0.7f, n / 2f), + new Vector2(n + 200f, n + 200f), 0.1f); + var forest = new System.Random(7); + for (int i = 0; i < 140; i++) + { + // кольцо деревьев вокруг участка + float angle = (float)forest.NextDouble() * Mathf.PI * 2f, r = n * 0.72f + (float)forest.NextDouble() * 14f; + var p = new Vector3(n / 2f + Mathf.Cos(angle) * r, -0.6f, n / 2f + Mathf.Sin(angle) * r); + if (p.x > 0 && p.x < n && p.z > 0 && p.z < n) continue; // внутри участка -- свои деревья + Map3D.Tree(transform, "ForestTree", p, 1.4f + (float)forest.NextDouble() * 0.8f, forest.Next(6)); + } + // Вода -- плоскость над руслом var water = GameObject.CreatePrimitive(PrimitiveType.Cube); water.name = "River"; diff --git a/Assets/Scripts/WorldMap/WorldMapController.cs b/Assets/Scripts/WorldMap/WorldMapController.cs index 6218411..f904d75 100644 --- a/Assets/Scripts/WorldMap/WorldMapController.cs +++ b/Assets/Scripts/WorldMap/WorldMapController.cs @@ -342,6 +342,10 @@ public class WorldMapController : MonoBehaviour mesh.uv = new[] { new Vector2(0, 0), new Vector2(0, 1), new Vector2(1, 1), new Vector2(1, 0) }; mesh.triangles = new[] { 0, 1, 2, 0, 2, 3 }; mesh.RecalculateNormals(); + // Земля за краем карты -- тёмная, как неисследованное: камера под наклоном не видит пустого неба + Map3D.Block(mapRoot, "OuterLand", PrimitiveType.Cube, new Color(0.12f, 0.16f, 0.13f), new Vector3(0, -0.08f, 0), + new Vector2(width + 160f, height + 160f), 0.06f); + var go = new GameObject("Ground"); go.transform.SetParent(mapRoot, false); go.AddComponent().sharedMesh = mesh;