-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 13 compatibility #150
Comments
@demisquare can you share your code, maybe i could help you that one |
@krsbx As I read in #66 I noticed if I disable all UI features, the AR engine won't autostart. In addition, if I leave them enabled the camera won't show. I installed libraries with npm, then I imported in the app.module.ts in this way:
Then, I created a MindAR viewer: mindar-viewer.component.html
mindar-viewer.component.ts
Console output if I click on the start button: I also printed the output of arSystem and it returns undefined. I can't understand if I mistake something or that's a bug. |
I never use angular, but from what I see, probably you are referring to the wrong elements I think you can start by checking does the element that you are trying to reference to is the correct one make sure the sceneRef is referencing to the scene element in the template html file, if it's the correct one then you can check the arSystem does it has the systems attributes or not |
I tried to print the output of sceneEl and it's okay, there's also a systems attribute. I also tried to print the other attributes and some of them return undefined even if are not empty. I think it's a problem of importing libraries in Angular, I don't know. |
I'll try to look at it tomorrow, let's see if it possible to make a wrapper for the angular as well |
@demisquare do you have a repo for this problem? If you do, can you share it in here so we could look into the problem much easier |
@krsbx yes, but it's private at this moment. I'll share it in the next days. |
UPDATE: I managed to run MindAR in Angular 13, even with UI widgets and autostart!The start function of
If you call the So, in the _resize function we have that
SOLUTIONYou must wrap your Exampleapp.component.html
mindar-viewer.component.html
mindar-viewer.component.css
|
Hi, I'm trying to write an Angular 13 module using your React example at https://github.com/hiukim/mind-ar-js-react. While the A-Frame module works well, my camera is on but no image is shown.
I already tried with Safari and Chrome.
The text was updated successfully, but these errors were encountered: