private void setup(GVRAnimation animation) { animation.setRepeatMode(GVRRepeatMode.REPEATED).setRepeatCount(-1); mAnimator.addAnimation(animation); }
private void rotateCloudsAroundCameraAnimation(GVRContext gvrContext, Cloud cloud) { GVRAnimation anim = new GVRRotationByAxisWithPivotAnimation( cloud, CLOUD_ROTATION_DURATION, FULL_ROTATION, 0, 1, 0, 0, 0, 0); anim.setRepeatCount(-1); anim.setRepeatMode(GVRRepeatMode.REPEATED); anim.start(gvrContext.getAnimationEngine()); } }
@Override public void onStartRendering(GVRViewSceneObject gvrViewSceneObject, View view) { addChildObject(gvrViewSceneObject); mAnimation = new GVRRotationByAxisWithPivotAnimation(this, 2, -360f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f).start(getGVRContext().getAnimationEngine()); mAnimation.setRepeatMode(1); mAnimation.setRepeatCount(-1); Log.d(TAG, "Animation Loading "); } }
private void animateRotationWork() { mRotationWork = new GVRRotationByAxisAnimation(mProgress, TIME_ANIMATION_ROTATION_WORK, ROTATION, 0, 0, 1); mRotationWork.setRepeatMode(GVRRepeatMode.REPEATED); mRotationWork.setRepeatCount(-1); mRotationWork.start(this.getGVRContext().getAnimationEngine()); }
private void startAnimation() { animation = new GVRRotationByAxisAnimation(styrocosaurus, 25, 360, 0, 1, 0).start(gvrContext.getAnimationEngine()); animation.setRepeatMode(1); animation.setRepeatCount(-1); isPlayed = true; swipeIndicator.setStop(true); }
@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 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()); } }
public void setSelectedAnimation(int index) { // No Animation if (index == 0) { if (currentAnimation != null) { context.getAnimationEngine().stop(currentAnimation); currentAnimation = null; } } else { index -= 1; if (currentDisplayedModel != null && currentDisplayedModel.getAnimation().getAnimationCount() > 0) currentAnimation = currentDisplayedModel.getAnimation().getAnimation(index); currentAnimation.setRepeatMode(GVRRepeatMode.REPEATED); currentAnimation.setRepeatCount(-1); currentAnimation.start(context.getAnimationEngine()); } }
.setRepeatMode(GVRRepeatMode.REPEATED).setRepeatCount(-1) // .start(mAnimationEngine);
public void startAppleAnimation() { apple.getTransform().setPositionY(APPLE_INITIAL_POSITION_Y); apple.getRenderData().getMaterial().setOpacity(1f); appleAnimation = new GVRRelativeMotionAnimation(apple, AnimationsTime.getDropTime(), 0, Y_ANIMATION_DELTA, 0) .setInterpolator(animationInterpolator) .setRepeatMode(GVRRepeatMode.REPEATED) .setRepeatCount(-1) .start(getGVRContext() .getAnimationEngine()); }