-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Rewrite and improve Polkicon -
@w3ux/react-polkicon
(#139)
- Loading branch information
Showing
7 changed files
with
799 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* @license Copyright 2024 w3ux authors & contributors | ||
SPDX-License-Identifier: GPL-3.0-only */ | ||
|
||
import { Scheme } from "./types"; | ||
|
||
// Size of the Polkicon in pixels. | ||
export const PolkiconSize = 64; | ||
|
||
// Center coordinate of the Polkicon. | ||
export const PolkiconCenter = PolkiconSize / 2; | ||
|
||
// Radius of a Polkicon circle. | ||
export const CircleRadius = 5; | ||
|
||
// Schemas for the Polkicon. | ||
export const SCHEMA: Record<string, Scheme> = { | ||
target: { | ||
colors: [0, 28, 0, 0, 28, 0, 0, 28, 0, 0, 28, 0, 0, 28, 0, 0, 28, 0, 1], | ||
freq: 1, | ||
}, | ||
cube: { | ||
colors: [0, 1, 3, 2, 4, 3, 0, 1, 3, 2, 4, 3, 0, 1, 3, 2, 4, 3, 5], | ||
freq: 20, | ||
}, | ||
quazar: { | ||
colors: [1, 2, 3, 1, 2, 4, 5, 5, 4, 1, 2, 3, 1, 2, 4, 5, 5, 4, 0], | ||
freq: 16, | ||
}, | ||
flower: { | ||
colors: [0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3], | ||
freq: 32, | ||
}, | ||
cyclic: { | ||
colors: [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6], | ||
freq: 32, | ||
}, | ||
vmirror: { | ||
colors: [0, 1, 2, 3, 4, 5, 3, 4, 2, 0, 1, 6, 7, 8, 9, 7, 8, 6, 10], | ||
freq: 128, | ||
}, | ||
hmirror: { | ||
colors: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 8, 6, 7, 5, 3, 4, 2, 11], | ||
freq: 128, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.