Fixed lighting
This commit is contained in:
@@ -10,8 +10,20 @@ import (
|
||||
|
||||
func CreateDesert(screenWidth, screenHeight float64) *Map {
|
||||
m := NewMap("desert", 2, "Desert", screenWidth, screenHeight)
|
||||
m.BackgroundColor = color.NRGBA{R: 15, G: 20, B: 40, A: 255} // Dark blue night sky
|
||||
m.TimeOfDay = Nighttime
|
||||
m.BackgroundColor = color.NRGBA{R: 15, G: 20, B: 40, A: 255}
|
||||
m.Lighting = LightConfig{
|
||||
AmbientBrightness: 0.1,
|
||||
Sources: []LightSource{
|
||||
{
|
||||
X: screenWidth - 80,
|
||||
Y: 80,
|
||||
Radius: 450,
|
||||
Color: color.RGBA{R: 200, G: 220, B: 255, A: 255},
|
||||
Intensity: 0.5,
|
||||
ShadowDarkness: 0.7,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// ground surface
|
||||
m.World.AddSurface(&world.Surface{
|
||||
|
||||
Reference in New Issue
Block a user