Builtin Library
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 }:
| field | what |
|---|---|
avatar | the avatar's guid; an outfit document wears it by this guid in every world (avatarAppearance.publishedAvatar mounts it from the world that published it) |
style | anime, stylised, creature, robot or lowPoly (defaultAvatars.styles) |
picture | the 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, credit | who made it, the licence that lets the platform give it to every person, and the credit line its author states |
source | where it comes from |
triangles | its 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.