Giter Site home page Giter Site logo

Comments (5)

vincentfretin avatar vincentfretin commented on July 22, 2024 1

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.

vincentfretin avatar vincentfretin commented on July 22, 2024

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.

acarnagey avatar acarnagey commented on July 22, 2024

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.

vincentfretin avatar vincentfretin commented on July 22, 2024

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.

acarnagey avatar acarnagey commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.