testing animation behaviours

This commit is contained in:
betalars 2024-02-11 22:34:34 +01:00
parent 50732ae525
commit 184fb82151
1 changed files with 61 additions and 69 deletions

View File

@ -1,81 +1,73 @@
[gd_scene load_steps=6 format=3 uid="uid://bigr0lnen1xdh"]
[gd_scene load_steps=5 format=3 uid="uid://bigr0lnen1xdh"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_3yn7w"]
sky_top_color = Color(0, 0, 1, 1)
sky_horizon_color = Color(0.858824, 0.541176, 0.4, 1)
sky_curve = 0.54075
[sub_resource type="GDScript" id="GDScript_5hy5u"]
script/source = "extends Node3D
[sub_resource type="Sky" id="Sky_lumfb"]
sky_material = SubResource("ProceduralSkyMaterial_3yn7w")
[sub_resource type="Environment" id="Environment_f0flp"]
background_mode = 2
background_energy_multiplier = 0.2
sky = SubResource("Sky_lumfb")
sky_rotation = Vector3(0, 0.352557, 0)
ambient_light_source = 3
ambient_light_color = Color(1, 1, 1, 1)
reflected_light_source = 1
tonemap_mode = 2
ssr_enabled = true
ssr_max_steps = 512
ssr_depth_tolerance = 0.01
ssao_enabled = true
ssao_radius = 1.24
ssao_intensity = 3.09
ssao_power = 1.91184
ssao_detail = 3.0
ssil_intensity = 0.72
ssil_normal_rejection = 0.56
sdfgi_enabled = true
sdfgi_use_occlusion = true
glow_enabled = true
glow_levels/2 = 0.3
glow_levels/7 = 2.0
glow_intensity = 0.4
glow_strength = 0.7
glow_bloom = 0.13
glow_blend_mode = 1
glow_hdr_threshold = 0.46
fog_enabled = true
fog_light_color = Color(0.141176, 0.133333, 0.301961, 1)
fog_sky_affect = 0.0
fog_height = 1.0
fog_height_density = 0.1
adjustment_enabled = true
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_2qx32"]
auto_exposure_enabled = true
auto_exposure_scale = 0.2
dof_blur_far_enabled = true
dof_blur_far_distance = 0.4
dof_blur_far_transition = 0.2
dof_blur_near_distance = 0.79
dof_blur_amount = 0.0
auto_exposure_min_sensitivity = 100.0
[sub_resource type="GDScript" id="GDScript_uqlwy"]
script/source = "extends WorldEnvironment
# Called when the node enters the scene tree for the first time.
func _ready():
focus_env()
await get_tree().create_timer(1).timeout
$AnimationPlayer.advance(10)
func focus_env():
var dof_strength_tween: Tween = create_tween()
dof_strength_tween.tween_property(camera_attributes, \"dof_blur_amount\", 0, 1)
func focus_object():
var dof_strength_tween: Tween = create_tween()
dof_strength_tween.tween_property(camera_attributes, \"dof_blur_amount\", 0.6, 1)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_animation_player_animation_finished(anim_name):
print(\"yay\")
"
[node name="Node3D" type="Node3D"]
[sub_resource type="Animation" id="Animation_wjx7h"]
resource_name = "test"
length = 5.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, -0.058, 0.77), Vector3(0, -0.058, 10.97)]
}
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_f0flp")
camera_attributes = SubResource("CameraAttributesPractical_2qx32")
script = SubResource("GDScript_uqlwy")
[sub_resource type="Animation" id="Animation_kdstq"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, -0.058, 0.77)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_l6qbr"]
_data = {
"RESET": SubResource("Animation_kdstq"),
"test": SubResource("Animation_wjx7h")
}
[node name="Node3D" type="Node3D"]
script = SubResource("GDScript_5hy5u")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.987688, -0.156434, 0, 0.156434, 0.987688, 0, -0.058, 0.77)
fov = 18.0
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_l6qbr")
}
autoplay = "test"
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]