- Dec 5, 2017
- 76
- 78
For the linux players - you can play this through your browser actually. But unlike some other games where you can just drag'n'drop the index.html file, it won't work in this case.
So here is a python script to start a local http server:
So copy this piece of code in a new file, for example server.py. Place the newly created server.py file in location where index.html is and start it from command line interface. You can do either ./server.py or python3 server.py. Python 3 needs to be installed first, of course.
And finally after starting the server you can open your browser and go to URL location localhost:8000 and you will be able to play the scene viewer.
You can stop the server by Ctrl + C keyboard combination from command line interface.
So here is a python script to start a local http server:
Python:
#!/usr/bin/env python3
# encoding: utf-8
"""Use instead of `python3 -m http.server` when you need CORS"""
from http.server import HTTPServer, SimpleHTTPRequestHandler
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Cross-Origin-Opener-Policy', 'same-origin')
self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')
return super(CORSRequestHandler, self).end_headers()
httpd = HTTPServer(('localhost', 8000), CORSRequestHandler)
httpd.serve_forever()
And finally after starting the server you can open your browser and go to URL location localhost:8000 and you will be able to play the scene viewer.
You can stop the server by Ctrl + C keyboard combination from command line interface.