有人知道可以创建 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模板网!
如何做以下掩码输入问题?How to do following mask input problem?(如何做以下掩码输入问题?)
使用 DropKick Javascript 设置值/标签的问题Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 设置值/标签的问题)
如何对 jquery 插件中的私有方法进行单元测试?how to unit-test private methods in jquery plugins?(如何对 jquery 插件中的私有方法进行单元测试?)
stellar.js - 为垂直滚动网站配置偏移量/对齐元素stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 为垂直滚动网站配置偏移量/对齐元素?)
jQuery 屏蔽输入插件.当文本框获得焦点时选择所有jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽输入插件.当文本框获得焦点时选择所有内容)
是否可以强制 jQuery.jScrollPane 始终显示垂直滚动条Is it possible to force jQuery.jScrollPane to always show a vertical scroll-bar?(是否可以强制 jQuery.jScrollPane 始终显示垂直滚动条?)