FitLive Developer Documentation

JSDoc reference

Class Fb.FitLive

Method Attributes Method Name and Description
 
Retrieve user history of tried frames
<static>  
Fb.FitLive.GetInstance(pConfig)
 
GetSnapshot(pCallback)
Request a snapshot bitmap from current user tryon
This is an asynchronous process, use the pCallback parameter to get the result bitmap
 
Safely removes fitlive instance
 
SetColor(pMeshIDS, pColor)
Set a dynamic/custom color for the specified frames mesh id list
 
SetFrame(pSkunumber)
Set frame id for try on
 
SetFramePart(pNodeID, pSkunumber)
Set part to attach to frames node
This method is useful for frames configurator projects
Nodes and parts identifiers must match predefined naming conventions
 
SetTexture(pMeshIDS, pTextureB64)
Set a dynamic/custom texture bitmap for the specified frames mesh id list

Method Detail

{Array} GetHistory()
Retrieve user history of tried frames
Returns:
{Array} List of previously tried frames (Skunumbers)

<static> {Object} Fb.FitLive.GetInstance(pConfig)
Parameters:
{JSON} pConfig
Global config used by the class and referenced classes
{JSON} pConfig.FitLive
Local config used by the class only
{String} pConfig.FitLive.container
DOM element where the product has to be
{Integer} pConfig.FitLive.height Optional, Default: 480
Height of the product
{String} pConfig.FitLive.language Optional, Default: 'en'
Application language
{String} pConfig.FitLive.css Optional
Custom CSS file
{JSON} pConfig.FitLive.messages Optional
Custom messages
{JSON} pConfig.FitLive.messages.fr Optional
Custom french messages
{String} pConfig.FitLive.messages.fr.MenuWebcamTitle Optional
Custom message for menu webcam title
{Function} pConfig.FitLive.onReady Optional
Callback function called when FitLive is ready
{Function} pConfig.FitLive.onDetect Optional
Callback function called when FitLive has detected face
{Function} pConfig.FitLive.onTryon Optional
Callback function called when FitLive is trying
{Function} pConfig.FitLive.onTracking Optional
Callback function called when FitLive is tracking
{Function} pConfig.FitLive.onTrackingLost Optional
Callback function called when FitLive looses tracking
{Function} pConfig.FitLive.onCallToActionClick Optional
Function called when callToAction element is clicked
{Integer} pConfig.FitLive.nofullscreen Optional, Default: false
Fullscreen availability
{Integer} pConfig.FitLive.nocompare Optional, Default: false
Compare mode availability
Returns:
{Object} Fb.FitLive instance

GetSnapshot(pCallback)
Request a snapshot bitmap from current user tryon
This is an asynchronous process, use the pCallback parameter to get the result bitmap
Parameters:
{Function} pCallback
async result callback

Remove()
Safely removes fitlive instance

SetColor(pMeshIDS, pColor)
Set a dynamic/custom color for the specified frames mesh id list
Parameters:
{Array} pMeshIDS
list of mesh ids (eg. [Branch_L,Branch_R,...])
{String} pColor
color value

SetFrame(pSkunumber)
Set frame id for try on
Parameters:
{String} pSkunumber
frame sku identifier

SetFramePart(pNodeID, pSkunumber)
Set part to attach to frames node
This method is useful for frames configurator projects
Nodes and parts identifiers must match predefined naming conventions
Parameters:
{String} pNodeID
frames node identifier (eg. LeftBranch_node_1...)
{String} pSkunumber
part sku identifier

SetTexture(pMeshIDS, pTextureB64)
Set a dynamic/custom texture bitmap for the specified frames mesh id list
Parameters:
{Array} pMeshIDS
list of mesh ids (eg. [Branch_L,Branch_R,...])
{String} pTextureB64
base64 encoded jpg/png bitmap