You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing scene/camera sync with browser view after web page-mouse interaction. #85
If you change the point of view dragging with mouse in the browser window the camera and scene data are not updated.
It could be CPU intensive/inefficient so could be possible to add at least an explicit sync method to be able to retrieve correct parameters just before perform some action like camera movement after key pressure detection or just before an action is made on scene or camera ?
Using the test below things became a little more clear.
I didn't yet understand how it works exactly but seems that up is a sort of gamma in the polar coordinates (alpha, beta , gamma).
If you try to do a 360° using "right" button it return to <0,1,0> BUT if you move the scene with the mouse and try again to do 360° up components change differently than before. @BruceSherwood ideas ?
(BTW: when you change the scene with the mouse just canvas and forward items are in the event list)
Activity
BruceSherwood commentedon Feb 27, 2020
I don't understand. Run the following code and you will see scene.forward and scene.camera.axis changing as you use the mouse to rotate:
nastasi commentedon Feb 27, 2020
Correct, instead
scene.upremains to<0,1,0>, is it correct ?BruceSherwood commentedon Feb 27, 2020
That is how it currently works, though it could use some critical thought. I'm not entirely comfortable with this corner of the vpython world.
nastasi commentedon Feb 28, 2020
Using the test below things became a little more clear.
I didn't yet understand how it works exactly but seems that
upis a sort of gamma in the polar coordinates (alpha, beta , gamma).If you try to do a 360° using "right" button it return to <0,1,0> BUT if you move the scene with the mouse and try again to do 360°
upcomponents change differently than before.@BruceSherwood ideas ?
(BTW: when you change the scene with the mouse just
canvasandforwarditems are in the event list)