widgetti / ipyvolume

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
MIT License
1.94k stars 234 forks source link

OrbitControl behaves strangely after first drag #89

Open mathieu1 opened 6 years ago

mathieu1 commented 6 years ago

Using fig.camera_control = 'orbit', the Orbital Control works as expected at first glance. However, after dragging the object and "tilting the horizontal plane" to a "non-horizontal position", the orbit controls do not behave as expected anymore, and do not keep the Y axis upwards (contrary to the standard behaviour of threejs' OrbitControl)

Hopefully what I mean is clarified with this: qie7k-wnuli (Edited for smaller gif)

maartenbreddels commented 6 years ago

Thanks, and this is only using that camera control right? Not switching between them?

mathieu1 commented 6 years ago

Indeed, nothing else happens in that clip besides two consecutive mouse drags. The code has nothing special AFAICT (nevermind the x,y,z rearrangement):

fig = p3.figure()
fig.camera_control = 'orbit' 
p3.plot_trisurf(y, z, x, triangles=faces, color=colors)
p3.show()
Carreau commented 5 years ago

Same for me, regardless of whether orbit is set from the python side, or by clicking the "up arrow" button. (BTW, I would suggest changing it for "globe") that would be IMHO more representative.

mgeier commented 5 years ago

@mathieu1 and @Carreau Does it work better with #273?