Skip to content

Commit

Permalink
refactor(#9): change background name from None to Globe
Browse files Browse the repository at this point in the history
  • Loading branch information
adriahso committed Sep 29, 2025
1 parent 5767ca1 commit 44a7c61
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/potreeViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ export async function createPotreeViewer(containerId, pointcloudUrl, settings) {
if (settings.pointBudget) viewer.setPointBudget(settings.pointBudget)

viewer.loadSettingsFromURL()
viewer.setBackground(null)
viewer.setDescription('Molloy Explorer')

viewer.loadGUI(() => {
viewer.setLanguage('en')
$('#menu_appearance').next().show()
Expand All @@ -24,10 +23,19 @@ export async function createPotreeViewer(containerId, pointcloudUrl, settings) {
$('#menu_filters').next().show()
viewer.toggleSidebar()
})

const e = await Potree.loadPointCloud(pointcloudUrl)
const pc = e.pointcloud
viewer.scene.addPointCloud(pc)

// Change name of default background from "None" to "Globe"
$("#background_options_none")
.text("Globe")
.attr("id", "background_options_globe")
.val("globe");

viewer.setBackground("globe")


pc.material.pointSizeType = Potree.PointSizeType.ADAPTIVE
pc.material.shape = Potree.PointShape.CIRCLE
Expand Down

0 comments on commit 44a7c61

Please sign in to comment.