Giter Site home page Giter Site logo

jsouzaso / minecraft-avatar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamiebicknell/minecraft-avatar

0.0 2.0 0.0 480 KB

PHP script (using GD) to generate avatar or skin from a Minecraft username

Home Page: http://www.jamiebicknell.com/16-Sep-2013/Minecraft-Skin-Preview-via-PHP

License: MIT License

ApacheConf 2.91% PHP 97.09%

minecraft-avatar's Introduction

Minecraft Avatar

PHP/GD creation of a Minecraft facial avatar or full skin preview based on a given username, constructed from their Minecraft skin.

If username is not found, then it uses the default Steve skin: http://assets.mojang.com/SkinTemplates/steve.png

Facial Avatar

Steve Avatar Alex Avatar

<img src='face.php?u={username}&s={size}&v={view}' />

Query Parameters

Key Example Value Default Description
u jamiebicknell steve Username of Minecraft player
s 8 - 250 48 Desired avatar width and height
v f, l, r, b
front, left, right, back
front View of facial avatar (optional)

Skin Preview

Steve Skin

Alex Skin

<img src='skin.php?u={username}&s={size}' />

Query Parameters

Key Example Value Default Description
u jamiebicknell steve Username of Minecraft player
s 40 - 800 250 Desired skin preview width

.Htaccess

If you have mod_rewrite enabled you can view the avatar via cleaner URLs.

Facial Avatar

<img src='http://domain.com/avatar/{username}' />
<img src='http://domain.com/avatar/{username}/{size}' />
<img src='http://domain.com/avatar/{username}/{view}' />
<img src='http://domain.com/avatar/{username}/{size}/{view}' />

Skin Preview

<img src='http://domain.com/skin/{username}' />
<img src='http://domain.com/skin/{username}/{size}' />

Notes

  • After changing your skin on Minecraft.net it can take up to 1 hour for the facial avatar or skin preview to show the new skin.
  • The skin preview differenciates between the Steve (4 pixel arm width) and Alex skin (3 pixel arm width) by checking the alpha value on the pixel at 54, 20. Therefore, the preview assumes that the skin is well formed and that the unallocated areas are transparent.
  • Default skins: Steve and Alex
  • Skin templates: Steve and Alex

License

Minecraft Avatar is licensed under the MIT license, see LICENSE.md for details.

minecraft-avatar's People

Contributors

jamiebicknell avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.