CSE512-15S / fp-tdurham-ajh24-chiasson-ningli30

EPICViz - http://cse512-15s.github.io/fp-tdurham-ajh24-chiasson-ningli30/
0 stars 3 forks source link

Make buttons for jumping to useful viewpoints in 3D plots #2

Open andrewhill157 opened 9 years ago

andrewhill157 commented 9 years ago

Jumping to views along each axis could be a useful feature if we end up sticking with 3D views. This should be possible with x3DOM API by defining and adding them as viewpoints.

andrewhill157 commented 9 years ago

I'm going to take a look at this as well as controlling rotation with sliders. If anyone else has already started on this, let me know.

andrewhill157 commented 9 years ago

I made some progress on this in 5be7c8ee4d1cd75b33c369107bb570e7e993f1f8

See commit message for a description of why this is still buggy and what I think might be going wrong (although I think this is a reasonable start):

Start towards jumping to small multiple viewpoints on click. There are two major problems with current implementation. The first is that the second small multiple viewpoint is not set up yet (it is actually pretty tricky to get these viewpoints oriented correctly). The second is that sometimes the viewpoints get mixed up, expecially if clicking quickly. I think this comes down to weird effects of asynchronous function calls. There is no setView function for x3dom, so I loop through and call nextView and prevView multiple times to get to the desired view. I think this ocassionally screws up, but I am not sure exactly how to fix this yet.

tdurham86 commented 9 years ago

Note for future: I came across a page in the x3dom documentation that might be useful for this issue: http://doc.x3dom.org/tutorials/animationInteraction/viewpoint/index.html

andrewhill157 commented 9 years ago

Good find Tim -- I must have missed this as I was focusing on a JS solution with the API. I had some free time this morning and changed the small multiples to work by setting the set_bind attribute and the reseting the view. As far as I can tell, this works great! The middle viewpoint is still not set up.

50e9e1c44754efe886a15fd76cae0ac0bc104781

Note that I merged gh-pages with master and committed this to the master branch. I have not merged this update with gh-pages as we should make sure the merge looks ok while the TAs are still looking at the visualization. Just don't want to totally break the gh-pages site if they are still grading...

andrewhill157 commented 9 years ago

I merged this locally and it looked fine. I pushed these changes to gh-pages.

The only remaining thing for this is to set up the middle viewpoint and maybe tweak the other viewpoints if you want to fine tune things.