dist/indoor.esm.js
/**
   * Initialize animation of values coming to a stop
   */
Initialize animation of values coming to a stop
Initialize animation of values coming to a stop
function startDecelAnim() {
    var firstPoint = trackingPoints[0];
    var lastPoint = trackingPoints[trackingPoints.length - 1];
    var xOffset = lastPoint.x - firstPoint.x;
    var yOffset = lastPoint.y - firstPoint.y;
    var timeOffset = lastPoint.time - firstPoint.time;
    var D = timeOffset / 15 / multiplier;
    decVelX = xOffset / D || 0; 
    decVelY = yOffset / D || 0;
    var diff = checkBounds();
    if (Math.abs(decVelX) > 1 || Math.abs(decVelY) > 1 || !diff.inBounds) {
      decelerating = true;
      requestAnimFrame(stepDecelAnim);
    } else if (stopCallback) {
      stopCallback(sourceEl);
    }
  }
function startDecelAnim ( ) { var firstPoint = trackingPoints [ 0 ] ; var lastPoint = trackingPoints [ trackingPoints . length - 1 ] ; var xOffset = lastPoint . x - firstPoint . x ; var yOffset = lastPoint . y - firstPoint . y ; var timeOffset = lastPoint . time - firstPoint . time ; var D = timeOffset / 15 / multiplier ; decVelX = xOffset / D || 0 ; decVelY = yOffset / D || 0 ; var diff = checkBounds ( ) ; if ( Math . abs ( decVelX ) > 1 || Math . abs ( decVelY ) > 1 || ! diff . inBounds ) { decelerating = true ; requestAnimFrame ( stepDecelAnim ) ; } else if ( stopCallback ) { stopCallback ( sourceEl ) ; } }
Initialize animation of values coming to a stop
Initialize animation of values coming to a stop
// prevent NaN