For example, how to detect the collision occurs at lower part of a square only whereas ignore the upper part?
Develop games in your browser. Powerful, performant & highly capable.
For things like this you need 2 sprites or much math :D