Skip to main content
Important!

Versions below v0.5.0 will be not supported starting Jan 1, 2024.

v0.7.0 (latest)

Added methods

  • setActiveAnimation
  • getActiveAnimation
  • getAnimationList
  • setEyewearColor
  • getEyewearColor

More specific type added to argument of setHairColor.

v0.6.0

Added methods

  • setSkinToneCorrection
  • getSkinToneCorrection
  • setBodyProportions
  • getBodyProportions

Methods getParam, setParam replaced with getHairColor, setHairColor.

v0.5.1

  • Improved documentation

v0.5.0

This is a major SDK update that improves stability and fixes issues with rare SDK initialization issues that happen because of unexpected loading order for server-side and client-side SDK. SDK now more correctly reports its version to Avaturn, which allows us to cover multiple SDK versions with tests and introduce breaking changes without actually breaking previous versions. It also changes some of the naming conventions we used before to be more developer-friendly.

Updates

  • Now you can set default assets for newly opened avatars.
sdk.init(containerRef, {
... // other params
defaultAssets: {
overrideSaved: false,
assets: ['asset_id1', 'asset_id2'],
},
})

Breaking changes

  • With introduction of asset management system we have to change the id's of the assets from human-readable to backend-friendly UUIDs.

    Affected methods:

    • setActiveAsset: now it expects UUID as input
    • getActiveAssets now returns { id: string; ... } where id is a new UUID. We plan to revise aliases for our own assets and make them available within this method as well. To convert your existing ids to new ids please use the following dictionary: LINK.
  • Changed ids for the bodies. Previously: model_T_${i} now: body_${i}. Affected methods:

    • getBodyList
    • setActiveBody
  • Changed names for categories. Affected methods:

    • getActiveAssets now returns { category: 'eyewear' | 'hairAndHeadwear' | 'clothing' | 'footwear'; ...}
  • Added bodyId and gender to ExportAvatarResult.

    export type ExportAvatarResult = {
    url: string,
    urlType: 'httpURL' | 'dataURL',
    avatarId: string,
    sessionId: string,
    avatarSupportsFaceAnimations: boolean,
    bodyId: string,
    gender: Gender,
    };
  • setAvailableAssets now takes as input list of IDs instead of a callback.

  • setAvailableAssetsList renamed to setAvailableAssets

  • UrlType is now inlined as httpURL | dataURL

  • getAvatarInfo renamed to getBodyInfo. Its return type is {id: string}.