Open transitive-bullshit opened 6 years ago
I do get this though:
window is not defined
ReferenceError: window is not defined
Are you trying to render it server-side? That's the only reason that window
would not be defined. If so, you want to guard it to only render if on the client-side.
yeah true, i loaded it dynamically and it worked.
any idea why the canvas height keeps increasing?
<canvas width="1479.2000732421875" height="2987.800048828125"></canvas>
See the example app in the repo for a wrapper that definitely works. It's due to the sizing wrapper trying to be full size, but that's dependent on the surrounding css + dom.
@philmetzger let's continue this discussion in the react-particle-animation repo.
<shameless-plug>
Just throwing this in here since I'm guessing a lot of people want to use something like this from react.
Check out react-particle-animation for a cool React alternative to particles.js.
</shameless-plug>