Closed iontom closed 9 years ago
The handling of different datasets through templating is implemented, but we might still need to handle this better... i.e. without reloading the scene. I guess we would do this by writing a reloadAsteroids method in js.
The majority of this was fixed in this merge. What I ended up doing was had all of the HTML templates served at once, and then based on what the user clicks on in each template, will send a query to the server to request the result of it. This cleared us of our webGL context loss issue, and sets us up for all the queries we could ever need. The idea is to use send/websockets to recieve information and then just append to the html divs where needed. I guess we may be able to figure out a way to do that with GET/POST requests with templates, but in my opinion it's a lot easier to do with JSON data structures and the like. Right now there's also zero querying going on (besides pulling in asteroids from the DB the legacy way), so this is something that we still have to work on; I don't really consider this issue to be closed yet.
Issue solved by websocket streaming. Closing issue.
Either deploy this, or something like this.. We just need something where page click conditionals are passed from the HTML/CSS layer into PYTHON, so that Python can spit back out sections/chunks of a webGL scene based on those conditionals. Also, we need to be able to do this without reloading the page... Or if we do force a reload, to keep the same camera state.
The other option is to try and use controls written in JS within the frame, and then try to pass the controls' states back up into Python and vice versa... This is a pretty tough problem.
We might try webGL in the CSS like done in the 100,000 stars application: http://www.emagix.net/academic/mscs-project/item/camera-sync-with-css3-and-webgl-threejs
Something like MontageJS would have sort of worked here... But that's nodeJS based, not python. We are in need of a pretty crazy solution.
Anyway, here's the mock code for scene templating in a simple example with multiple components: