Closed ghost closed 5 years ago
Hi, i'm guessing the error of multiple imports occurs because of
{/* Preload Start */}
<link rel="preload" href="/static/js/lib/arjs/aframe-ar.js" as="script" />
{/* Preload End */}
{/* JS Imports Start */}
// Here I'm importing AR because I'm not allowed inside Stage, due to its not-module nature
// I tried to import aframe here too, but I'm getting more exceptions in doing it
<script src="/static/js/lib/arjs/aframe-ar.js"></script>
those link and script tags that are referencing the same files. Try to remove one.
For AR.js on React, in general, did you already checked other similar issues on this repository? This topic has been quite popular recently, you may find something useful.
Hi Nicolò, thanks for replying. Yes, I was reading the #493 specifically, but the tips suggested in this issue doesn't fit in my case. I tried with your suggestion, but unfortunately deleting only a script preload wasn't enough to solve it.
EDIT:
Just noticed that sometimes the camera starts, but blank screen stills. I'm sure it's all related to script initialisation, but as I said, I'm stuck now about its integration inside my current setting.
EDIT 2:
For now I solved by falling back on usual plain HTML. Hope in the future this awesome library will be available for JS frameworks too, in a stable version.
Thanks for your help.
Describe the bug I'm trying to use ARjs inside a NextJS application, with the help of
aframe-react
dependency. When launching it on browser, I get this exception onconsole
:The Page component - My webpage
Stage - The component that contains aframe/AR
To Reproduce Steps to reproduce the behavior:
Expected behavior The page should correctly render the component with AR library too, then the user should be able to read markers as expected
Screenshots
Desktop (please complete the following information):
Additional context I think that could be related to
ARjs
library inclusion, but I'm a bit confused about how to render it correctly in conjunction with this scenario resources.Thanks in advance for the help.