{"id":6194,"date":"2024-07-17T16:37:12","date_gmt":"2024-07-17T20:37:12","guid":{"rendered":"https:\/\/ionic.io\/blog\/?p=6194"},"modified":"2025-05-12T17:09:42","modified_gmt":"2025-05-12T21:09:42","slug":"cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor","title":{"rendered":"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)"},"content":{"rendered":"\n<p><em>This blog post is part of the second episode of the Out-Of-The-Box With Capacitor series on our YouTube channel and the second AR tutorial on the blog. You can find the previous <a href=\"https:\/\/www.youtube.com\/watch?v=BrcZqes0WtU\">video here<\/a> and <a href=\"https:\/\/ionic.io\/blog\/augmented-reality-with-capacitor-ar-quick-look\">blog post here<\/a><\/em><\/p>\n\n\n\n<p>For the longest time, creating immersive, adaptive, and interactive experiences was a time-consuming process. Developing these types of experiences usually meant using specific tools, testing on expensive hardware, and you were usually locked into an ecosystem unless you worked for a company with the means to create multiple versions of your immersive experience. However, with the advent of WebXR it\u2019s becoming easier for developers to create AR\/VR experiences in their applications and with the help of a tool like Capacitor it can run on many different platforms with a single codebase.<\/p>\n\n\n\n<p>In this tutorial I\u2019m going to show you how to use <a href=\"https:\/\/aframe.io\/\">A-Frame<\/a>, <a href=\"https:\/\/angular.io\/\">Angular<\/a>, and <a href=\"https:\/\/capacitorjs.com\/\">Capacitor<\/a> to create a cross-platform immersive experience that runs on iOS, Android, and devices like the Apple Vision Pro using the web with a single codebase. More importantly, If the device you plan to put this on supports WebXR then this tutorial will also work with your device!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-tutorial\">Tutorial<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create an Ionic-Angular Project<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">ionic start webXR blank --type=angular<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Install A-Frame into your project<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">npm install --save aframe<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Import A-Frame in <em>polyfills.ts&nbsp;<\/em>under Browser Polyfills<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">* BROWSER POLYFILLS\n\u00a0*\/\nimport &#039;aframe&#039;;\n\/**<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>In your component, import <em>CUSTOM_ELEMENTS_SCHEMA<\/em> from <em>@angular\/core <\/em>and add it to the schemas section<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">import { Component, OnInit, CUSTOM_ELEMENTS_SCHEMA } from &#039;@angular\/core&#039;;\nimport { CommonModule, Location } from &#039;@angular\/common&#039;;\nimport { FormsModule } from &#039;@angular\/forms&#039;;\nimport { IonContent, IonHeader, IonTitle, IonToolbar } from &#039;@ionic\/angular\/standalone&#039;;\n\n@Component({\n\u00a0\u00a0selector: &#039;app-webxr&#039;,\n\u00a0\u00a0templateUrl: &#039;.\/webxr.page.html&#039;,\n\u00a0\u00a0styleUrls: [&#039;.\/webxr.page.scss&#039;],\n\u00a0\u00a0standalone: true,\n\u00a0\u00a0imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule],\n\u00a0\u00a0schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Add A-Frame HTML<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">&lt;a-scene&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;a-box position=&quot;-1 0.5 -3&quot; rotation=&quot;0 45 0&quot; color=&quot;#4CC3D9&quot;&gt;&lt;\/a-box&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;a-sphere position=&quot;0 1.25 -5&quot; radius=&quot;1.25&quot; color=&quot;#EF2D5E&quot;&gt;&lt;\/a-sphere&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;a-cylinder\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0position=&quot;1 0.75 -3&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0radius=&quot;0.5&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0height=&quot;1.5&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color=&quot;#FFC65D&quot;\n\u00a0\u00a0\u00a0\u00a0&gt;&lt;\/a-cylinder&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;a-plane\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0position=&quot;0 0 -4&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rotation=&quot;-90 0 0&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0width=&quot;4&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0height=&quot;4&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color=&quot;#7BC8A4&quot;\n\u00a0\u00a0\u00a0\u00a0&gt;&lt;\/a-plane&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;a-sky color=&quot;#ECECEC&quot;&gt;&lt;\/a-sky&gt;\n\u00a0\u00a0&lt;\/a-scene&gt;\n\u00a0\u00a0&lt;ion-button fill=&quot;outline&quot; style=&quot;position:absolute; top:40px; left:10px;&quot; (click)=&quot;back()&quot;&gt;Back&lt;\/ion-button&gt;<\/code><\/pre>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li>Add, build, sync, and run on your platform of choice<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">ionic capacitor add ios\nionic capacitor add android\n\nionic capacitor build\nionic capacitor sync\n\n\/\/Works best if you run it on a physical device\nionic capacitor run ios\nionic capacitor run android<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-optional-running-project-on-vr-headsets\"> Optional: Running Project on VR Headsets<\/h2>\n\n\n\n<ol start=\"7\" class=\"wp-block-list\">\n<li>To run on headsets like the Vision Pro\/Meta Quest\/etc. you can serve the application locally or <a href=\"https:\/\/docs.aws.amazon.com\/Route53\/latest\/DeveloperGuide\/getting-started-cloudfront-overview.html\">deploy<\/a> it to a server with certs enabled<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/\/Run locally\nionic serve<\/code><\/pre>\n\n\n\n<ol start=\"8\" class=\"wp-block-list\">\n<li>[Optional] If using the Vision Pro, enable WebXR by going to <em>Settings-&gt;Apps-&gt;Safari-&gt;Advanced-&gt;Feature Flags <\/em>and enabling <em>WebXR Device API<\/em>. (This should be enabled by default in VisionOS 2.0)<br><img decoding=\"async\" data-src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXeVweXAvl0NUjsaB2y6EAC_siXs2Tst2pFcPeT1Kqf65Hl32uo5obYsqHK0qPpCAAUBLiZXVJjoWsWl9lGNHfjxgx-H3BaLy8H29Ig45UYzaALKZ8ov_wyQhiqwmulgJJ0cTWWHtmwVAjn2puw9l3Wr_Zpc?key=lFMGDvZQzVUwZcHDKVw4PA\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"lazyload\"><noscript><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXeVweXAvl0NUjsaB2y6EAC_siXs2Tst2pFcPeT1Kqf65Hl32uo5obYsqHK0qPpCAAUBLiZXVJjoWsWl9lGNHfjxgx-H3BaLy8H29Ig45UYzaALKZ8ov_wyQhiqwmulgJJ0cTWWHtmwVAjn2puw9l3Wr_Zpc?key=lFMGDvZQzVUwZcHDKVw4PA\"><\/noscript><\/li>\n\n\n\n<li>Run the experience in the browser<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXeNqD0JEQ5VmcctNUwUgVlwBkUC59RQpY5BxMCRh4VRYa_Bo3m6fpWgTJ5D1SYYrLgn9g7nMbh-j4r9_zbNGIf7dzoSZg0bwrlA6vKD74KT2EJLj-Th4pDSyVkAOBGyjRXXjAkpL-nQN_B9UTR7halHXLw?key=lFMGDvZQzVUwZcHDKVw4PA\" alt=\"\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"lazyload\" \/><noscript><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXeNqD0JEQ5VmcctNUwUgVlwBkUC59RQpY5BxMCRh4VRYa_Bo3m6fpWgTJ5D1SYYrLgn9g7nMbh-j4r9_zbNGIf7dzoSZg0bwrlA6vKD74KT2EJLj-Th4pDSyVkAOBGyjRXXjAkpL-nQN_B9UTR7halHXLw?key=lFMGDvZQzVUwZcHDKVw4PA\" alt=\"\" \/><\/noscript><\/figure>\n\n\n\n<ol start=\"10\" class=\"wp-block-list\">\n<li>Click VR in the bottom right-hand corner to enter the experience<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXfK57DSdHMmPjGZLKfFglKSp8kLmfotJYBssRdgZRxdyVyaUjOTnJqb0oOQMPNHREYkFEdA_wzuOprsI6zmC7b42fspqiuYEHwc2jSHJtUFwtALEpbuJEkGhXKs5Y4Pi3VhgNAkrhLWvYtPi5tX-Pcbxys?key=lFMGDvZQzVUwZcHDKVw4PA\" alt=\"\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"lazyload\" \/><noscript><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXfK57DSdHMmPjGZLKfFglKSp8kLmfotJYBssRdgZRxdyVyaUjOTnJqb0oOQMPNHREYkFEdA_wzuOprsI6zmC7b42fspqiuYEHwc2jSHJtUFwtALEpbuJEkGhXKs5Y4Pi3VhgNAkrhLWvYtPi5tX-Pcbxys?key=lFMGDvZQzVUwZcHDKVw4PA\" alt=\"\" \/><\/noscript><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion:<\/h2>\n\n\n\n<p>While this is a basic immersive experience to get an understanding of how to create these types of apps and make them cross-platform there are a ton of ways to extend these experiences. With A-Frame it\u2019s possible to add controllers, interactive components, and even animations to create rich experiences. I highly suggest taking a look at A-Frame\u2019s <a href=\"https:\/\/aframe.io\/docs\/1.6.0\/introduction\/\">documentation<\/a> to find out how you can take your Capacitor apps to the next level!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post is part of the second episode of the Out-Of-The-Box With Capacitor series on our YouTube channel and the second AR tutorial on the blog. You can find the previous video here and blog post here For the longest time, creating immersive, adaptive, and interactive experiences was a time-consuming process. Developing these types [&hellip;]<\/p>\n","protected":false},"author":103,"featured_media":6198,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"","publish_post_category":"","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"","discourse_permalink":"","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,124],"tags":[282,60,284,151,3,25,285,283],"class_list":["post-6194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","category-tutorials","tag-a-frame","tag-angular","tag-ar","tag-capacitor","tag-ionic","tag-tutorials","tag-vr","tag-webxr"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I) - Ionic Blog<\/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:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)\" \/>\n<meta property=\"og:description\" content=\"This blog post is part of the second episode of the Out-Of-The-Box With Capacitor series on our YouTube channel and the second AR tutorial on the blog. You can find the previous video here and blog post here For the longest time, creating immersive, adaptive, and interactive experiences was a time-consuming process. Developing these types [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-17T20:37:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-12T21:09:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2240\" \/>\n\t<meta property=\"og:image:height\" content=\"1120\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Logan Brade\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@loganbrade\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Logan Brade\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\"},\"author\":{\"name\":\"Logan Brade\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/07a04c81f6b3180076d1a6ac967bc562\"},\"headline\":\"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)\",\"datePublished\":\"2024-07-17T20:37:12+00:00\",\"dateModified\":\"2025-05-12T21:09:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\"},\"wordCount\":415,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png\",\"keywords\":[\"A-Frame\",\"Angular\",\"AR\",\"Capacitor\",\"Ionic\",\"Tutorials\",\"VR\",\"WebXR\"],\"articleSection\":[\"All\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\",\"url\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\",\"name\":\"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I) - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png\",\"datePublished\":\"2024-07-17T20:37:12+00:00\",\"dateModified\":\"2025-05-12T21:09:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png\",\"width\":2240,\"height\":1120},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/07a04c81f6b3180076d1a6ac967bc562\",\"name\":\"Logan Brade\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/03\/IMG_2854-150x150.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/03\/IMG_2854-150x150.jpg\",\"caption\":\"Logan Brade\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/loganbrade\/\",\"https:\/\/x.com\/loganbrade\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/logan-brade\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I) - Ionic Blog","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:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor","og_locale":"en_US","og_type":"article","og_title":"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)","og_description":"This blog post is part of the second episode of the Out-Of-The-Box With Capacitor series on our YouTube channel and the second AR tutorial on the blog. You can find the previous video here and blog post here For the longest time, creating immersive, adaptive, and interactive experiences was a time-consuming process. Developing these types [&hellip;]","og_url":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor","og_site_name":"Ionic Blog","article_published_time":"2024-07-17T20:37:12+00:00","article_modified_time":"2025-05-12T21:09:42+00:00","og_image":[{"width":2240,"height":1120,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png","type":"image\/png"}],"author":"Logan Brade","twitter_card":"summary_large_image","twitter_creator":"@loganbrade","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Logan Brade","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor"},"author":{"name":"Logan Brade","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/07a04c81f6b3180076d1a6ac967bc562"},"headline":"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)","datePublished":"2024-07-17T20:37:12+00:00","dateModified":"2025-05-12T21:09:42+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor"},"wordCount":415,"commentCount":0,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png","keywords":["A-Frame","Angular","AR","Capacitor","Ionic","Tutorials","VR","WebXR"],"articleSection":["All","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor","url":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor","name":"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I) - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png","datePublished":"2024-07-17T20:37:12+00:00","dateModified":"2025-05-12T21:09:42+00:00","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png","width":2240,"height":1120},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/cross-platform-ar-vr-with-the-web-webxr-with-a-frame-angular-and-capacitor#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Cross-platform AR\/VR With the Web: WebXR with A-Frame, Angular, and Capacitor (Part I)"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/07a04c81f6b3180076d1a6ac967bc562","name":"Logan Brade","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/03\/IMG_2854-150x150.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/03\/IMG_2854-150x150.jpg","caption":"Logan Brade"},"sameAs":["https:\/\/www.linkedin.com\/in\/loganbrade\/","https:\/\/x.com\/loganbrade"],"url":"https:\/\/ionic.io\/blog\/author\/logan-brade"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/07\/boxcap-feature-image.png","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/6194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/103"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=6194"}],"version-history":[{"count":17,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/6194\/revisions"}],"predecessor-version":[{"id":6415,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/6194\/revisions\/6415"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media\/6198"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=6194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=6194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=6194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}