承接 smnandre/easing-functions 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smnandre/easing-functions

Composer 安装命令:

composer require smnandre/easing-functions

包简介

Easing & Timing Functions - Cubic-Bezier, EaseIn, Quad ...

README 文档

README

Easing Functions

composer require smnandre/easing-functions

PHP Version CI Release License Codecov

EasingFunctions is a PHP library that provides a collection of easing functions commonly used in animations, transitions, and smooth interpolations.

It includes standard easing equations: quadratic, cubic, quartic, quintic, sine, exponential, circular, elastic, and bounce functions.

Each of them is available in three variations:

  • In: The motion starts slowly and accelerates.
  • Out: The motion starts quickly and decelerates.
  • InOut: A combination of both, accelerating at the start and decelerating at the end.

Easing Functions

x In Out InOut
Cubic Ease In Cubic
easeInCubic
Ease Out Cubic
easeOutCubic
Ease InOut Cubic
easeInOutCubic
Quart Ease In Quart
easeInQuart
Ease Out Quart
easeOutQuart
Ease InOut Quart
easeInOutQuart
Quad Ease In Quad
easeInQuad
Ease Out Quad
easeOutQuad
Ease InOut Quad
easeInOutQuad
Quint Ease In Quint
easeInQuint
Ease Out Quint
easeOutQuint
Ease InOut Quint
easeInOutQuint
Sine Ease In Sine
easeInSine
Ease Out Sine
easeOutSine
Ease InOut Sine
easeInOutSine
Expo Ease In Expo
easeInExpo
Ease Out Expo
easeOutExpo
Ease InOut Expo
easeInOutExpo
Circ Ease In Circ
easeInCirc
Ease Out Circ
easeOutCirc
Ease InOut Circ
easeInOutCirc
Back Ease In Back
easeInBack
Ease Out Back
easeOutBack
Ease InOut Back
easeInOutBack
Bounce Ease In Bounce
easeInBounce
Ease Out Bounce
easeOutBounce
Ease InOut Bounce
easeInOutBounce
Elastic Ease In Elastic
easeInElastic
Ease Out Elastic
easeOutElastic
Ease InOut Elastic
easeInOutElastic

Installation

composer require smnandre/easing-functions

Usage

Easing\Functions::easeOutCubic(0);
// 0
Easing\Functions::easeOutCubic(0.5);
// 0.875

$values = array_map(Easing\Functions::easeOutCubic(...), range(0, 1, 0.1));
echo implode(" ", $values);
// 0 0.271 0.488 0.657 0.784 0.875 0.936 0.973 0.992 0.999 1

Functions

Easing Functions

Name Formulae Preview
easeOutCubic $1 - pow(1 - x, 3)$ easeOutCubic PHP
easeInOutCubic $x < 0.5 ? 4 * pow(x, 3) : 1 - pow(-2 * x + 2, 3) / 2$ easeInOutCubic PHP
easeInQuart $pow(x, 4)$ easeInQuart PHP
easeOutQuart $1 - pow(1 - x, 4)$ easeOutQuart PHP
easeInOutQuart $x < 0.5 ? 8 * pow(x, 4) : 1 - pow(-2 * x + 2, 4) / 2$ easeInOutQuart PHP
easeInCubic $pow(x, 3)$ easeInCubic PHP
easeInQuad $x * x$ easeInQuad PHP
easeOutQuad $1 - (1 - x) * (1 - x)$ easeOutQuad PHP
easeInOutQuad $x < 0.5 ? 2 * x * x : 1 - pow(-2 * x + 2, 2) / 2$ easeInOutQuad PHP
easeInQuint $pow(x, 5)$ easeInQuint PHP
easeOutQuint $1 - pow(1 - x, 5)$ easeOutQuint PHP
easeInOutQuint $x < 0.5 ? 16 * pow(x, 5) : 1 - pow(-2 * x + 2, 5) / 2$ easeInOutQuint PHP
easeInSine $1 - cos((x * pi()) / 2)$ easeInSine PHP
easeOutSine $sin((x * pi()) / 2)$ easeOutSine PHP
easeInOutSine $-(cos(pi() * x) - 1) / 2$ easeInOutSine PHP
easeInExpo $x == 0 ? 0 : pow(2, 10 * x - 10)$ easeInExpo PHP
easeOutExpo $x == 1 ? 1 : 1 - pow(2, -10 * x)$ easeOutExpo PHP
easeInOutExpo $x == 0 ? 0 : x == 1 ? 1 : x < 0.5 ? pow(2, 20 * x - 10) / 2 : (2 - pow(2, -20 * x + 10)) / 2$ easeInOutExpo PHP
easeInCirc $1 - sqrt(1 - pow(x, 2))$ easeInCirc PHP
easeOutCirc $sqrt(1 - pow(x - 1, 2))$ easeOutCirc PHP
easeInOutCirc $x < 0.5 ? (1 - sqrt(1 - pow(2 * x, 2))) / 2 : (sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2$ easeInOutCirc PHP
easeInBack $2.70158 * pow(x, 3) - 1.70158 * pow(x, 2)$ easeInBack PHP
easeOutBack $1 + 2.70158 * pow(x - 1, 3) + 1.70158 * pow(x - 1, 2)$ easeOutBack PHP
easeInOutBack $x < 0.5 ? (pow(2 * x, 2) * ((3.59258 * 2 * x) - 2.59258)) / 2 : (pow(2 * x - 2, 2) * ((3.59258 * (x * 2 - 2)) + 2.59258) + 2) / 2$ easeInOutBack PHP
easeInBounce $1 - easeOutBounce(1 - x)$ easeInBounce PHP
easeOutBounce See bounceOut function easeOutBounce PHP
easeInOutBounce $x < 0.5 ? (1 - easeOutBounce(1 - 2 * x)) / 2 : (1 + easeOutBounce(2 * x - 1)) / 2$ easeInOutBounce PHP
easeInElastic $x == 0 ? 0 : x == 1 ? 1 : -pow(2, 10 * x - 10) * sin((x * 10 - 10.75) * ((2 * pi()) / 3))$ easeInElastic PHP
easeOutElastic $x == 0 ? 0 : x == 1 ? 1 : pow(2, -10 * x) * sin((x * 10 - 0.75) * ((2 * pi()) / 3)) + 1$ easeOutElastic PHP
easeInOutElastic $x == 0 ? 0 : x == 1 ? 1 : x < 0.5 ? -(pow(2, 20 * x - 10) * sin((20 * x - 11.125) * ((2 * pi()) / 4.5))) / 2 : (pow(2, -20 * x + 10) * sin((20 * x - 11.125) * ((2 * pi()) / 4.5))) / 2 + 1$ easeInOutElastic PHP

License

This project is licensed under the MIT License. See the LICENSE file for more information.

smnandre/easing-functions 适用场景与选型建议

smnandre/easing-functions 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 3, 最近一次更新时间为 2025 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「interpolation」 「transition」 「functions」 「animation」 「easing」 「timing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 smnandre/easing-functions 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 smnandre/easing-functions 我们能提供哪些服务?
定制开发 / 二次开发

基于 smnandre/easing-functions 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 24
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-19