Skip to content

Commit

Permalink
Holiday Themed Cursors (#1229)
Browse files Browse the repository at this point in the history
* Mappy Holidays 2022: The return

Limit colors to be only red or green.

Change all the map control icons to something more cheery!

Update to rebuilt (?) particle-container package using v7.x of pixi.

Re-enable the snowflakes, which now work. Ticker only fires on-demand though, so snowflakes only update on hover/pan/etc.

Set up the ticker to fire continuously for the snowflakes layer, for SEAMLESS SNOWFLAKE ACTION.

Get snowflakes layer rendering opaquely above the main-map.

Fix the snowflake renderer to be transparent background.

Fix snowflakes so that they work better on larger screens.

Fix missing semicolon so linter will work.

Add the snowflake, which is kinda necessary.

Update snowflake layer to load icons using the appropriate distpath.

* Christmas themed cursors

* added santas sleigh pure Oscars request

---------

Co-authored-by: Benjamin Clark <clarkben@fb.com>
  • Loading branch information
2 people authored and Benjamin Clark committed Dec 3, 2024
1 parent a2d34eb commit 36232c1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
Binary file added dist/img/holiday_candy_cane_cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/holiday_christmas_tree_cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/holiday_gingerbread_man_cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/holiday_santa_claus_cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/holiday_santa_sleigh_cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions modules/pixi/PixiEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,21 @@ export class PixiEvents extends EventEmitter {
const path = this.context.assetPath;
const surface = this.gfx.surface;

const cursors = {
areaCursor: `url(${path}img/cursor-select-area.png), pointer`,
connectLineCursor: `url(${path}img/cursor-draw-connect-line.png) 9 9, crosshair`,
connectVertexCursor: `url(${path}img/cursor-draw-connect-vertex.png) 9 9, crosshair`,
lineCursor: `url(${path}img/cursor-select-line.png), pointer`,
pointCursor: `url(${path}img/cursor-select-point.png), pointer`,
selectSplitCursor: `url(${path}img/cursor-select-split.png), pointer`,
vertexCursor: `url(${path}img/cursor-select-vertex.png), pointer`,
// christmas tree https://www.vecteezy.com/png/9346313-hand-drawn-christmas-tree
// candy cane https://www.vecteezy.com/png/11016194-christmas-toy-lollipop-red-and-white-cane
// ginger bread man https://www.vecteezy.com/png/9399803-gingerbread-man-clipart-design-illustration
// santa https://www.vecteezy.com/png/15693545-santa-claus-christmas-cartoon-character

const cursors = {
connectLineCursor: `url(${path}/img/holiday_candy_cane_cursor.png) 5 5, crosshair`,
connectVertexCursor: `url(${path}/img/holiday_santa_claus_cursor.png) 5 5, crosshair`,
lineCursor:`url(${path}/img/holiday_santa_sleigh_cursor.png) 5 5, pointer`,
vertexCursor: `url(${path}/img/holiday_gingerbread_man_cursor.png) 5 5, pointer`,
pointCursor:`url(${path}/img/holiday_candy_cane_cursor.png) 5 5, pointer`,
areaCursor:`url(${path}/img/holiday_christmas_tree_cursor.png) 9 9, pointer`,
};


switch (style) {
case 'areaCursor':
surface.style.cursor = cursors.areaCursor;
Expand Down

0 comments on commit 36232c1

Please sign in to comment.