Returns all assets owned by User when an email address is provided.
Returns all platform assets.
Returns the platform assets or an error response.
Add a new avatar
const animationMeta = {
"emote": { "loop": false, "x": 0, "y": 0, "hideLoop": true }
}
const spriteSheetJSON = {
"animations": {
"emote": [
"emote/1.png"
]
},
"frames": {
"emote/1.png": {
"frame": {
"x": 1911,
"y": 778,
"w": 58,
"h": 91
},
"rotated": true,
"trimmed": true,
"spriteSourceSize": {
"x": 50,
"y": 33,
"w": 58,
"h": 91
},
"sourceSize": {
"w": 159,
"h": 159
}
}
},
"spriteSheetTypeMeta": {
"nameplate": {
"x": 0,
"y": -70
}
},
"meta": {
"image": "spriteSheets%2FTvHNjgoMkiErDNSrVqHU%2FspriteSheet.png?alt=media",
"format": "RGBA8888",
"size": {
"w": 2006,
"h": 1099
},
"scale": "1"
}
}
const formData = new FormData();
formData.append('animationMeta', animationMeta);
formData.append('name', "ExampleAvatarName");
formData.append('spriteSheetJSON', spriteSheetJSON);
formData.append('expression_dance', expression_dance);
formData.append('expression_emote', expression_emote);
formData.append('expression_sit', expression_sit);
formData.append('expression_stand', expression_stand);
formData.append('expression_transport', expression_transport);
formData.append('preview', preview);
formData.append('spriteSheet', spriteSheet);
formData.append('unityPackage', unityPackage);
await user.uploadAvatarFiles("exampleAvatarId", formData);
Update avatar and sprite sheet records and upload files to existing sprite sheet and avatar storage buckets
Returns all avatars owned by User
Returns the avatars or an error.
Update avatar and sprite sheet records and upload files to existing sprite sheet and avatar storage buckets
const animationMeta = {
"emote": { "loop": false, "x": 0, "y": 0, "hideLoop": true }
}
const spriteSheetJSON = {
"animations": {
"emote": [
"emote/1.png"
]
},
"frames": {
"emote/1.png": {
"frame": {
"x": 1911,
"y": 778,
"w": 58,
"h": 91
},
"rotated": true,
"trimmed": true,
"spriteSourceSize": {
"x": 50,
"y": 33,
"w": 58,
"h": 91
},
"sourceSize": {
"w": 159,
"h": 159
}
}
},
"spriteSheetTypeMeta": {
"nameplate": {
"x": 0,
"y": -70
}
},
"meta": {
"image": "spriteSheets%2FTvHNjgoMkiErDNSrVqHU%2FspriteSheet.png?alt=media",
"format": "RGBA8888",
"size": {
"w": 2006,
"h": 1099
},
"scale": "1"
}
}
const formData = new FormData();
formData.append('animationMeta', animationMeta);
formData.append('name', "ExampleAvatarName");
formData.append('spriteSheetJSON', spriteSheetJSON);
formData.append('expression_dance', expression_dance);
formData.append('expression_emote', expression_emote);
formData.append('expression_sit', expression_sit);
formData.append('expression_stand', expression_stand);
formData.append('expression_transport', expression_transport);
formData.append('preview', preview);
formData.append('spriteSheet', spriteSheet);
formData.append('unityPackage', unityPackage);
await user.uploadAvatarFiles("exampleAvatarId", formData);
Retrieves the data object for a visitor.
Optional
appPublicKey: stringOptional
appJWT: stringOptional
sharedAppPublicKey: stringOptional
sharedAppJWT: stringReturns the data object or an error response.
Increments a specific value in the data object for a visitor by the amount specified. Must have valid interactive credentials from a visitor in the world.
Sets the data object for a visitor.
Updates the data object for a visitor.
Retrieves ids of all dropped assets in all worlds with a matching interactivePublicKey.
Returns the urlSlugs
of worlds where the Public Key is found or an error response.
Get expressions
Returns an array of expressions or an error response.
Grant expression to a visitor by id or name.
Returns { success: true }
if the expression was granted successfully or an error response.
Optional
dataReadonly
idOptional
jwtOptional
profileOptional
profileOptional
userGet a single visitor from a world
Returns details for a visitor in a world by id and urlSlug
Display a message via a toast to a visitor currently in a world.
Returns { success: true }
or an error.
Teleport or walk a visitor currently in a world to a single set of coordinates.
Returns { success: true }
if the visitor was moved successfully.
Send an email
Returns { success: true }
if the email is sent successfully or an error response.
Setup signal to visitor
Mute and turn video off for a visitor currently in a world.
Returns { success: true }
or an error.
Update analytics for a given public key. Must have valid interactive credentials from a visitor in the world.
Optional
analytics: AnalyticType[]Get all particles available
Returns an array of particles or an error response.
Trigger a particle effect on a visitor
Returns { success: true }
or a message if no particleId is found.
Returns all scenes owned by User.
Retrieves all worlds a user with matching API Key is an admin in, creates a new World object for each, and creates new map of Worlds accessible via user.adminWorlds.
Retrieves all worlds owned by user with matching API Key, creates a new World object for each, and creates new map of Worlds accessible via user.worlds.
{ urlSlug: new World({ apiKey, worldArgs, urlSlug }) }
Close an iframe for a visitor currently in a world.
Returns { success: true }
or an error.
Open an iframe in a drawer or modal for a visitor currently in a world.
Returns { success: true }
or an error.
Reload an iframe for a visitor currently in a world.
Returns { success: true }
or an error.
Create an instance of Visitor class with a given id and optional attributes and session credentials.
Example