news.volyx.in

Faces.js, a JavaScript library for generating vector-based cartoon faces (zengm.com)

493 points by starkparker · 861 days ago · 95 comments on HN

Article summary

Faces.js is a JavaScript library that generates and displays cartoon faces as SVGs. The library allows users to create custom faces, export them in JSON, SVG, or PNG format, and use them in various applications. The faces are generated based on a set of parameters, including skin color, hair style, and facial features. The library also includes a face editor and a React component for easy integration.

Main themes

  • JavaScript library
  • Cartoon face generation
  • SVG graphics
  • Customization options
  • React integration
  • Procedural generation

What commenters say

  • The library's API could be improved by returning a root element instead of requiring a DOM element or ID.
  • The current API is sufficient and has been stable since 2015, with the ability to pass a DOM element as an argument.
  • The library's art style is not appealing to everyone, but the idea behind it is interesting and has potential applications.
  • A seed value API would be useful for generating faces that can be persisted across page loads and devices without storing the entire face object.
  • The library's ability to generate a wide range of facial morphologies makes it a useful tool for various applications, including games and animations.
  • The concept of procedural generation of faces and characters has been explored in other fields, such as 3D modeling and animation.
  • Some users would like to see more customization options, such as the ability to edit individual facial features, while others appreciate the simplicity of the current implementation.
  • The library's potential applications extend beyond games and animations, and could be used in areas such as SRE dashboards and educational tools.