update examples; polishing

This commit is contained in:
m-schuetz 2021-01-24 18:47:46 +01:00
parent fe2e4d2a43
commit 080334e0f2
14 changed files with 588 additions and 43 deletions

View File

@ -102,8 +102,8 @@ Copy the converted directory into <potreeDirectory>/pointclouds/data_conve
<img src="examples/thumbnails/matcap.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/vr.html" target="_blank">
<img src="examples/thumbnails/vr.jpg" width="100%" />
<a href="https://potree.org/potree/examples/vr_heidentor.html" target="_blank">
<img src="examples/thumbnails/heidentor.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/heidentor.html" target="_blank">
@ -233,6 +233,37 @@ Copy the converted directory into &lt;potreeDirectory&gt;/pointclouds/data_conve
</table>
</details>
# VR
<table>
<tr>
<td>
<a href="https://potree.org/potree/examples/vr_heidentor.html" target="_blank">
<img src="examples/thumbnails/heidentor.jpg" width="100%" />
</a>
</td><td>
<a href="https://potree.org/potree/examples/vr_eclepens.html" target="_blank">
<img src="examples/thumbnails/eclepens.jpg" width="100%" />
</a>
</td><td>
<a href="https://potree.org/potree/examples/vr_morro_bay.html" target="_blank">
<img src="examples/thumbnails/ca13.png" width="100%" />
</a>
</td><td>
<a href="https://potree.org/potree/examples/vr_lion.html" target="_blank">
<img src="examples/thumbnails/lion.png" width="100%" />
</a>
</td><td>
<a href="https://potree.org/potree/examples/vr_dechen_cave.html" target="_blank">
<img src="examples/thumbnails/dechen_cave.jpg" width="100%" />
</a>
</td>
</tr>
<tr>
<th>Heidentor</th><th>Eclepens</th><th>Morro Bay</th><th>Lion</th><th>Dechen Cave</th>
</tr>
</table>
# Showcase
<table>

View File

@ -49,7 +49,7 @@
viewer.setPointBudget(5_000_000);
viewer.loadSettingsFromURL();
viewer.setDescription("");
viewer.setDescription(`Point cloud courtesy of PG&E and <a href="https://opentopography.org/">Open Topography</a>.`);
viewer.loadGUI().then( () => {
viewer.setLanguage('en');

View File

@ -45,10 +45,6 @@
<a href="http://potree.org/potree/examples/matcap.html" target="_blank">
<img src="examples/thumbnails/matcap.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/vr.html" target="_blank">
<img src="examples/thumbnails/vr.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/heidentor.html" target="_blank">
<img src="examples/thumbnails/heidentor.png" width="100%" />
@ -57,16 +53,16 @@
<a href="http://potree.org/potree/examples/lion.html" target="_blank">
<img src="examples/thumbnails/lion.png" width="100%" />
</a>
</td>
</tr>
<tr>
<th>Load Project</th><th>Toolbar</th><th>Matcap</th><th>Virtual Reality</th><th>Heidentor</th><th>Lion</th>
</tr><tr>
<td>
</td><td>
<a href="http://potree.org/potree/examples/lion_las.html" target="_blank">
<img src="examples/thumbnails/lion_las.png" width="100%" />
</a>
</td><td>
</td>
</tr>
<tr>
<th>Load Project</th><th>Toolbar</th><th>Matcap</th><th>Heidentor</th><th>Lion</th><th>Lion LAS</th>
</tr><tr>
<td>
<a href="http://potree.org/potree/examples/lion_laz.html" target="_blank">
<img src="examples/thumbnails/lion_las.png" width="100%" />
</a>
@ -86,16 +82,16 @@
<a href="http://potree.org/potree/examples/clipping_volume.html" target="_blank">
<img src="examples/thumbnails/clipping_volume.png" width="100%" />
</a>
</td>
</tr>
<tr>
<th>Lion LAS</th><th>Lion LAZ</th><th>EPT</th><th>EPT Binary</th><th>EPT zstandard</th><th>Clipping Volume</th>
</tr><tr>
<td>
</td><td>
<a href="http://potree.org/potree/examples/ca13.html" target="_blank">
<img src="examples/thumbnails/ca13.png" width="100%" />
</a>
</td><td>
</td>
</tr>
<tr>
<th>Lion LAZ</th><th>EPT</th><th>EPT Binary</th><th>EPT zstandard</th><th>Clipping Volume</th><th>CA13</th>
</tr><tr>
<td>
<a href="http://potree.org/potree/examples/elevation_profile.html" target="_blank">
<img src="examples/thumbnails/elevation_profile.png" width="100%" />
</a>
@ -115,16 +111,16 @@
<a href="http://potree.org/potree/examples/features_sorvilier.html" target="_blank">
<img src="examples/thumbnails/features_sorvilier.png" width="100%" />
</a>
</td>
</tr>
<tr>
<th>CA13</th><th>Elevation Profile</th><th>Measurements</th><th>Meshes</th><th>Multiple Point Clouds</th><th>Features (Sorvilier)</th>
</tr><tr>
<td>
</td><td>
<a href="http://potree.org/potree/examples/features_ca13.html" target="_blank">
<img src="examples/thumbnails/features_ca13.png" width="100%" />
</a>
</td><td>
</td>
</tr>
<tr>
<th>Elevation Profile</th><th>Measurements</th><th>Meshes</th><th>Multiple Point Clouds</th><th>Features (Sorvilier)</th><th>Features (CA13)</th>
</tr><tr>
<td>
<a href="http://potree.org/potree/examples/annotations.html" target="_blank">
<img src="examples/thumbnails/annotations.png" width="100%" />
</a>
@ -144,16 +140,16 @@
<a href="http://potree.org/potree/examples/cesium_ca13.html" target="_blank">
<img src="examples/thumbnails/cesium_ca13.png" width="100%" />
</a>
</td>
</tr>
<tr>
<th>Features (CA13)</th><th>Annotations</th><th>Hierarchical Annotations</th><th>Animation Path</th><th>Shapefiles</th><th>Cesium CA13</th>
</tr><tr>
<td>
</td><td>
<a href="http://potree.org/potree/examples/cesium_retz.html" target="_blank">
<img src="examples/thumbnails/cesium_retz.png" width="100%" />
</a>
</td><td>
</td>
</tr>
<tr>
<th>Annotations</th><th>Hierarchical Annotations</th><th>Animation Path</th><th>Shapefiles</th><th>Cesium CA13</th><th>Cesium Retz</th>
</tr><tr>
<td>
<a href="http://potree.org/potree/examples/cesium_sorvilier.html" target="_blank">
<img src="examples/thumbnails/cesium_sorvilier.png" width="100%" />
</a>
@ -172,7 +168,38 @@
</td>
</tr>
<tr>
<th>Cesium Retz</th><th>Cesium Sorvilier</th><th>Custom Sidebar Section</th><th>Embedded Iframe</th><th>Gradient Colors</th>
<th>Cesium Sorvilier</th><th>Custom Sidebar Section</th><th>Embedded Iframe</th><th>Gradient Colors</th>
</tr>
</table>
<h1>VR</h1>
<table>
<tr>
<td>
<a href="http://potree.org/potree/examples/vr_heidentor.html" target="_blank">
<img src="examples/thumbnails/heidentor.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/vr_eclepens.html" target="_blank">
<img src="examples/thumbnails/eclepens.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/vr_morro_bay.html" target="_blank">
<img src="examples/thumbnails/ca13.png" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/vr_lion.html" target="_blank">
<img src="examples/thumbnails/lion.png.jpg" width="100%" />
</a>
</td><td>
<a href="http://potree.org/potree/examples/vr_dechen_cave.html" target="_blank">
<img src="examples/thumbnails/dechen_cave.jpg" width="100%" />
</a>
</td>
</tr>
<tr>
<th>Heidentor</th><th>Eclepens</th><th>Morro Bay</th><th>Lion</th><th>Dechen Cave</th>
</tr>
</table>

View File

@ -10,7 +10,6 @@
{"thumb": "thumbnails/toolbar.jpg", "label": "Toolbar", "url": "toolbar.html"},
{"thumb": "thumbnails/matcap.jpg", "label": "Matcap", "url": "matcap.html"},
{"thumb": "thumbnails/vr.jpg", "label": "Virtual Reality", "url": "vr.html"},
{"thumb": "thumbnails/heidentor.png", "label": "Heidentor", "url": "heidentor.html"},
{"thumb": "thumbnails/lion.png", "label": "Lion", "url": "lion.html"},
{"thumb": "thumbnails/lion_las.png", "label": "Lion LAS", "url": "lion_las.html"},
@ -41,6 +40,13 @@
{"thumb": "thumbnails/embedded_iframe.png", "label": "Embedded Iframe", "url": "embedded_iframe.html"},
{"thumb": "thumbnails/gradient_colors.png", "label": "Gradient Colors", "url": "gradient_colors.html"}
],
"VR": [
{"thumb": "thumbnails/heidentor.jpg", "label": "Heidentor", "url": "vr_heidentor.html"},
{"thumb": "thumbnails/eclepens.jpg", "label": "Eclepens", "url": "vr_eclepens.html"},
{"thumb": "thumbnails/ca13.png", "label": "Morro Bay", "url": "vr_morro_bay.html"},
{"thumb": "thumbnails/lion.png", "label": "Lion", "url": "vr_lion.html"},
{"thumb": "thumbnails/dechen_cave.jpg", "label": "Dechen Cave", "url": "vr_dechen_cave.html"}
],
"showcase": [
{"thumb": "thumbnails/matterhorn.jpg", "label": "Matterhorn", "url": "showcase/matterhorn.html"},
{"thumb": "thumbnails/retz.jpg", "label": "Retz", "url": "showcase/retz.html"},

View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Potree Viewer</title>
<link rel="stylesheet" type="text/css" href="../build/potree/potree.css">
<link rel="stylesheet" type="text/css" href="../libs/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../libs/openlayers3/ol.css">
<link rel="stylesheet" type="text/css" href="../libs/spectrum/spectrum.css">
<link rel="stylesheet" type="text/css" href="../libs/jstree/themes/mixed/style.css">
</head>
<body>
<script src="../libs/jquery/jquery-3.1.1.min.js"></script>
<script src="../libs/spectrum/spectrum.js"></script>
<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
<script src="../libs/other/BinaryHeap.js"></script>
<script src="../libs/tween/tween.min.js"></script>
<script src="../libs/d3/d3.js"></script>
<script src="../libs/proj4/proj4.js"></script>
<script src="../libs/openlayers3/ol.js"></script>
<script src="../libs/i18next/i18next.js"></script>
<script src="../libs/jstree/jstree.js"></script>
<script src="../build/potree/potree.js"></script>
<script src="../libs/plasio/js/laslaz.js"></script>
<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
<!-- INCLUDE SETTINGS HERE -->
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');"></div>
<div id="potree_sidebar_container"> </div>
</div>
<script type="module">
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(true);
viewer.setFOV(60);
viewer.setPointBudget(1_000_000);
viewer.loadSettingsFromURL();
viewer.setBackground("skybox");
viewer.setDescription(`Point cloud of <a href="http://www.dechenhoehle.de/" target="_blank">Dechen-Cave, Iserlohn</a>. Courtesy of <a href="http://lrg.geog.uni-heidelberg.de" target="_blank">Heidelberg University, LiDAR Research Group (LRG)</a><br>
<i style="font-size: small">
H&auml;mmerle, M., H&ouml;fle, B., Fuchs, J., Schr&ouml;der-Ritzrau, A., Vollweiler, N. & Frank, N. (2014): <a href="http://lrg.geog.uni-heidelberg.de/dechencave/" target="_blank">Comparison of Kinect and Terrestrial LiDAR Capturing Natural Karst Cave 3D Objects</a>. IEEE Geoscience and Remote Sensing Letters, Vol. 11(11), pp 1896-1900, DOI:<a href="http://dx.doi.org/10.1109/LGRS.2014.2313599" target="_blank">10.1109/LGRS.2014.2313599</a>
</i>`);
viewer.loadGUI(() => {
viewer.setLanguage('en');
$("#menu_tools").next().show();
$("#menu_clipping").next().show();
viewer.toggleSidebar();
});
// Load and add point cloud to scene
Potree.loadPointCloud("https://potree.org/pointclouds/dechen_cave/metadata.json", "Dechen Cave", e => {
let scene = viewer.scene;
let pointcloud = e.pointcloud;
let material = pointcloud.material;
material.size = 0.7;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
material.shape = Potree.PointShape.SQUARE;
material.activeAttributeName = "rgba";
material.rgbGamma = 0.67;
scene.addPointCloud(pointcloud);
// viewer.fitToScreen();
viewer.scene.view.setView(
[8.408, 12.242, 2.585],
[9.270, 12.767, 2.584],
);
});
</script>
</body>
</html>

84
examples/vr_eclepens.html Normal file
View File

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Potree Viewer</title>
<link rel="stylesheet" type="text/css" href="../build/potree/potree.css">
<link rel="stylesheet" type="text/css" href="../libs/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../libs/openlayers3/ol.css">
<link rel="stylesheet" type="text/css" href="../libs/spectrum/spectrum.css">
<link rel="stylesheet" type="text/css" href="../libs/jstree/themes/mixed/style.css">
</head>
<body>
<script src="../libs/jquery/jquery-3.1.1.min.js"></script>
<script src="../libs/spectrum/spectrum.js"></script>
<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
<script src="../libs/other/BinaryHeap.js"></script>
<script src="../libs/tween/tween.min.js"></script>
<script src="../libs/d3/d3.js"></script>
<script src="../libs/proj4/proj4.js"></script>
<script src="../libs/openlayers3/ol.js"></script>
<script src="../libs/i18next/i18next.js"></script>
<script src="../libs/jstree/jstree.js"></script>
<script src="../build/potree/potree.js"></script>
<script src="../libs/plasio/js/laslaz.js"></script>
<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
<!-- INCLUDE SETTINGS HERE -->
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');"></div>
<div id="potree_sidebar_container"> </div>
</div>
<script type="module">
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(true);
viewer.setFOV(60);
viewer.setPointBudget(1_000_000);
viewer.loadSettingsFromURL();
viewer.setBackground("skybox");
viewer.setDescription(`Point cloud courtesy of <a href="https://www.pix4d.com/de/">Pix4D</a>.`);
viewer.loadGUI(() => {
viewer.setLanguage('en');
$("#menu_tools").next().show();
$("#menu_clipping").next().show();
viewer.toggleSidebar();
});
// Load and add point cloud to scene
Potree.loadPointCloud("https://potree.org/pointclouds/eclepens/metadata.json", "Eclepens", e => {
let scene = viewer.scene;
let pointcloud = e.pointcloud;
let material = pointcloud.material;
material.size = 0.7;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
material.shape = Potree.PointShape.SQUARE;
material.activeAttributeName = "rgba";
scene.addPointCloud(pointcloud);
// viewer.fitToScreen();
viewer.scene.view.setView(
[285.377, -820.884, 409.188],
[84.116, -3.442, -24.020],
);
});
</script>
</body>
</html>

106
examples/vr_heidentor.html Normal file
View File

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Potree Viewer</title>
<link rel="stylesheet" type="text/css" href="../build/potree/potree.css">
<link rel="stylesheet" type="text/css" href="../libs/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../libs/openlayers3/ol.css">
<link rel="stylesheet" type="text/css" href="../libs/spectrum/spectrum.css">
<link rel="stylesheet" type="text/css" href="../libs/jstree/themes/mixed/style.css">
</head>
<body>
<script src="../libs/jquery/jquery-3.1.1.min.js"></script>
<script src="../libs/spectrum/spectrum.js"></script>
<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
<script src="../libs/other/BinaryHeap.js"></script>
<script src="../libs/tween/tween.min.js"></script>
<script src="../libs/d3/d3.js"></script>
<script src="../libs/proj4/proj4.js"></script>
<script src="../libs/openlayers3/ol.js"></script>
<script src="../libs/i18next/i18next.js"></script>
<script src="../libs/jstree/jstree.js"></script>
<script src="../build/potree/potree.js"></script>
<script src="../libs/plasio/js/laslaz.js"></script>
<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
<!-- INCLUDE SETTINGS HERE -->
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');"></div>
<div id="potree_sidebar_container"> </div>
<input id="tiffTest" type="button" value="tiff test" />
</div>
<script type="module">
import * as THREE from "../libs/three.js/build/three.module.js";
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(true);
viewer.setFOV(90);
viewer.setPointBudget(1_000_000);
viewer.setMinNodeSize(0);
viewer.loadSettingsFromURL();
viewer.setBackground("skybox");
viewer.setShowBoundingBox(false);
viewer.setDescription(`Heidentor point cloud courtesy of <a href="http://archpro.lbg.ac.at/" target="_blank">Ludwig Boltzmann Institute - Archeological Prospection and Virtual Archeology</a> (26M points)`);
viewer.loadGUI(() => {
viewer.setLanguage('en');
$("#menu_appearance").next().show();
$("#menu_tools").next().show();
$("#menu_scene").next().show();
//viewer.toggleSidebar();
});
Potree.loadPointCloud("https://potree.org/pointclouds/heidentor/metadata.json", "Heidentor", function(e){
viewer.scene.addPointCloud(e.pointcloud);
e.pointcloud.position.z = 0;
let material = e.pointcloud.material;
material.size = 1;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
viewer.scene.view.setView(
[4.681, 3.228, 2.074],
[3.681, 3.222, 2.359],
);
});
{ // ground plane
const texture = new THREE.TextureLoader().load(`${Potree.resourcePath}/textures/rectangle.png`);
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.x = 10;
texture.repeat.y = 10;
texture.anisotropy = 16;
let geometry = new THREE.PlaneBufferGeometry(1, 1, 10, 10);
let material = new THREE.MeshBasicMaterial();
material.map = texture;
material.needsUpdate = true;
let plane = new THREE.Mesh(geometry, material);
plane.scale.set(18, 18, 18);
plane.position.set(-2, 3, 0);
plane.material.color.setRGB(0.8, 0.8, 0.8);
window.plane = plane;
viewer.scene.scene.add(plane);
}
</script>
</body>
</html>

80
examples/vr_lion.html Normal file
View File

@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Potree Viewer</title>
<link rel="stylesheet" type="text/css" href="../build/potree/potree.css">
<link rel="stylesheet" type="text/css" href="../libs/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../libs/openlayers3/ol.css">
<link rel="stylesheet" type="text/css" href="../libs/spectrum/spectrum.css">
<link rel="stylesheet" type="text/css" href="../libs/jstree/themes/mixed/style.css">
</head>
<body>
<script src="../libs/jquery/jquery-3.1.1.min.js"></script>
<script src="../libs/spectrum/spectrum.js"></script>
<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
<script src="../libs/other/BinaryHeap.js"></script>
<script src="../libs/tween/tween.min.js"></script>
<script src="../libs/d3/d3.js"></script>
<script src="../libs/proj4/proj4.js"></script>
<script src="../libs/openlayers3/ol.js"></script>
<script src="../libs/i18next/i18next.js"></script>
<script src="../libs/jstree/jstree.js"></script>
<script src="../build/potree/potree.js"></script>
<script src="../libs/plasio/js/laslaz.js"></script>
<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
<!-- INCLUDE SETTINGS HERE -->
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');"></div>
<div id="potree_sidebar_container"> </div>
</div>
<script type="module">
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(true);
viewer.setFOV(60);
viewer.setPointBudget(1_000_000);
viewer.loadSettingsFromURL();
viewer.setBackground("skybox");
// viewer.setDescription(`Point cloud courtesy of PG&E and <a href="https://opentopography.org/">Open Topography</a>.`);
viewer.loadGUI(() => {
viewer.setLanguage('en');
$("#menu_tools").next().show();
$("#menu_clipping").next().show();
viewer.toggleSidebar();
});
// Load and add point cloud to scene
Potree.loadPointCloud("https://potree.org/pointclouds/lion/metadata.json", "Lion", e => {
let scene = viewer.scene;
let pointcloud = e.pointcloud;
let material = pointcloud.material;
material.size = 0.6;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
material.shape = Potree.PointShape.SQUARE;
material.activeAttributeName = "rgba";
scene.addPointCloud(pointcloud);
viewer.fitToScreen(0.6);
});
</script>
</body>
</html>

View File

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Potree Viewer</title>
<link rel="stylesheet" type="text/css" href="../build/potree/potree.css">
<link rel="stylesheet" type="text/css" href="../libs/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../libs/openlayers3/ol.css">
<link rel="stylesheet" type="text/css" href="../libs/spectrum/spectrum.css">
<link rel="stylesheet" type="text/css" href="../libs/jstree/themes/mixed/style.css">
</head>
<body>
<script src="../libs/jquery/jquery-3.1.1.min.js"></script>
<script src="../libs/spectrum/spectrum.js"></script>
<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
<script src="../libs/other/BinaryHeap.js"></script>
<script src="../libs/tween/tween.min.js"></script>
<script src="../libs/d3/d3.js"></script>
<script src="../libs/proj4/proj4.js"></script>
<script src="../libs/openlayers3/ol.js"></script>
<script src="../libs/i18next/i18next.js"></script>
<script src="../libs/jstree/jstree.js"></script>
<script src="../build/potree/potree.js"></script>
<script src="../libs/plasio/js/laslaz.js"></script>
<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
<!-- INCLUDE SETTINGS HERE -->
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');"></div>
<div id="potree_sidebar_container"> </div>
</div>
<script type="module">
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(true);
viewer.setFOV(60);
viewer.setPointBudget(1_000_000);
viewer.loadSettingsFromURL();
viewer.setBackground("skybox");
viewer.setDescription(`Point cloud courtesy of PG&E and <a href="https://opentopography.org/">Open Topography</a>.`);
viewer.loadGUI(() => {
viewer.setLanguage('en');
$("#menu_tools").next().show();
$("#menu_clipping").next().show();
viewer.toggleSidebar();
});
// Load and add point cloud to scene
Potree.loadPointCloud("https://potree.org/pointclouds/morro_bay/metadata.json", "Morro Bay", e => {
let scene = viewer.scene;
let pointcloud = e.pointcloud;
let material = pointcloud.material;
material.size = 0.6;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
material.shape = Potree.PointShape.SQUARE;
material.activeAttributeName = "rgba";
scene.addPointCloud(pointcloud);
// viewer.fitToScreen();
viewer.scene.view.setView(
[693507.083, 3915277.848, 940.159],
[694700.838, 3916428.109, 52.515],
);
});
</script>
</body>
</html>

View File

@ -116,11 +116,33 @@ export class PointCloudOctree extends PointCloudTree {
this.updateMatrix();
{
let attributeName = "rgba";
if(this.pcoGeometry.pointAttributes.attributes.length > 1){
attributeName = this.pcoGeometry.pointAttributes.attributes[1].name;
let priorityQueue = ["rgba", "rgb", "intensity", "classification"];
let selected = "rgba";
for(let attributeName of priorityQueue){
let attribute = this.pcoGeometry.pointAttributes.attributes.find(a => a.name === attributeName);
if(!attribute){
continue;
}
let min = attribute.range[0].constructor.name === "Array" ? attribute.range[0] : [attribute.range[0]];
let max = attribute.range[1].constructor.name === "Array" ? attribute.range[1] : [attribute.range[1]];
let range_min = new THREE.Vector3(...min);
let range_max = new THREE.Vector3(...max);
let range = range_min.distanceTo(range_max);
if(range === 0){
continue;
}
selected = attributeName;
break;
}
this.material.activeAttributeName = attributeName;
this.material.activeAttributeName = selected;
}
this.showBoundingBox = false;

View File

@ -38,9 +38,17 @@ function computeMove(vrControls, controller){
y = Math.sign(y) * (2 * y) ** 2;
let maxSize = 0;
for(let pc of viewer.scene.pointclouds){
let size = pc.boundingBox.min.distanceTo(pc.boundingBox.max);
maxSize = Math.max(maxSize, size);
}
let multiplicator = Math.pow(maxSize, 0.5) / 2;
let scale = vrControls.node.scale.x;
let moveSpeed = viewer.getMoveSpeed();
let amount = 15 * y * (moveSpeed ** 0.5) / scale;
let amount = multiplicator * y * (moveSpeed ** 0.5) / scale;
let rotation = new THREE.Quaternion().setFromEuler(controller.rotation);
let dir = new THREE.Vector3(0, 0, -1);

View File

@ -89,6 +89,7 @@ async function createGithubPage(){
let unhandledCode = ``;
let exampleCode = toCode(files, settings.examples);
let vrCode = toCode(files, settings.VR);
let showcaseCode = toCode(files, settings.showcase);
let thirdpartyCode = toCode(files, settings.thirdparty);
@ -100,6 +101,12 @@ async function createGithubPage(){
${exampleCode}
</table>
<h1>VR</h1>
<table>
${vrCode}
</table>
<h1>Showcase</h1>
<table>

View File

@ -117,7 +117,7 @@ class ProfileFakeOctree extends PointCloudTree{
this.currentBatch.geometry.computeBoundingBox();
this.currentBatch.geometry.computeBoundingSphere();
this.currentBatch = this.createNewBatch();
this.currentBatch = this.createNewBatch(data);
updateRange = {
start: 0,
count: 0

View File

@ -2039,6 +2039,8 @@ export class Viewer extends EventDispatcher{
let v = xrCamera.viewport;
renderer.setViewport(v.x, v.y, v.width, v.height);
xrCamera.fov = 90;
for(let pointcloud of this.scene.pointclouds){
const {material} = pointcloud;
material.useEDL = false;