{"id":1162,"date":"2024-01-23T23:33:19","date_gmt":"2024-01-23T22:33:19","guid":{"rendered":"https:\/\/osiris.itabc.cnr.it\/aton\/?page_id=1162"},"modified":"2025-09-28T20:34:12","modified_gmt":"2025-09-28T18:34:12","slug":"flares","status":"publish","type":"page","link":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/","title":{"rendered":"Flares"},"content":{"rendered":"\n<p><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-1189\" style=\"width: 150px;\" src=\"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png\" alt=\"\" srcset=\"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png 512w, https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares-300x300.png 300w, https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares-150x150.png 150w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/>Flares are basically <em>plugins <\/em>for ATON. Check out the <a href=\"https:\/\/aton.ispc.cnr.it\/apidoc\/client\/Flare.html\" target=\"_blank\" rel=\"noreferrer noopener\">official API docs<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>They intend to <em>extend <\/em>the functionalities of your ATON instance, for multiple web-apps<\/li>\n\n\n\n<li>They can provide both <strong>client <\/strong>and <strong>server <\/strong>components (e.g. additional routes performing server-side actions, REST API enrichments, etc.)<\/li>\n\n\n\n<li>They automatically equip the official front-end (<a href=\"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/hathor\/\">Hathor<\/a>)<\/li>\n<\/ul>\n\n\n\n<p>They are located in <code><strong>&lt;your-main-ATON-folder&gt;\/config\/flares\/<\/strong><\/code><\/p>\n\n\n\n<p>The model is pretty much the same for <strong>web-apps<\/strong> <em>plug&amp;play<\/em> architecture &#8211; i.e. they can be pugged in while the services are running<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Structure<\/h2>\n\n\n\n<p>The basic structure involves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>a <strong>public<\/strong>\/ subfolder, providing <em>client <\/em>components (e.g. javascript\/ES modules) loaded by the web-app \/ front-end<\/li>\n\n\n\n<li>a <strong>flare.json<\/strong> representing the descriptor<\/li>\n<\/ul>\n\n\n\n<p>Sample <strong><em>flare.json<\/em><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\n    \"name\": \"My first flare\",\n\n    \"client\":{\n        \"files\": [\n            \"myflare.js\"\n        ]\n    }\n}<\/code><\/pre>\n\n\n\n<p>This basically tells ATON we want to add a flare called &#8220;<strong>My first flare<\/strong>&#8220;, loading a simple javascript file located in the public\/ sub-folder of the flare. A flare can also require multiple dependencies indeed, in the files list.<\/p>\n\n\n\n<p>A very basic example for <strong><em>myflare.js<\/em><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">{\n  let F = new ATON.Flare(\"myFlare\");\n  \n  \/\/ do stuff for this flare initialization\n  F.setup = ()=&gt;{\n    F.log(\"initialized!\"); \/\/ Flare log\n  }\n\n  \/\/ optional update routine (executed continuously)\n  F.update = ()=&gt;{\n  }\n}<\/code><\/pre>\n\n\n\n<p>&#8220;<em><strong>myFlare<\/strong><\/em>&#8221; is a local identifier for this flare in ATON, although it usually matches the flare ID on the server. After flares deployment, this specific flare can be accessed via <strong><code>ATON.getFlare(\"myFlare\")<\/code><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add Flares to your App via code<\/h2>\n\n\n\n<p>You can require a specific <strong><em>list of flares<\/em><\/strong> to equip your app in this way:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">let myApp = ATON.App.realize();\nmyApp.requireFlares([\"myFlare\"]);\n\nmyApp.setup = ()=>{\n  ATON.realize();\n\n  \/\/ Do app setup stuff\n  \n  \/\/ Do stuff that depends on flares (wait for all flares to be ready)\n  ATON.on(\"AllFlaresReady\",()=>{\n    \/\/ ...\n  });\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Add Flares dynamically via url parameters<\/h2>\n\n\n\n<p>You can also equip any app with any flare <strong>dynamically <\/strong>via url parameters. Any ATON app in fact, can request a list of flares through <strong>ff<\/strong> parameter, for instance:<\/p>\n\n\n\n<p><code>https:\/\/myatoninstance.com\/a\/myapp\/?<strong>ff=FlareA<\/strong><\/code><\/p>\n\n\n\n<p>will equip &#8220;<strong>myapp<\/strong>&#8221; with the flare &#8220;<strong>FlareA<\/strong>&#8220;, while:<\/p>\n\n\n\n<p><code>https:\/\/myatoninstance.com\/a\/myapp\/?<strong>ff=FlareA,FlareB<\/strong><\/code><\/p>\n\n\n\n<p>will equip myapp with 2 flares (FlareA and FlareB)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Flares are basically plugins for ATON. Check out the official API docs. They are located in &lt;your-main-ATON-folder&gt;\/config\/flares\/ The model is pretty much the same for web-apps plug&amp;play architecture &#8211; i.e. they can be pugged in while the services are running Structure The basic structure involves: Sample flare.json: This basically tells ATON we want to add [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1189,"parent":71,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1162","page","type-page","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Flares - ATON<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flares - ATON\" \/>\n<meta property=\"og:description\" content=\"Flares are basically plugins for ATON. Check out the official API docs. They are located in &lt;your-main-ATON-folder&gt;\/config\/flares\/ The model is pretty much the same for web-apps plug&amp;play architecture &#8211; i.e. they can be pugged in while the services are running Structure The basic structure involves: Sample flare.json: This basically tells ATON we want to add [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/\" \/>\n<meta property=\"og:site_name\" content=\"ATON\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-28T18:34:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/\",\"url\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/\",\"name\":\"Flares - ATON\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/aton-flares.png\",\"datePublished\":\"2024-01-23T22:33:19+00:00\",\"dateModified\":\"2025-09-28T18:34:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/#primaryimage\",\"url\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/aton-flares.png\",\"contentUrl\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/aton-flares.png\",\"width\":512,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/flares\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Overview\",\"item\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/index.php\\\/overview\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Flares\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/#website\",\"url\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/\",\"name\":\"ATON\",\"description\":\"open-source Web3D\\\/WebXR framework by CNR ISPC\",\"publisher\":{\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/#organization\",\"name\":\"ATON\",\"url\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/aton-logo-100.png\",\"contentUrl\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/aton-logo-100.png\",\"width\":100,\"height\":100,\"caption\":\"ATON\"},\"image\":{\"@id\":\"https:\\\/\\\/osiris.itabc.cnr.it\\\/aton\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Flares - ATON","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/","og_locale":"en_US","og_type":"article","og_title":"Flares - ATON","og_description":"Flares are basically plugins for ATON. Check out the official API docs. They are located in &lt;your-main-ATON-folder&gt;\/config\/flares\/ The model is pretty much the same for web-apps plug&amp;play architecture &#8211; i.e. they can be pugged in while the services are running Structure The basic structure involves: Sample flare.json: This basically tells ATON we want to add [&hellip;]","og_url":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/","og_site_name":"ATON","article_modified_time":"2025-09-28T18:34:12+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/","url":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/","name":"Flares - ATON","isPartOf":{"@id":"https:\/\/osiris.itabc.cnr.it\/aton\/#website"},"primaryImageOfPage":{"@id":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/#primaryimage"},"image":{"@id":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/#primaryimage"},"thumbnailUrl":"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png","datePublished":"2024-01-23T22:33:19+00:00","dateModified":"2025-09-28T18:34:12+00:00","breadcrumb":{"@id":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/#primaryimage","url":"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png","contentUrl":"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2024\/01\/aton-flares.png","width":512,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/flares\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/osiris.itabc.cnr.it\/aton\/"},{"@type":"ListItem","position":2,"name":"Overview","item":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/overview\/"},{"@type":"ListItem","position":3,"name":"Flares"}]},{"@type":"WebSite","@id":"https:\/\/osiris.itabc.cnr.it\/aton\/#website","url":"https:\/\/osiris.itabc.cnr.it\/aton\/","name":"ATON","description":"open-source Web3D\/WebXR framework by CNR ISPC","publisher":{"@id":"https:\/\/osiris.itabc.cnr.it\/aton\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/osiris.itabc.cnr.it\/aton\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/osiris.itabc.cnr.it\/aton\/#organization","name":"ATON","url":"https:\/\/osiris.itabc.cnr.it\/aton\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/osiris.itabc.cnr.it\/aton\/#\/schema\/logo\/image\/","url":"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2022\/12\/aton-logo-100.png","contentUrl":"https:\/\/osiris.itabc.cnr.it\/aton\/wp-content\/uploads\/2022\/12\/aton-logo-100.png","width":100,"height":100,"caption":"ATON"},"image":{"@id":"https:\/\/osiris.itabc.cnr.it\/aton\/#\/schema\/logo\/image\/"}}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/pages\/1162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/comments?post=1162"}],"version-history":[{"count":30,"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/pages\/1162\/revisions"}],"predecessor-version":[{"id":1371,"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/pages\/1162\/revisions\/1371"}],"up":[{"embeddable":true,"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/pages\/71"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/media\/1189"}],"wp:attachment":[{"href":"https:\/\/osiris.itabc.cnr.it\/aton\/index.php\/wp-json\/wp\/v2\/media?parent=1162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}