Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
TheAvatarBookmarks
API provides facilities for working with avatar bookmarks ("favorites" in the Avatar app).
An avatar bookmark associates a name with an avatar model, scale, and avatar entities (wearables).Methods
Name | Return Value | Summary |
---|---|---|
addBookmark
|
None |
Adds a new (or updates an existing) avatar bookmark with your current avatar model, scale, and avatar entities. |
deleteBookmark
|
None |
Performs no action. Deprecated: This function is deprecated and will be removed. |
getBookmark
|
AvatarBookmarks.BookmarkData | Object |
Gets the details of an avatar bookmark. |
getBookmarks
|
Object.<string, AvatarBookmarks.BookmarkData> |
Gets the details of all avatar bookmarks. |
loadBookmark
|
None |
Loads an avatar bookmark, setting your avatar model, scale, and avatar entities to those in the bookmark. |
removeBookmark
|
None |
Deletes an avatar bookmark. |
saveBookmark
|
None |
Updates an existing bookmark with your current avatar model, scale, and wearables. No action is taken if the bookmark doesn't exist. |
updateAvatarEntities
|
None |
Updates the avatar entities and their properties. Current avatar entities not included in the list provided are deleted. Deprecated: This function is deprecated and will be removed. Use the MyAvatar API instead. |
Signals
Name | Summary |
---|---|
bookmarkAdded
|
Triggered when a new avatar bookmark is added or an existing avatar bookmark is updated, using addBookmark. |
bookmarkDeleted
|
Triggered when an avatar bookmark is deleted. |
bookmarkLoaded
|
Triggered when an avatar bookmark is loaded, setting your avatar model, scale, and avatar entities to those in the bookmark. |
Type Definitions
BookmarkData Type: object |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Details of an avatar bookmark. Properties
|
Method Details
(static) addBookmark( bookmarkName ) | ||||||
---|---|---|---|---|---|---|
Adds a new (or updates an existing) avatar bookmark with your current avatar model, scale, and avatar entities. Parameters
Example
|
(static) deleteBookmark( ) |
---|
Performs no action. Deprecated: This function is deprecated and will be removed. |
(static) getBookmark( bookmarkName ) → {AvatarBookmarks.BookmarkData|Object}
Returns: The bookmark data if the bookmark exists, {} if it doesn't.
|
||||||
---|---|---|---|---|---|---|
Gets the details of an avatar bookmark. Parameters
|
(static) getBookmarks( ) → {Object.<string, AvatarBookmarks.BookmarkData>}
Returns: The current avatar bookmarks in an object where the keys are the bookmark names and the values are the bookmark details. |
---|
Gets the details of all avatar bookmarks. Example
|
(static) loadBookmark( bookmarkName ) | ||||||
---|---|---|---|---|---|---|
Loads an avatar bookmark, setting your avatar model, scale, and avatar entities to those in the bookmark. Parameters
|
(static) removeBookmark( bookmarkName ) | ||||||
---|---|---|---|---|---|---|
Deletes an avatar bookmark. Parameters
|
(static) saveBookmark( bookmarkName ) | ||||||
---|---|---|---|---|---|---|
Updates an existing bookmark with your current avatar model, scale, and wearables. No action is taken if the bookmark doesn't exist. Parameters
|
(static) updateAvatarEntities( avatarEntities ) | ||||||
---|---|---|---|---|---|---|
Updates the avatar entities and their properties. Current avatar entities not included in the list provided are deleted. Deprecated: This function is deprecated and will be removed. Use the MyAvatar API instead. Parameters
|
Signal Details
bookmarkAdded(
bookmarkName
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when a new avatar bookmark is added or an existing avatar bookmark is updated, using addBookmark. Parameters
|
bookmarkDeleted(
bookmarkName
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when an avatar bookmark is deleted. Parameters
Example
|
bookmarkLoaded(
bookmarkName
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when an avatar bookmark is loaded, setting your avatar model, scale, and avatar entities to those in the bookmark. Parameters
|