РВП. Добавлен макет вида "ПО СТЦ"

This commit is contained in:
sasha80
2023-04-21 14:38:19 +03:00
parent a85375bc25
commit 8b1d07d3d5
12 changed files with 614 additions and 982 deletions

View File

@@ -1,16 +1,18 @@
[gd_scene load_steps=3 format=3 uid="uid://cu3e03by7d61j"]
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_70q2b"]
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="9_jpswg"]
[ext_resource type="PackedScene" uid="uid://3slb0i3pvowc" path="res://scenes/tab_switch.tscn" id="1_q31c2"]
[ext_resource type="PackedScene" uid="uid://w6ta0ck1bedl" path="res://scenes/wnd_stc.tscn" id="2_hsjlm"]
[node name="tab_switch" type="TabContainer"]
offset_top = -2.0
[node name="main" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_top = -55.0
offset_right = 1600.0
offset_bottom = 1200.0
offset_bottom = 1145.0
[node name="работа" parent="." instance=ExtResource("2_70q2b")]
layout_mode = 2
[node name="tab_switch" parent="." instance=ExtResource("1_q31c2")]
layout_mode = 0
offset_top = 0.0
offset_bottom = 1202.0
[node name="контроль" parent="." instance=ExtResource("9_jpswg")]
visible = false
layout_mode = 2
[node name="wnd_stc" parent="." instance=ExtResource("2_hsjlm")]

View File

@@ -18,7 +18,6 @@ boot_splash/show_image=false
boot_splash/fullsize=false
boot_splash/use_filter=false
config/icon="res://data/icon.png"
run/delta_sync_after_draw=true
[debug]
@@ -28,7 +27,8 @@ file_logging/enable_file_logging=true
window/size/viewport_width=1600
window/size/viewport_height=1200
window/stretch/mode="viewport"
window/size/mode=3
window/subwindows/embed_subwindows=false
window/vsync/vsync_mode=false
[editor_plugins]
@@ -37,8 +37,10 @@ enabled=PackedStringArray()
[gui]
fonts/dynamic_fonts/use_oversampling=false
common/text_edit_undo_stack_max_size=10
theme/custom_font="res://data/main-font.tres"
theme/lcd_subpixel_layout=0
common/drop_mouse_on_gui_input_disabled=true
[input_devices]
@@ -53,5 +55,6 @@ file_logging/enable_file_logging=true
renderer/rendering_method="gl_compatibility"
textures/default_filters/anisotropic_filtering_level=0
anti_aliasing/screen_space_roughness_limiter/enabled=false
environment/defaults/default_environment="res://default_env.tres"
quality/driver/fallback_to_gles2=true

163
scenes/canvas.tscn Normal file
View File

@@ -0,0 +1,163 @@
[gd_scene load_steps=14 format=3 uid="uid://b5kjdyxuwsot5"]
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://shaders/shader_edu.tres" id="1_ow7xo"]
[ext_resource type="Texture2D" uid="uid://cqu18m05sdl5w" path="res://data/прицел-табличка.png" id="2_g47s7"]
[ext_resource type="Texture2D" uid="uid://6qqcqds5majk" path="res://data/отметка-бпла.png" id="3_bgvyj"]
[ext_resource type="Texture2D" uid="uid://bibsq2uejlm0s" path="res://data/отметка-корабль.png" id="4_wasyy"]
[ext_resource type="Texture2D" uid="uid://b8ern67qnb5ky" path="res://data/кораблик-22800.png" id="5_1y104"]
[ext_resource type="Texture2D" uid="uid://biy3dmtuefrqe" path="res://data/отметка-ракета.png" id="6_mvioa"]
[ext_resource type="Texture2D" uid="uid://b3woliae871je" path="res://data/отметка-неопред.png" id="7_6ag6n"]
[ext_resource type="Texture2D" uid="uid://ccgavrtpkd56i" path="res://data/прицел-сопровождение.png" id="8_l63ig"]
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_2bft1"]
size = Vector2(1600, 1200)
[sub_resource type="Animation" id="Animation_vbwp0"]
length = 0.001
loop_mode = 1
[sub_resource type="Animation" id="Animation_wfwqs"]
resource_name = "вращение"
length = 6.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("canvas/прицел-сопровождение-3:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0, 3, 6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 6.28319, 12.5664]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("canvas/прицел-сопровождение-1:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = false
tracks/1/keys = {
"times": PackedFloat32Array(0, 3, 6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 6.28319, 12.5664]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("canvas/прицел-табличка:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = false
tracks/2/keys = {
"times": PackedFloat32Array(0, 3, 6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [6.28319, 0.0, -6.28319]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("canvas:material:shader_parameter/pc2")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 2.5, 6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(100, 1065), Vector2(115, 1070), Vector2(100, 1065)]
}
[sub_resource type="Animation" id="Animation_dch6g"]
resource_name = "направление"
length = 3.6
[sub_resource type="AnimationLibrary" id="AnimationLibrary_codoa"]
_data = {
"RESET": SubResource("Animation_vbwp0"),
"вращение": SubResource("Animation_wfwqs"),
"направление": SubResource("Animation_dch6g")
}
[node name="canvas" type="Sprite2D"]
material = ExtResource("1_ow7xo")
position = Vector2(800, 596)
texture = SubResource("PlaceholderTexture2D_2bft1")
metadata/_edit_lock_ = true
[node name="animator" type="AnimationPlayer" parent="."]
root_node = NodePath("../..")
libraries = {
"": SubResource("AnimationLibrary_codoa")
}
[node name="прицел-табличка" type="Sprite2D" parent="."]
position = Vector2(-101, -176)
rotation = 6.28319
texture = ExtResource("2_g47s7")
[node name="отметка-бпла" type="Sprite2D" parent="."]
position = Vector2(-101, -176)
texture = ExtResource("3_bgvyj")
[node name="отметка-корабль" type="Sprite2D" parent="."]
position = Vector2(-350, -103)
rotation = -2.09439
texture = ExtResource("4_wasyy")
[node name="кораблик" type="Sprite2D" parent="."]
position = Vector2(-192, 3)
scale = Vector2(0.25, 0.25)
texture = ExtResource("5_1y104")
[node name="отметка_ракета" type="Sprite2D" parent="."]
position = Vector2(-130, 19)
rotation = -1.309
texture = ExtResource("6_mvioa")
[node name="отметкаеопред" type="Sprite2D" parent="."]
position = Vector2(-200, -191)
texture = ExtResource("7_6ag6n")
[node name="прицел-сопровождение-3" type="Sprite2D" parent="."]
position = Vector2(-500, -200)
texture = ExtResource("8_l63ig")
[node name="прицел-сопровождение-1" type="Sprite2D" parent="."]
position = Vector2(-200, 400)
texture = ExtResource("8_l63ig")
[node name="номер-цели-3" type="Label" parent="."]
offset_left = -517.0
offset_top = -248.0
offset_right = -477.0
offset_bottom = -226.0
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 2
text = "3"
horizontal_alignment = 1
vertical_alignment = 1
[node name="номер-цели-2" type="Label" parent="."]
z_index = 1
offset_left = -120.0
offset_top = -212.0
offset_right = -80.0
offset_bottom = -190.0
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 2
text = "2"
horizontal_alignment = 1
vertical_alignment = 1
[node name="номер-цели-1" type="Label" parent="."]
offset_left = -219.0
offset_top = 357.0
offset_right = -179.0
offset_bottom = 379.0
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 2
text = "1"
horizontal_alignment = 1
vertical_alignment = 1

16
scenes/tab_switch.tscn Normal file
View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://3slb0i3pvowc"]
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="1_jjcv4"]
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="2_h2mc4"]
[node name="tab_switch" type="TabContainer"]
offset_top = -2.0
offset_right = 1600.0
offset_bottom = 1200.0
[node name="работа" parent="." instance=ExtResource("1_jjcv4")]
layout_mode = 2
[node name="контроль" parent="." instance=ExtResource("2_h2mc4")]
visible = false
layout_mode = 2

12
scenes/wnd_stc.tscn Normal file
View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=3 uid="uid://w6ta0ck1bedl"]
[ext_resource type="PackedScene" uid="uid://cbfp6bylx8g4i" path="res://tab_container_stc.tscn" id="1_c76qk"]
[node name="wnd_stc" type="Window"]
initial_position = 3
size = Vector2i(1600, 1200)
mode = 3
current_screen = 1
borderless = true
[node name="TabContainer" parent="." instance=ExtResource("1_c76qk")]

View File

@@ -25,18 +25,23 @@ tbl_celi.set_columns_min_size(CELI_COLUMNS_SIZE) """
const RADIO_GROUPE_NAMES = \
['btn_off', 'btn_p4', 'btn_p5', 'btn_p6', 'btn_p7',
'btn_p8', 'btn_p9', 'btn_p10', 'btn_p11', 'btn_p12',
'btn_p13', 'btn_p14', 'btn_p15', 'btn_p16', 'btn_auto']
'btn_p13', 'btn_p14', 'btn_p15', 'btn_p16', 'btn_auto_rfi']
enum DRAG_FSM { IDLE, DRAG }
var radio_groupe: Array
var band_ants = [10, 10, 10]
var drag_pos_begin: Vector2
var drag_pos_end: Vector2
var drag_fsm: DRAG_FSM
var drag_button: MouseButton
var pc0: Vector2
var ant_dir_width_begin: float
# Called when the node enters the scene tree for the first time.
func _ready():
$canvas.material.set('shader_parameter/band_ants', band_ants)
$animator.play('вращение')
$ramka_rezhim/btn_off.set_pressed(true)
var nodes = $ramka_rezhim.get_children()
$canvas/animator.play('вращение')
$'рамка-режим/btn_off'.set_pressed(true)
var nodes = $'рамка-режим'.get_children()
pc0 = $canvas.material.get('shader_parameter/pc0')
for btn in nodes:
if btn.name in RADIO_GROUPE_NAMES:
radio_groupe.append(btn)
@@ -46,15 +51,7 @@ func _ready():
func _on_button_pressed(btn):
# поведение радиокнопок в группе
for btn0 in radio_groupe:
if btn0 != btn:
btn0.set_pressed(false)
else:
btn0.set_pressed(true)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
btn0.set_pressed(btn0 == btn)
func hypot(x: float, y: float) -> float:
@@ -63,20 +60,46 @@ func hypot(x: float, y: float) -> float:
func map_xy_ang(pos0: Vector2, pos: Vector2) -> Vector2:
""" Преобразует декартовые координаты в полярные """
var x1: float = pos.x - pos0.x
var y1: float = pos.y - pos0.y
var x1: float = pos.x - pos0.x
var y1: float = pos.y - pos0.y
var ang: float = (atan2(y1, x1) * 180.0) / PI
ang += 360.0 * float(ang < 0.0)
var radius: float = hypot(x1, y1)
return Vector2(ang, radius)
func _input(event):
if event is InputEventMouseButton:
if not event.pressed:
return
var radp: Vector2 = map_xy_ang(Vector2(600, 600), event.position)
if radp.y < 600:
$canvas/"направление-1".rotation_degrees = radp.x
$canvas.material.set('shader_parameter/sec_var', radp.x)
func set_ant_width(position: Vector2):
var radp: Vector2 = map_xy_ang(pc0, position)
var ant_dir_width: float = ant_dir_width_begin + (drag_pos_begin.y - position.y) / 5.0
if ant_dir_width < 5.0:
ant_dir_width = 5.0
if ant_dir_width > 90.0:
ant_dir_width = 90.0
$canvas.material.set('shader_parameter/ap_ant_w', ant_dir_width)
func set_ant_dir(position: Vector2):
var radp: Vector2 = map_xy_ang(pc0, position)
if radp.y < 600:
$canvas.material.set('shader_parameter/sec_var', radp.x)
func _input(event):
if event is InputEventMouseMotion:
if drag_fsm == DRAG_FSM.DRAG:
if drag_button == MOUSE_BUTTON_RIGHT:
set_ant_width(event.position)
elif drag_button == MOUSE_BUTTON_LEFT:
set_ant_dir(event.position)
if event is InputEventMouseButton:
drag_button = event.button_index
if event.pressed:
if drag_fsm == DRAG_FSM.IDLE:
drag_fsm = DRAG_FSM.DRAG
drag_pos_begin = event.position
if drag_button == MOUSE_BUTTON_LEFT:
set_ant_dir(event.position)
elif drag_button == MOUSE_BUTTON_RIGHT:
set_ant_width(event.position)
else:
drag_fsm = DRAG_FSM.IDLE

File diff suppressed because it is too large Load Diff

View File

@@ -15,4 +15,4 @@ extends NinePatchRect
@export var text: String = 'caption text':
get: return $header.text
set(text): $header.text = text
set(val): $header.text = val

View File

@@ -3,49 +3,46 @@
[sub_resource type="Shader" id="1"]
code = "shader_type canvas_item;
const float M_PI = 3.141592653589793;
/*const vec3 blue1 = vec3(0.42, 0.51, 0.55);
const vec3 blue2 = vec3(0.11, 0.21, 0.25);
const vec3 blue3 = vec3(0.35, 0.76, 0.83);
const vec3 blue4 = vec3(0.953, 0.969, 0.89);
const vec3 red = vec3(1.00, 0.38, 0.227);
uniform vec4 blue1: source_color = vec4(0.4, 0.3, 0.3, 1.0);
uniform vec4 blue2: source_color = vec4(0.6, 0.5, 0.5, 1.0);
uniform vec4 blue3: source_color = vec4(0.8, 0.7, 0.7, 1.0);
uniform vec4 blue4: source_color = vec4(1.0, 0.9, 0.9, 1.0);
uniform vec4 red: source_color = vec4(1.0, 0.5, 0.3, 1.0); */
uniform vec4 blue0: source_color = vec4(0.38, 0.47, 0.51, 1.0);
uniform vec4 blue1: source_color = vec4(0.39, 0.44, 0.50, 1.0);
uniform vec4 blue2: source_color = vec4(0.11, 0.21, 0.25, 1.0);
uniform vec4 blue3: source_color = vec4(0.35, 0.76, 0.83, 1.0);
uniform vec4 blue4: source_color = vec4(0.953, 0.969, 0.89, 1.0);
uniform vec4 red: source_color = vec4(1.00, 0.38, 0.227, 1.0);
uniform float line_width = 2.0;
uniform float sec_forward = 180.0;
uniform float sec_back = 0.0;
uniform float sec_left = 90.0;
uniform float sec_right = 300.0;
uniform float d0 = 520.0;
uniform float d1 = 1120.0;
uniform float d2 = 1160.0;
uniform float d3 = 100.0;
uniform float d4 = 180.0;
uniform float d5 = 650.0;
uniform float d6 = 800.0;
uniform float d7 = 950.0;
uniform vec2 pc0 = vec2(0, 0);
uniform vec2 pc1 = vec2(0, 0);
uniform vec2 pc2 = vec2(0, 0);
uniform float ap_ant_w = 12.0;
uniform vec2 tr0 = vec2(0, 0);
uniform vec2 tr1 = vec2(0, 0);
uniform vec2 tr2 = vec2(0, 0);
uniform vec2 pc0;
uniform vec2 pc1;
uniform vec2 pc2;
uniform vec2 tr0;
uniform vec2 tr1;
uniform vec2 tr2;
uniform float sec_var = 0.0;
uniform float ap_ant_w = 12.0;
#define ANTENNAS_GRID_SIZE 7
const float line_width = 2.0;
const float ant_band_count_0 = 2.0;
const float ant_band_count_1 = 2.0;
const float ant_band_count_2 = 2.0;
const float ant_band_count_3 = 2.0;
const float ant_band_count_4 = 2.0;
const float ant_band_count_5 = 2.0;
const float ant_band_count_6 = 2.0;
const float ant_band_r0_0 = 200.0;
const float ant_band_r0_1 = 250.0;
const float ant_band_r0_2 = 300.0;
const float ant_band_r0_3 = 350.0;
const float ant_band_r0_4 = 400.0;
const float ant_band_r0_5 = 450.0;
const float ant_band_r0_6 = 500.0;
const float ant_band_r1_0 = 250.0;
const float ant_band_r1_1 = 300.0;
const float ant_band_r1_2 = 350.0;
const float ant_band_r1_3 = 400.0;
const float ant_band_r1_4 = 450.0;
const float ant_band_r1_5 = 500.0;
const float ant_band_r1_6 = 550.0;
uniform int band_ants[3]; // количество антенн, радиус внутренний, радиус внешний, подстройка по углу
float SMOOTH(float r, float R)
{
@@ -80,10 +77,10 @@ vec3 radar_scan_line(vec2 uv, vec2 center, float time, float radius, vec3 color)
if (r < radius)
{
//compute the distance to the line theta=theta0
vec2 p = radius * vec2(cos(theta0 * M_PI / 180.0), - sin(theta0 * M_PI / 180.0));
vec2 p = radius * vec2(cos(theta0 * PI / 180.0), - sin(theta0 * PI / 180.0));
float l = length(d - p * clamp(dot(d, p) / dot(p, p), 0.0, 1.0));
//compute gradient based on angle difference to theta0
float theta = mod(180.0 * atan(d.y, d.x) / M_PI + theta0, 360.0);
float theta = mod(180.0 * atan(d.y, d.x) / PI + theta0, 360.0);
float gradient = clamp(1.0 - theta / 90.0, 0.0, 1.0);
return color * SMOOTH(l, 1.0) + 0.5 * gradient * color;
}
@@ -112,8 +109,6 @@ void rotate_uv(inout vec2 uv, float a)
uv.x = cos(a) * (uv.x - mid) + sin(a) * (uv.y - mid) + mid;
uv.y = cos(a) * (uv.x - mid) - sin(a) * (uv.x - mid) + mid;
}
void sector2(inout vec3 c, vec2 uv, vec2 center, float a, float da, float r0, float r1, vec3 color)
@@ -155,7 +150,7 @@ float circle3(vec2 uv, vec2 center, float radius, float width)
vec2 d = uv - center;
float r = sqrt(dot(d, d));
d = normalize(d);
float theta = 180.0 * (atan(d.y, d.x) / M_PI);
float theta = 180.0 * (atan(d.y, d.x) / PI);
return smoothstep(2.0, 2.1, abs(mod(theta + 2.0, 45.0) - 2.0))
* mix(0.5, 1.0, step(45.0, abs(mod(theta, 180.0) - 90.0)))
* (SMOOTH(r - width / 2.0, radius) - SMOOTH(r + width / 2.0, radius));
@@ -233,16 +228,16 @@ vec3 circle_h(inout vec3 c, vec2 uv, vec2 c0, float r, vec3 color)
}
void antenas(inout vec3 c, vec2 uv, vec2 p0, int cnt, float r0, float r1, vec3 c0, vec3 c1, float a, float adj)
void antenas(inout vec3 c, vec2 uv, vec2 p0, float cnt, float r0, float r1, vec3 c0, vec3 c1, float a)
{
float da = 180.0f / float(cnt);
c0 *= a;
c1 *= a;
for (int i = -cnt; i <= cnt; i ++)
for (int i = int(-cnt); i <= int(cnt); i ++)
{
float v = float(i & 1);
vec3 col = v * c0 + (1.0f - v) * c1;
sector(c, uv, p0, float(i) * da + adj, da, r0, r1, col);
sector(c, uv, p0, float(i) * da, da, r0, r1, col);
}
}
@@ -260,7 +255,6 @@ void line(inout vec3 color, vec2 uv, vec2 p0, vec2 p1, vec3 c, float a)
{
vec2 d = uv - p0;
float radius = distance(p0, p1);
float r = sqrt(dot(d, d));
float theta0 = acos(dot(normalize(p0), normalize(p1)));
vec2 p = radius * vec2(cos(theta0), -sin(theta0));
float l = length(d - p * clamp(dot(d, p) / dot(p, p), 0.0, 1.0));
@@ -271,64 +265,47 @@ void line(inout vec3 color, vec2 uv, vec2 p0, vec2 p1, vec3 c, float a)
void line_r(inout vec3 color, vec2 uv, vec2 center, float theta0, float radius, vec3 c, float a)
{
vec2 d = uv - center;
float r = sqrt(dot(d, d));
vec2 p = radius * vec2(cos(theta0 * M_PI / 180.0), - sin(theta0 * M_PI / 180.0));
vec2 p = radius * vec2(cos(theta0 * PI / 180.0), - sin(theta0 * PI / 180.0));
float l = length(d - p * clamp(dot(d, p) / dot(p, p), 0.0, 1.0));
color += c * SMOOTH(l, 1.0);
}
/* Возвращает угол атаки в диапазоне 0...180
для правого борта и -0...-180 для левого борта.
aoa - Угол в диапазоне 0...360 */
float get_ang_atack(float aoa)
{
if ((0.0 <= aoa) && (aoa < 180.0))
return aoa;
else
return aoa - 360.0;
}
void fragment()
{
ivec2 isz = textureSize(TEXTURE, 0);
vec2 uv = UV * vec2(float(isz.x), float(isz.y));
vec3 rs = vec3(d2, d1, d0) / 2.0f;
COLOR = texture(TEXTURE, UV);
vec2 uv = UV * vec2(float(isz.x), float(isz.y)); // координаты текущей точки в пикселях
COLOR = vec4(0, 0, 0, 1.0); //texture(TEXTURE, UV); // Цвет текущей точки
// РТО
//circle_thin(COLOR.rgb, uv, pc0, d0 / 2.0, line_width, blue1.rgb, 1.0);
//circle_thin(COLOR.rgb, uv, pc0, d1 / 2.0, line_width, blue1.rgb, 1.0);
//circle_thin(COLOR.rgb, uv, pc0, d2 / 2.0, line_width, blue1.rgb, 1.0);
//circle_thin(COLOR.rgb, uv, pc0, d5 / 2.0, line_width, blue1.rgb, 0.5);
//circle_thin(COLOR.rgb, uv, pc0, d6 / 2.0, line_width, blue1.rgb, 0.5);
//circle_thin(COLOR.rgb, uv, pc0, d7 / 2.0, line_width, blue1.rgb, 0.5);
//line_r(COLOR.rgb, uv, pc0, 45, 580, blue1.rgb, 1.0);
//line_r(COLOR.rgb, uv, pc0, 135, 580, blue1.rgb, 1.0);
//line_r(COLOR.rgb, uv, pc0, 225, 580, blue1.rgb, 1.0);
//line_r(COLOR.rgb, uv, pc0, 315, 580, blue1.rgb, 1.0);
sector2(COLOR.rgb, uv, pc0, sec_var, ap_ant_w, 280, 580, red.rgb);
//sector(COLOR.rgb, uv, pc0, sec_back, ap_ant_w, 280, 580, red.rgb);
//sector(COLOR.rgb, uv, pc0, sec_left, ap_ant_w, 280, 580, red.rgb);
//sector(COLOR.rgb, uv, pc0, sec_right, ap_ant_w, 280, 580, red.rgb);
//antenas(COLOR.rgb, uv, pc0, ants_count, d6 / 2.0, d7 / 2.0, blue0.rgb, blue1.rgb, 0.3, 7.5);
antenas(COLOR.rgb, uv, pc0, 2, 220, 280, blue1.rgb, blue0.rgb, 0.4, 0);
antenas(COLOR.rgb, uv, pc0, 2, 280, 340, blue0.rgb, blue1.rgb, 0.4, 0);
antenas(COLOR.rgb, uv, pc0, 2, 340, 400, blue1.rgb, blue0.rgb, 0.4, 0);
antenas(COLOR.rgb, uv, pc0, 2, 400, 460, blue0.rgb, blue1.rgb, 0.4, 0);
antenas(COLOR.rgb, uv, pc0, 2, 460, 520, blue1.rgb, blue0.rgb, 0.4, 0);
antenas(COLOR.rgb, uv, pc0, 2, 520, 580, blue0.rgb, blue1.rgb, 0.4, 0);
// Сектор направления
sector(COLOR.rgb, uv, pc0, get_ang_atack(450.0 - sec_var), ap_ant_w, float(ant_band_r0_0), float(ant_band_r1_6), red.rgb);
//antenas(COLOR.rgb, uv, pc0, band_ants[0], 100, 120, blue0.rgb, blue1.rgb, 0.4, 0);
//antenas(COLOR.rgb, uv, pc0, band_ants[1], 125, 150, blue0.rgb, blue1.rgb, 0.4, 0);
//antenas(COLOR.rgb, uv, pc0, band_ants[2], 155, 180, blue0.rgb, blue1.rgb, 0.4, 0);
// Сетка антенн
antenas(COLOR.rgb, uv, pc0, ant_band_count_0, ant_band_r0_0, ant_band_r1_0, blue1.rgb, blue0.rgb, 0.4);
antenas(COLOR.rgb, uv, pc0, ant_band_count_1, ant_band_r0_1, ant_band_r1_1, blue0.rgb, blue1.rgb, 0.4);
antenas(COLOR.rgb, uv, pc0, ant_band_count_2, ant_band_r0_2, ant_band_r1_2, blue1.rgb, blue0.rgb, 0.4);
antenas(COLOR.rgb, uv, pc0, ant_band_count_3, ant_band_r0_3, ant_band_r1_3, blue0.rgb, blue1.rgb, 0.4);
antenas(COLOR.rgb, uv, pc0, ant_band_count_4, ant_band_r0_4, ant_band_r1_4, blue1.rgb, blue0.rgb, 0.4);
antenas(COLOR.rgb, uv, pc0, ant_band_count_5, ant_band_r0_5, ant_band_r1_5, blue0.rgb, blue1.rgb, 0.4);
antenas(COLOR.rgb, uv, pc0, ant_band_count_6, ant_band_r0_6, ant_band_r1_6, blue1.rgb, blue0.rgb, 0.4);
// Цели
bip1(COLOR.rgb, uv, tr0, 13.0, blue1.rgb, 1.0);
bip1(COLOR.rgb, uv, tr1, 13.0, blue1.rgb, 1.0);
bip1(COLOR.rgb, uv, tr2, 13.0, blue1.rgb, 1.0);
// Массивы не работают
//for (int i = 0; i < 3; i ++)
//{
// int cnt = int(band_ants[i].x);
// float r0 = band_ants[i].y;
// float r1 = band_ants[i].z;
// float adj = band_ants[i].w;
// antenas(COLOR.rgb, uv, pc0, cnt, r0, r1, blue0.rgb, blue1.rgb, 0.3, adj);
//}
// Качка
circle_thin(COLOR.rgb, uv, pc1, d4 / 2.0, line_width, blue1.rgb, 1.0);
line_r(COLOR.rgb, uv, pc1, 0, d4 / 2.0, blue1.rgb, 1.0);
@@ -343,29 +320,13 @@ void fragment()
shader = SubResource("1")
shader_parameter/blue0 = Color(0.38, 0.47, 0.51, 1)
shader_parameter/blue1 = Color(0.39, 0.44, 0.5, 1)
shader_parameter/blue2 = Color(0.11, 0.21, 0.25, 1)
shader_parameter/blue3 = Color(0.35, 0.76, 0.83, 1)
shader_parameter/blue4 = Color(0.953, 0.969, 0.89, 1)
shader_parameter/red = Color(1, 0.38, 0.227, 1)
shader_parameter/line_width = 2.0
shader_parameter/sec_forward = 180.0
shader_parameter/sec_back = 0.0
shader_parameter/sec_left = 90.0
shader_parameter/sec_right = 300.0
shader_parameter/d0 = 520.0
shader_parameter/d1 = 1120.0
shader_parameter/d2 = 1160.0
shader_parameter/d3 = 100.0
shader_parameter/d4 = 180.0
shader_parameter/d5 = 650.0
shader_parameter/d6 = 800.0
shader_parameter/d7 = 950.0
shader_parameter/pc0 = Vector2(590, 600)
shader_parameter/pc0 = Vector2(610, 600)
shader_parameter/pc1 = Vector2(110, 1070)
shader_parameter/pc2 = Vector2(100, 1060)
shader_parameter/ap_ant_w = 12.0
shader_parameter/pc2 = Vector2(100, 1065)
shader_parameter/tr0 = Vector2(600, 1000)
shader_parameter/tr1 = Vector2(1000, 600)
shader_parameter/tr2 = Vector2(300, 400)
shader_parameter/sec_var = 0.0
shader_parameter/band_ants = PackedInt32Array(8, 8, 12)
shader_parameter/ap_ant_w = 12.0

22
tab_container_stc.gd Normal file
View File

@@ -0,0 +1,22 @@
extends TabContainer
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_tab_changed(tab):
if tab == 7:
$Panel8/VideoStreamPlayer.play()
else:
$Panel8/VideoStreamPlayer.stop()
func _on_video_stream_player_finished():
$Panel8/VideoStreamPlayer.play()

96
tab_container_stc.tscn Normal file
View File

@@ -0,0 +1,96 @@
[gd_scene load_steps=10 format=3 uid="uid://cbfp6bylx8g4i"]
[ext_resource type="Texture2D" uid="uid://tfju4shlxd7g" path="res://data/1.png" id="1_5wdck"]
[ext_resource type="Script" path="res://tab_container_stc.gd" id="1_6hxhh"]
[ext_resource type="Texture2D" uid="uid://bhvo4qe45sof6" path="res://data/2.png" id="2_iwy0o"]
[ext_resource type="Texture2D" uid="uid://eixrw0k33lan" path="res://data/3.png" id="3_378a8"]
[ext_resource type="Texture2D" uid="uid://c52qoo3dp877e" path="res://data/4.png" id="4_n106p"]
[ext_resource type="Texture2D" uid="uid://kx8tn03k5ips" path="res://data/5.png" id="5_gkcgk"]
[ext_resource type="Texture2D" uid="uid://b6jjplsdvxmh2" path="res://data/7.png" id="6_7khta"]
[ext_resource type="Texture2D" uid="uid://cv2cj5ffmcked" path="res://data/6.png" id="7_3ndk8"]
[ext_resource type="VideoStream" path="res://data/dji-mini-2.mkv.ogv" id="9_3phym"]
[node name="TabContainer" type="TabContainer"]
offset_left = 10.0
offset_top = 5.0
offset_right = 1595.0
offset_bottom = 1200.0
script = ExtResource("1_6hxhh")
[node name="Panel1" type="Panel" parent="."]
layout_mode = 2
[node name="Sprite2D1" type="Sprite2D" parent="Panel1"]
position = Vector2(792.5, 589)
scale = Vector2(1.22951, 1.43142)
texture = ExtResource("1_5wdck")
[node name="Panel2" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="Sprite2D2" type="Sprite2D" parent="Panel2"]
position = Vector2(789.5, 586)
scale = Vector2(1.20724, 1.54768)
texture = ExtResource("2_iwy0o")
[node name="Panel3" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="Sprite2D3" type="Sprite2D" parent="Panel3"]
position = Vector2(795.75, 582.25)
scale = Vector2(1.23536, 1.44257)
texture = ExtResource("3_378a8")
[node name="Panel4" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="Sprite2D4" type="Sprite2D" parent="Panel4"]
position = Vector2(799.25, 582.75)
scale = Vector2(1.24902, 1.44271)
texture = ExtResource("4_n106p")
[node name="Panel5" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="Sprite2D5" type="Sprite2D" parent="Panel5"]
position = Vector2(797.5, 586.5)
scale = Vector2(1.34957, 1.69559)
texture = ExtResource("5_gkcgk")
[node name="Panel7" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="Sprite2D7" type="Sprite2D" parent="Panel7"]
position = Vector2(790, 586)
scale = Vector2(1.24219, 1.7432)
texture = ExtResource("6_7khta")
[node name="Panel6" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="Sprite2D6" type="Sprite2D" parent="Panel6"]
position = Vector2(790, 577)
scale = Vector2(1.23437, 1.73112)
texture = ExtResource("7_3ndk8")
[node name="Panel8" type="Panel" parent="."]
visible = false
layout_mode = 2
[node name="VideoStreamPlayer" type="VideoStreamPlayer" parent="Panel8"]
layout_mode = 0
offset_left = 8.0
offset_top = 9.0
offset_right = 1570.0
offset_bottom = 1155.0
stream = ExtResource("9_3phym")
expand = true
[connection signal="tab_changed" from="." to="." method="_on_tab_changed"]
[connection signal="finished" from="Panel8/VideoStreamPlayer" to="." method="_on_video_stream_player_finished"]

View File

@@ -1,439 +0,0 @@
{
"disabled_build_options": {
},
"disabled_classes": [
"AESContext",
"AStar2D",
"AStar3D",
"AStarGrid2D",
"ActionMapEditor",
"AnimatedSprite2D",
"AnimatedTexture",
"Animation",
"AnimationBezierTrackEdit",
"AnimationLibrary",
"AnimationNode",
"AnimationNodeStateMachinePlayback",
"AnimationNodeStateMachineTransition",
"AnimationPlayer",
"AnimationTrackEditPlugin",
"AnimationTree",
"AspectRatioContainer",
"AtlasTexture",
"AtlasTileProxyObject",
"AudioBusLayout",
"AudioEffect",
"AudioEffectInstance",
"AudioListener2D",
"AudioServer",
"AudioStream",
"AudioStreamPlayback",
"AudioStreamPlayer",
"AudioStreamPlayer2D",
"AudioStreamPreviewGenerator",
"BackBufferCopy",
"BitMap",
"Bone2D",
"BoneMap",
"BoxContainer",
"ButtonGroup",
"CPUParticles2D",
"Camera2D",
"CameraAttributes",
"CameraFeed",
"CameraServer",
"CameraTexture",
"CanvasGroup",
"CanvasItemEditorSelectedItem",
"CanvasItemEditorViewport",
"CanvasLayer",
"CanvasModulate",
"CanvasTexture",
"Cast2DEditor",
"CenterContainer",
"CharFXTransform",
"CheckBox",
"CheckButton",
"ClassDB",
"CollisionObject2D",
"CollisionPolygon2D",
"CollisionShape2D",
"CollisionShape2DEditor",
"ColorPickerButton",
"ColorRect",
"ConfigFile",
"ConnectDialogBinds",
"ControlEditorPopupButton",
"Crypto",
"CryptoKey",
"Curve",
"Curve2D",
"Curve3D",
"CurveTexture",
"CurveXYZTexture",
"DTLSServer",
"DebugAdapterParser",
"DirAccess",
"DisplayServer",
"DynamicFontImportSettingsData",
"ENetConnection",
"EditorAssetLibrary",
"EditorAudioBus",
"EditorAudioMeterNotches",
"EditorBuildProfile",
"EditorDebuggerPlugin",
"EditorDebuggerRemoteObject",
"EditorDebuggerSession",
"EditorExport",
"EditorExportPlatform",
"EditorExportPlugin",
"EditorExportPreset",
"EditorFeatureProfile",
"EditorFileServer",
"EditorFileSystem",
"EditorFileSystemDirectory",
"EditorFileSystemImportFormatSupportQuery",
"EditorImportBlendRunner",
"EditorInspectorCategory",
"EditorInspectorPlugin",
"EditorInspectorSection",
"EditorInterface",
"EditorNode",
"EditorNode3DGizmoPlugin",
"EditorPath",
"EditorPaths",
"EditorPlugin",
"EditorProperty",
"EditorPropertyArrayObject",
"EditorPropertyDictionaryObject",
"EditorPropertyLayersGrid",
"EditorPropertyNameProcessor",
"EditorResourceConversionPlugin",
"EditorResourcePreview",
"EditorResourcePreviewGenerator",
"EditorSceneFormatImporter",
"EditorScenePostImport",
"EditorScenePostImportPlugin",
"EditorScript",
"EditorSelection",
"EditorSettings",
"EditorTranslationParserPlugin",
"EditorUndoRedoManager",
"EditorVCSInterface",
"EncodedObjectAsID",
"Engine",
"EngineDebugger",
"EngineProfiler",
"Environment",
"Expression",
"FileAccess",
"FindInFiles",
"FindInFilesPanel",
"FlowContainer",
"FontVariation",
"GDExtension",
"GDExtensionManager",
"GDScriptNativeClass",
"GDScriptTextDocument",
"GDScriptWorkspace",
"GLTFAccessor",
"GLTFAnimation",
"GLTFBufferView",
"GLTFCamera",
"GLTFDocument",
"GLTFDocumentExtension",
"GLTFLight",
"GLTFMesh",
"GLTFNode",
"GLTFSkeleton",
"GLTFSkin",
"GLTFSpecGloss",
"GLTFState",
"GLTFTexture",
"GLTFTextureSampler",
"GPUParticles2D",
"GPUParticles3DEditorBase",
"Geometry2D",
"Geometry3D",
"Gradient",
"GradientTexture1D",
"GradientTexture2D",
"GraphEdit",
"GraphEditFilter",
"GraphEditMinimap",
"GraphNode",
"GridContainer",
"HMACContext",
"HTTPClient",
"HTTPRequest",
"HashingContext",
"IP",
"Image",
"ImageFormatLoader",
"ImageTexture",
"ImportDefaultsEditorSettings",
"ImportDockParameters",
"ImporterMesh",
"Input",
"InputEvent",
"InputMap",
"InstancePlaceholder",
"ItemList",
"JNISingleton",
"JSON",
"JSONRPC",
"JavaClass",
"JavaClassWrapper",
"JavaScriptBridge",
"JavaScriptObject",
"Joint2D",
"KinematicCollision2D",
"KinematicCollision3D",
"LabelSettings",
"Light2D",
"LightOccluder2D",
"LightmapGIData",
"Lightmapper",
"Line2D",
"LineEdit",
"LinkButton",
"MainLoop",
"MarginContainer",
"Marker2D",
"Marshalls",
"Material",
"MaterialEditor",
"MenuBar",
"MenuButton",
"Mesh",
"MeshDataTool",
"MeshInstance2D",
"MeshInstance3DEditor",
"MeshLibrary",
"MeshLibraryEditor",
"MeshTexture",
"MissingNode",
"MissingResource",
"MovieWriter",
"MultiMesh",
"MultiMeshEditor",
"MultiMeshInstance2D",
"MultiplayerAPI",
"MultiplayerSpawner",
"MultiplayerSynchronizer",
"Mutex",
"NavigationAgent2D",
"NavigationAgent3D",
"NavigationLink2D",
"NavigationLink2DEditor",
"NavigationMesh",
"NavigationMeshEditor",
"NavigationMeshGenerator",
"NavigationObstacle2D",
"NavigationObstacle3D",
"NavigationPathQueryParameters2D",
"NavigationPathQueryParameters3D",
"NavigationPathQueryResult2D",
"NavigationPathQueryResult3D",
"NavigationPolygon",
"NavigationRegion2D",
"NavigationServer2D",
"NavigationServer3D",
"Node3D",
"Node3DEditorViewport",
"Node3DEditorViewportContainer",
"Node3DGizmo",
"Noise",
"NoiseTexture2D",
"OS",
"Occluder3D",
"OccluderPolygon2D",
"OggPacketSequence",
"OggPacketSequencePlayback",
"OpenXRAction",
"OpenXRActionMap",
"OpenXRActionSet",
"OpenXRIPBinding",
"OpenXRInteractionProfile",
"OptionButton",
"PCKPacker",
"PackedDataContainer",
"PackedDataContainerRef",
"PacketPeer",
"ParallaxLayer",
"Path2D",
"PathFollow2D",
"Performance",
"PhysicsDirectBodyState2D",
"PhysicsDirectBodyState3D",
"PhysicsDirectSpaceState2D",
"PhysicsDirectSpaceState3D",
"PhysicsMaterial",
"PhysicsPointQueryParameters2D",
"PhysicsPointQueryParameters3D",
"PhysicsRayQueryParameters2D",
"PhysicsRayQueryParameters3D",
"PhysicsServer2D",
"PhysicsServer2DManager",
"PhysicsServer3D",
"PhysicsServer3DManager",
"PhysicsServer3DRenderingServerHandler",
"PhysicsShapeQueryParameters2D",
"PhysicsShapeQueryParameters3D",
"PhysicsTestMotionParameters2D",
"PhysicsTestMotionParameters3D",
"PhysicsTestMotionResult2D",
"PhysicsTestMotionResult3D",
"PlaceholderTexture2D",
"Polygon2D",
"PolygonPathFinder",
"PortableCompressedTexture2D",
"ProjectSettings",
"RDAttachmentFormat",
"RDFramebufferPass",
"RDPipelineColorBlendState",
"RDPipelineColorBlendStateAttachment",
"RDPipelineDepthStencilState",
"RDPipelineMultisampleState",
"RDPipelineRasterizationState",
"RDPipelineSpecializationConstant",
"RDSamplerState",
"RDShaderFile",
"RDShaderSPIRV",
"RDShaderSource",
"RDTextureFormat",
"RDTextureView",
"RDUniform",
"RDVertexAttribute",
"RandomNumberGenerator",
"Range",
"RayCast2D",
"ReferenceRect",
"RegEx",
"RegExMatch",
"RemoteTransform2D",
"RenderingDevice",
"RenderingServer",
"ResourceFormatLoader",
"ResourceFormatSaver",
"ResourceImporter",
"ResourceLoader",
"ResourcePreloader",
"ResourcePreloaderEditor",
"ResourceSaver",
"ResourceUID",
"RichTextEffect",
"RichTextLabel",
"SceneCacheInterface",
"SceneImportSettingsData",
"SceneRPCInterface",
"SceneReplicationConfig",
"SceneReplicationInterface",
"SceneState",
"SceneTileProxyObject",
"SceneTreeEditor",
"SceneTreeTimer",
"ScriptEditor",
"ScriptExtension",
"ScriptLanguage",
"ScrollContainer",
"SectionedInspectorFilter",
"Semaphore",
"Separator",
"ShaderFileEditor",
"ShaderGlobalsEditorInterface",
"ShaderGlobalsOverride",
"ShaderInclude",
"Shape2D",
"Shape3D",
"ShapeCast2D",
"Shortcut",
"Skeleton2D",
"Skeleton2DEditor",
"SkeletonIK3D",
"SkeletonModification2D",
"SkeletonModificationStack2D",
"SkeletonProfile",
"Skin",
"SkinReference",
"SplitContainer",
"SplitContainerDragger",
"Sprite2DEditor",
"SpriteFrames",
"StreamPeer",
"StyleBoxFlat",
"StyleBoxLine",
"StyleBoxTexture",
"SubViewportContainer",
"SurfaceTool",
"SyntaxHighlighter",
"SystemFont",
"TCPServer",
"TLSOptions",
"TabBar",
"TextEdit",
"TextLine",
"TextParagraph",
"TextServer",
"TextServerManager",
"Texture3D",
"TextureButton",
"TextureLayered",
"TextureRect",
"Theme",
"ThemeDB",
"Thread",
"TileAtlasView",
"TileData",
"TileMap",
"TileMapEditorTerrainsPlugin",
"TileMapEditorTilesPlugin",
"TileMapPattern",
"TileSet",
"TileSetAtlasSourceProxyObject",
"TileSetScenesCollectionProxyObject",
"TileSetSource",
"Time",
"Timer",
"TouchScreenButton",
"Translation",
"TranslationServer",
"Tree",
"TreeItem",
"TriangleMesh",
"Tween",
"Tweener",
"UDPServer",
"UPNP",
"UPNPDevice",
"UndoRedo",
"VideoStream",
"VideoStreamPlayback",
"VideoStreamPlayer",
"ViewPanner",
"Viewport",
"ViewportNavigationControl",
"ViewportRotationControl",
"ViewportTexture",
"VisibleOnScreenNotifier2D",
"VisualShader",
"VisualShaderNode",
"VoxelGIData",
"WeakRef",
"WebRTCPeerConnection",
"WorkerThreadPool",
"World2D",
"World3D",
"WorldEnvironment",
"X509Certificate",
"XMLParser",
"XRInterface",
"XRPose",
"XRPositionalTracker",
"XRServer",
"ZIPPacker",
"ZIPReader"
],
"type": "build_profile"
}