2023-05-24 23:52:07 +08:00
|
|
|
extends Label
|
|
|
|
|
2023-07-01 05:38:17 +08:00
|
|
|
|
2023-05-24 23:52:07 +08:00
|
|
|
func _ready():
|
2023-07-01 05:38:17 +08:00
|
|
|
$"/root/Main/Camera3D".position.y = (
|
|
|
|
pow($"%HeightSlider".value, 4.0)
|
|
|
|
- $"/root/Main/WorldEnvironment".environment.sky.sky_material.get_shader_parameter("Height")
|
|
|
|
+ 1.0
|
|
|
|
)
|
|
|
|
|
2023-05-24 23:52:07 +08:00
|
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
|
|
set_text("FPS: " + str(Engine.get_frames_per_second()))
|
2023-07-01 05:38:17 +08:00
|
|
|
get_node("/root/Main/Moon Holder/Moon").transform.rotated(Vector3.UP, delta)
|
|
|
|
|
2023-05-24 23:52:07 +08:00
|
|
|
|
|
|
|
func _on_height_slider_value_changed(value):
|
2023-07-01 05:38:17 +08:00
|
|
|
$"/root/Main/Camera3D".position.y = (
|
|
|
|
pow(value, 4.0)
|
|
|
|
- $"/root/Main/WorldEnvironment".environment.sky.sky_material.get_shader_parameter("Height")
|
|
|
|
+ 1.0
|
|
|
|
)
|