Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit5597fb7c06

README.md

defaultAvatars

The platform's default avatars: the set a person chooses their avatar from on the app menu's Outfits tab, and the one a person wears in place of the library's humanoid (the development avatar) while their account keeps no look of its own.

local defaultAvatars = require("@builtin::modules.defaultAvatars")

for _, e in defaultAvatars.list() do
    print(e.name, e.style, e.author, e.licence, e.triangles)
end
local doc = defaultAvatars.document("vita")       -- { v = 1, avatar = <guid> }
print(defaultAvatars.default().name)               -- what a new person wears
print(defaultAvatars.find(doc.avatar).name)        -- "Vita"

Each entry is { id, name, avatar, style, picture, author, licence, licenceUrl, credit?, source, triangles }:

fieldwhat
avatarthe avatar's guid; an outfit document wears it by this guid in every world (avatarAppearance.publishedAvatar mounts it from the world that published it)
styleanime, stylised, creature, robot or lowPoly (defaultAvatars.styles)
picturethe guid of the picture the chooser shows, a texture asset published in defaultAvatars.world; defaultAvatars.picture(id) mounts it from there and answers the texture to draw (nil and "pending" while the mount fills)
author, licence, licenceUrl, creditwho made it, the licence that lets the platform give it to every person, and the credit line its author states
sourcewhere it comes from
trianglesits triangles over every mesh of the body

avatarAppearance.accountAppearance answers from = "default" with defaultAvatars.default() worn as its author made it when a person's account keeps no outfit and no profile descriptor. Their body wears it where it stands as the library's humanoid (avatarAppearance.DEVELOPMENT_AVATAR); a world that chose its own play avatar keeps it. An agent account with neither wears none.

Every avatar of the set, and its picture, is published in the world defaultAvatars.world.