Product Management
The products in our AR are categorised as follows -
Category | Tracking Type | Body Part |
---|---|---|
Earrings | Face | Ear |
Necklaces | Face | Neck |
Rings | Hand | Finger |
Bracelets | Hand | Wrist |
Add Product to AR Engine
const product = {
id: '1', //sku or any unique identifier
bodyPartType: BodyPartTypes.ear, // type of body part
renderType: '2D', // rendering type
asset: {
url_2D: "image_url"
},
visualizationData: {
height: 15, // height of the earring
xOffset: 0, // offset on x axis
yOffset: -4 // offset on y axis
}
}
arEngine.addProduct(product)
Remove Product from AR Engine
const product = {
id: '1', //sku or any unique identifier
bodyPartType: BodyPartTypes.ear, // type of body part
renderType: '2D', // rendering type
asset: {
url_2D: "image_url"
},
visualizationData: {
height: 15, // height of the earring
xOffset: 0, // offset on x axis
yOffset: -4 // offset on y axis
}
}
arEngine.removeProduct(product)
Update Product from AR Engine
This is used to update the product that is already added to the AR Engine. This will not be used in most cases.
const product = {
id: '1', //sku or any unique identifier
bodyPartType: BodyPartTypes.ear, // type of body part
renderType: '2D', // rendering type
asset: {
url_2D: "image_url"
},
visualizationData: {
height: 15, // height of the earring
xOffset: 0, // offset on x axis
yOffset: -4 // offset on y axis
}
}
arEngine.update(product)