Faces.js,一个用于生成基于矢量的卡通面孔的 JavaScript 库
Faces.js, a JavaScript library for generating vector-based cartoon faces

原始链接: https://zengm.com/facesjs/

Faces.js 是一个简单的 JavaScript 库,允许用户创建和修改卡通面孔。 它利用可扩展矢量图形 (SVG) 技术。 用户可以使用 npm 或 Yarn 包管理器导入此库,并通过给定的 id(“#my-div-id”)在 HTML 元素中展示随机生成的面孔。 该 id 容器的大小会影响显示面的比例。 对于那些对自定义现有功能或添加新功能感兴趣的人,请随时通过在 GitHub 上分叉其存储库来做出贡献。 文档、附加选项、SVG 导出和命令行界面详细信息可以在项目的自述文件中找到。

彼得·瓦茨(Peter Watts)的小说《盲视》(Blindsight)在萨拉斯蒂船长使用切尔诺夫面孔的场景中出现了这些面孔。 这些面部表情工具因其在复杂面部动画和模型定制方面的多功能性而已成为 3D 建模的标准。 虽然对 Extism 不熟悉,但创建者建议重点关注通过清晰的文档、可访问的检查和透明度来建立信任来确保其安全性。 一个有趣的想法涉及通过输入数字种子值来生成独特的面部表情,这可以在不同平台上产生不同的结果,而无需存储整个面部对象。 早期的实验产生了 Minecraft 头像,具有通过数字序列生成的各种面部形态。 然而,将这些详细图像压缩成更小的字符串仍然是一个挑战。 整个对话涉及围绕不可替代代币(NFT)、加密货币以及与所有权、利润和原创性相关的道德问题的争论。
相关文章

原文
faces.js - A JavaScript library for generating vector-based cartoon faces

A JavaScript library for generating vector-based cartoon faces

To load new random faces, click here or press "r" on your keyboard.

faces.js is a JavaScript library that generates and displays cartoon faces, somewhat reminiscent of how the Nintendo Wii generates random Miis. Faces are drawn as scalable vector graphics (SVG). Each face can also be represented by a small JavaScript object, which allows you to store that object and then draw the same face again later.

As you can probably tell, the number of options for each facial feature (eyes, nose, mouth, etc.) is fairly limited, and some of the current options are fairly crude. So fork it on GitHub and add some new options!

Usage

1. Install from npm:

$ npm install --save facesjs

Or yarn:

$ yarn add facesjs

2. Display a randomly-generated face (the size of the #my-div-id div determines the size of the displayed face):

import { display, generate } from "facesjs";

// Generate a random face
const face = generate();

// Display in a div with id "my-div-id"
display("my-div-id", face);

More

See all the available facial features in the faces.js editor.

For more documentation and information (additional options, SVG export, CLI), see the README on GitHub.

Fork me on GitHub
联系我们 contact @ memedata.com