FreezingMoon / AncientBeast

The Turn Based Strategy Game/eSport. Master your beasts! 🐺
https://AncientBeast.com
GNU Affero General Public License v3.0
1.69k stars 589 forks source link

animated cursor #8

Open DreadKnight opened 12 years ago

DreadKnight commented 12 years ago

We need to replace "/images/cursor/" with "/images/cursor.png", which is a sprite sheet with 5 frames, going from normal cursor to a hover state cursor, using js there should be a "smooth" animation between the two states, ping-pong style, up to 1 second length, meaning each frame should last 200ms.

Keep in mind the current offset of the cursor, as the finger is not placed in the top-left corner.

calebj0seph commented 12 years ago

Added in b637512, needs a refactor though.

DreadKnight commented 12 years ago

Firefox 14 added a new feature called "Pointer Lock API (primarily aimed at games developers)". This provides the mouse coordinates, so it should improve performance of the animated cursor and avoid lag. Maybe Chromium has something similar (or will get in the near future).

DreadKnight commented 12 years ago

@turjuque's code refactoring introduces this as a regression, so it needs to be addressed again.