File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 2.8.11
4+
5+ - Support opening stl, obj, gltf and step files
6+
37## 2.8.10
48
59- Support downloading stl, obj, gltf and step files
Original file line number Diff line number Diff line change 55
66def run (source_path : Path , port :str , params :str ):
77 image_directory = source_path .parent
8- image_name = source_path .name
8+ model_name = source_path .name
99
1010 html_content = f"""
1111<html>
1212<head>
1313 <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/online-3d-viewer@0.15.0/build/engine/o3dv.min.js"></script>
1414</head>
1515<body>
16- <a href="{ image_name } "> { image_name } </a>
17- <div class="online_3d_viewer" style="width: 100%; height: 100%;" model="{ image_name } "></div>
16+ <a id="open-link" href="{ model_name } " target="_blank" rel="noopener noreferrer">Open { image_name } </a>
17+ <div class="online_3d_viewer" style="width: 100%; height: 100%;" model="{ model_name } "></div>
1818 <script>window.addEventListener ('load', () => {{ OV.Init3DViewerElements (); }});</script>
19+ <script>
20+ document.addEventListener("DOMContentLoaded", function () {{
21+ const link = document.getElementById("open-link");
22+ const currentPageUrl = window.location.href + '/{ model_name } ';
23+ link.href = `https://3dviewer.net/#model=${{encodeURIComponent(currentPageUrl)}}`;
24+ }});
25+ </script>
1926</body>
2027</html>
2128"""
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " hal9"
3- version = " 2.8.10 "
3+ version = " 2.8.11 "
44description = " "
55authors = [" Javier Luraschi <javier@hal9.ai>" ]
66readme = " README.md"
You can’t perform that action at this time.
0 commit comments