-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Avoid showing the bounding box when the scene is still loading assets #906
Conversation
Deploying with Cloudflare Pages
|
Test this pull request
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #906 +/- ##
==========================================
+ Coverage 66.81% 67.13% +0.32%
==========================================
Files 524 529 +5
Lines 16542 16676 +134
Branches 2111 2132 +21
==========================================
+ Hits 11052 11196 +144
+ Misses 5155 5143 -12
- Partials 335 337 +2 ☔ View full report in Codecov by Sentry. |
@@ -244,22 +248,22 @@ async function validateEntityIsOutsideLayout(entity: EcsEntity) { | |||
|
|||
function updateMeshBoundingBoxVisibility(entity: EcsEntity, mesh: BABYLON.AbstractMesh) { | |||
const scene = mesh.getScene() | |||
if (scene.isLoading) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Condition added to avoid showing bounding boxes while the scene is still loading assets
This PR adds validation to avoid showing meshes' bounding boxes when the scene is still loading out of the layout.
It also adds a new
SceneMetrics
RPC and store to consume the scenemetrics | limits | entitiesOutOfBoundaries
outside the inspector, like from the builder.