简体   繁体   English

在Threebox中,可以禁用拖动,只有3D object的高度?

[英]In Threebox, it is possible to disable dragging, only the altitude of a 3D object?

In Threebox, it is possible to disable dragging, only the altitude of a 3D object?在Threebox中,可以禁用拖动,只有3D object的高度?

I know that we get the altitude position value on the third index of the coords (origin) array, when we are dragging the 3D object and have the enableSelectingFeatures: true, and enableDraggingObjects: true, features set to true.我知道当我们拖动 3D ZA8CFDE6331BD59EB2AC96F8911C4B6A760D683D6EZ 值时,我们在坐标(原点)数组的第三个索引上获得了高度 position 值,并且将 enableSelectingObject: trueD66Z 功能设置为 trueDraggingObject: trueD:

const origin = [-122.47920912, 37.716351775, 0];常量原点 = [-122.47920912, 37.716351775, 0]; window.tb = new Threebox(m, gl, { defaultLights: true, enableSelectingFeatures: true, enableSelectingObjects: true, enableDraggingObjects: true, enableRotatingObjects: true }); window.tb = new Threebox(m, gl, { defaultLights: true, enableSelectingFeatures: true, enableSelectingObjects: true, enableDraggingObjects: true, enableRotatingObjects: true });

We could set that value always to 0, but I'm looking to disable the option of changing the altitude position when dragging with ctrlKey and mouse move.我们可以将该值始终设置为 0,但我希望在使用 ctrlKey 拖动和鼠标移动时禁用更改高度 position 的选项。 Anyone knows if that is possible?任何人都知道这是否可能?

Thanks in advance, and thanks @jscastro for the library update.在此先感谢,并感谢 @jscastro 库更新。

Yes, you can.是的你可以。 Just add only the following:只需添加以下内容:

tb.altitudeStep = 0;

That will make the vertical dragging not working.这将使垂直拖动不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM