tengbao / vanta

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

Error when using Vanta with React please help #116

Closed NimishKashyap closed 2 years ago

NimishKashyap commented 3 years ago

× TypeError: Cannot read properties of undefined (reading 'prototype')

Getting this error. image I am very new to Vanta and I need to implement this using React only

Please help!

NimishKashyap commented 3 years ago

image This is my index.html

image

image

koji commented 2 years ago

@NimishKashyap Did you solve the issue? If not, this might be useful.

Here is my CodeSandbox https://codesandbox.io/s/jolly-morning-m9f3p?file=/src/components/MyComponent.js

chazkondo commented 2 years ago

Changing my three version did the trick for me.

"three": "0.121.0"

@koji Thanks for sharing your fix

i-am-the-slime commented 2 years ago

Yes, I got the same 💩 , how do you do this with a modern version of three?

i-am-the-slime commented 2 years ago

Three 0.121.0 has a Denial of Service vuln.

elrumordelaluz commented 2 years ago

I am using "three": "0.124.0"

tengbao commented 2 years ago

I've updated the library so it now works three r134. See the react examples and fiddle links in the readme https://github.com/tengbao/vanta/

Closing this issue now.