24 lines
439 B
Kotlin
24 lines
439 B
Kotlin
package ru.dbotthepony.kstarbound.client.render
|
|
|
|
import ru.dbotthepony.kstarbound.math.*
|
|
|
|
class Camera {
|
|
val pos = MutableVector3f()
|
|
var zoom = 1f
|
|
|
|
fun translate(stack: FloatMatrix<*>) {
|
|
stack.translateWithScale(pos)
|
|
stack.scale(x = zoom, y = zoom)
|
|
}
|
|
|
|
fun userInput(key: Int, scancode: Int, action: Int, mods: Int) {
|
|
|
|
}
|
|
|
|
companion object {
|
|
const val MAX_ZOOM = 4f
|
|
const val MIN_ZOOM = 0.1f
|
|
const val ZOOM_STEP = 0.1f
|
|
}
|
|
}
|