Browse Source

Prevent friction value of undefined breaking inertia

pull/689/head
Will Calderbank 6 years ago
parent
commit
23d32ffd20
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/js/pannellum.js

+ 1
- 0
src/js/pannellum.js View File

@@ -1249,6 +1249,7 @@ function keyRepeat() {
// "Inertia"
if (diff > 0 && !config.autoRotate) {
// "Friction"
config.friction = config.friction == undefined ? defaultConfig.friction : config.friction;
var slowDownFactor = 1 - config.friction;

// Yaw


Loading…
Cancel
Save