Open ajmeese7 opened 1 year ago
Running into the same issue. For me the animation seems to render properly, but is very dark. Pretty sure it has something to do with the color logic changes in r151 -> r152 of three.js.
https://github.com/mrdoob/three.js/wiki/Migration-Guide#151--152 https://github.com/mrdoob/three.js/releases/tag/r152
This is my implementation FWIW
import * as THREE from 'three'
import FOG from 'vanta/dist/vanta.fog.min'
export default function AppProvider() {
const [background, setBackground] = useState<VantaEffect>(null)
const backgroundRef = useRef(null)
useEffect(() => {
if (!background) {
setBackground(
FOG({
el: backgroundRef.current,
THREE: THREE, // seems to not work properly > 0.151.3
highlightColor: 0xb5336,
midtoneColor: 0x211e1d,
lowlightColor: 0x16166f,
baseColor: 0x0,
speed: 1,
}),
)
}
return () => {
if (background) {
background.destroy()
}
}
}, [background])
return (
<main ref={backgroundRef}>
{children}
</main>
)
}
Thank you for this thread - I thought I was doing something wrong when trying to implement Waves into my React project!
I have nothing more to contribute other than to confirm that using the latest version of Three JS (0.164.0) continues to break some VantaJS effects.
Out of the effects I've tried, Waves renders a blank screen, Rings has some sort of muted grey layer on top, and only Globe seems to render properly. Had to downgrade to 0.151.0 of Three to get Waves working.
Whenever I use
0.152.2
of three.js, my project works exactly as expected. But if I try upgrading my project to the latest version of three, Vanta just renders a blank screen. This is my code segment, unchanged between when I used each version of three:Do you have any idea why this might be, or how I can resolve it? I would like to update to the latest version of three, but I'm stuck at the previous version until this issue is resolved.