Bouncing Images around a container. How would you do this?

The easiest way to visualise what I want want is by taking a look at this image =>

Basically want the images to "bounce" round the website similar to this =>

The example above uses canvas! But I'm not sure if you can drop images into canvas easily? I can't seem to find any library out there.

Any help massively appreciated!

last of the young and famous writers -

Maker of WIP amongst other things.

Break up the problem in smaller bits and then tackle them one by one:

  1. Create code example with image on canvas:…
  2. Make image move on canvas
  3. Detect when image reaches edge of screen
  4. Make image bounce when reaching end of screen
last of the young and famous writers -

cheers man. ended up just about working it out!

👋 Join WIP to participate