отладка (наводим красоту)

This commit is contained in:
2025-02-11 19:15:36 +03:00
parent cd83c97d6a
commit b686c0f137
29 changed files with 48 additions and 48 deletions

View File

@@ -6,9 +6,9 @@
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://Shaders/shader_edu.tres" id="3_3syd3"]
[ext_resource type="Texture2D" uid="uid://cfktmk2rowmul" path="res://table/off.png" id="3_qvuyu"]
[ext_resource type="Shader" path="res://Shaders/ray.gdshader" id="4_uy5o2"]
[ext_resource type="Texture2D" uid="uid://co8dxcd8eckjs" path="res://Web.png" id="5_i3nvb"]
[ext_resource type="Texture2D" uid="uid://co8dxcd8eckjs" path="res://pictures/Web.png" id="5_i3nvb"]
[ext_resource type="Shader" path="res://Shaders/ray_2.gdshader" id="8_12mng"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="9_0r2qk"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="9_0r2qk"]
[ext_resource type="Script" path="res://scripts/control_panel.gd" id="9_akagi"]
[ext_resource type="Script" path="res://scripts/ems_g.gd" id="9_g1wia"]
[ext_resource type="Shader" path="res://Shaders/load.gdshader" id="10_lf1xh"]

View File

@@ -31,7 +31,7 @@ uniform bool show_icon = false; // Если false, текстура иконки
void fragment() {
// Преобразование UV-координат для центрирования начала координат и корректировки в зависимости от аспекта экрана.
float aspect_ratio = SCREEN_PIXEL_SIZE.x / SCREEN_PIXEL_SIZE.y;
float aspect_ratio = SCREEN_PIXEL_SIZE.x / SCREEN_PIXEL_SIZE.y;
vec2 uv = (UV * 2.0 - 1.0) * vec2(0.3, aspect_ratio); // Нормализация UV координат.
// Подсчет кольца (точек и опциональной тени).
@@ -42,7 +42,7 @@ void fragment() {
float total_angle = 6.283185307; // Полный круг в радианах (2π).
float gap = total_angle * gap_ratio; // Вычисление ширины пробела между точками.
float spacing = (total_angle - gap) / float(num_points); // Вычисление интервала между точками.
// Определение направления вращения кольца.
float direction = 1.0; // Вращение по часовой стрелке или против.
float rotation = TIME * rotation_speed * direction; // Вычисление текущего угла поворота.
@@ -63,7 +63,7 @@ void fragment() {
// Вычисление вклада точки на основе расстояния.
float distance = length(uv - pos); // Расстояние до текущей точки.
float contribution = smoothstep(radius + 0.01, radius, distance); // Плавный вклад на основе расстояния.
if (contribution > 0.0) { // Если вклад точки больше нуля,
ring_color = mix(ring_color, dot_color, contribution); // Смешивание с цветом кольца.
dot_accum += contribution; // Накопление вклада от точки.
@@ -90,10 +90,10 @@ void fragment() {
if (show_icon) {
// Создание радиальной маски, чтобы иконка была видимой внутри радиуса icon_size.
float icon_mask = smoothstep(icon_size, icon_size - 0.005, length(uv)); // Маска для иконки.
// Нормализация UV-координат для иконки.
vec2 icon_uv = (uv / icon_size + vec2(1.0)) / 2.0; // Превращение из диапазона (-icon_size ... +icon_size) в (0 ... 1).
// Применение вращения иконки, если оно включено.
if (enable_icon_rotation) {
float icon_angle = TIME * icon_rotation_speed; // Угол вращения на основе времени и скорости вращения.
@@ -108,11 +108,11 @@ void fragment() {
centered_uv.x * s + centered_uv.y * c); // Применение матрицы вращения.
icon_uv = centered_uv + vec2(0.5); // Смещение обратно к нормализованным координатам.
}
vec4 icon_sample = texture(icon_texture, icon_uv); // Получение цвета из текстуры иконки.
// Смешивание текстуры иконки с базовым цветом кольца с учетом маски и альфа-канала текстуры.
base_color = mix(base_color, icon_sample, icon_mask * icon_sample.a);
}
COLOR = base_color; // Установка финального цвета для текущего пикселя.
}

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://bdb0bhfu7366l"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="1_1jljp"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="1_1jljp"]
[ext_resource type="Script" path="res://scripts/кассета.gd" id="2_20xal"]
[node name="kasseta_fs_kd" type="NinePatchRect"]

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://co8dxcd8eckjs"
path="res://.godot/imported/Web.png-c71665e7797af3c541effa7e6a335fc8.ctex"
path="res://.godot/imported/Web.png-dc8815faf5efba2116da493712c8f347.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Web.png"
dest_files=["res://.godot/imported/Web.png-c71665e7797af3c541effa7e6a335fc8.ctex"]
source_file="res://pictures/Web.png"
dest_files=["res://.godot/imported/Web.png-dc8815faf5efba2116da493712c8f347.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 567 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cgtg4gbqnuxrc"
path="res://.godot/imported/nine-patch-round.png-61bc031153ce0d2485f8ba950a72df3f.ctex"
path="res://.godot/imported/nine-patch-round.png-d67b419565e5d3ad11857c28e4e157e8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://nine-patch-round.png"
dest_files=["res://.godot/imported/nine-patch-round.png-61bc031153ce0d2485f8ba950a72df3f.ctex"]
source_file="res://pictures/nine-patch-round.png"
dest_files=["res://.godot/imported/nine-patch-round.png-d67b419565e5d3ad11857c28e4e157e8.ctex"]
[params]

BIN
pictures/бургер.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
pictures/клад.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ce3qpf070wgd2"
path="res://.godot/imported/состояние-исправности-0.png-5c54b931fdcaaeea20ccd26e18d4b7de.ctex"
path="res://.godot/imported/состояние-исправности-0.png-ec804b9c19d2b9ac0d14165a8b0d572a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://состояние-исправности-0.png"
dest_files=["res://.godot/imported/состояние-исправности-0.png-5c54b931fdcaaeea20ccd26e18d4b7de.ctex"]
source_file="res://pictures/состояние-исправности-0.png"
dest_files=["res://.godot/imported/состояние-исправности-0.png-ec804b9c19d2b9ac0d14165a8b0d572a.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://byweg7pgt8o4h"
path="res://.godot/imported/состояние-исправности-1.png-3675cd90cab151ef6fac9b2e3babeb44.ctex"
path="res://.godot/imported/состояние-исправности-1.png-b3ce72ab96220f1713af3c4876cdbccb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://состояние-исправности-1.png"
dest_files=["res://.godot/imported/состояние-исправности-1.png-3675cd90cab151ef6fac9b2e3babeb44.ctex"]
source_file="res://pictures/состояние-исправности-1.png"
dest_files=["res://.godot/imported/состояние-исправности-1.png-b3ce72ab96220f1713af3c4876cdbccb.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bvikuv0lbvou8"
path="res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"
path="res://.godot/imported/состояние-исправности-2.png-bca7b95f6cde89856ef4da574dc4c166.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://состояние-исправности-2.png"
dest_files=["res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"]
source_file="res://pictures/состояние-исправности-2.png"
dest_files=["res://.godot/imported/состояние-исправности-2.png-bca7b95f6cde89856ef4da574dc4c166.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 704 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ijdfo2mml54"
path="res://.godot/imported/эмс-бланк-перем.png-011e0d06ef6ddca754d1f3d8e11a448c.ctex"
path="res://.godot/imported/эмс-бланк-перем.png-033d3a20f21f565460affa02e225fff8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://эмс-бланк-перем.png"
dest_files=["res://.godot/imported/эмс-бланк-перем.png-011e0d06ef6ddca754d1f3d8e11a448c.ctex"]
source_file="res://pictures/эмс-бланк-перем.png"
dest_files=["res://.godot/imported/эмс-бланк-перем.png-033d3a20f21f565460affa02e225fff8.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 483 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b15flrfytxkop"
path="res://.godot/imported/эмс-бланк-пост.png-439ef19be91abe97f22f96e843d00c61.ctex"
path="res://.godot/imported/эмс-бланк-пост.png-61a20a1f6fe7b6142ff882433918f09a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://эмс-бланк-пост.png"
dest_files=["res://.godot/imported/эмс-бланк-пост.png-439ef19be91abe97f22f96e843d00c61.ctex"]
source_file="res://pictures/эмс-бланк-пост.png"
dest_files=["res://.godot/imported/эмс-бланк-пост.png-61a20a1f6fe7b6142ff882433918f09a.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 787 B

After

Width:  |  Height:  |  Size: 787 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dkef6xwxwdxi8"
path="res://.godot/imported/эмс-бланк.png-59a703aa6cdf36be7c906f7ee7a30184.ctex"
path="res://.godot/imported/эмс-бланк.png-8ff830647ca6b31294e66f002eb30e08.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://эмс-бланк.png"
dest_files=["res://.godot/imported/эмс-бланк.png-59a703aa6cdf36be7c906f7ee7a30184.ctex"]
source_file="res://pictures/эмс-бланк.png"
dest_files=["res://.godot/imported/эмс-бланк.png-8ff830647ca6b31294e66f002eb30e08.ctex"]
[params]

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://dn3jp4r8ij3rf"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="1_bsrew"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="2_b2kjm"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="3_odpjv"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://pictures/эмс-бланк.png" id="1_bsrew"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://pictures/эмс-бланк-пост.png" id="2_b2kjm"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://pictures/эмс-бланк-перем.png" id="3_odpjv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"]
bg_color = Color(0, 0, 0, 0.490196)

View File

@@ -1,13 +1,13 @@
[gd_scene load_steps=12 format=3 uid="uid://p2suppildvq0"]
[ext_resource type="Texture2D" uid="uid://ce3qpf070wgd2" path="res://состояние-исправности-0.png" id="1_2n7he"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="2_4b43i"]
[ext_resource type="Texture2D" uid="uid://byweg7pgt8o4h" path="res://состояние-исправности-1.png" id="2_38t58"]
[ext_resource type="Texture2D" uid="uid://ce3qpf070wgd2" path="res://pictures/состояние-исправности-0.png" id="1_2n7he"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="2_4b43i"]
[ext_resource type="Texture2D" uid="uid://byweg7pgt8o4h" path="res://pictures/состояние-исправности-1.png" id="2_38t58"]
[ext_resource type="Shader" path="res://Shaders/opt_btn.gdshader" id="2_ecsml"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="3_4kmgr"]
[ext_resource type="Texture2D" uid="uid://bvikuv0lbvou8" path="res://состояние-исправности-2.png" id="3_i2t3v"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="4_omove"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="5_jia67"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://pictures/эмс-бланк.png" id="3_4kmgr"]
[ext_resource type="Texture2D" uid="uid://bvikuv0lbvou8" path="res://pictures/состояние-исправности-2.png" id="3_i2t3v"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://pictures/эмс-бланк-пост.png" id="4_omove"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://pictures/эмс-бланк-перем.png" id="5_jia67"]
[sub_resource type="GDScript" id="GDScript_fbktk"]
script/source = "@tool

View File

@@ -1,9 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://bnlkbbn7b4a3k"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="1_lmmwb"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="3_2trq1"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="4_vgjvf"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="5_1heoc"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://pictures/nine-patch-round.png" id="1_lmmwb"]
[ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://pictures/эмс-бланк.png" id="3_2trq1"]
[ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://pictures/эмс-бланк-пост.png" id="4_vgjvf"]
[ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://pictures/эмс-бланк-перем.png" id="5_1heoc"]
[sub_resource type="GDScript" id="GDScript_fbktk"]
script/source = "@tool

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB