Or alternatively, write it as a CSS animation and modify it on collision.
https://bouncing-logo-css.glitch.me/
Just needed a tiny bit of JS to set the sizes and randomise the logo colour.
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animati...