Comments (5)
You will have a better change someone to help with your issue if you share a link where we can reproduce it. You can create a bare minimum NextJS app with one model that has an animation on https://glitch.com/~aframe for example.
Also be sure that the scripts mainly aframe-extras that includes animation-mixer component are loaded before the a-scene is created. NextJS may auto add a defer script for example that's not compatible with having a a-scene in index.html, you would need to configure the script insertion to not be defer or create a-scene dynamically when you're sure the scripts are loaded. I don't know this stack so can't help you further on it.
from ar.js.
I know nothing about nextjs so I can't help you with this specific setup. But I have a project using just webpack and a static index.html, that works fine using aframe cdn or npm dependencies.
Your above configuration doesn't make any sense, are you using npm dependencies or the cdn? Please use one or the other, not both. Do you have any errors in the console?
from ar.js.
Thanks for the quick response, everything works, like the 3d model displays in the camera above the marker, except for the animation when node_modules and import
syntax basically.
I know nothing about nextjs so I can't help you with this specific setup. But I have a project using just webpack and a static index.html, that works fine using aframe cdn or npm dependencies.
I think this would be the same with webpack, if you could share your code where the animation works with glb and animation-mixer that would be helpful for me if it works to see if I am doing some setup incorrectly.
Your above configuration doesn't make any sense, are you using npm dependencies or the cdn? Please use one or the other, not both. Do you have any errors in the console?
I am saying if I use import and node_modules animate doesn't work, this is what I am using and would like to get working, I am just saying that my glb 3d asset and animation normally works when using a cdn , I don't see any console errors. But these are the logs I see around aframe / ar.js when the page loads
A-Frame Version: 1.5.0 (Date 2023-11-14, Commit #7856a058)
page.js:5023 THREE Version (https://github.com/supermedium/three.js): 0.158.0
page.js:5023 WebVR Polyfill Version: ^0.10.12
page.js:7471 WARNING: Multiple instances of Three.js being imported.
eval @ three.cjs:50433
...
page.js:8238 WARNING: Multiple instances of Three.js being imported.
from ar.js.
If you see the "WARNING: Multiple instances of Three.js being imported." message that's not normal with latest aframe-extras. Double check you don't include the scripts twice.
I have an example of webpack config and static index.html in https://github.com/networked-aframe/naf-valid-avatars/ using a components bundle and defer ui bundle. That example uses aframe and aframe-extras with cdn in index.html. But you can put aframe and aframe-extras imports in src/components.js instead, that will work the same.
from ar.js.
Thanks but this doesn't explain the reported issue, it animated for me with cdn in index.html, my issue I am reporting it is doesn't animate when I try to import aframe, aframe-extras, & @ar-js-org/ar.js as node modules.
from ar.js.
Related Issues (20)
- Seems like the version is Updated but not the docs and example
- Document is so misleading HOT 2
- Module Import fails in Nuxt3 --- ar-threex-location-only.js --- Cannot read properties of undefined (reading 'THREE') HOT 3
- 将ar.js引入three.js 请求一个功能
- Location based compass orientation is incorrect. It always says North is direction when starting up. HOT 3
- Location Base - Entity is following HOT 4
- Event fired when user "see" an object (location based) HOT 1
- "click" events are not emitted on Android when scene is loaded dynamically HOT 1
- Replacing a building?
- Need help implementing AR.js
- New-location-based entity position problem HOT 1
- Location Based AR.JS project mixed with AFRAME Hit Test
- Place to list device models / OS versions which cause the "content sticking to camera" problem (#278)
- Raycaster intersects invisible marker roots. Is there any landmark to distinguish between displayed and hidden elements? (marker-based) HOT 1
- es-modules @ar-js-org/ar.js doesn't work HOT 3
- Implementing OpenCV in AR.js for Google Meet-style Filter
- AR.js maintainers needed
- Supporting A-Frame 1.6.0 and newer versions of three
- The Worker can not send message when list the event "arjs-video-loaded" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ar.js.