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'],
},
})
- New SDK API documentation hosted at sdk-docs.avaturn.me.
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 inputgetActiveAssets
now returns{ id: string; ... }
whereid
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
andgender
toExportAvatarResult
.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 tosetAvailableAssets
-
UrlType
is now inlined ashttpURL | dataURL
-
getAvatarInfo
renamed togetBodyInfo
. Its return type is{id: string}
.