The avatar block
A customer's avatar on a store page, in 2D or 3D, and what the 3D view needs from your store.
Shows a logged-in customer their own avatar: the full-body character they dress from the wearables they have earned.
The same avatar appears beside the profile card. Use this block when you want the avatar on its own, larger, with a download button.
What customers see
| View | What it is |
|---|---|
| 3D | The avatar standing in a lit scene. The customer can turn it by dragging and zoom with the wheel or a pinch. |
| 2D | The same avatar as a flat picture |
In the 3D view, a Reset camera button appears once they have moved it, and a Download button saves a picture of the avatar's upper body.
Visitors who are not logged in see a prompt to sign in. Nothing about any avatar is read for a visitor.
Customers do not dress their avatar in the store yet. They change it on your community's site, and the store shows the saved result. An editor block follows in a later release.
Settings
| Setting | Default | What it does |
|---|---|---|
| Heading | My avatar | The title above the avatar. Leave it empty for none. |
| View | 2D | 2D or 3D |
| Show Download | On | The download button under the 3D avatar |
| Accent color | Empty | For this block only |
| Corner radius | 8 px | For this block only |
What the 3D view costs
The 3D view is a real 3D engine, and it is the one heavy thing in the whole set of blocks: about half a megabyte to download, against a few kilobytes for everything else.
It is loaded with care:
- Only for a logged-in customer
- Only when the view is set to 3D
- Only when the avatar is about to scroll into view
- Once per page, however many avatars are on it
A page with the view on 2D never downloads it. If a page feels heavy, that is the setting to change.
When 3D does not show
The block never shows a broken scene. Whenever 3D cannot work, the customer sees the 2D avatar and the theme editor shows a note saying why.
| Reason | What to do |
|---|---|
| The customer's browser has no 3D graphics support | Nothing. 2D is the right result. |
| One of their items has no 3D model yet | Nothing. It resolves when the model is published. |
| Your store blocks a file the scene needs | Allow the hosts below |
Files from outside your store
The 3D scene loads three kinds of file from other hosts.
| File | Host |
|---|---|
| The lighting for the scene | cdn.jsdelivr.net |
| The decoder for compressed models | www.gstatic.com |
| The avatar's models | Your community's media host |
A store with no Content Security Policy needs to do nothing. If your theme or another app sets one, those hosts have to be allowed, or the scene falls back to 2D on every page.
To check, set the view to 3D on a development store, open the page logged in as a customer with an avatar, and look at the browser's console. A blocked host shows there as an error naming it.
For customers who prefer less motion
A customer whose device asks for reduced motion gets no floating particles and no fade between the 2D picture and the 3D scene. The avatar still stands in its idle pose.
Troubleshooting
| What you see | Cause |
|---|---|
| The block shows nothing | Sign-in is off, your community has avatars off, or the avatar could not be read. The theme editor says which. |
| "Sign in to see your avatar" after logging in | Customer accounts are off, or the store is not connected to your community |
| A flat avatar with the view on 3D | See the table above |
| No Download button | Show Download is off, or the block is in 2D |