Skip to content

Commit

Permalink
Small changes here and there
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt committed Jun 30, 2022
1 parent b485429 commit 5b6dfcc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 0 additions & 1 deletion export_LHCb.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<head>
<script src="https://unpkg.com/[email protected]/build/three.js"> </script>
<script> import * as THREE from 'three'; </script>
<script src="https://unpkg.com/[email protected]/examples/js/exporters/GLTFExporter.js"> </script>
<script src="https://root.cern/js/latest/scripts/JSRoot.core.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.js"></script>
Expand Down
Binary file added favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions phoenixExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<h1>Converting ROOT geometry to GLTF</h1>Input file : " + inputFile + "</br>Output file : " + outputFile + "</br>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 += "<h1>Convertion succeeded !</h1>"
}
Expand Down
13 changes: 9 additions & 4 deletions run
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/usr/bin/env python3

import sys
import http.server
import socketserver

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)

0 comments on commit 5b6dfcc

Please sign in to comment.