stephanreiter / jkview Goto Github PK
View Code? Open in Web Editor NEWJedi Knight & MotS 3D Preview
License: BSD 2-Clause "Simplified" License
Jedi Knight & MotS 3D Preview
License: BSD 2-Clause "Simplified" License
If I use the camera/keyboard to navigate somewhere inside the map, and then I use the mouse click+drag to rotate, it seems to be rotating the map about the original "player" start position, rather than the current "player" start position. This makes it a bit difficult to navigate to and view some areas.
Some levels fail to load (see #2). In these cases, it would be nice if the client code could detect the error and show the user a friendly error message. Hopefully we could do it for all errors not just the ones we already know about.
Would it be possible to have a toggle to show a wireframe/sector view? Kinda like the main JED view. I think it would be super cool to be able to see the wireframe as well.
Some bigger levels take a while to load. It would be nice to have a loading spinner or progress meter or something.
I hit this level and the first episode rendered fine, but there is no selector to choose other episodes. This is a single player level so maybe it's different than the MP ones where the selector shows up?
Some levels fail to load. I don't know why, the error message isn't helpful to me. I was just going through some random levels and found that 325 and 328. The preview gives a blank screen. The log on the server says:
ERROR:flask.app:Exception on /level/325.js [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 36, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/3dpreview/server_cache.py", line 87, in decorated_function
response = make_response(f(*args, **kwargs))
File "server.py", line 65, in level_data
gob_path, censor=censor)
File "/usr/local/3dpreview/loader.py", line 183, in load_level_from_file
return _load_level(b'jkl/' + info.levels[0], gobs=[target] + OFFICIAL, censor=OFFICIAL if censor else [])
File "/usr/local/3dpreview/loader.py", line 134, in _load_level
material_name = level.materials[surface['material']]
KeyError: -1
ERROR:flask.app:Exception on /level/328.js [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 36, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/3dpreview/server_cache.py", line 87, in decorated_function
response = make_response(f(*args, **kwargs))
File "server.py", line 65, in level_data
gob_path, censor=censor)
File "/usr/local/3dpreview/loader.py", line 183, in load_level_from_file
return _load_level(b'jkl/' + info.levels[0], gobs=[target] + OFFICIAL, censor=OFFICIAL if censor else [])
File "/usr/local/3dpreview/loader.py", line 134, in _load_level
material_name = level.materials[surface['material']]
KeyError: -1
When loading this level it pauses for a long time and then returns 502 Bad Gateway (suspect server process crashed, will look for logs soon):
Our friends at JKDF2.NET would also like to use jkview on their site. I am planning on looking into it maybe next month, but I am wondering if you have any ideas on how to make this work on other sites. It is pretty tied to massassi's level_ids
which makes it problematic for JKDF2.NET.
Is there anything it's pulling from the level info page other than the download URL? I wonder if we could make a change to embed using the full download URL (and maybe a title or name or something?) instead of the massassi level id.
For example, currently massassi embeds like this:
<iframe src="https://3dpreview.massassi.net/level/3136/" scrolling="no" width="640" height="480"></iframe>
What if instead we could embed something like:
<iframe src="https://3dpreview.massassi.net/level?link=https://www.massassi.net/media/levels/files/jksp/FGR6.zip" scrolling="no" width="640" height="480"></iframe>
That way JKDF2.NET could do their own 3dpreview like:
<iframe src="https://3dpreview.jkdf2.net/level?link=https://www.jkdf2.net/download/a-jedis-discovery/?wpdmdl=27595&refresh=6201c36213c3c1644282722" scrolling="no" width="640" height="480"></iframe>
Any ideas on how to implement something like this?
I'm not even sure if they have the expertise to manage a python app server but thought I'd ask in case you see an easy path forward.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.