Files
project-thought-experiment/scenes/gravity_gun.tscn
2024-01-24 20:55:45 +01:00

221 lines
8.4 KiB
Plaintext

[gd_scene load_steps=24 format=3 uid="uid://cl6gw3huejnrl"]
[ext_resource type="Script" path="res://scripts/gravity_gun.gd" id="1_0upyy"]
[ext_resource type="ArrayMesh" uid="uid://cxw30fmp15jsd" path="res://assets/models/gun.obj" id="1_803cf"]
[ext_resource type="Environment" uid="uid://drn5fwa4uhv4m" path="res://resources/environment.tres" id="1_vtn44"]
[ext_resource type="Material" uid="uid://b6r8e4302xg1d" path="res://assets/materials/dark_metal.material" id="2_qrl87"]
[ext_resource type="Shader" path="res://shaders/pbr_glass.gdshader" id="3_aeppb"]
[ext_resource type="Texture2D" uid="uid://bjx2i53wtjair" path="res://assets/textures/crosshair.png" id="7_4s8bm"]
[ext_resource type="Texture2D" uid="uid://b4en3dw3q324p" path="res://assets/textures/circle.png" id="8_al3c7"]
[sub_resource type="World3D" id="World3D_wp4pn"]
environment = ExtResource("1_vtn44")
[sub_resource type="GDScript" id="GDScript_sr7lp"]
script/source = "extends SubViewport
func _ready() -> void:
msaa_3d = ProjectSettings.get_setting(\"rendering/anti_aliasing/quality/msaa_3d\",0)
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b1al8"]
render_priority = 0
shader = ExtResource("3_aeppb")
shader_parameter/albedo = Color(1, 1, 0.729412, 0.270588)
shader_parameter/roughness = 0.15
shader_parameter/normal_strength = 1.0
shader_parameter/edge_color = Color(0, 0, 0, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3g65u"]
albedo_color = Color(0.08984, 0.019501, 0, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sgrb8"]
albedo_color = Color(0.447059, 0.447059, 0.447059, 1)
metallic = 0.94
roughness = 0.3
clearcoat_enabled = true
ao_light_affect = 0.22
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6ml44"]
albedo_color = Color(1, 0, 0, 1)
metallic_specular = 0.0
emission_enabled = true
emission = Color(1, 0.156863, 0, 1)
emission_energy_multiplier = 16.0
backlight_enabled = true
backlight = Color(1, 0.215686, 0, 1)
disable_receive_shadows = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_r64y0"]
albedo_color = Color(1, 0.945098, 0.72549, 1)
metallic_specular = 0.0
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yttr4"]
lifetime_randomness = 0.1
emission_shape = 1
emission_sphere_radius = 0.2
initial_velocity_min = 1.0
initial_velocity_max = 1.0
gravity = Vector3(3, -7.5, 0)
scale_min = 0.01
scale_max = 0.07
collision_mode = 2
collision_use_scale = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rnipw"]
transparency = 2
alpha_scissor_threshold = 0.9
alpha_antialiasing_mode = 0
albedo_texture = ExtResource("8_al3c7")
emission_enabled = true
emission = Color(0.784314, 0.396078, 0, 1)
emission_energy_multiplier = 16.0
billboard_mode = 1
billboard_keep_scale = true
[sub_resource type="QuadMesh" id="QuadMesh_wtlns"]
material = SubResource("StandardMaterial3D_rnipw")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_5ccgj"]
direction = Vector3(3, 0, 1)
initial_velocity_min = 10.0
initial_velocity_max = 10.0
[sub_resource type="Curve" id="Curve_xucvk"]
_data = [Vector2(0.0245902, 0), 0.0, -0.0514974, 0, 0, Vector2(0.766827, 0), 0.00682321, 0.0, 0, 0]
point_count = 2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_endjk"]
emission_enabled = true
emission = Color(0, 1, 1, 1)
emission_energy_multiplier = 16.0
backlight = Color(1, 1, 1, 1)
billboard_keep_scale = true
point_size = 12.7
use_particle_trails = true
[sub_resource type="RibbonTrailMesh" id="RibbonTrailMesh_fwaab"]
material = SubResource("StandardMaterial3D_endjk")
size = 18.0
sections = 8
section_length = 0.3
section_segments = 2
curve = SubResource("Curve_xucvk")
[sub_resource type="Shader" id="Shader_3q2t2"]
code = "shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture;
void fragment() {
COLOR.rgb = 1.0 - textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb;
COLOR.a = texture(TEXTURE , UV).a;
}"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_1bkc3"]
shader = SubResource("Shader_3q2t2")
[node name="GravityGunLayer" type="CanvasLayer"]
follow_viewport_enabled = true
script = ExtResource("1_0upyy")
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 0
size_flags_vertical = 0
stretch = true
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
own_world_3d = true
world_3d = SubResource("World3D_wp4pn")
transparent_bg = true
handle_input_locally = false
scaling_3d_scale = 2.0
sdf_scale = 0
size = Vector2i(1152, 648)
size_2d_override_stretch = true
render_target_update_mode = 4
script = SubResource("GDScript_sr7lp")
[node name="Node3D" type="Node3D" parent="SubViewportContainer/SubViewport"]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewportContainer/SubViewport/Node3D"]
transform = Transform3D(0.707107, -0.707107, 0, 0.5, 0.5, 0.707107, -0.5, -0.5, 0.707107, 0, 0, 0)
directional_shadow_blend_splits = true
sky_mode = 1
[node name="Camera3D" type="Camera3D" parent="SubViewportContainer/SubViewport/Node3D"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/Node3D/Camera3D"]
transform = Transform3D(0.00445237, 0.182181, 0.983255, 0.0240231, 0.982961, -0.182236, -0.999701, 0.0244322, -4.29794e-08, 0.895815, -0.569743, -1.63173)
mesh = ExtResource("1_803cf")
skeleton = NodePath("../..")
surface_material_override/0 = ExtResource("2_qrl87")
surface_material_override/1 = SubResource("ShaderMaterial_b1al8")
surface_material_override/2 = SubResource("StandardMaterial3D_3g65u")
surface_material_override/3 = SubResource("StandardMaterial3D_sgrb8")
surface_material_override/4 = SubResource("StandardMaterial3D_6ml44")
surface_material_override/5 = SubResource("StandardMaterial3D_r64y0")
[node name="GPUParticles3D" type="GPUParticles3D" parent="SubViewportContainer/SubViewport/Node3D/Camera3D/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.20308, -0.000130415, 0.165362)
emitting = false
lifetime = 5.0
randomness = 0.2
visibility_aabb = AABB(-0.894568, -0.448322, -0.513538, 1.77742, 0.896643, 1.02708)
process_material = SubResource("ParticleProcessMaterial_yttr4")
draw_pass_1 = SubResource("QuadMesh_wtlns")
[node name="GPUParticles3D2" type="GPUParticles3D" parent="SubViewportContainer/SubViewport/Node3D/Camera3D/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.173204, 0.0331628, -0.182098)
lifetime = 5.0
randomness = 0.5
visibility_aabb = AABB(-0.894568, -0.448322, -0.513538, 1.77742, 0.896643, 1.02708)
process_material = SubResource("ParticleProcessMaterial_yttr4")
draw_pass_1 = SubResource("QuadMesh_wtlns")
[node name="GPUParticles3D3" type="GPUParticles3D" parent="SubViewportContainer/SubViewport/Node3D/Camera3D/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.132698, 0.304665, 0.0594321)
lifetime = 5.0
randomness = 0.5
visibility_aabb = AABB(-0.894568, -0.448322, -0.513538, 1.77742, 0.896643, 1.02708)
process_material = SubResource("ParticleProcessMaterial_yttr4")
draw_pass_1 = SubResource("QuadMesh_wtlns")
[node name="GPUParticlesCollisionBox3D" type="GPUParticlesCollisionBox3D" parent="SubViewportContainer/SubViewport/Node3D/Camera3D/MeshInstance3D"]
transform = Transform3D(0.999923, -0.012392, 0.000616441, 0.0123854, 0.999875, 0.00980631, -0.000737865, -0.00979792, 0.999952, 0.358337, 0.108517, -0.0012207)
size = Vector3(1.17664, 0.301201, 0.299805)
[node name="GravityParticles" type="GPUParticles3D" parent="SubViewportContainer/SubViewport/Node3D/Camera3D/MeshInstance3D"]
transform = Transform3D(1, -2.79397e-08, 8.70349e-09, 1.9744e-07, 1, 5.83791e-08, -7.93013e-09, -5.67382e-07, 1, 1, 0, 0)
visible = false
amount = 50
lifetime = 0.1
visibility_aabb = AABB(0.0726342, 0.335538, 0.399176, 0.593013, 0.887273, 1.34056)
trail_enabled = true
trail_lifetime = 0.8
process_material = SubResource("ParticleProcessMaterial_5ccgj")
draw_pass_1 = SubResource("RibbonTrailMesh_fwaab")
[node name="TextureRect" type="TextureRect" parent="."]
material = SubResource("ShaderMaterial_1bkc3")
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -8.0
offset_top = -8.0
offset_right = 8.0
offset_bottom = 8.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("7_4s8bm")
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]