Visualizes a vAtom's cloning score.
This face view provides a great way to incentivize the sharing vAtoms as the user sees a change each time the user shares the vAtom. For example, a "Coffee Cup" vAtom (see Fig 1) could fill by some amount each time it is shared. This adds to the viral potential of the vAtom.
The progress image face view visualizes a vAtom's cloning score visually by using two overlapping images. The base image represents the "empty" state and the full image represents the "complete" state. The percentage of the full image shown is a function of the cloning score. The range of the image affected by the cloning score may be adjusted using the padding start and end offsets (see face config).
A potential use case is for vAtoms which "fill up" when shared, e.g. Coffee Cup vAtom.
This example below shows how to register the image face onto your vAtom's template.
{
"template": "MyTemplateName",
"display_url": "native://progress-image-overlay",
"package_url": ".",
"constraints": {
"bluetooth_le": false,
"contact_list": false,
"gps": false,
"three_d": true,
"view_mode": "icon",
"platform": "generic",
"quality": "high"
},
"config": {
"empty_image": "BaseImage",
"full_image": "FilledImage",
"direction": "up",
"padding_end": 82,
"padding_start": 3,
"show_percentage": false
}
}
Configuration of this face can be achieved using the following attributes:
Property | Type | Description |
---|---|---|
empty_image | string | The name of the empty image resource to display. If not specified, will fall back to
BaseImage
. |
full_image | string | The name of the full image resource to display. If not specified, will fall back to
ActivatedImage
. |
direction | string | The direction in which the face view should fill, e.g. "up". |
show_percentage | bool | Boolean value indicating whether the fill percentage show be displayed. |
padding_end | float | Value to offset the end of the progress fill (measured in pixels). |
padding_start | float | Value to offset the start of the progress fill (measured in pixels). |
By default, the config section on the face model is used to configure the face view. If the face config is not present, the configuration may fallback on the vAtom's private section (in order to support older vAtoms). Note however this fallback mechanism will soon be depreciated.