feat(viewer): add support for pure HTML cluster feature - part 1#5504
feat(viewer): add support for pure HTML cluster feature - part 1#5504
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5504 +/- ##
==========================================
- Coverage 72.84% 72.84% -0.01%
==========================================
Files 463 463
Lines 46515 46508 -7
Branches 3590 3601 +11
==========================================
- Hits 33884 33878 -6
+ Misses 12537 12536 -1
Partials 94 94
🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new method getLODByDistanceWithClustering to IconOctree for enhanced clustering, along with a new data type and corresponding tests. The implementation is generally solid. However, I've identified a performance concern in the new getNodeSize helper method, where a new Vector3 object is allocated on each call within a loop. My feedback includes a suggestion to optimize this by reusing a Vector3 instance to prevent potential performance degradation from garbage collection.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new type for cluster intersection data and a new method getLODByDistanceWithClustering in IconOctree for enhanced clustering. The new method incorporates node size and maximum depth for better granularity. Tests for this new functionality have been added. However, there is a critical inconsistency regarding the getLODByDistance method: its calls in IconOctree.test.ts have been updated to remove the clusteringLevel parameter, but the method signature in IconOctree.ts still declares and uses this parameter, which will lead to a runtime error or unexpected behavior.
nilsfremming
left a comment
There was a problem hiding this comment.
I had some comments
…when checking when the camera is close and node has children
|
risk review ok |
Type of change
Jira ticket 📘
https://cognitedata.atlassian.net/browse/BND3D-6392
This PR is part of a stacked PR to support the pure HTML cluster feature with an internal counter.
In this PR, I'm adding mainly the new IconOctree method getLODByDistanceWithClustering to get LOD nodes based on camera distance with enhanced clustering for pure cluster visualization.
How has this been tested? 🔍
It was tested by building it locally and testing it on cog-3d in scenes that have a lot of 360s, such as the Hybrid Mapping scene and the Ivar Aasen Demo (CAD, PC, 360).
Test instructions ℹ️
screen-capture.44.webm
Checklist ☑️