feat(environment): add painterly skies and living meadows

This commit is contained in:
Rijad Zuzo
2026-09-05 20:27:09 +02:00
parent 7899d36f03
commit ec16e2f2ca
71 changed files with 2280 additions and 213 deletions
+29
View File
@@ -0,0 +1,29 @@
extends GutTest
const CYCLE := preload("res://world/jajce/day_night_cycle.gd")
func test_sun_is_highest_at_noon_and_lights_the_ground_throughout_day() -> void:
var cycle := CYCLE.new()
var light := DirectionalLight3D.new()
cycle.directional_light = light
cycle._apply_light_rotation(0.5)
var noon_elevation := -light.rotation_degrees.x
assert_gt(noon_elevation, 45.0, "Noon should have an elevated sun, not grazing light")
for time in [0.15, 0.25, 0.4, 0.6, 0.75, 0.85]:
cycle._apply_light_rotation(time)
assert_lt(light.rotation_degrees.x, 0.0, "The daylight source points down toward terrain")
assert_lt(-light.rotation_degrees.x, noon_elevation, "The solar arc peaks at noon")
cycle.free()
light.free()
func test_warm_transitions_overlap_dawn_and_dusk_without_persisting_at_noon() -> void:
var cycle := CYCLE.new()
for time in [0.22, 0.78]:
assert_gt(cycle._day_factor(time), 0.0)
assert_lt(cycle._day_factor(time), 1.0)
assert_gt(cycle._sunrise_sunset_weight(time), 0.8)
assert_eq(cycle._sunrise_sunset_weight(0.5), 0.0)
assert_eq(cycle._sunrise_sunset_weight(0.0), 0.0)
cycle.free()