public static Vector3 Direction(this SlideAxis slideAxis) { if (slideAxis == SlideAxis.X) { return(Vector3.right); } else if (slideAxis == SlideAxis.NegativeX) { return(-Vector3.right); } else if (slideAxis == SlideAxis.Z) { return(Vector3.forward); } else { return(-Vector3.forward); } }
/// <summary> /// Initializes a new instance of the <see cref="PageSlide"/> class. /// </summary> /// <param name="duration">The duration of the animation.</param> /// <param name="orientation">The axis on which the animation should occur</param> public PageSlide(TimeSpan duration, SlideAxis orientation = SlideAxis.Horizontal) { Duration = duration; Orientation = orientation; }
/// <summary> /// Creates a new instance of the <see cref="Rotate3DTransition"/> /// </summary> /// <param name="duration">How long the rotation should take place</param> /// <param name="orientation">The orientation of the rotation</param> /// <param name="depth">Defines the depth of the 3D Effect. If null, depth will be calculated automatically from the width or height of the common parent of the visual being rotated</param> public Rotate3DTransition(TimeSpan duration, SlideAxis orientation = SlideAxis.Horizontal, double?depth = null) : base(duration, orientation) { Depth = depth; }