private void animateRotationOut() { mRotationOut = new GVRRotationByAxisAnimation(mProgress, TIME_ANIMATION_ROTATION_OUT, ROTATION * 3, 0, 0, 1); mRotationOut.setInterpolator(new InterpolatorExpoEaseOut()); mRotationOut.start(this.getGVRContext().getAnimationEngine()); }
private void AnimateOpacity(float opacity) { blurOpacity = new GVROpacityAnimation(blurObject, ANIMATION_TIME, opacity); blurOpacity.start(this.getGVRContext().getAnimationEngine()); blurOpacity.setInterpolator(new InterpolatorExpoEaseInOut()); ringOpacity = new GVROpacityAnimation(ringObject, ANIMATION_TIME, opacity); ringOpacity.start(this.getGVRContext().getAnimationEngine()); ringOpacity.setInterpolator(new InterpolatorExpoEaseInOut()); iconOpacity = new GVROpacityAnimation(iconObject, ANIMATION_TIME, opacity); iconOpacity.start(this.getGVRContext().getAnimationEngine()); iconOpacity.setInterpolator(new InterpolatorExpoEaseInOut()); }
private void AnimateScale(float scale) { blurScale = new GVRScaleAnimation(blurObject, ANIMATION_TIME, scale); blurScale.start(this.getGVRContext().getAnimationEngine()); blurScale.setInterpolator(new InterpolatorExpoEaseInOut()); ringScale = new GVRScaleAnimation(ringObject, ANIMATION_TIME, scale); ringScale.start(this.getGVRContext().getAnimationEngine()); ringScale.setInterpolator(new InterpolatorExpoEaseInOut()); }
private void animateRotationIn() { mRotationIn = new GVRRotationByAxisAnimation(mProgress, TIME_ANIMATION_ROTATION_IN, ROTATION, 0, 0, 1); mRotationIn.setInterpolator(new InterpolatorExpoEaseIn()); mRotationIn.setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation arg0) { work(); } }); mRotationIn.start(this.getGVRContext().getAnimationEngine()); }
@Override public void run() { mOpacityAnimation[iterator] = new GVROpacityAnimation(mMicRunItens[iterator], ANIMATION_TIME, 0); mOpacityAnimation[iterator].setInterpolator(new InterpolatorExpoEaseOut()); mOpacityAnimation[iterator].setRepeatMode(GVRRepeatMode.ONCE); mOpacityAnimation[iterator].setRepeatCount(1); mOpacityAnimation[iterator].start(getGVRContext().getAnimationEngine()); }
@Override public void run() { mOpacityAnimation[iterator] = new GVROpacityAnimation(mMicRunItens[iterator], ANIMATION_TIME, 1); mOpacityAnimation[iterator].setInterpolator(new InterpolatorExpoEaseOut()); mOpacityAnimation[iterator].setRepeatMode(GVRRepeatMode.REPEATED); mOpacityAnimation[iterator].setRepeatCount(-1); mOpacityAnimation[iterator].start(getGVRContext().getAnimationEngine()); }
public void playAnimation(GVRContext gvrContext) { GVRAnimation anim = new GVRRelativeMotionAnimation(this, AnimationsTime.getDropTime(), 0, -Constants.APPLE_INICIAL_YPOS - 1, 0); anim.setInterpolator(defineInterpolator(motion)); anim.start(gvrContext.getAnimationEngine()); playShadowAnimation(); playOpacityAnimation(gvrContext); }
public void animateFloating() { if (!isFloatingSphere) { isFloatingSphere = true; float intensity = 1; float randomValue = 0.7f + ((float) Math.random() * 1.0f); floatingAnimation = new GVRRelativeMotionAnimation (getParent(), intensity * 3 * randomValue, 0, getParent().getTransform() .getPositionY() - intensity * 2 * randomValue, 0); floatingAnimation.setInterpolator(new FloatEffectInterpolator()); floatingAnimation.setRepeatMode(GVRRepeatMode.PINGPONG); floatingAnimation.setRepeatCount(-1); floatingAnimation.start(gvrContext.getAnimationEngine()); } }
@Override public void finished(GVRAnimation animation) { new GVRRotationByAxisAnimation(SceneItem.this, duration * 3, 180, 0, 1, 0) .start(getGVRContext().getAnimationEngine()) .setInterpolator(InterpolatorStrongEaseInOut.getInstance()).setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation animation) { new GVRRelativeMotionAnimation(SceneItem.this, duration, initialPosition[0] - newPosition[0], initialPosition[1] - newPosition[1], initialPosition[2] - newPosition[2]) .start(getGVRContext().getAnimationEngine()) .setInterpolator(InterpolatorBackEaseIn.getInstance()) .setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation animation) { isAnimating = false; } }); } }); } });
@Override public void finished(GVRAnimation animation) { new GVRRotationByAxisAnimation(SceneItem.this, duration * 3, -180, 0, 1, 0) .start(getGVRContext().getAnimationEngine()) .setInterpolator(InterpolatorStrongEaseInOut.getInstance()).setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation animation) { new GVRRelativeMotionAnimation(SceneItem.this, duration, initialPosition[0] - newPosition[0], initialPosition[1] - newPosition[1], initialPosition[2] - newPosition[2]) .start(getGVRContext().getAnimationEngine()) .setInterpolator(InterpolatorBackEaseIn.getInstance()) .setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation animation) { isAnimating = false; } }); } }); } });
public void unsnapSphere(float duration) { if (!isUnsnappingSphere) { if (snapAnimation != null) { gvrContext.getAnimationEngine().stop(snapAnimation); } isUnsnappingSphere = true; snapAnimation = new GVRRelativeMotionAnimation(this, duration, -getTransform() .getPositionX(), -getTransform().getPositionY(), 0f).start(gvrContext.getAnimationEngine()) .setInterpolator(new InterpolatorExpoEaseInOut()) .setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation arg0) { isUnsnappingSphere = false; if (answerState == SphereStaticList.MOVEABLE) { animateFloating(); } } }); } }
swipeAnimation = new GVRRotationByAxisAnimation(this, Fling.getDelayToAnimate(topVelocityY), degree, 1.0f, 0, 0); swipeAnimation.setInterpolator(Fling.getInterpolator(topVelocityY));
new GVRRelativeMotionAnimation(this, duration, newPosition[0] - initialPosition[0], newPosition[1] - initialPosition[1], newPosition[2] - initialPosition[2]).start(getGVRContext().getAnimationEngine()) .setInterpolator(InterpolatorBackEaseOut.getInstance()).setOnFinish(new GVROnFinish() { new GVRRelativeMotionAnimation(this, duration, newPosition[0] - initialPosition[0], newPosition[1] - initialPosition[1], newPosition[2] - initialPosition[2]).start(getGVRContext().getAnimationEngine()) .setInterpolator(InterpolatorBackEaseOut.getInstance()).setOnFinish(new GVROnFinish() {