Skip to content
Permalink
Browse files
Add matcap example and potree with normals
Added a potree of lion takanawa with normals + a matcap.html example
  • Loading branch information
jo-chemla authored and paubineau committed Jul 31, 2019
1 parent cdfb730 commit 36bf1fb969f366b849b4dc70ea5dcb05959362da
Showing 81 changed files with 110 additions and 0 deletions.
@@ -0,0 +1,79 @@
<!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/perfect-scrollbar/css/perfect-scrollbar.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/perfect-scrollbar/js/perfect-scrollbar.jquery.js"></script>
<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
<script src="../libs/three.js/build/three.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"></div>
<div id="potree_sidebar_container"> </div>
</div>

<script>
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));

viewer.setEDLEnabled(true);
viewer.setFOV(60);
viewer.setPointBudget(1*1000*1000);
viewer.loadSettingsFromURL();

viewer.loadGUI(() => {
viewer.setLanguage('en');
$("#menu_tools").next().show();
$("#menu_clipping").next().show();
viewer.toggleSidebar();
});

// Load and add point cloud to scene
Potree.loadPointCloud("../pointclouds/lion_takanawa_normals/cloud.js", "lion takanawa normals", e => {
let scene = viewer.scene;
let pointcloud = e.pointcloud;
scene.addPointCloud(pointcloud);

let material = pointcloud.material;
material.size = 1;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
material.shape = Potree.PointShape.CIRCLE;

// Edit matcap properties
material.pointColorType = Potree.PointColorType.MATCAP;
material.matcap = 'matcap.jpg'

viewer.fitToScreen();
});

</script>


</body>
</html>
@@ -0,0 +1,30 @@
{
"version": "1.7",
"octreeDir": "data",
"projection": "",
"points": 341989,
"boundingBox": {
"lx": -4.985000133514404,
"ly": 1.0390000343322755,
"lz": -3.444999933242798,
"ux": 0.6999998092651367,
"uy": 6.723999977111816,
"uz": 2.240000009536743
},
"tightBoundingBox": {
"lx": -4.985000133514404,
"ly": 1.0390000343322755,
"lz": -3.444999933242798,
"ux": -0.7889999747276306,
"uy": 6.723999977111816,
"uz": 1.1239999532699586
},
"pointAttributes": [
"POSITION_CARTESIAN",
"COLOR_PACKED",
"NORMAL_OCT16"
],
"spacing": 0.04923354461789131,
"scale": 0.001,
"hierarchyStepSize": 5
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
{"bounds":{"min":[-4.985000133514404,1.0390000343322755,-3.444999933242798],"max":[-0.7889999747276306,6.723999977111816,1.1239999532699586]},"projection":"","sources":[{"name":"lion_takanawa_las_normals_bin.ply","points":341989,"bounds":{"min":[-4.985000133514404,1.0390000343322755,-3.444999933242798],"max":[-0.7889999747276306,6.723999977111816,1.1239999532699586]}}]}

0 comments on commit 36bf1fb

Please sign in to comment.