Added a polygon class for more flexible hit areas for interaction.