-
Notifications
You must be signed in to change notification settings - Fork 930
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
When running the A-Frame location-based sample code in React, errors occur. #515
Comments
Not sure what the problem is but will try and investigate it. |
"I am using a project created using 'Create React App. |
Thanks - will take a look if I have a moment. |
This is happening to me also with the three.js location based example.
|
Strange, I don't get that with the three location-based example but will have a look. |
I've created a gist with the code: https://gist.github.com/miqmago/e1430405b34d384dec5fd393d6ee3ded This is meant to be useed in a stencil 3.0.1 component. |
FYI - I am getting this also - but only on my mobile device, the browser on my PC works... |
THREE.Math was renamed to THREE.MathUtils in r113. THREE.PlaneBufferGeometry is deprecated. Fixes AR-js-org#515 Signed-off-by: Gordon Smith <[email protected]>
@Hyeonoo-Park it looks like you have made additional changes, additional to those in @GordonSmith's PR. |
The same problem occurs in v3.4.4. |
@Hyeonoo-Park i merged the fix for MathUtils from #523 #532 in the master branch now, It should be fine but can you test and tell me if it is ok? |
I'm sorry, it still hasn't been fixed. 3D model was visible in the test sample code, but not in the actual code. Fix: arjs-device-orientation-controls.js
This is the entry code for a React component that uses A-Frame.
|
Hi, I got the same error full error: https://gist.github.com/jywarren/c3f0670903e0595f1f37ae33be202837 which I believe leads to this line:
This makes sense in that I'm only seeing this error on mobile, not desktop testing. Shouldn't it be possible to not use any threejs code? Thank you! |
Also, including the same file just above the aframe script worked for me:
|
I was using Nuxt3 and had the same problem, but I solved it by specifying version 3.4.5 with reference to the following ISSUE. <script type="text/javascript" src="https://aframe.io/releases/1.6.0/aframe.min.js" ></script>
<script type="text/javascript" src="https://www.unpkg.com/@ar-js-org/[email protected]/three.js/build/ar-threex-location-only.js" ></script>
<script type="text/javascript" src="https://www.unpkg.com/@ar-js-org/[email protected]/aframe/build/aframe-ar.js"></script> |
@jywarren not sure if this is what you meant by "Shouldn't it be possible to not use any threejs code?" but the current A-Frame location-based code uses functionality from the three.js location-based code to avoid code duplication. PR #563 might fix it, I haven't had time to work on AR.js for a while but might get the chance to test it. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
I am developing based on the A-Frame location based sample code using React, but I am getting an error when I run it on the device. I am not familiar with web programming, so I am not sure if this is a bug or if I am doing something wrong. To resolve the issue, I received the AR.js source and made a few modifications and now it works without errors.
The errors are:
The development environment and source are as follows:
Environment set up with Webpack following the guide on the AR.js home page in React.
Modifications to the AR.js source:
I hope to confirm whether this is a bug and incorporate it into an update.
If the current behavior is a bug, please provide the steps to reproduce.
Please mention other relevant information such as the browser version, Operating System and Device Name
What is the expected behavior?
If this is a feature request, what is motivation or use case for changing the behavior?
The text was updated successfully, but these errors were encountered: