2013-11-21 22 views

cevap

6
controls.autoRotate = false; 

Sadece 'gerçek', daha sonra init üzerinde başlatın onMouseMove, gibi bir şey yapın: Eğer ilk etkileşimden sonra Autorotate durdurmak istiyorsanız, googling insanlar için

if (controls.AutoRotate) 
    controls.autoRotate = false; 
+1

Yaptım, çok teşekkürler. – n2g6t1q1

5

; Eğer 3 etkinlik OrbitControls birinde bir olay dinleyicisi kanca edebilirsiniz yayar:

: kullanıcı son etkileşimi bittikten sonra

// stop autorotate after the first interaction 
controls.addEventListener('start', function(){ 
    controls.autoRotate = false; 
}); 

Hatta daha gelişmiş, 1000 mili saniyelik bir zaman aşımı ile Autorotate yeniden

// stop autorotate after the first interaction 
controls.addEventListener('start', function(){ 
    clearTimeout(autorotateTimeout); 
    controls.autoRotate = false; 
}); 

// restart autorotate after the last interaction & an idle time has passed 
this.controls.addEventListener('end', function(){ 
    autorotateTimeout = setTimeout(function(){ 
    controls.autoRotate = true; 
    }, 1000); 
}); 
İlgili konular