package xyz.r0r5chach.dermy_app.map

import com.badlogic.gdx.graphics.g3d.Environment
import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute
import com.badlogic.gdx.graphics.g3d.environment.DirectionalLight

class MapEnvironment internal constructor() : Environment() {
    init {
        this.set(ambientLight)
        this.add(rightLight)
        this.add(leftLight)
    }

    companion object {
        private val ambientLight = ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f)
        private val rightLight: DirectionalLight =
            DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f)
        private val leftLight: DirectionalLight =
            DirectionalLight().set(0.8f, 0.8f, 0.8f, 1f, 0.8f, 0.2f)
    }
}
