AltParty2024/entities/balls.tscn

146 lines
20 KiB
Text
Raw Permalink Normal View History

2024-10-10 22:04:47 +03:00
[gd_scene load_steps=11 format=3 uid="uid://cwtpmstacd7h6"]
2024-10-10 18:43:23 +03:00
[ext_resource type="Script" path="res://scripts/balls.gd" id="1_phwel"]
2024-10-10 22:04:47 +03:00
[ext_resource type="PackedScene" uid="uid://br7cnj1spc4rk" path="res://assets/auto_scale.tscn" id="2_cvkem"]
2024-10-10 18:43:23 +03:00
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_b4b3o"]
friction = 0.5
bounce = 0.3
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_vdks7"]
data = PackedVector3Array(0, 0.7412, -0.9659, 0, 0.5, -0.866, 0.25, 0.7412, -0.933, 0.25, 0.7412, -0.933, 0, 0.5, -0.866, 0.2241, 0.5, -0.8365, 0, 0.0341, -0.2588, 0, 0, 0, 0.067, 0.0341, -0.25, 0, 0.5, -0.866, 0, 0.2929, -0.7071, 0.2241, 0.5, -0.8365, 0.2241, 0.5, -0.8365, 0, 0.2929, -0.7071, 0.183, 0.2929, -0.683, 0, 0.2929, -0.7071, 0, 0.134, -0.5, 0.183, 0.2929, -0.683, 0.183, 0.2929, -0.683, 0, 0.134, -0.5, 0.1294, 0.134, -0.483, 0, 1, -1, 0, 0.7412, -0.9659, 0.2588, 1, -0.9659, 0.2588, 1, -0.9659, 0, 0.7412, -0.9659, 0.25, 0.7412, -0.933, 0, 0.134, -0.5, 0, 0.0341, -0.2588, 0.1294, 0.134, -0.483, 0.1294, 0.134, -0.483, 0, 0.0341, -0.2588, 0.067, 0.0341, -0.25, 0.183, 0.2929, -0.683, 0.1294, 0.134, -0.483, 0.3535, 0.2929, -0.6124, 0.3535, 0.2929, -0.6124, 0.1294, 0.134, -0.483, 0.25, 0.134, -0.433, 0.2588, 1, -0.9659, 0.25, 0.7412, -0.933, 0.5, 1, -0.866, 0.5, 1, -0.866, 0.25, 0.7412, -0.933, 0.4829, 0.7412, -0.8365, 0.1294, 0.134, -0.483, 0.067, 0.0341, -0.25, 0.25, 0.134, -0.433, 0.25, 0.134, -0.433, 0.067, 0.0341, -0.25, 0.1294, 0.0341, -0.2242, 0.25, 0.7412, -0.933, 0.2241, 0.5, -0.8365, 0.4829, 0.7412, -0.8365, 0.4829, 0.7412, -0.8365, 0.2241, 0.5, -0.8365, 0.433, 0.5, -0.75, 0.067, 0.0341, -0.25, 0, 0, 0, 0.1294, 0.0341, -0.2242, 0.2241, 0.5, -0.8365, 0.183, 0.2929, -0.683, 0.433, 0.5, -0.75, 0.433, 0.5, -0.75, 0.183, 0.2929, -0.683, 0.3535, 0.2929, -0.6124, 0.1294, 0.0341, -0.2242, 0, 0, 0, 0.183, 0.0341, -0.183, 0.433, 0.5, -0.75, 0.3535, 0.2929, -0.6124, 0.6124, 0.5, -0.6124, 0.6124, 0.5, -0.6124, 0.3535, 0.2929, -0.6124, 0.5, 0.2929, -0.5, 0.3535, 0.2929, -0.6124, 0.25, 0.134, -0.433, 0.5, 0.2929, -0.5, 0.5, 0.2929, -0.5, 0.25, 0.134, -0.433, 0.3535, 0.134, -0.3536, 0.5, 1, -0.866, 0.4829, 0.7412, -0.8365, 0.7071, 1, -0.7071, 0.7071, 1, -0.7071, 0.4829, 0.7412, -0.8365, 0.683, 0.7412, -0.683, 0.25, 0.134, -0.433, 0.1294, 0.0341, -0.2242, 0.3535, 0.134, -0.3536, 0.3535, 0.134, -0.3536, 0.1294, 0.0341, -0.2242, 0.183, 0.0341, -0.183, 0.4829, 0.7412, -0.8365, 0.433, 0.5, -0.75, 0.683, 0.7412, -0.683, 0.683, 0.7412, -0.683, 0.433, 0.5, -0.75, 0.6124, 0.5, -0.6124, 0.3535, 0.134, -0.3536, 0.183, 0.0341, -0.183, 0.433, 0.134, -0.25, 0.433, 0.134, -0.25, 0.183, 0.0341, -0.183, 0.2241, 0.0341, -0.1294, 0.683, 0.7412, -0.683, 0.6124, 0.5, -0.6124, 0.8365, 0.7412, -0.483, 0.8365, 0.7412, -0.483, 0.6124, 0.5, -0.6124, 0.75, 0.5, -0.433, 0.183, 0.0341, -0.183, 0, 0, 0, 0.2241, 0.0341, -0.1294, 0.6124, 0.5, -0.6124, 0.5, 0.2929, -0.5, 0.75, 0.5, -0.433, 0.75, 0.5, -0.433, 0.5, 0.2929, -0.5, 0.6124, 0.2929, -0.3536, 0.5, 0.2929, -0.5, 0.3535, 0.134, -0.3536, 0.6124, 0.2929, -0.3536, 0.6124, 0.2929, -0.3536, 0.3535, 0.134, -0.3536, 0.433, 0.134, -0.25, 0.7071, 1, -0.7071, 0.683, 0.7412, -0.683, 0.866, 1, -0.5, 0.866, 1, -0.5, 0.683, 0.7412, -0.683, 0.8365, 0.7412, -0.483, 0.6124, 0.2929, -0.3536, 0.433, 0.134, -0.25, 0.683, 0.2929, -0.183, 0.683, 0.2929, -0.183, 0.433, 0.134, -0.25, 0.4829, 0.134, -0.1294, 0.866, 1, -0.5, 0.8365, 0.7412, -0.483, 0.9659, 1, -0.2588, 0.9659, 1, -0.2588, 0.8365, 0.7412, -0.483, 0.933, 0.7412, -0.25, 0.433, 0.134, -0.25, 0.2241, 0.0341, -0.1294, 0.4829, 0.134, -0.1294, 0.4829, 0.134, -0.1294, 0.2241, 0.0341, -0.1294, 0.25, 0.0341, -0.067, 0.8365, 0.7412, -0.483, 0.75, 0.5, -0.433, 0.933, 0.7412, -0.25, 0.933, 0.7412, -0.25, 0.75, 0.5, -0.433, 0.8365, 0.5, -0.2242, 0.2241, 0.0341, -0.1294, 0, 0, 0, 0.25, 0.0341, -0.067, 0.75, 0.5, -0.433, 0.6124, 0.2929, -0.3536, 0.8365, 0.5, -0.2242, 0.8365, 0.5, -0.2242, 0.6124, 0.2929, -0.3536, 0.683, 0.2929, -0.183, 0.25, 0.0341, -0.067, 0, 0, 0, 0.2588, 0.0341, 0, 0.8365, 0.5, -0.2242, 0.683, 0.2929, -0.183, 0.866, 0.5, 0, 0.866, 0.5, 0, 0.683, 0.2929, -0.183, 0.7071, 0.2929, 0, 0.683, 0.2929, -0.183, 0.4829, 0.134, -0.1294, 0.7071, 0.2929, 0, 0.7071, 0.2929, 0, 0.4829, 0.134, -0.1294, 0.5, 0.134, 0, 0.9659, 1, -0.2588, 0.933, 0.7412, -0.25, 1, 1, 0, 1, 1, 0, 0.933, 0.7412, -0.25, 0.9659, 0.7412, 0, 0.4829, 0.134, -0.1294, 0.25, 0.0341, -0.067, 0.5, 0.134, 0, 0.5, 0.134, 0, 0.25, 0.0341, -0.067, 0.2588, 0.0341, 0, 0.933, 0.7412, -0.25, 0.8365, 0.5, -0.2
[sub_resource type="Environment" id="Environment_a5sfg"]
background_mode = 1
background_energy_multiplier = 0.0
2024-10-10 22:04:47 +03:00
[sub_resource type="LabelSettings" id="LabelSettings_q7ejd"]
font_size = 256
[sub_resource type="ViewportTexture" id="ViewportTexture_lydef"]
viewport_path = NodePath("BallsViewport")
[sub_resource type="Shader" id="Shader_cytw2"]
code = "shader_type canvas_item;
uniform bool enabled;
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 col = texture(TEXTURE,UV).rgba;
if (enabled) {
if (col.a != 0.0) {
col.a = 0.0;
}
else {
col.a = 1.0;
}
}
else {
col.a = 0.0;
}
COLOR = col;
}
//void light() {
// Called for every pixel for every light affecting the CanvasItem.
// Uncomment to replace the default light processing function with this one.
//}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2rcjr"]
shader = SubResource("Shader_cytw2")
shader_parameter/enabled = true
[sub_resource type="ViewportTexture" id="ViewportTexture_kd4bv"]
viewport_path = NodePath("TextViewPort")
[node name="Balls" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
2024-10-10 18:43:23 +03:00
script = ExtResource("1_phwel")
2024-10-10 22:04:47 +03:00
[node name="BallsViewport" type="SubViewport" parent="."]
size = Vector2i(1920, 1080)
[node name="Balls" type="Node3D" parent="BallsViewport"]
[node name="StaticBody3D" type="StaticBody3D" parent="BallsViewport/Balls"]
2024-10-10 18:43:23 +03:00
physics_material_override = SubResource("PhysicsMaterial_b4b3o")
2024-10-10 22:04:47 +03:00
[node name="CollisionShape3D" type="CollisionShape3D" parent="BallsViewport/Balls/StaticBody3D"]
2024-10-10 18:43:23 +03:00
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
shape = SubResource("ConcavePolygonShape3D_vdks7")
disabled = true
2024-10-10 22:04:47 +03:00
[node name="Timer" type="Timer" parent="BallsViewport/Balls"]
wait_time = 0.003
2024-10-10 18:43:23 +03:00
autostart = true
2024-10-10 22:04:47 +03:00
[node name="Camera3D" type="Camera3D" parent="BallsViewport/Balls"]
2024-10-10 18:43:23 +03:00
transform = Transform3D(1, 0, 0, 0, 0.964732, 0.263233, 0, -0.263233, 0.964732, 0, 1.07001, 5.63238)
2024-10-10 22:04:47 +03:00
current = true
2024-10-10 18:43:23 +03:00
size = 2.802
2024-10-10 22:04:47 +03:00
far = 100.0
2024-10-10 18:43:23 +03:00
2024-10-10 22:04:47 +03:00
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="BallsViewport/Balls"]
transform = Transform3D(1, 0, 0, 0, -0.106282, 0.994336, 0, -0.994336, -0.106282, 0, 0, 0)
2024-10-10 18:43:23 +03:00
2024-10-10 22:04:47 +03:00
[node name="WorldEnvironment" type="WorldEnvironment" parent="BallsViewport/Balls"]
2024-10-10 18:43:23 +03:00
environment = SubResource("Environment_a5sfg")
2024-10-10 22:04:47 +03:00
[node name="AutoScale" parent="BallsViewport" instance=ExtResource("2_cvkem")]
[node name="TextViewPort" type="SubViewport" parent="."]
transparent_bg = true
size = Vector2i(1920, 1080)
[node name="Label" type="Label" parent="TextViewPort"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -907.5
offset_top = -174.5
offset_right = 907.5
offset_bottom = 174.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
text = "WE ❤️"
label_settings = SubResource("LabelSettings_q7ejd")
horizontal_alignment = 1
[node name="AutoScale" parent="TextViewPort" instance=ExtResource("2_cvkem")]
[node name="Out" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_lydef")
[node name="TextMask" type="TextureRect" parent="."]
material = SubResource("ShaderMaterial_2rcjr")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_kd4bv")
[connection signal="timeout" from="BallsViewport/Balls/Timer" to="." method="_on_timer_timeout"]