Tresjs / nuxt

TresJS integration for Nuxt.
https://tresjs.org/
MIT License
211 stars 6 forks source link

`Levioso` and `MouseParallax` are not working as expected. #98

Open stefanobartoletti opened 6 months ago

stefanobartoletti commented 6 months ago

Describe the bug

I'm posting this here, as it seems to be related to the Nuxt module.

I've already posted some more info here https://github.com/Tresjs/cientos/issues/369 and here https://github.com/orgs/Tresjs/discussions/642

The problem is that both Levioso and MouseParallax are not working as expected, while other stuff from cientos don't seem to have issues (in my case, 3d text is working).

The problem started with these two components not working only in development environment, but with the latest dependencies updates (probably caused by Nuxt), they don't work in the built production site too. (the problem with development is on a private project that I cannot share at the moment).

The issue with the production environment can be seen also on the linked repository, in the latest commits on the main branch. The latest working configuration is available at the working tag: https://github.com/stefanobartoletti/tresjs-playground/tree/working tag.

A live demo is also available here https://tresjs-playground.vercel.app/3d-text

If more info is needed, please ask :)

Reproduction

https://github.com/stefanobartoletti/tresjs-playground

Steps to reproduce

System Info

No response

Used Package Manager

pnpm

Code of Conduct

stefanobartoletti commented 6 months ago

I noticed that even the example available here https://tresjs-playground.vercel.app/rotating-ring is not working as expected, but it is not using Levioso or MouseParallax.

It is using an onLoop function, as you can see from its source here https://github.com/stefanobartoletti/tresjs-playground/blob/main/pages/rotating-ring.vue

I had a look at the source of both Levioso and MouseParallax and I see that they are internally using onLoop too, so maybe the problem is originating there.

I'm not sure, but maybe this is related to #97

stefanobartoletti commented 6 months ago

A quick report: updating cientos to version 3.9.0 seems to have partially solved this issue, these animations work correctly on the static production site, but I still have some problems in the development environment (they are not working)