the AURORA effect is not working #900
Replies: 2 comments
-
|
Hi @Ankush-Rajpoot, The error Uncaught TypeError: Cannot set properties of null (setting 'renderer') usually happens when the script is trying to access a DOM element that doesn’t exist yet. In your case, the Aurora effect probably expects a container element to be present in the DOM. Here is how you can fix it:
In React, use useEffect to ensure the element is rendered first:
|
Beta Was this translation helpful? Give feedback.
-
|
Salut @Ankush-Rajpoot, En regardant directement le code source d'Aurora.jsx, le composant gère déjà lui-même le timing via useEffect et useRef — donc l'erreur Cannot set properties of null (setting 'renderer') vient probablement d'un usage incorrect du composant, pas d'un problème de timing DOM. Voici les causes les plus fréquentes : Solution recommandée : utilise le composant tel quel sans ré-instancier OGL manuellement : jsx function App() { Assure-toi aussi que le conteneur parent a une taille définie (width/height), sinon ctn.offsetWidth retourne 0 et le canvas WebGL ne s'initialise pas correctement. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Uncaught TypeError: Cannot set properties of null (setting 'renderer')
at new ebt (index-CMIogMVV.js:9465:1175)
at index-CMIogMVV.js:9555:209
at Di (index-CMIogMVV.js:8:25504)
at ne (index-CMIogMVV.js:8:44517)
at index-CMIogMVV.js:8:42678
at w (index-CMIogMVV.js:1:10841)
at MessagePort.D (index-CMIogMVV.js:1:11200)Understand this error
Beta Was this translation helpful? Give feedback.
All reactions