Skip to content

marcusshepp/particles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Particle System

I want to get a lot better at graphics programming. So, right now I'm focusing on canvas.

particles2.mp4

How it works

Each particle has an original position. When the cursor is close enough to the particle, that particle calculates a new position based on an editable radius around the mouse.

The speed in which the particle flys to its new position around the radis, is determined by the speed from cursor.

When the mouse is no longer close enough, the particle goes back to its original position. The speed in which it repositions itself is based on the editable reposition speed.

Why??

Because if I'm typing and thinking, I'm happy.

If you want to mess with this

The only dependencies are typescript and vite.

  • Clone the repo
  • pnpm i
  • pnpm dev

About

A Particle System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published