韦布里的波特里

时间:2018-11-27 22:42:32

标签: weebly

我正在尝试将Potree点云查看器网页添加到Weebly网站。我已经成功地使用PotreeConverter创建了如下所示的结果HTML文件,并测试了它是否可以在XAMPP下工作。我尝试将该文件中引用的每个js和css文件上载到weebly,然后更改此HTML以引用上载的文件。例如,我上传potree.css然后更改

<link rel="stylesheet" type="text/css" href="libs/potree/potree.css">

<link rel="stylesheet" type="text/css" href="/files/theme/potree.css">

我检查了页面,并且此方法似乎对css和js文件有效。唯一似乎不起作用的是此行

Potree.loadPointCloud("pointclouds/seattle/cloud.js", "seattle", e => {

我改为

Potree.loadPointCloud("/files/theme/cloud.js", "seattle", e => {

对如何进行有任何想法吗?

<!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="libs/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="libs/potree/potree.js"></script>
<script src="libs/plasio/js/laslaz.js"></script>

<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
    document.title = "";
    viewer.setEDLEnabled(true);
    viewer.setBackground("gradient"); // ["skybox", "gradient", "black", "white"];
    viewer.setDescription(``);

<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);
    document.title = "";
    viewer.setEDLEnabled(true);
    viewer.setBackground("gradient"); // ["skybox", "gradient", "black", "white"];
    viewer.setDescription(``);
    viewer.loadSettingsFromURL();

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

    Potree.loadPointCloud("pointclouds/seattle/cloud.js", "seattle", e => {
        let pointcloud = e.pointcloud;
        let material = pointcloud.material;
        viewer.scene.addPointCloud(pointcloud);
        material.pointColorType = Potree.PointColorType.ELEVATION; // any Potree.PointColorType.XXXX 
        material.size = 1;
        material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
        material.shape = Potree.PointShape.SQUARE;
        viewer.fitToScreen();
    });

</script>


</body>
</html>

0 个答案:

没有答案