Library for adding an Avatar Generator into your application.
https://avatar-maker.herokuapp.com/home.html
https://avatar-maker.herokuapp.com/documentation.html
-
Download the stylesheet and JavaScript for the library from here
-
Include JQuery
<script defer src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
- Link the CSS stylesheet for the library
<link rel="stylesheet" type="text/css" href="AvatarMaker.css">
- Include the JavaScript file for the library.
<script defer type="text/javascript" src="./js/AvatarMaker.js"></script>
- Create a div element in your body. Give it an id. This is where the generator will go. For example:
<div id="generator-container"></div>
- Create a new JavaScript file and include it in your HTML. Place it after you import the library. For example:
<script defer type="text/javascript" src="./js/documentation.js"></script>
- In the JavaScript file, instantiate the library and call createGenerator(). The generator should appear on the page.
const avatar = new AvatarMaker()
avatar.createGenerator("#generator-container")