Add `zoomBy` controls

feature/threejs-update
Matthew Harrison-Jones 2016-11-18 11:01:41 +00:00
rodzic 1ca6273797
commit 141f2edbbc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 2BFA474C82C30A2C
1 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -34,7 +34,15 @@ class Orbit extends EventEmitter {
// Zooming the camera in and out
zoomTo(metres, animate) {}
zoomBy(metresDelta, animate) {}
zoomBy(metresDelta, animate) {
var controls = this._controls;
if (metresDelta < 0) {
controls.dollyIn(0.95);
} else {
controls.dollyOut(0.95);
}
}
// Force camera to look at something other than the target
lookAt(point, animate) {}