I was critically damp once. It was okay.
This commit is contained in:
@@ -704,11 +704,11 @@ void LLButton::draw()
|
||||
mCurGlowStrength = lerp(mCurGlowStrength,
|
||||
mFlashing ? (flash? 1.0 : 0.0)
|
||||
: mHoverGlowStrength,
|
||||
LLCriticalDamp::getInterpolant(0.05f));
|
||||
LLSmoothInterpolation::getInterpolant(0.05f));
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f));
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLSmoothInterpolation::getInterpolant(0.05f));
|
||||
}
|
||||
|
||||
// Draw button image, if available.
|
||||
|
||||
@@ -621,7 +621,7 @@ bool LLLayoutStack::animatePanels()
|
||||
{
|
||||
if (!mAnimatedThisFrame)
|
||||
{
|
||||
panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
|
||||
panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 1.f, LLSmoothInterpolation::getInterpolant(mOpenTimeConstant));
|
||||
if (panelp->mVisibleAmt > 0.99f)
|
||||
{
|
||||
panelp->mVisibleAmt = 1.f;
|
||||
@@ -646,7 +646,7 @@ bool LLLayoutStack::animatePanels()
|
||||
{
|
||||
if (!mAnimatedThisFrame)
|
||||
{
|
||||
panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
|
||||
panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 0.f, LLSmoothInterpolation::getInterpolant(mCloseTimeConstant));
|
||||
if (panelp->mVisibleAmt < 0.001f)
|
||||
{
|
||||
panelp->mVisibleAmt = 0.f;
|
||||
@@ -673,7 +673,7 @@ bool LLLayoutStack::animatePanels()
|
||||
{
|
||||
if (!mAnimatedThisFrame)
|
||||
{
|
||||
panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
|
||||
panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLSmoothInterpolation::getInterpolant(mCloseTimeConstant));
|
||||
}
|
||||
|
||||
if (llabs(panelp->mCollapseAmt - collapse_state) < 0.001f)
|
||||
|
||||
@@ -4509,7 +4509,7 @@ void LLTearOffMenu::draw()
|
||||
if (getRect().getHeight() != mTargetHeight)
|
||||
{
|
||||
// animate towards target height
|
||||
reshape(getRect().getWidth(), llceil(lerp((F32)getRect().getHeight(), mTargetHeight, LLCriticalDamp::getInterpolant(0.05f))));
|
||||
reshape(getRect().getWidth(), llceil(lerp((F32)getRect().getHeight(), mTargetHeight, LLSmoothInterpolation::getInterpolant(0.05f))));
|
||||
}
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
@@ -502,11 +502,11 @@ void LLScrollbar::draw()
|
||||
BOOL hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y));
|
||||
if (hovered)
|
||||
{
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f));
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLSmoothInterpolation::getInterpolant(0.05f));
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f));
|
||||
mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLSmoothInterpolation::getInterpolant(0.05f));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ void LLTabContainer::draw()
|
||||
}
|
||||
}
|
||||
|
||||
setScrollPosPixels(mIsVertical ? target_pixel_scroll : lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLCriticalDamp::getInterpolant(0.08f)));
|
||||
setScrollPosPixels(mIsVertical ? target_pixel_scroll : lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLSmoothInterpolation::getInterpolant(0.08f)));
|
||||
|
||||
BOOL has_scroll_arrows = !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0));
|
||||
if (!mIsVertical)
|
||||
|
||||
Reference in New Issue
Block a user