承接 multiavatar/multiavatar-php 相关项目开发

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

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

multiavatar/multiavatar-php

Composer 安装命令:

composer require multiavatar/multiavatar-php

包简介

Multicultural Avatar Generator

README 文档

README

Multiavatar is a multicultural avatar generator.

In total, it is possible to generate 12,230,590,464 cryptographically unique avatars.

Initially coded in JavaScript, this version of Multiavatar is re-created in PHP. It can be used in PHP-based backend environments.

For more details about the Multiavatar Generator, please refer to the readme available in the JS repository.

Installation

If you don't use composer, just include Multiavatar.php in your application.

require_once('Multiavatar.php');

Via Composer:

composer require multiavatar/multiavatar-php

Usage

$multiavatar = new Multiavatar();
$svgCode = $multiavatar("Binx Bond", null, null);

For advanced usage, pass boolean true as the second parameter if you wish to generate an avatar without the environment part.

Pass an associative array as the third parameter to generate a specific avatar version.

$multiavatar = new Multiavatar();
$avatarId = "ANY_STRING";
$svgCode = $multiavatar($avatarId, true, array("part" => "11", "theme" => "C"));

API

This PHP script is powering the Multiavatar API.

To get an avatar as SVG code, add the avatar's ID to the URL:

https://api.multiavatar.com/Binx Bond

JavaScript API call example to get SVG code:

let avatarId = 'Binx Bond'
fetch('https://api.multiavatar.com/'
+JSON.stringify(avatarId))
  .then(res => res.text())
  .then(svg => console.log(svg))

To get an avatar as SVG file, add .svg to the end of the URL:

https://api.multiavatar.com/Binx Bond.svg

To get an avatar as PNG file, add .png to the end of the URL:

https://api.multiavatar.com/Binx Bond.png

Testing

To catch bugs, the representation of tests should be visual because not all bugs have programmatic errors. For example, if an equal length color array is mixed, or a double semicolon appears in a color string, in such cases an error is not thrown, but the visual representation of avatar(-s) becomes broken.

There are two types of tests, currently available in index.php and other.php files. Simply load these files in your browser from your PHP web server.

In the index.php file, visually presented are all 48 base versions or avatars. If all 48 base versions are good, then it means that all 12 billion are also good, because the 12 billion are constructed from different parts of the 48 base versions. All avatars in this file should look exactly the same as in the JavaScript repository's \svg\index.html file.

In the other.php file, additional various tests are performed to test different approaches how to generate avatars, specific avatar versions, or some repository-specific cases.

Contributors

Ignace Nyamagana Butera (@nyamsprod)

License

You can use Multiavatar for free, as long as the conditions described in the LICENSE are followed.

Screenshots

More info

For additional information and extended functionality, visit the multiavatar.com web-app.

The app is based on static html for the home page, and on Laravel 8 + Vue.js for extended functionality, including the web store.

The product mockup generator for the Merch Maker is based on the ImageMagick PHP library.

multiavatar/multiavatar-php 适用场景与选型建议

multiavatar/multiavatar-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 166.84k 次下载、GitHub Stars 达 656, 最近一次更新时间为 2020 年 12 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 166.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 657
  • 点击次数: 22
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 656
  • Watchers: 21
  • Forks: 48
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2020-12-15