Skip to content

Comments

feat(viewer): add support for pure HTML cluster feature - part 5#5508

Open
danpriori wants to merge 17 commits intodanpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part4from
danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
Open

feat(viewer): add support for pure HTML cluster feature - part 5#5508
danpriori wants to merge 17 commits intodanpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part4from
danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5

Conversation

@danpriori
Copy link
Contributor

@danpriori danpriori commented Feb 8, 2026

Type of change

Feat

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.

This PR adds capabilities of zoom to cluster capabilities in api helper, including wiring up and prevent intersect geometry while clicking a cluster icon

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 ℹ️

  • Open unified 3d in a scene with a large collection of 360s (example: Hybrid Mapping).
  • Navigate through the 360s and clusters without entering a 360 image.
  • Observe the clusters appearing with the numbering of how many points that cluster represents.
  • Click on one of the clusters.
  • Observe the camera zooming in so that the cluster expands, showing the points it represents.
screen-capture.44.webm

Checklist ☑️

  • I am happy with this implementation.
  • I have performed a self-review of my own code.
  • I have added unit and visuals tests to prove that my feature works to the best of my ability.
  • I have added documentation to new and changed elements; both public and internally shared ones
  • I have refactored the code for testability, readability and extendibility to the best of my ability.
  • I have listed the JIRA tasks covering remaining work or tech debt related to this PR in the description.

…in api helper and prevent intersect geometry while clicking a cluster icon
@danpriori danpriori requested a review from a team as a code owner February 8, 2026 02:09
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 79.86111% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.76%. Comparing base (0cc223b) to head (0fa710c).

Files with missing lines Patch % Lines
...ckages/api/src/public/migration/Cognite3DViewer.ts 12.12% 29 Missing ⚠️
Additional details and impacted files
@@                                         Coverage Diff                                         @@
##           danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part4    #5508      +/-   ##
===================================================================================================
+ Coverage                                                            73.51%   73.76%   +0.24%     
===================================================================================================
  Files                                                                  467      467              
  Lines                                                                47675    47816     +141     
  Branches                                                              3768     3802      +34     
===================================================================================================
+ Hits                                                                 35050    35273     +223     
+ Misses                                                               12491    12409      -82     
  Partials                                                               134      134              
Files with missing lines Coverage Δ
.../packages/api/src/api-helpers/Image360ApiHelper.ts 41.12% <100.00%> (+7.57%) ⬆️
viewer/packages/api/src/public/migration/types.ts 100.00% <100.00%> (ø)
...ackages/camera-manager/src/DefaultCameraManager.ts 66.42% <100.00%> (+0.59%) ⬆️
...ckages/api/src/public/migration/Cognite3DViewer.ts 67.51% <12.12%> (-0.84%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…on-part4' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
…on-part4' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
…on-part4' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
@danpriori
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the capability to zoom into 360 image clusters. The implementation correctly prioritizes cluster intersections over individual icon intersections and adds the necessary logic for camera transitions. The changes are well-tested. However, there is a significant issue in the zoomToCluster implementation where setTimeout is used to wait for an animation. This can lead to an unresponsive UI if the animation is interrupted by the user. I've provided a detailed comment on how to address this by using a promise-based approach for the animation.

Copy link
Contributor

@nilscognite nilscognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a comment

Copy link
Contributor

@nilsfremming nilsfremming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. I see the camera manager stuff is charged to my suggestion.

@danpriori danpriori added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Feb 13, 2026
@danpriori danpriori dismissed nilscognite’s stale review February 13, 2026 12:06

He already approved using his other account

…on-part4' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
@github-actions
Copy link

There were failures in the visual tests workflow.
Image diffs for visual tests can be downloaded as an artifact here.

…on-part4' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
…on-part4' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part5
Copy link
Contributor

@nilscognite nilscognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-risk-review Waiting for a member of the risk review team to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants