pythreejs icon indicating copy to clipboard operation
pythreejs copied to clipboard

How do you “truck” (translate left or right) the camera with the keyboard in Jupyter?

Open scottlittle opened this issue 6 years ago • 6 comments

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

scottlittle avatar Nov 01 '18 19:11 scottlittle

Answered on SO. If you want to make the keys configurable, we can have this issue track that (contributions welcome 😉).

vidartf avatar Nov 02 '18 12:11 vidartf

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.

scottlittle avatar Nov 02 '18 15:11 scottlittle

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?

scottlittle avatar Nov 02 '18 16:11 scottlittle

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.

scottlittle avatar Nov 02 '18 16:11 scottlittle

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.

scottlittle avatar Nov 04 '18 19:11 scottlittle

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.

vidartf avatar Nov 06 '18 12:11 vidartf