Class FanAnimation

    • Constructor Detail

      • FanAnimation

        public FanAnimation​(FanComponent fan,
                            long duration,
                            AnimationFunction<java.lang.Float> rotationFunction)
        Constructs an animation that rotates a fan using the given fan component, duration and rotation animation function.
        Parameters:
        fan - the fan component animation target
        duration - the animation duration
        rotationFunction - the rotation animation function
    • Method Detail

      • defaultFan

        public static FanAnimation defaultFan​(FanComponent fan,
                                              long duration)
        Creates and answers the default fan animation.
        Parameters:
        fan - the fan component animation target
        duration - the animation duration
        Returns:
        a default fan animation
      • defaultRotationFunction

        public static AnimationFunction<java.lang.Float> defaultRotationFunction​(long duration)
        Creates and answers an animation function for the default rotation.
        Parameters:
        duration - the animation duration
        Returns:
        an animation function for the default rotation
      • applyEffect

        protected void applyEffect​(long time)
        Applies the effect: sets the time-based rotation.
        Specified by:
        applyEffect in class AbstractAnimation
        Parameters:
        time - the render time