GoogleChromeLabs / proxx

A game of proximity
https://proxx.app
Apache License 2.0
1.32k stars 125 forks source link

Hold to flag with Nebula flash #483

Open Fry98 opened 5 years ago

Fry98 commented 5 years ago

NOW it solves issue #55... I think... well... I hope....

After user holds his finger on a tile for 400 ms, the alternate click gets executed (flags the tile in danger mode, reveals it in safe mode). At the same time, the background flashes with a color of the other mode (I was originally testing it with white flash but I found it to be way too distracting).

If Nebula is enabled, the color switches e.g. from red to blue immediately and then it slowly fades back to red. The flash gets triggered by flipping a value of the "flashTrigger" prop on the Nebula component.

If animations are disabled, the background gradient momentarily switches to a blend of both colors and after 200 ms it switches back.

jakearchibald commented 5 years ago

Thank you for doing this btw! Sorry I haven't gotten around to taking a look yet.

Fry98 commented 5 years ago

Thank you for doing this btw! Sorry I haven't gotten around to taking a look yet.

No worries! I get that you're probably pretty busy. 😄

jakearchibald commented 5 years ago

We've changed the build for this project which has involved moving a lot of files around. Don't worry about the conflicts, we'll take care of it when we come to merge this.