Quickstart
Load your personal Ready Player Me avatar in your React project in less than 5 minutes.
Before you begin
Sign in to Studio (Developer Dashboard) and copy your subdomain. This will allow you to create and load an avatar in your domain at a later step.
You can explore the implemented package on Codesandbox
1. Install the react-avatar-creator package
Ready Player Me - React Avatar Creator is available as an npm package. Run the following command in the root of your React project.
2. Configure the AvatarCreator
AvatarCreator
component can take an editorConfig parameter, which helps you with this. The component uses an iframe to render the underlying Avatar Creator, and passes these parameters in the URL.
bodyType
"halfbody" | "fullbody"
Instead of select page, starts with given option.
clearCache
boolean
If disabled previous avatar will not be loaded.
3. Receive the Avatar URL from AvatarCreator
After installing the npm package into your project, you can import the AvatarCreator
Component and pass your subdomain as a parameter to load the Ready Player Me in your React project. You should also add an onAvatarExported callback to the component to receive the avatar's URL when exported.
If you want to sign up later, you can use demo as subdomain parameter.
4. Install Visage package to render your avatar
Ready Player Me Visage package enables you to render your avatar in the browser. This package is available as an npm package.
You can explore the react avatar creator with visage on Codesandbox
Run the following command at the root of your React project.
5. Display your avatar
Using the code snippet below, you can display your avatar.
Visage offers a range of different rendering options that allow you to customize your avatar's visuals in lots of different ways. You can experiment with these rendering options here: https://readyplayerme.github.io/visage/?path=/story/components-avatar--showcase
Last updated