diff --git a/export_LHCb.html b/export_LHCb.html index a877dfb..45bb1e2 100644 --- a/export_LHCb.html +++ b/export_LHCb.html @@ -2,7 +2,6 @@ - diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..025f684 Binary files /dev/null and b/favicon.ico differ diff --git a/phoenixExport.js b/phoenixExport.js index 0ebeaca..a34f212 100644 --- a/phoenixExport.js +++ b/phoenixExport.js @@ -260,11 +260,11 @@ async function internal_convert_geometry(obj, filename, max_level, subparts, hid await forceDisplay() await convert_geometry(scenes, filename, body);} -async function convertGeometry(inputFile, outputFile, max_level, subparts, hide_children) { +async function convertGeometry(inputFile, outputFile, max_level, subparts, hide_children, objectName = "Default") { const body = document.body body.innerHTML = "

Converting ROOT geometry to GLTF

Input file : " + inputFile + "
Output file : " + outputFile + "
Reading input..." const file = await JSROOT.openFile(inputFile) - const obj = await file.readObject("Default;1") + const obj = await file.readObject(objectName + ";1") await internal_convert_geometry(obj, outputFile, max_level, subparts, hide_children, body) body.innerHTML += "

Convertion succeeded !

" } diff --git a/run b/run index 88aba2f..ab78b3e 100755 --- a/run +++ b/run @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import sys import http.server import socketserver @@ -7,7 +8,11 @@ port = 8000 handler = http.server.SimpleHTTPRequestHandler -with socketserver.TCPServer(('', port), handler) as httpd: - print('Started http server to serve requests at:') - print('http://127.0.0.1:' + str(port)) - httpd.serve_forever() +try: + with socketserver.TCPServer(('', port), handler) as httpd: + print('Started http server to serve requests at:') + print('http://127.0.0.1:' + str(port)) + httpd.serve_forever() +except KeyboardInterrupt: + print('Bye!') + sys.exit(0)