Skip to content

Commit 1024024

Browse files
committed
Add color option to EPT/COPC examples.
1 parent f7ac011 commit 1024024

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

examples/copc.html

+2
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@
7373
else path = "../pointclouds/" + name + "/ept.json";
7474
}
7575

76+
var c = getQueryParam('c');
7677
Potree.loadPointCloud(path, name, function(e){
7778
viewer.scene.addPointCloud(e.pointcloud);
7879

7980
let material = e.pointcloud.material;
8081
material.size = 1;
8182
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
83+
if (c) material.activeAttributeName = c;
8284

8385
viewer.fitToScreen(0.5);
8486
});

examples/ept.html

+2
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@
7373
else path = "../pointclouds/" + name + "/ept.json";
7474
}
7575

76+
var c = getQueryParam('c');
7677
Potree.loadPointCloud(path, name, function(e){
7778
viewer.scene.addPointCloud(e.pointcloud);
7879

7980
let material = e.pointcloud.material;
8081
material.size = 1;
8182
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
83+
if (c) material.activeAttributeName = c;
8284

8385
viewer.fitToScreen(0.5);
8486
});

0 commit comments

Comments
 (0)