Skip to content

Commit

Permalink
fix(#61): 🐛 fix init of potreeViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
gautegf committed Nov 10, 2025
1 parent eb9e1b5 commit a8f2d97
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ async function init() {
console.error('Failed to load country borders:', error)
}

if (!window.viewer) {
window.viewer = window.potreeViewer
}

window.potreeViewer = await createPotreeViewer(
'potree_render_area',
POTREE_POINTCLOUD_URLS,
POTREE_SETTINGS
)

const potreeViewer = window.potreeViewer
window.viewer = window.potreeViewer
potreeViewer.addEventListener('camera_changed', updateText)
setupRightClickListener(potreeViewer)

Expand Down

0 comments on commit a8f2d97

Please sign in to comment.