mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
renders = '3D renders'
This commit is contained in:
parent
34e94c090e
commit
cb7f03b0b5
@ -6,7 +6,7 @@ https://crafatar.com
|
|||||||
Crafatar serves Minecraft avatars based on the skin for use in external applications.
|
Crafatar serves Minecraft avatars based on the skin for use in external applications.
|
||||||
Inspired by [Gravatar](https://gravatar.com) (hence the name) and [Minotar](https://minotar.net).
|
Inspired by [Gravatar](https://gravatar.com) (hence the name) and [Minotar](https://minotar.net).
|
||||||
|
|
||||||
Image manipulation is done by [lwip](https://github.com/EyalAr/lwip). Renders are created with [node-canvas](https://github.com/Automattic/node-canvas), based on math by [confuser](https://github.com/confuser/serverless-mc-skin-viewer).
|
Image manipulation is done by [lwip](https://github.com/EyalAr/lwip). 3D renders are created with [node-canvas](https://github.com/Automattic/node-canvas), based on math by [confuser](https://github.com/confuser/serverless-mc-skin-viewer).
|
||||||
|
|
||||||
    
|
    
|
||||||
## Usage / Documentation
|
## Usage / Documentation
|
||||||
|
|||||||
@ -2,9 +2,9 @@ var config = {
|
|||||||
min_size: 1, // for avatars
|
min_size: 1, // for avatars
|
||||||
max_size: 512, // for avatars; too big values might lead to slow response time or DoS
|
max_size: 512, // for avatars; too big values might lead to slow response time or DoS
|
||||||
default_size: 160, // for avatars; size to be used when no size given
|
default_size: 160, // for avatars; size to be used when no size given
|
||||||
min_scale: 1, // for renders
|
min_scale: 1, // for 3D renders
|
||||||
max_scale: 10, // for renders; too big values might lead to slow response time or DoS
|
max_scale: 10, // for 3D renders; too big values might lead to slow response time or DoS
|
||||||
default_scale: 6, // for renders; scale to be used when no scale given
|
default_scale: 6, // for 3D renders; scale to be used when no scale given
|
||||||
local_cache_time: 1200, // seconds until we will check if the image changed. should be > 60 to prevent mojang 429 response
|
local_cache_time: 1200, // seconds until we will check if the image changed. should be > 60 to prevent mojang 429 response
|
||||||
browser_cache_time: 3600, // seconds until browser will request image again
|
browser_cache_time: 3600, // seconds until browser will request image again
|
||||||
cleaning_interval: 1800, // seconds interval: deleting images if disk size at limit
|
cleaning_interval: 1800, // seconds interval: deleting images if disk size at limit
|
||||||
|
|||||||
@ -272,7 +272,7 @@ function get_type(helm, body) {
|
|||||||
return helm ? text + "helm" : text;
|
return helm ? text + "helm" : text;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handles creations of skin renders
|
// handles creations of 3D renders
|
||||||
// callback contains error, skin hash, image buffer
|
// callback contains error, skin hash, image buffer
|
||||||
exp.get_render = function(rid, userId, scale, helm, body, callback) {
|
exp.get_render = function(rid, userId, scale, helm, body, callback) {
|
||||||
exp.get_skin(rid, userId, function(err, skin_hash, img) {
|
exp.get_skin(rid, userId, function(err, skin_hash, img) {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "Jake0oo0",
|
"author": "Jake0oo0",
|
||||||
"description": "A Minecraft avatar service with support for avatars, 1.8 skins, and even renders!",
|
"description": "A Minecraft avatar service with support for avatars, 1.8 skins, and even 3D renders!",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
"name": "jomo"
|
"name": "jomo"
|
||||||
|
|||||||
@ -5,7 +5,7 @@ html
|
|||||||
link(rel="icon", sizes="16x16", type="image/png", href="/favicon.png")
|
link(rel="icon", sizes="16x16", type="image/png", href="/favicon.png")
|
||||||
link(href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css", rel="stylesheet")
|
link(href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css", rel="stylesheet")
|
||||||
link(rel="stylesheet", href="/stylesheets/style.css")
|
link(rel="stylesheet", href="/stylesheets/style.css")
|
||||||
meta(name="description", content="Crafatar is a blazing fast Minecraft avatar API with support for avatars, 1.8 skins, and even renders!")
|
meta(name="description", content="Crafatar is a blazing fast Minecraft avatar API with support for avatars, 1.8 skins, and even 3D renders!")
|
||||||
meta(name="keywords", content="minecraft, avatar, renders, skins, uuid, username")
|
meta(name="keywords", content="minecraft, avatar, renders, skins, uuid, username")
|
||||||
meta(name="viewport", content="initial-scale=1,maximum-scale=1")
|
meta(name="viewport", content="initial-scale=1,maximum-scale=1")
|
||||||
body
|
body
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user