1
1
import _ from 'underscore' ;
2
2
3
3
import Sister from 'sister' ;
4
- import rebound from 'rebound' ;
4
+ import * as rebound from 'rebound' ;
5
5
import vendorPrefix from 'vendor-prefix' ;
6
6
import raf from 'raf' ;
7
7
import Direction from './direction' ;
@@ -381,8 +381,8 @@ const Card = (stack, targetElement) => {
381
381
} ,
382
382
onSpringUpdate : ( spring ) => {
383
383
const value = spring . getCurrentValue ( ) ;
384
- const coordianteX = rebound . MathUtil . mapValueInRange ( value , 0 , 1 , lastThrow . fromX , 0 ) ;
385
- const coordianteY = rebound . MathUtil . mapValueInRange ( value , 0 , 1 , lastThrow . fromY , 0 ) ;
384
+ const coordianteX = rebound . util . mapValueInRange ( value , 0 , 1 , lastThrow . fromX , 0 ) ;
385
+ const coordianteY = rebound . util . mapValueInRange ( value , 0 , 1 , lastThrow . fromY , 0 ) ;
386
386
387
387
onSpringUpdate ( coordianteX , coordianteY ) ;
388
388
}
@@ -403,12 +403,12 @@ const Card = (stack, targetElement) => {
403
403
404
404
if ( lastThrow . direction === Direction . RIGHT || lastThrow . direction === Direction . LEFT ) {
405
405
directionFactor = lastThrow . direction === Direction . RIGHT ? 1 : - 1 ;
406
- coordianteX = rebound . MathUtil . mapValueInRange ( value , 0 , 1 , lastThrow . fromX , throwOutDistance * directionFactor ) ;
406
+ coordianteX = rebound . util . mapValueInRange ( value , 0 , 1 , lastThrow . fromX , throwOutDistance * directionFactor ) ;
407
407
coordianteY = lastThrow . fromY ;
408
408
} else if ( lastThrow . direction === Direction . UP || lastThrow . direction === Direction . DOWN ) {
409
409
directionFactor = lastThrow . direction === Direction . DOWN ? 1 : - 1 ;
410
410
coordianteX = lastThrow . fromX ;
411
- coordianteY = rebound . MathUtil . mapValueInRange ( value , 0 , 1 , lastThrow . fromY , throwOutDistance * directionFactor ) ;
411
+ coordianteY = rebound . util . mapValueInRange ( value , 0 , 1 , lastThrow . fromY , throwOutDistance * directionFactor ) ;
412
412
}
413
413
414
414
onSpringUpdate ( coordianteX , coordianteY ) ;
0 commit comments