-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
44 lines (36 loc) · 1.34 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<meta name="viewport"
content="width=device-width, height=device-height, user-scalable=no, initial-scale=0.5, minimum-scale=0.5, maximum-scale=1.0">
<title>gltf view</title>
</head>
<body
style="border: 0px; padding: 0px; margin: 0px; overflow:hidden; -ms-user-select: none; -webkit-user-select: none; user-select: none">
<div id="drawarea" style="position:absolute;height:100%;width:100%;">
</div>
<script>
//获取挂载 容器
let div = document.getElementById("drawarea");
//CDN 地址
// let CNDURL = `http://192.168.1.98:5501/`; //例子
let CNDURL = ``;
//gltf查看URL 格式参数
let p = `file=realtimeLight`; //例子
//加载 gltfView.js
let htmlS = document.createElement("script");
htmlS.src = `${CNDURL}gltfView.js`;
//挂载到doc
div.parentElement.appendChild(htmlS);
htmlS.onload = () => {
//code加载完毕 执行 gltfView.js 中的函数
gltfView(div, p , CNDURL);
}
</script>
</body>
</html>