- Remove extra class names from some SVG elements, as they were not doing anything and had the potential to conflict with other class names (such as "outline" from Tailwind).
- Remove extra files from build.
- Got rid of CommonJS build and switched to ESM only, since Node 20+ can require(ESM).
- Get rid of
generateRelativeexport and instead just have arelativeoption on the normalgeneratefunction.
- Don't override jersey/teamColors when making relatives, it just produces weird results.
- Fix issue with some bundlers.
-
#58 - New
generateRelativefunction to generate a face that is similar to an exisiting face, like a sibling/parent/child. -
#57 - faces.js recognizes if it has been opened from a ZenGM game, and in that case it displays a "Save" button in the bottom right corner that sends face data back to the page that opened it. (Other apps can use the same mechanism if they want, there's nothing specific to ZenGM in the code here.)
-
The
FaceReact component should now be imported as:// New correct way import { Face } from "facesjs/react";
Rather than the way it was imported in version 4.2.0:
// Old wrong way import { Face } from "facesjs";
The reason is because version 4.2.0 broke importing other facesjs exports in some non-React projects.
- #47 - Restore the "shave" facial feature option to the editor, which was accidentally removed in v4.1.0.
-
Added a
FaceReact component for easier integration with React. -
Renamed the
Facetype toFaceConfig.
- Fixed the CommonJS build.
- #35 - @tomkennedy22 rewrote the editor UI and added a ton of functionality. The main new features are a gallery of faces showing previews of all features you can select, and the ability to export a face in SVG or PNG format.
-
Added
faceToSvgStringfunction to output faces as SVG strings, rather than only rendering to the DOM viadisplay. -
Added CLI for generating faces and outputting them as SVG strings.
- Fixed the esm build.
- Added back the "messy" and "messy-short" hairstyles which were accidentally deleted in v3.8.0.
- Added a
genderoption to generate female faces, likeconst face = faces.generate(null, { gender: "female" });
- Restore rate of accessories (such as headbands) being present.
- Tweak baseball jersey/hat colors
- Tweak baseball jersey/hat colors
- Tweak baseball jersey/hat colors
- Added baseball jerseys and hats from PR #2 - thank you @TravisJB89
- Added new football jersey style from PR #20 - thank you @tomkennedy22
-
Added ability to select which facial features to randomize in the editor UI - thank you @gtabot
-
Improved Asian skin tones - thank you /u/Duradello from Reddt
- Added some additional jersey options for football and basketball - thank you @TravisJB89
- Fixed bug where faces generated with v1 and displayed in the current version resulted in an error.
- Added a hockey jersey and several new hair styles, head shapes, and body shapes - thank you @TravisJB89
-
Added 100+ new facial features - thank you @TravisJB89 and @domini7
-
Added a new option "race" to generate a face with skin color corresponding to one of these four categories: asian, black, brown, white. Thank you @icedjuro
- Added several new hair styles - thank you @TravisJB89