From da2b348d08a1b030ed6f1b6e1a6475392cc7de95 Mon Sep 17 00:00:00 2001 From: Thomas Gorisse Date: Wed, 19 Jun 2024 19:04:01 +0200 Subject: [PATCH] Default camera far to 1000 units --- .../src/main/java/io/github/sceneview/node/CameraNode.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sceneview/src/main/java/io/github/sceneview/node/CameraNode.kt b/sceneview/src/main/java/io/github/sceneview/node/CameraNode.kt index 2548a975..6588181c 100644 --- a/sceneview/src/main/java/io/github/sceneview/node/CameraNode.kt +++ b/sceneview/src/main/java/io/github/sceneview/node/CameraNode.kt @@ -44,7 +44,7 @@ open class CameraNode(engine: Engine, entity: Entity) : Node(engine, entity), Ca } // Far = 1 km - private var _far = 30.0f//1000.0f + private var _far = 1000.0f override var far: Float get() = super.far set(value) { @@ -335,7 +335,7 @@ open class CameraNode(engine: Engine, entity: Entity) : Node(engine, entity), Ca updateProjection() } - private fun getViewPortAspect() = + fun getViewPortAspect() = viewport?.let { (it.width.toDouble() / it.height.toDouble()) }?.takeIf { !it.isNaN() } ?: 1.0 } \ No newline at end of file