tengbao / vanta

Animated 3D backgrounds for your website
http://vantajs.com/
MIT License
5.54k stars 1.02k forks source link

about its use in combination with Next.js #169

Open kleisberg opened 1 year ago

kleisberg commented 1 year ago

hello i tried to use it with Next.js , but I couldn't get it to work. is there an example piece of code available?

33tm commented 1 year ago

The backgrounds that use Three should have the same process as using React.

Regarding the backgrounds that use p5, I was able to use it in Next by following the same steps as React, but with some minor changes.

Hope this brings you success, I struggled with this problem too 😅

LB22 commented 1 year ago

@treetreet0rrm0uth Do you have a working example like a repo/jsfiddle or similar? I believe I want to use NET or WAVES as the background in root layout. Would be greatly appreciated 😄

s-alad commented 9 months ago
  • const Background = dynamic(() => import("@/components/background").then(mod => mod.Background), { ssr: false })

Do you have an example? I deal with[VANTA] Init error TypeError: T is undefined after following your steps.

umutkamanoglu commented 3 months ago

@treetreet0rrm0uth Do you have a working example like a repo/jsfiddle or similar? I believe I want to use NET or WAVES as the background in root layout. Would be greatly appreciated 😄

I absolutely agree. there is a small documentation for react but it would be nice to create a documentation for next.js as well.