Skip to content

Commit

Permalink
refactor(#9): change elevationControl handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adriahso committed Oct 4, 2025
1 parent 1e7b214 commit c3bfa54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Molloy Explorer is a 3D seabed visualization tool built with **Potree**. It allo

### Add point cloud data

Place the point cloud data (in Potree format) in `public/pointclouds/data_converted`.
Place the point cloud data (in Potree format with EPSG:4978 coordinates) in `public/pointclouds/data_converted`.

**Note:** Point cloud files should not be committed to Git.

Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<div id="potree_sidebar_container"></div>
</div>

<script src="src/ElevationControl/elevationControl.js"></script>
<script type="module" src="src/main.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/ElevationControl/elevationControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function moveElevationContainer() {
}

//initiate and orchestrate all funcitons to render the Evelation control section of the sidebar propperly
window.initElevationControls = function initElevationControls(viewer) {
export function initElevationControls(viewer) {
//Creates the section
createElevationPanel(viewer)

Expand Down
6 changes: 3 additions & 3 deletions src/potreeViewer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { initElevationControls } from './ElevationControl/elevationControl.js'

/**
* Initializes the Potree viewer used to visualize the point cloud.
*
Expand Down Expand Up @@ -31,9 +33,7 @@ export async function createPotreeViewer(containerId, pointcloudUrl, settings) {
$('#menu_filters').next().show()
viewer.toggleSidebar()

if (window.initElevationControls) {
window.initElevationControls(viewer)
}
initElevationControls(viewer)
})

const e = await Potree.loadPointCloud(pointcloudUrl)
Expand Down

0 comments on commit c3bfa54

Please sign in to comment.