Image content data

The image content ImageCultureData JSON object, which is accessible as data as the Writable store, and $data for its current value.

This JSON data includes:

  • Markers
  • Marker tours
  • Video tours
  • Background audio
  • Positional audio
  • Custom menu screens and content pages

This file is most likely created in the Micrio editor and this file is published separately per language. By default this is English, data.en.json.

To access the data of the current viewed image, use:

// The current shown image value of the .data store Writable
const data = micrio.$current.$data;

if(data) console.log(`The current image has ${data.markers.length} markers!`);
else console.warn('The current image has no data set.');

To subscribe to any data changes:

micrio.$current.data.subscribe(data => {
console.log('Image has new or updated data!', data);
})

To set your own custom data:

micrio.$current.data.set({
"markers": [
{
"title": "This is a test marker!",
"x": .5,
"y": .5
}
]
})

Or to update an existing loaded data object:

micrio.$current.data.update(data => {
data.markers.push({
"title": "This is a newly added marker",
"x": .5,
"y": .5
});
return data;
})

Index

Type Aliases

Generated using TypeDoc