After creating a Template, a publisher will register one or more Faces for that Template. Faces allow publishers on the BLOCKv platform to easily customize the way their vAtoms are visually displayed to the user. As an example, most vAtoms include a Face that instructs the BLOCKv mobile/web apps to display an icon for that vAtom.
Faces can either be implemented via native platform code, or via a cross-platform HTML/CSS/JS mobile web app. A vAtom can also have specific VR Faces that activate while displayed in VR viewer applications, while others might leverage the sensor/actuator plane of IoT-devices.
There are two types of Faces on the BLOCKv platform:
This is an example of creating a face for the icon
view mode, using a native face view (native://image) which should display the resource named "ActivatedImage". The face targets all platforms.
{
"template": "publisher_fqdn::v1::Template-Name",
"display_url": "native://image",
"package_url": ".",
"constraints": {
"bluetooth_le": false,
"contact_list": false,
"gps": false,
"view_mode": "icon",
"platform": "generic",
"three_d": false,
"quality": "high"
},
"config": {
"image": "ActivatedImage"
}
}
To create a web face, pass the HTTPS URL to your web app in the display_url
field. See the Configuring Faces section for details on the supported native faces.
View modes determine where a face is used. The available view modes are:
icon
: Icon faces are displayed in the user's inventory. (Only Native Faces can run in this view mode, Web Faces are not supported).engaged
: Engaged faces are displayed when the user selects a vAtom, making it prominent in the app, usually zooming it in on the screen. If no engaged face is registered on the vAtom, the Icon face will be used instead.card
: The Card face is an optional face which provides more details and interactive features to the user. When a user engages a vAtom, the card can be pulled out by the user.fullscreen
: If available, the Fullscreen face is displayed over the entire screen when the user presses the fullscreen button on a vAtom.