src/main/java/com/spinyowl/legui/component/misc/animation/scrollbar/ScrollBarAnimation.java
@Override
  protected boolean animate(double delta) {
    ScrollBar scrollBar = this.scrollBar.get();
    if (scrollBar == null) {
      return true;
    }

    Viewport viewport = scrollBar.getViewport();
    if (scrollBar.isVisible() && viewport != null) {

      Vector2f viewportSize = viewport.getViewportSize();
      Vector2f viewportViewSize = viewport.getViewportViewSize();

      if (viewportSize == null || viewportViewSize == null) {
        return true;
      }

      float range = scrollBar.getMaxValue() - scrollBar.getMinValue();
      float allSize = Orientation.HORIZONTAL.equals(scrollBar.getOrientation()) ? viewportViewSize.x
          : viewportViewSize.y;
      float viewSize = Orientation.HORIZONTAL.equals(scrollBar.getOrientation()) ? viewportSize.x
          : viewportSize.y;

      scrollBar.setVisibleAmount(allSize >= viewSize ? (range * viewSize / allSize) : range);
    }

    return false;
  }
/**
   * This method used to update animated object. Called by animator every frame. Removed from
   * animator and stops when this method returns true. <p> Returns true if animation is finished and
   * could be removed from animator.
   *
   * @param delta delta time (from previous call).
   * @return true if animation is finished and could be removed from animator.
   */
This method used to update animated object. Called by animator every frame. Removed from
animator and stops when this method returns true.  Returns true if animation is finished and
could be removed from animator.

@param delta delta time (from previous call).
@return true if animation is finished and could be removed from animator.
This method used to update animated object . Called by animator every frame . Removed from animator and stops when this method returns true . Returns true if animation is finished and could be removed from animator . @param delta delta time ( from previous call ) . @return true if animation is finished and could be removed from animator .
@Override
  protected boolean animate(double delta) {
    ScrollBar scrollBar = this.scrollBar.get();
    if (scrollBar == null) {
      return true;
    }
    Viewport viewport = scrollBar.getViewport();
    if (scrollBar.isVisible() && viewport != null) {
      Vector2f viewportSize = viewport.getViewportSize();
      Vector2f viewportViewSize = viewport.getViewportViewSize();
      if (viewportSize == null || viewportViewSize == null) {
        return true;
      }
      float range = scrollBar.getMaxValue() - scrollBar.getMinValue();
      float allSize = Orientation.HORIZONTAL.equals(scrollBar.getOrientation()) ? viewportViewSize.x
          : viewportViewSize.y;
      float viewSize = Orientation.HORIZONTAL.equals(scrollBar.getOrientation()) ? viewportSize.x
          : viewportSize.y;
      scrollBar.setVisibleAmount(allSize >= viewSize ? (range * viewSize / allSize) : range);
    }
    return false;
  }
@ Override protected boolean animate ( double delta ) { ScrollBar scrollBar = this . scrollBar . get ( ) ; if ( scrollBar == null ) { return true ; } Viewport viewport = scrollBar . getViewport ( ) ; if ( scrollBar . isVisible ( ) && viewport != null ) { Vector2f viewportSize = viewport . getViewportSize ( ) ; Vector2f viewportViewSize = viewport . getViewportViewSize ( ) ; if ( viewportSize == null || viewportViewSize == null ) { return true ; } float range = scrollBar . getMaxValue ( ) - scrollBar . getMinValue ( ) ; float allSize = Orientation . HORIZONTAL . equals ( scrollBar . getOrientation ( ) ) ? viewportViewSize . x : viewportViewSize . y ; float viewSize = Orientation . HORIZONTAL . equals ( scrollBar . getOrientation ( ) ) ? viewportSize . x : viewportSize . y ; scrollBar . setVisibleAmount ( allSize >= viewSize ? ( range * viewSize / allSize ) : range ) ; } return false ; }
This method used to update animated object.
This method used to update animated object .