BLOCKv Basics

vAtom
Ecosystem Roles
Template and Variation
Action
Face

Building vAtoms

Overview
Guidelines

Configuring Faces

Image
Image Progress
Image Policy
Image Layered
3D
Web Face

Image Progress

Overview

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).

Use Case

A potential use case is for vAtoms which "fill up" when shared, e.g. Coffee Cup vAtom.

Progress Image Face View
Fig 1. Progress Image Face View.

Registering the face

This example below shows how to register the image face onto your vAtom's template.

POST /v1/publisher/face

{
  "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
  }
}

Face Config

Configuration of this face can be achieved using the following attributes:

PropertyTypeDescription
empty_imagestringThe name of the empty image resource to display. If not specified, will fall back to BaseImage .
full_imagestringThe name of the full image resource to display. If not specified, will fall back to ActivatedImage .
directionstringThe direction in which the face view should fill, e.g. "up".
show_percentageboolBoolean value indicating whether the fill percentage show be displayed.
padding_endfloatValue to offset the end of the progress fill (measured in pixels).
padding_startfloatValue 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.

©2020 BLOCKv
Info