jQuery/JavaScript Library for avatar creation? [closed]

╄→гoц情女王★ 提交于 2019-11-30 17:41:49

问题


Is anyone aware of a JavaScript or jQuery library that enables the creation of Pixelart avatars? I'm hoping for something with a Mr. Potatohead style face creation using components and resulting in a GIF.

If not, I guess I'll need to make one myself.


回答1:


You could try Blockies.

Its usage is pretty simple (from the README):

var icon = blockies.create({ // All options are optional
    seed: 'randstring', // seed used to generate icon data, default: random
    color: '#dfe', // to manually specify the icon color, default: random
    bgcolor: '#aaa', // choose a different background color, default: white
    size: 15, // width/height of the icon in blocks, default: 10
    scale: 3 // width/height of each block in pixels, default: 5
});

where icon is a canvas element.

You can't really plan what you're going to get, though: you just end up with a random icon unless you specify a seed to generate it from.



来源:https://stackoverflow.com/questions/3731933/jquery-javascript-library-for-avatar-creation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!