DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
HomeGame DevEasing Function Generator

Example: Easing Function Generator

A worked example, rendered from real sample data. Sign in to run the tool on your own input.

Input
ease-in-out-cubic
Output
/* CSS */
.ease-in-out-cubic {
  transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  transition-duration: 600ms;
}

/* linear() — samples the curve, so it survives overshoot and springs exactly */
.ease-in-out-cubic-precise {
  transition-timing-function: linear(0, 0.0021, 0.0089, 0.0216, 0.0415, 0.0708, 0.1124, 0.1707, 0.2521, 0.363, 0.5, 0.637, 0.7479, 0.8293, 0.8876, 0.9292, 0.9585, 0.9784, 0.9911, 0.9979, 1);
}

/* JavaScript */
const ease_in_out_cubic = (t) => {
  const [x1, y1, x2, y2] = [0.65, 0, 0.35, 1];
  const ax = (t, a, b) => 3 * (1 - t) ** 2 * t * a + 3 * (1 - t) * t ** 2 * b + t ** 3;
  let lo = 0, hi = 1, u = t;
  for (let i = 0; i < 24; i++) {
    const x = ax(u, x1, x2);
    if (Math.abs(x - t) < 1e-5) break;
    x < t ? (lo = u) : (hi = u);
    u = (lo + hi) / 2;
  }
  return ax(u, y1, y2);
};

/* Framer Motion */
transition={{ duration: 0.6, ease: [0.65, 0, 0.35, 1] }}

/* GSAP */
gsap.to(target, { duration: 0.6, ease: "cubic-bezier(0.65,0,0.35,1)" });

@media (prefers-reduced-motion: reduce) {
  .ease-in-out-cubic, .ease-in-out-cubic-precise {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

About Easing Function Generator

Easing Function Generator preview - Game Dev tool

Generate easing functions in C#, GLSL, JS with visual curve preview. Part of the DevTools Surf developer suite. Browse more tools in the Game Dev collection.

Use Cases

  • Game developers implementing smooth camera and UI transitions
  • Animation programmers choosing easing curves for character movement
  • Frontend developers generating easing functions for web animations
  • Technical artists tuning interpolation curves for visual effects

Tips

  • Preview the curve shape before copying the easing function
  • Choose ease-out for UI elements entering the screen naturally
  • Export to your target language — C#, GLSL, or JavaScript

Fun Facts

  • Robert Penner published his famous easing equations in 2001 in his book 'Programming Macromedia Flash MX' — these 30+ functions remain the foundation of animation easing across all platforms.
  • The word 'tween' comes from 'in-betweening,' a term from traditional animation where junior artists drew the frames between key poses — Disney formalized this workflow in the 1930s.
  • Easing functions are mathematically just polynomial curves — ease-in-cubic is simply t^3, while ease-in-out-cubic splices two cubic curves together at the midpoint.

FAQ

Which languages does it output?
JavaScript (CSS bezier + JS function), C# (Unity-compatible), HLSL/GLSL (shader code). Plus a visual curve preview.
What's the difference from CSS cubic-bezier?
Same concept — 4-control-point curves. Gaming adds elastic, bounce, and back easings that CSS doesn't support natively.
Can I make custom easings?
Yes — drag control points or enter values directly. Preview shows the curve and the animation runs visibly.
Is it Penner's easing?
Yes — Robert Penner's equations are the standard, implemented in most game libraries. The tool shows Penner form alongside cubic-bezier where both exist.

Related Game Dev Tools

Unity Icon GeneratorAndroid Icon GeneratoriOS Icon GeneratorUnity C# Class GeneratorUnity Prefab InspectorSprite Sheet CalculatorGame Math CalculatorGame Color Palette Generator
New · Flagshipsimple REST client

REST Handler — Collections, env vars, history, cURL converter

Send requests, save collections (nested), swap environments, and convert between cURL / Collection JSON / REST Handler YAML.

Open

Popular tools

The most-used tools on DevToolsSurf, one click away.

Encoding & crypto

  • Base64 Encode
  • Base64 Decode
  • URL Encoder
  • URL Decoder
  • Hash Generator
  • JWT Decoder
  • JWT Encoder
  • UUID Generator
  • ULID Generator
  • Password Generator
  • Bcrypt Hash Tester

Converters

  • CSV to JSON
  • JSON to CSV
  • XML to JSON
  • JSON to XML
  • HTML → Markdown
  • HTML → React JSX
  • cURL to Code
  • Collection JSON → cURL
  • Swagger to Collection JSON
  • JSON → Go Struct
  • JSON → TypeScript Types

JSON & YAML

  • JSON Formatter
  • JSON Validator
  • JSON Viewer
  • JSON Minifier
  • JSON Diff
  • JSONPath Tester
  • YAML Formatter
  • YAML to JSON
  • JSON to YAML

Text & regex

  • Regex Tester
  • Text Diff
  • Case Converter
  • Word Counter
  • Markdown Preview
  • Slug Generator
  • Lorem Ipsum Generator
  • Markdown → PDF

CSS & color

  • CSS Beautifier
  • Minify CSS
  • Color Converter
  • Gradient Generator
  • Contrast Checker
  • Color Palette Generator
  • Flexbox Playground
  • Tailwind → CSS

Generators

  • QR Code Generator
  • Mock Data Generator
  • Favicon Generator
  • .gitignore Builder
  • README.md Generator
  • Dockerfile Generator
  • Sitemap Generator

API & networking

  • REST Handler
  • HTTP Header Analyzer
  • IP Address Lookup
  • CIDR Calculator
  • User-Agent Parser
  • HTTP Status Reference
  • OpenAPI Viewer

Date & time

  • Timestamp Converter
  • Timezone Converter
  • Cron Expression Parser
  • Duration Calculator
  • Age Calculator
  • Date Format Converter

Images

  • Image Converter
  • Image Resizer (Batch)
  • SVG Optimizer
  • Base64 ↔ Image
  • WebP ↔ AVIF Converter
  • Image Compressor

PDF tools

  • PDF Merger
  • PDF Splitter
  • PDF Compressor
  • Markdown → PDF
  • EPUB → PDF
  • MOBI / AZW → PDF
  • DOCX → PDF
  • HTML → PDF

Resources

  • Community feed
  • Themes marketplace
  • Pricing & credits
  • Privacy policy
  • Terms of service
  • Sitemap
  • robots.txt

Your account

  • Sign in
  • Dashboard
  • Run history
  • My profile
  • Settings
DevTools Surf logo
DevTools Surf919+ tools

Fast · privacy-first · client-side · © 2026

Home·Feed·ThemesPricing·Sign inPrivacy·Sitemap Feedback