forked from xeokit/xeokit-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
effects_SAO_XKT_OTCConferenceCenter.html
45 lines (36 loc) · 1.29 KB
/
effects_SAO_XKT_OTCConferenceCenter.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>xeokit-sdk Visual Test</title>
<link href="./css/pageStyle.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<canvas id="myCanvas"></canvas>
</body>
<script type="module">
import {Viewer, XKTLoaderPlugin} from "./../dist/xeokit-sdk.es.js";
import {signalTestComplete} from "./lib/utils.js";
const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true
});
if (!viewer.scene.sao.supported) {
viewer.scene.sao.warn("SAO is not supported by this browser or GPU - ignoring SAO configs")
}
viewer.scene.sao.enabled = true; // Only works if supported (see above)
viewer.scene.camera.eye = [3.6930694580078125, 5.834853649139404, -23.98213005065918];
viewer.scene.camera.look = [84.31920623779297, -29.88751792907715, -116.21513366699219];
viewer.scene.camera.up = [0.18424127995967865, 0.9600174427032471, -0.21076446771621704];
const xktLoader = new XKTLoaderPlugin(viewer);
const model = xktLoader.load({
id: "myModel",
src: "./../assets/models/xkt/v8/ifc/OTCConferenceCenter.ifc.xkt",
edges: true,
saoEnabled: true
});
model.on("loaded", function () {
signalTestComplete(viewer);
});
</script>
</html>