Versions below v0.5.0 will be not supported starting Jan 1, 2024.
v0.7.0 (latest)
Added methods
setActiveAnimationgetActiveAnimationgetAnimationListsetEyewearColorgetEyewearColor
More specific type added to argument of setHairColor.
v0.6.0
Added methods
setSkinToneCorrectiongetSkinToneCorrectionsetBodyProportionsgetBodyProportions
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 inputgetActiveAssetsnow returns{ id: string; ... }whereidis 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:getBodyListsetActiveBody
-
Changed names for categories. Affected methods:
getActiveAssetsnow returns{ category: 'eyewear' | 'hairAndHeadwear' | 'clothing' | 'footwear'; ...}
-
Added
bodyIdandgendertoExportAvatarResult.export type ExportAvatarResult = {
url: string,
urlType: 'httpURL' | 'dataURL',
avatarId: string,
sessionId: string,
avatarSupportsFaceAnimations: boolean,
bodyId: string,
gender: Gender,
}; -
setAvailableAssetsnow takes as input list of IDs instead of a callback. -
setAvailableAssetsListrenamed tosetAvailableAssets -
UrlTypeis now inlined ashttpURL | dataURL -
getAvatarInforenamed togetBodyInfo. Its return type is{id: string}.