Detailed Description: |
Starting with Layar API v8.3, you can specify links between reference images, so that when the Layar app tracks any of these reference images, it knows how it relates to the rest of the scene and therefore how to render the objects in the scene. You can use this feature for two purposes: - Make it easier for the app to track your reference images at various zoom ranges. If you have a very big page with a lot of content (e.g. the page of broad spread newspaper with a lot of columns and images), you can upload the entire page but also smaller slices of the page. You anchor your objects on the entire page (i.e. use the entire page as the hotspots.anchor.referenceImage key); but your also include the smaller slices, specifying how they relate to the entire page by applying a 'transform.translate'. Now, when the user points the camera closer to the page, the Layar app will find it easier to track the smaller slice and still render the augments correctly. - Attach augments to a 3D object that consists of multiple planar surfaces, e.g. a box. You upload each side of the box separately and anchor the augments to whichever side is most convenient to you. By specifying how each side relates to the anchor image, the Layar app gets a full 3D view of the reference images and will be able to render the augment regardless of which side of the box is facing the camera. In order to specify additional linked reference images, just add a referenceImages array at the top level of the getPOI response, next to the hotspots array. The array has the following format: <add image here> <add table explaining the various parameters here> |
Example: |
{
"hotspots": [
{
"id": "4934350",
"anchor": {
"referenceImage": "test1"
},
"object": {
"contentType": "image/png",
"url": "http: //server.com/someimage.png",
"size": 1
}
},
{
"id": "431590235",
"anchor": {
"referenceImage": "test1_a"
},
"object": {
"contentType": "image/png",
"url": "http: //server.com/someotherimage.png",
"size": 0.5
}
}
],
"referenceImages": [
{
"key": "jenstest1",
"featuresUrl": "http: //url_to_features"
},
{
"key": "test1_b",
"featuresUrl": "http: //url_to_features",
"links": [
{
"to": "test1",
"transform": {
"translate": {
"x": 1,
"y": 2,
"z": 3
}
}
}
]
}
]
} |