Skip to content
loading...

Pure Javascript particle repeller from base64 encoded png

twitter logo ・1 min read  

I have some js code that i copied from a youtube tutorial and adapted for my own project to fill the header, the code works as intended and it works when the viewport is smaller than around 1200px, however when i put firefox into full screen the animation does not…





Can anyone help....
twitter logo DISCUSS (1)
markdown guide
 

Calculating that amount of pixels will be slow because HTML5Canvas 2D is not very performant, you could use WEBGL to speed things up. or just use a smaller canvas then resize it with CSS. that would be a good choice.

You can watch Daniel Shiffman's tutorials about repelling, steering behaviors & vectors to understand the physics behind it. here's a video youtube.com/watch?v=4hA7G3gup-4

Also try my demo here (source-code)

another one here (source-code)

Classic DEV Post from Dec 27 '19

How do you manage your browser bookmarks?

Please share your way of staying sane without missing out

LinxLibraryArt profile image
hello