Add rotation effect and some smart logic for canvas