Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
GlossaryNovember 22, 20263 min read

What are easing and lerp?

Lerp gets a value from A to B; easing makes the trip feel natural. Here is the formula, the curves worth knowing, and the common lerp mistake that varies by frame rate.

Startbase Team
Editorial ink illustration of a wooden drawer gliding shut and slowing at the end, the brass handle in ember orange

Key takeaways

  • Lerp (linear interpolation) is a + (b - a) * t: the point a fraction t of the way from a to b.
  • Easing curves reshape t so motion starts or ends gently: ease-out for things arriving, ease-in for things leaving.
  • The popular "lerp a little toward the target each frame" trick depends on frame rate unless you scale it with delta time.

Lerp, short for linear interpolation, finds a value part of the way between two others, and easing is the curve that controls how quickly a movement or fade progresses from start to end. Together they are how games and interfaces move things smoothly instead of teleporting them.

Close a well-made drawer: it moves quickly at first and slows just before it shuts. A cheap one slams at full speed. Lerp gets the drawer from open to closed; easing is what makes it glide.

Lerp in one line

The formula is `lerp(a, b, t) = a + (b - a) * t`, with t from 0 to 1. lerp(100, 300, 0) is 100, lerp(100, 300, 0.5) is 200, lerp(100, 300, 1) is 300. It works for anything numeric: positions, colors, volume, zoom, the width of a health bar. To animate, you grow t from 0 to 1 over a duration: t = elapsed / duration.

Easing curves worth knowing

Easing replaces t with a curved version before the lerp. A handful cover most needs:

  • Linear: constant speed. Feels mechanical; fine for progress bars and scrolling backgrounds.
  • Ease-out (fast, then slow, for example 1 - (1 - t)^3): things arriving. Menus sliding in, coins flying to the counter, a camera settling.
  • Ease-in (slow, then fast): things leaving or falling away.
  • Ease-in-out: gentle at both ends, for travel from one rest to another, like a level map panning between nodes.
  • Back and elastic: overshoot then settle. A button that pops to 110% then back to 100% feels alive; use it sparingly.

Durations matter as much as curves. Starting values: 150 to 250 ms for UI responses, 300 to 500 ms for screen transitions (scene transitions), under 100 ms for hit reactions. Slower than that and the game feels sluggish.

The frame-rate trap

A very common shortcut is `x = lerp(x, target, 0.1)` every frame: move 10% of the remaining gap, giving a nice ease-out for cameras and followers. The catch is that it runs twice as often at 120 fps, so the camera catches up much faster on a fast screen. The fix uses delta time: `x = lerp(x, target, 1 - Math.pow(0.001, dt))` closes 99.9% of the gap per second whatever the frame rate. If a camera feels tighter on one device than another, this is usually why (game camera guide).

Easing when building with Startbase

Easing is most of what people mean by "polish" and "juice" (game feel and juice). The useful way to ask for it is by moment and feeling: what moves, how long, and whether it should overshoot. Make the key durations Engine panel dials in a game so you can feel 200 ms versus 300 ms instead of debating it.

Make motion feel smooth: health bars ease down over 300 ms with a white trailing bar, collected coins fly to the counter with ease-out in 400 ms, buttons pop to 108% and back in 150 ms, and the camera follows using frame-rate-independent smoothing. Expose the camera smoothing as a dial.

Common confusions

  • Tween vs lerp. A tween is a ready-made animation (from, to, duration, easing); lerp is the math inside it.
  • Easing vs physics. Easing follows a fixed curve and always lands on time. Springs and physics respond to forces and may land at different times.
  • Slerp. Spherical lerp, for rotations in 3D, so turning takes the short way around.

Frequently asked questions

What does lerp stand for?

Linear interpolation: finding the value a given fraction of the way between two values, a + (b - a) * t.

Which easing should I use for UI?

Ease-out for things appearing or arriving, ease-in for things leaving, about 150 to 250 ms. Linear motion tends to look robotic.

Why does my lerp camera behave differently on different screens?

A fixed lerp fraction per frame runs more often at higher frame rates. Base the fraction on delta time so it is the same per second.

On this page

  • Lerp in one line
  • Easing curves worth knowing
  • The frame-rate trap
  • Easing when building with Startbase
  • Common confusions

Keep reading

More in Glossary
Editorial ink illustration of a hand-cranked music box drum plucking a metal comb, the crank handle in ember orange
GlossaryNovember 22, 2026

What is a game loop?

Every real-time game runs one repeating cycle: read input, update the world, draw it. Here is what that cycle looks like and why it decides how your game feels.

3 min read
Editorial ink illustration of a brass stopwatch beside a small wind-up toy car, the second hand in ember orange
GlossaryNovember 22, 2026

What is delta time?

Delta time is the number that keeps your game the same speed on every screen. Here is how to use it, where it breaks, and how to spot a game that forgot it.

3 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.