Proxy control events to world

master
Robin Hawkes 2016-02-12 22:28:31 +00:00
rodzic 4e78610365
commit 447beb58b9
4 zmienionych plików z 18 dodań i 12 usunięć

14
dist/vizicities.js vendored
Wyświetl plik

@ -730,20 +730,24 @@ return /******/ (function(modules) { // webpackBootstrap
// Initialise without requiring new keyword
// Proxy control events
//
// There's currently no distinction between pan, orbit and zoom events
_createClass(Orbit, [{
key: '_initEvents',
value: function _initEvents() {
var _this = this;
this._controls.addEventListener('start', function (event) {
console.log(event);
_this._world.emit('moveStart');
});
this._controls.addEventListener('change', function (event) {
console.log(event);
_this._world.emit('move');
});
this._controls.addEventListener('end', function (event) {
console.log(event);
_this._world.emit('moveEnd');
});
}
@ -826,8 +830,8 @@ return /******/ (function(modules) { // webpackBootstrap
this._controls.maxPolarAngle = Math.PI / 2;
this._controls.enableDamping = true;
this._controls.dampingFactor = 0.25;
// this._controls.enableDamping = true;
// this._controls.dampingFactor = 0.25;
this._initEvents();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -10,17 +10,19 @@ class Orbit extends EventEmitter {
}
// Proxy control events
//
// There's currently no distinction between pan, orbit and zoom events
_initEvents() {
this._controls.addEventListener('start', (event) => {
console.log(event);
this._world.emit('moveStart');
});
this._controls.addEventListener('change', (event) => {
console.log(event);
this._world.emit('move');
});
this._controls.addEventListener('end', (event) => {
console.log(event);
this._world.emit('moveEnd');
});
}
@ -75,8 +77,8 @@ class Orbit extends EventEmitter {
this._controls.maxPolarAngle = Math.PI / 2;
this._controls.enableDamping = true;
this._controls.dampingFactor = 0.25;
// this._controls.enableDamping = true;
// this._controls.dampingFactor = 0.25;
this._initEvents();