improves initialization and configuration of the ARCore Session, see changes in ArSessionWrapper:
session property is now a state flow of type <Session?>. Initially the session will be null and will only be created in onResume. This brings it inline with Google's HelloAr sample.
The session gets now configured in onResume.
During config we set Config.LightEstimationMode.ENVIRONMENTAL_HDR, which improves detection of planes on some devices.
In TableTopSceneView the session state flow is observed and only when a session is available, we create the ArCameraFeed
Removed onDrawStatusChanged parameter from TableTopSceneView, since draw status changed events are never invoked when manual rendering is enabled (which is the case for TableTopSceneView).
A change in the SceneView() composable function to invoke the content lambda when the scene view is ready OR when manual rendering is enabled. This is because when manual rendering is enabled (in the case of AR), we never receive a DrawStatusChanged event for Completed, thus the scene view would never be ready if we waited on it. So in cases where we render manually, we need to invoke the content lambda regardless of the draw status.
Changes to SceneViewProxy to cache the isManualRenderingEnabled flag in a backing field and sync that with the SceneView when it is set on the proxy.
Related to issue: https://devtopia.esri.com/runtime/kotlin/issues/4769
Description:
Fixes some issues and adds some refinements to TableTopSceneView.
Note - best to review this PR with
w=1
: https://github.com/Esri/arcgis-maps-sdk-kotlin-toolkit/pull/663/files?w=1Summary of changes:
ArSessionWrapper
:session
property is now a state flow of type<Session?>
. Initially the session will be null and will only be created inonResume
. This brings it inline with Google's HelloAr sample.onResume
.Config.LightEstimationMode.ENVIRONMENTAL_HDR
, which improves detection of planes on some devices.TableTopSceneView
the session state flow is observed and only when a session is available, we create theArCameraFeed
onDrawStatusChanged
parameter fromTableTopSceneView
, since draw status changed events are never invoked when manual rendering is enabled (which is the case for TableTopSceneView).SceneView()
composable function to invoke the content lambda when the scene view is ready OR when manual rendering is enabled. This is because when manual rendering is enabled (in the case of AR), we never receive a DrawStatusChanged event forCompleted
, thus the scene view would never be ready if we waited on it. So in cases where we render manually, we need to invoke the content lambda regardless of the draw status.SceneViewProxy
to cache theisManualRenderingEnabled
flag in a backing field and sync that with the SceneView when it is set on the proxy.Pre-merge Checklist