getInlineAvatarPath

Returns the path to the avatar view, to embed in a page template It accepts opts, an object describing character options, such as the pose, type or index, and it accepts character, a key in the opts that describes the character customisations.

It uses avatarPickParams() to construct an array with the avatar params required in the URL and can be overriden in the product.

In the pug template

- const opts = { pose: 'example', index: 0, type: 'child', side: 'right', } - const character = helpers.getCharacters()[index] object.right( data-muse-action="flatten" data=helpers.getInlineAvatarPath(opts, character) type="text/html" )

This could produce an URL like http://localhost:3000/preview/avatar?gender=boy&skintone=tone-1&hairtype=hair-1&haircolour=haircolour-1&pose=example&index=0&type=child&side=right