Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Last active May 17, 2017 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/23772e20d462e65d7a31928354faff98 to your computer and use it in GitHub Desktop.
Save matthieu-D/23772e20d462e65d7a31928354faff98 to your computer and use it in GitHub Desktop.
setDeselected (marker) {
marker.isSelected = false;
if(marker.animationGroupIdle === null) {
var selectedDrawableResizeAnimationX = new AR.PropertyAnimation(marker.markerDrawableSelected, 'scale.x', null, 1, this.RESIZE_DURATION, new AR.EasingCurve(AR.CONST.EASING_CURVE_TYPE.EASE_OUT_ELASTIC, {
amplitude: 2.0
}));
var selectedDrawableResizeAnimationY = new AR.PropertyAnimation(marker.markerDrawableSelected, 'scale.y', null, 1, this.RESIZE_DURATION, new AR.EasingCurve(AR.CONST.EASING_CURVE_TYPE.EASE_OUT_ELASTIC, {
amplitude: 2.0
}));
var idleDrawableResizeAnimationX = new AR.PropertyAnimation(marker.markerDrawableIdle, 'scale.x', null, 3, this.RESIZE_DURATION, new AR.EasingCurve(AR.CONST.EASING_CURVE_TYPE.EASE_OUT_ELASTIC, {
amplitude: 2.0
}));
var idleDrawableResizeAnimationY = new AR.PropertyAnimation(marker.markerDrawableIdle, 'scale.y', null, 3, this.RESIZE_DURATION, new AR.EasingCurve(AR.CONST.EASING_CURVE_TYPE.EASE_OUT_ELASTIC, {
amplitude: 2.0
}));
marker.animationGroupIdle = new AR.AnimationGroup(AR.CONST.ANIMATION_GROUP_TYPE.PARALLEL, [
selectedDrawableResizeAnimationX,
selectedDrawableResizeAnimationY,
idleDrawableResizeAnimationX,
idleDrawableResizeAnimationY
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment