Initial commit
This commit is contained in:
commit
05c65aad4d
155 changed files with 93617 additions and 0 deletions
54
embed.html
Normal file
54
embed.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
||||
/>
|
||||
<title>DFG 3D Viewer Embed</title>
|
||||
<link rel="shortcut icon" href="assets/img/dfgviewerFavicon.png" type="image/png">
|
||||
<link href="assets/css/main.css" rel="stylesheet" />
|
||||
<link href="assets/css/spinner.css" rel="stylesheet" />
|
||||
<link href="assets/css/theme.css" rel="stylesheet" />
|
||||
<link href="assets/css/external-sources.css" rel="stylesheet"/>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
#DFG_3DViewer {
|
||||
width: 100%;
|
||||
height: 100dvh;
|
||||
min-height: 240px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="viewer-embed-page">
|
||||
<div id="DFG_3DViewer"></div>
|
||||
<script>
|
||||
(function () {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const hasExplicitSource = params.has("model") || params.has("src") || params.has("id");
|
||||
if (hasExplicitSource) return;
|
||||
|
||||
const isLocalPreviewHost = ["localhost", "127.0.0.1", "::1"].includes(window.location.hostname);
|
||||
if (!isLocalPreviewHost) return;
|
||||
|
||||
const container = document.getElementById("DFG_3DViewer");
|
||||
if (!container || container.hasAttribute("3d")) return;
|
||||
container.setAttribute("3d", "./examples/box.stl");
|
||||
})();
|
||||
</script>
|
||||
<script type="module" src="dfg_3dviewer-module.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue