From 69cb0066f8f5900fde373c4c3db202b48f100712 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 8 Dec 2023 20:06:30 +0100 Subject: [PATCH] Change godot default wallpaper make it also move vertically --- .gitignore | 1 + .../Create/WizardsFiles/Godot_v5/spinner.gd | 16 +++++++- .../WizardsFiles/Godot_v5/wallpaper.tscn | 40 ++++++++++++++++--- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 228c4fbe..72ab70f8 100644 --- a/.gitignore +++ b/.gitignore @@ -263,3 +263,4 @@ cython_debug/ /ThirdParty/ffmpeg/** /ThirdParty/qt-layer-shell/** /ThirdParty/Godot/Godot_*.* +/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/.godot/* diff --git a/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/spinner.gd b/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/spinner.gd index 2e5cdb3b..545192ca 100644 --- a/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/spinner.gd +++ b/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/spinner.gd @@ -1,6 +1,18 @@ extends CSGBox3D -var rotation_speed = 3.0 +var rotation_speed = 2.0 +var hover_height = 0.5 # Half of the total hover distance +var hover_speed = 1 # Speed of the hover effect +var hover_offset = 0.0 # Offset for the sine function -func _process(delta): +func _process(delta): rotate_y(rotation_speed * delta) + + # Increment the hover offset + hover_offset += hover_speed * delta + + # Calculate the new Y position based on the sine wave + var hover_y = hover_height * sin(hover_offset) + + # Update the position with the hover effect + position.y = hover_y diff --git a/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/wallpaper.tscn b/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/wallpaper.tscn index 714824ae..c7686445 100644 --- a/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/wallpaper.tscn +++ b/ScreenPlay/qml/Create/WizardsFiles/Godot_v5/wallpaper.tscn @@ -1,19 +1,47 @@ -[gd_scene load_steps=2 format=3 uid="uid://d105uliklnkd5"] +[gd_scene load_steps=5 format=3 uid="uid://d105uliklnkd5"] [ext_resource type="Script" path="res://spinner.gd" id="1_ggnsn"] +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_e2y6e"] +sky_top_color = Color(0.0431373, 0.431373, 0.490196, 1) +sky_horizon_color = Color(0.290196, 0.486275, 0.592157, 1) +ground_bottom_color = Color(0.47451, 0.596078, 0.247059, 1) +ground_horizon_color = Color(0.533333, 0.72549, 0.266667, 1) + +[sub_resource type="Sky" id="Sky_lblg2"] +sky_material = SubResource("ProceduralSkyMaterial_e2y6e") + +[sub_resource type="Environment" id="Environment_o4j5r"] +background_mode = 2 +sky = SubResource("Sky_lblg2") + [node name="Node3D" type="Node3D"] [node name="Camera3D" type="Camera3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5) -[node name="CSGBox3D" type="CSGBox3D" parent="."] -transform = Transform3D(0.707107, -0.5, -0.5, 0, 0.707107, -0.707107, 0.707107, 0.5, 0.5, 0, 0, 0) +[node name="Cube" type="CSGBox3D" parent="."] +transform = Transform3D(0.707107, -0.5, -0.5, 0, 0.707107, -0.707107, 0.707107, 0.5, 0.5, 0, 0.645491, 0) script = ExtResource("1_ggnsn") +[node name="Godot Engine 3d Text" type="Label3D" parent="Cube"] +transform = Transform3D(1, 0, 0, 0, -5.96046e-08, 1, 0, -1, -1.19209e-07, 0.00762761, 0.513576, 0.00745064) +text = "Godot Wallpaper" +font_size = 22 + [node name="OmniLight3D" type="OmniLight3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.41283, 1.52646) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.37605, 0.497631) +shadow_enabled = true +omni_range = 7.41946 [node name="Label3D" type="Label3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.874896, 0.37249) -text = "Godot Wallpaper" +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.29892, 0.37249) +text = "You can edit this wallpaper by right click +edit in the Installed tab." + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_o4j5r") + +[node name="Floor" type="CSGBox3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.78161, 0) +size = Vector3(94.9521, 0.361328, 7.57324)