private void clockwise(GVRSceneObject object, float duration) { setup(new GVRRotationByAxisWithPivotAnimation( // object, duration, -360.0f, // 0.0f, 1.0f, 0.0f, // 0.0f, 0.0f, 0.0f)); }
private void counterClockwise(GVRSceneObject object, float duration) { setup(new GVRRotationByAxisWithPivotAnimation( // object, duration, 360.0f, // 0.0f, 1.0f, 0.0f, // 0.0f, 0.0f, 0.0f)); }
private void clockwise(GVRTransform transform, float duration) { setup(new GVRRotationByAxisWithPivotAnimation( // transform, duration, -360.0f, // 0.0f, 1.0f, 0.0f, // 0.0f, 0.0f, 0.0f)); } }
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 "); } }
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()); }
z /= length; new GVRRotationByAxisWithPivotAnimation(bunny, // 5.0f + random.nextFloat() * 25.0f, // 360.0f, //
public void showButtonPressed(float angle) { buttonHover.getRenderData().getMaterial().setOpacity(0); buttonHover.getTransform().setPosition(evPositionX, evPositionY, evPositionZ); buttonHover.getTransform().setRotation(evRotationW, evPositionX, evPositionY, evPositionZ); GVRRotationByAxisWithPivotAnimation dpadRotation = new GVRRotationByAxisWithPivotAnimation( buttonHover, 0.001f, angle, 0, 0, 1, pivotX, pivotY, pivotZ); dpadRotation.setRepeatMode(GVRRepeatMode.ONCE); dpadRotation.setRepeatCount(1); dpadRotation.start(this.getGVRContext().getAnimationEngine()); animOpacity = new GVROpacityAnimation(buttonHover, 2, 1); animOpacity.setRepeatMode(GVRRepeatMode.ONCE); animOpacity.setRepeatCount(1); animOpacity.setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation gvrAnimation) { buttonHover.getRenderData().getMaterial().setOpacity(0); } }); animOpacity.start(getGVRContext().getAnimationEngine()); }