Pixelbox API documentation and source code is available on GitHub
Create 2D games in JavaScript, made easier · By
Sprites can only be rotated by 90° increments using flip flags.
A work-around to make 45° rotation would be to draw another version of your sprite.
For those wondering, I've figured it out.
In the editor, at the top of the tile sheet, there's three buttons for flipping sprites horizontally, vertically or rotating it 90 degrees. You can use that if you want to flip tiles and place them inside the map.
In the code, there are additional arguments for flipping for sprite and draw functions. Check the documentation under the Drawing Graphics category.
Find the coordinates of the sprites ie top right, top left, bottom right, bottom left corners. Then check whether any of those points overlap. Here's a tutorial on it that should be helpful. https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_J...