gpt4 book ai didi

three.js - 如何停止轨迹球 Controller ? [三.js]

转载 作者:行者123 更新时间:2023-12-04 05:16:37 27 4
gpt4 key购买 nike

有没有办法在three.js中打开和关闭轨迹球 Controller ?

我有这个作为我的事件处理程序

function onDocumentMouseMove(event){


if (CAN_MOVE == 1){
// update the mouse variable
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
}
else
{
//do nothing
event.preventDefault();
}
}

最佳答案

是的。

controls.enabled = false;

关于three.js - 如何停止轨迹球 Controller ? [三.js],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14188819/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com