private void stop(GVRAnimation animation) { if (animation != null) { this.getGVRContext().getAnimationEngine().stop(animation); } }
private void stop(GVRAnimation animation) { if (animation != null) { this.getGVRContext().getAnimationEngine().stop(animation); } }
public void hideVideo() { active = false; mediaPlayer.stop(); mediaPlayer.release(); mediaPlayer = null; new GVROpacityAnimation(this, .1f, 0).start(gvrContext.getAnimationEngine()); gvrContext.getMainScene().removeSceneObject(this); }
private void animateArrowOff() { if (opacityAnimationOff != null) { getGVRContext().getAnimationEngine().stop(opacityAnimationOff); } else { opacityAnimationOff = new GVROpacityAnimation(this, TIME_TO_OFF, 0); } opacityAnimationOff.start(getGVRContext().getAnimationEngine()); }
public void turnOnGUISeekbar() { seekbarHover.attachCollider(new GVRMeshCollider(gvrContext, false)); new GVROpacityAnimation(this, .1f, 1).start(gvrContext.getAnimationEngine()); new GVROpacityAnimation(seekbarHover, .1f, 1).start(gvrContext.getAnimationEngine()); new GVROpacityAnimation(playedSide, .1f, 1).start(gvrContext.getAnimationEngine()); }
public void animationsTime(){ getGVRContext().getAnimationEngine().stop(appleAnimation); startAppleAnimation(); } }
public void rotateAroundCamera(float duration, float degree) { if (wormParentAnimation != null) { getGVRContext().getAnimationEngine().stop(wormParentAnimation); } wormParentAnimation = new GVRRotationByAxisWithPivotAnimation( wormParent.getTransform(), duration, degree, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f) .start(getGVRContext().getAnimationEngine()); }
void onScrollOverModel(GVRCollider holder, float scrollValue) { if (null != currentDisplayedModel && currentDisplayedModel.getModel(context).getCollider() == holder) { Log.d(TAG, "Angle mover applied"); if (scrollValue > 0) new GVRRotationByAxisAnimation(currentDisplayedModel.getModel (context), 0.1f, 35, 0, 1, 0).start(context.getAnimationEngine()); else new GVRRotationByAxisAnimation(currentDisplayedModel.getModel (context), 0.1f, 35, 0, -1, 0).start(context.getAnimationEngine()); } }
public void animateOpacityOff() { if (isVisibleByOpacity) { isVisibleByOpacity = false; stop(mOpacityAnimation); mOpacityAnimation = new GVROpacityAnimation(mHover, 1, mOff); mOpacityAnimation.start(this.getGVRContext().getAnimationEngine()); } }
@Override public boolean visit(GVRComponent comp) { GVRRenderData rd = (GVRRenderData) comp; GVRSceneObject owner = rd.getOwnerObject(); try { new GVROpacityAnimation(owner, 1f, 1f).start(getGVRContext().getAnimationEngine()); } catch (UnsupportedOperationException ex) { // shader doesn't support opacity } return true; } };
private void stopAnimation() { gvrContext.getAnimationEngine().stop(animation); AudioClip.getInstance(getGVRContext().getContext()) .pauseSound(streamID); animation = null; isPlayed = false; }
@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()); }
@Override public void run() { mScaleAnimation[iterator] = new GVRScaleAnimation(mMicRunItens[iterator], ANIMATION_TIME, 1); mScaleAnimation[iterator].setRepeatMode(GVRRepeatMode.REPEATED); mScaleAnimation[iterator].setRepeatCount(-1); mScaleAnimation[iterator].setInterpolator(new InterpolatorExpoEaseOut()); mScaleAnimation[iterator].start(getGVRContext().getAnimationEngine()); }
@Override public void onSwipeBack() { AudioClip.getInstance(getGVRContext().getContext()).playSound(AudioClip.getUIRotateSoundID(), 1.0f, 1.0f); new GVRRotationByAxisAnimation(dinosaur, 4f, -45, 0, 1, 0).start(gvrContext.getAnimationEngine()); } });
@Override public void onSwipeForward() { AudioClip.getInstance(getGVRContext().getContext()).playSound(AudioClip.getUIRotateSoundID(), 1.0f, 1.0f); new GVRRotationByAxisAnimation(ankylosaurus, 4f, 45, 0, 1, 0).start(gvrContext.getAnimationEngine()); }
@Override public void onSwipeBack() { AudioClip.getInstance(getGVRContext().getContext()).playSound(AudioClip.getUIRotateSoundID(), 1.0f, 1.0f); new GVRRotationByAxisAnimation(ankylosaurus, 4f, -45, 0, 1, 0).start(gvrContext.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); }
@Override public void show() { radioGroup.show(); removeChildObject(mGrid); removeChildObject(previewArea); addChildObject(mGrid); addChildObject(previewArea); previewArea.show(); GVROpacityAnimation opacitypreviewArea = new GVROpacityAnimation(previewArea, 1f, 1); opacitypreviewArea.setRepeatMode(GVRRepeatMode.ONCE); opacitypreviewArea.start(getGVRContext().getAnimationEngine()); }
public static void moveWormPartToClose(GVRContext gvrContext, GVRSceneObject moveablePart, GVRSceneObject basePart) { float scaleRatio = ScaleWorm.getWorm().getHead().getTransform().getScaleX() / ScaleWorm.getLastSize()[0]; float distance = (float) Util.distance(basePart, moveablePart) * scaleRatio; float[] newPosition = Util .calculatePointBetweenTwoObjects(basePart, moveablePart, distance); float newX = newPosition[0] - moveablePart.getTransform().getPositionX(); float newZ = newPosition[2] - moveablePart.getTransform().getPositionZ(); new GVRRelativeMotionAnimation(moveablePart, AnimationsTime.getScaleTime(), newX, 0, newZ) .start(gvrContext.getAnimationEngine()); }