本文介紹了用于創建頭像的 jQuery/JavaScript 庫?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
有人知道可以創建 Pixelart 頭像的 JavaScript 或 jQuery 庫嗎?我希望使用組件創建具有 Mr. Potatohead 風格的面孔并生成 GIF.
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.
推薦答案
你可以試試Blockies.
它的使用非常簡單(來自 README):
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
});
其中 icon
是一個畫布元素.
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.
這篇關于用于創建頭像的 jQuery/JavaScript 庫?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!