pythreejs
pythreejs copied to clipboard
How do you “truck” (translate left or right) the camera with the keyboard in Jupyter?
I was wondering if there is a keyboard shortcut for translation of the origin. I can pan, tilt, and zoom with the mouse, but I would like to truck, etc. (wasd keys in most video games). If this is not possible, then that info is helpful as well.
https://stackoverflow.com/questions/53107873/for-pythreejs-how-do-you-truck-translate-left-or-right-the-camera-with-the
Answered on SO. If you want to make the keys configurable, we can have this issue track that (contributions welcome 😉).
Would it make sense to have a modifier key that would enable translation with the mouse or other keyboard functions? Would love to contribute if I could get to that point, ha.
Does // keys: new Types.KeyDict()
need to be enabled for the keys to work? The three.js documentation gives this mapping:
controls.keys = {
LEFT: 37, //left arrow
UP: 38, // up arrow
RIGHT: 39, // right arrow
BOTTOM: 40 // down arrow
}
Those could be exposed to make the controls configurable, correct?
I guess, I digress. I am mainly wondering if there is a way to translate the camera in any way by the user. This would be useful for exploring large network graphs, for instance.
On a different Mac laptop, I am able to hold down the CTRL or command key for translation of the image. So, I am closing this.
Currently, the keyboard nav cannot be used since it is not possible to directly focus the canvas element. Whether or not this is a desired possibility is uncertain. E.g., we do not want to inadvertently interfere with mouse-scrolling / cell-selection by focusing when we should not. Reopening to track this until its been thought through fully.