Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Last active May 17, 2017 20:56
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/927932eee959a66955022b501cfc0f5f to your computer and use it in GitHub Desktop.
Save matthieu-D/927932eee959a66955022b501cfc0f5f to your computer and use it in GitHub Desktop.
setSelected (marker) {
marker.isSelected = true;
if (marker.animationGroupSelected === null) {
var selectedDrawableResizeAnimationX = new AR.PropertyAnimation(marker.markerDrawableSelected, 'scale.x', null, 3, 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, 3, 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, 1, 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, 1, this.RESIZE_DURATION, new AR.EasingCurve(AR.CONST.EASING_CURVE_TYPE.EASE_OUT_ELASTIC, {
amplitude: 2.0
}));
marker.animationGroupSelected = 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