• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

crafatar/crafatar: A blazing fast API for Minecraft faces

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

crafatar/crafatar

开源软件地址(OpenSource Url):

https://github.com/crafatar/crafatar

开源编程语言(OpenSource Language):

JavaScript 79.2%

开源软件介绍(OpenSource Introduction):

Crafatar

logo

travis Coverage Status Code Climate dependency status devDependency status docs status

Crafatar serves Minecraft avatars based on the skin for use in external applications. Inspired by Gravatar (hence the name) and Minotar.

Image manipulation is done by lwip. 3D renders are created with node-canvas / cairo.

Contributions welcome!

There are usually a few open issues.
We welcome any opinions or advice in discussions as well as pull requests.
Issues tagged with help wanted show where we could especially need your help!

Examples

jomo's avatar Jake_0's avatar Notch's avatar sk89q's avatar
jomo's 3d head Jake_0's 3d head Notch's 3d head sk89q's 3d head
jomo's 3d body Jake_0's 3d body Notch's 3d body sk89q's 3d body
jomo's skin Jake_0's skin Notch's skin sk89q's skin

Usage / Documentation

Please visit the website for details.

Contact

Installation

Docker

docker network create crafatar
docker run --net crafatar -d --name redis redis
docker run --net crafatar -v crafatar-images:/crafatar/images -e REDIS_URL=redis://redis -p 3000:3000 crafatar/crafatar

Manual

  • Install nodejs 12 (LTS)
  • Install redis-server
  • Run npm install
    If that fails, it's likely because because of node-canvas dependencies. Follow this guide to install them.
  • Run npm start

Crafatar is now available at http://0.0.0.0:3000.

Configration / Environment variables

See the config.js file.

Operational notes

inodes

Crafatar stores a lot of images on disk. For avatars, these are 8×8 px PNG images with an average file size of ~90 bytes. This can lead to issues on file systems such as ext4, which (by default) has a bytes-per-inode ratio of 16Kb. With thousands of files with an average file size below this ratio, you will run out of available inodes before running out of disk space. (Note that this will still be reported as ENOSPC: no space left on device).

Consider using a different file system, changing the inode ratio, or deleting files before the inode limit is reached.

disk space and memory usage

Eventually you will run out of disk space and/or redis will be out of memory. Make sure to delete image files and/or flush redis before this happens.

Tests

npm test

If you want to debug failing tests:

# show logs during tests
env VERBOSE_TEST=true npm test

It can be helpful to monitor redis commands to debug caching errors:

redis-cli monitor



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
meta-42/Minecraft-Unity发布时间:2022-08-16
下一篇:
crbednarz/AMIDST: Advanced Minecraft Interface and Data/Structure Tracking发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap