Skip to content

Commit

Permalink
fix OrbitControl damping
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Jun 7, 2018
1 parent 3644609 commit 389dd01
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/plugin/OrbitControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ var OrbitControl = Base.extend(function () {
this._mouseUpHandler = this._mouseUpHandler.bind(this);
this._pinchHandler = this._pinchHandler.bind(this);

this.update = this.update.bind(this);

this.init();
}, /** @lends clay.plugin.OrbitControl# */ {
/**
Expand All @@ -169,7 +167,7 @@ var OrbitControl = Base.extend(function () {
vendor.addEventListener(dom, 'wheel', this._mouseWheelHandler);

if (this.timeline) {
this.timeline.on('frame', this.update);
this.timeline.on('frame', this.update, this);
}
},

Expand Down Expand Up @@ -423,8 +421,6 @@ var OrbitControl = Base.extend(function () {
this.setBeta(this.getBeta());

this._vectorDamping(velocity, this.damping);

velocity.x = velocity.y = 0;
},

_updateDistance: function (deltaTime) {
Expand Down

0 comments on commit 389dd01

Please sign in to comment.