-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
159 lines (134 loc) · 5.23 KB
/
index.html
File metadata and controls
159 lines (134 loc) · 5.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!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>e-verse</title>
<link rel="shortcut icon" href="./resources/images/Background.ico" />
<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">
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"
/>
<link rel="stylesheet" type="text/css" href="./resources/css/custom.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="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.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('../resources/images/EverseBlackLogo.png');">
</div>
<!-- <div id="potree_sidebar_container"> </div> -->
</div>
<div class="info-wrapper" data-target="#info-modal" data-toggle="modal">
<img src="./resources/images/infoLogo.jpeg" id="info-logo" alt="logo" />
</div>
<a href="https://www.e-verse.com" target={"_blank"}>
<img src="./resources/images/EverseLogo.png" id="bottom-logo" alt="logo" />
</a>
<!-- Start Modal -->
<div class="modal fade" id="info-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<h3 class="modal-title">DATA MODEL</h3>
<div class="info-description">
<h5>
REPOSITORY
</h5>
<p>
<a href="https://github.com/EverseDevelopment/Viewer.IFC.Potree.Snack">
https://github.com/EverseDevelopment/Viewer.IFC.Potree.Snack
</a>
</p>
</div>
<div class="info-description">
<h5>
DESCRIPTION
</h5>
<p>
This is a 3D viewer to visualize how a point cloud and an IFC model interact
</p>
</div>
<div class="info-description">
<h5>
TECHNOLOGY STACK
</h5>
<p>IFC</p>
<p>Three.js</p>
<p>Potree</p>
</div>
<div class="info-description">
<h5>
SERVICES
</h5>
<p>3D viewer</p>
</div>
</div>
</div>
</div>
</div>
<!-- End Modal -->
<script type="module">
import * as THREE from '../libs/three.js/build/three.module.js';
import { IFCLoader } from '../libs/three.js/extra/IFCLoader.js';
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(false);
viewer.setFOV(60);
viewer.setPointBudget(1_000_000);
viewer.loadSettingsFromURL();
const scene = viewer.scene.scene;
const directionalLight1 = new THREE.DirectionalLight(0xffeeff, 0.8);
directionalLight1.position.set(1, 1, 1);
scene.add(directionalLight1);
const directionalLight2 = new THREE.DirectionalLight(0xffffff, 0.8);
directionalLight2.position.set(- 1, 0.5, - 1);
scene.add(directionalLight2);
const ambientLight = new THREE.AmbientLight(0xffffee, 0.25);
scene.add(ambientLight);
// Load and add point cloud to scene
Potree.loadPointCloud("../pointclouds/demo/cloud.js", "sigeom.sa", e => {
let scene = viewer.scene;
let pointcloud = e.pointcloud;
let material = pointcloud.material;
material.size = 1;
material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
material.shape = Potree.PointShape.SQUARE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
// scene.view.setView(
// [589974.341, 231698.397, 986.146],
// [589851.587, 231428.213, 715.634],
// );
});
const ifcLoader = new IFCLoader();
ifcLoader.ifcManager.setWasmPath('../libs/three.js/extra/ifc/');
ifcLoader.load('../pointclouds/Project1.ifc', function (model) {
model.mesh.rotateX(Math.PI * 0.5);
model.scale.multiplyScalar(0.3048);
scene.add(model.mesh);
});
</script>
</body>
</html>