genshin-interface 4.3.3 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -9
- package/dist/{constants-DtYf-wVe.d.ts → constants-CLLAons1.d.ts} +21 -4
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +21 -4
- package/dist/getFixtureImageName.d.ts +1 -0
- package/dist/getFixtureImageName.js +4 -0
- package/dist/index.d.ts +1205 -329
- package/dist/index.js +4864 -2052
- package/dist/style.css +4372 -3075
- package/dist/styles/artifactStats.css +21 -0
- package/dist/styles/creamDiscPress.css +8 -0
- package/dist/styles/creamPill.css +9 -0
- package/dist/styles/creamPillButton.css +39 -0
- package/dist/styles/creamPillLit.css +18 -0
- package/dist/styles/fillTint.css +21 -0
- package/dist/styles/footDisc.css +9 -0
- package/dist/styles/forgeDetail.css +30 -0
- package/dist/styles/gradientTint.css +17 -0
- package/dist/styles/ringButton.css +27 -0
- package/dist/styles/rowTint.css +33 -0
- package/dist/styles/shopScreen.css +31 -0
- package/dist/styles/sparkle.css +6 -0
- package/dist/styles/translucentButton.css +9 -0
- package/dist/styles/visuallyHidden.css +11 -0
- package/dist/styles/weaponStars.css +1 -4
- package/dist/styles/wishOverlay.css +7 -5
- package/package.json +9 -8
- package/dist/styles/blessingWorship.css +0 -50
- package/dist/styles/partyReputation.css +0 -24
package/README.md
CHANGED
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
[![NPM downloads][badge-npm-downloads]][url-npm]
|
|
6
6
|
[![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
|
|
7
7
|
|
|
8
|
-
Genshin Impact's interface
|
|
8
|
+
Genshin Impact's interface as a fan recreation. It provides the game's own screen units, face and pointer, and its buttons, dividers, bars and notices, as presentational Vue components.
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
- its round buttons and their glyphs, the server bar, the progress bar, the prompt band, the notice card, the wait mark and the ornamented divider.
|
|
10
|
+
It is an unofficial, non-commercial fan work. It is not affiliated with HoYoverse. It ships no image or font from the game. Each glyph is a vector path, traced from the game's own. The face is the open face nearest to the game's.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Design notes live in [the specs](https://github.com/Esposter/Esposter/tree/main/openspec/specs/genshin/interface-library).
|
|
14
13
|
|
|
15
14
|
## Table of Contents
|
|
16
15
|
|
|
17
16
|
- 🚀 [Getting Started](#getting-started)
|
|
18
|
-
-
|
|
17
|
+
- 🧩 [Key Exports](#key-exports)
|
|
19
18
|
- ⚖️ [License](#license)
|
|
20
19
|
|
|
21
20
|
---
|
|
@@ -26,7 +25,9 @@ It ships no image or font from the game: each glyph is a vector path traced from
|
|
|
26
25
|
pnpm i genshin-interface vue
|
|
27
26
|
```
|
|
28
27
|
|
|
29
|
-
Draw
|
|
28
|
+
1. Draw each screen inside `GameScreen`.
|
|
29
|
+
2. Lay out each screen in `calc(var(--unit) * n)`.
|
|
30
|
+
3. Import the styles once, as shown:
|
|
30
31
|
|
|
31
32
|
```vue
|
|
32
33
|
<script setup lang="ts">
|
|
@@ -41,9 +42,20 @@ import "genshin-interface/style.css";
|
|
|
41
42
|
</template>
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
## <a name="
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
## <a name="key-exports">🧩 Key Exports</a>
|
|
46
|
+
|
|
47
|
+
| Export | Kind | Purpose |
|
|
48
|
+
| ------------------- | --------- | --------------------------------------------------------------------------------------------- |
|
|
49
|
+
| `GameScreen` | component | The root of every game screen, with its 1920 by 1080 unit, face and pointer |
|
|
50
|
+
| `InterfaceClip` | interface | One interface animation clip of the game, with a span and a track for each property it moves |
|
|
51
|
+
| `InterfaceIcon` | enum | The glyphs that the round buttons show |
|
|
52
|
+
| `LoadingSpinner` | component | The game's wait mark, with a label for a screen reader |
|
|
53
|
+
| `OrnamentDivider` | component | The game's divider: a hairline with diamonds at its ends, and a middle ornament unless hidden |
|
|
54
|
+
| `playInterfaceClip` | function | Plays a clip on a screen with Web Animations, and returns the animations to await or seek |
|
|
55
|
+
| `ProgressBar` | component | The game's progress bar, filled from 0 to 1 |
|
|
56
|
+
| `PromptBand` | component | The band that holds a prompt, across the foot of a screen |
|
|
57
|
+
| `RoundButton` | component | The game's round button, with a glyph and a label for a screen reader |
|
|
58
|
+
| `ToastNotice` | component | The game's notice card, dropped at the top of a screen |
|
|
47
59
|
|
|
48
60
|
## <a name="license">⚖️ License</a>
|
|
49
61
|
|
|
@@ -7,7 +7,7 @@ interface CanvasRect {
|
|
|
7
7
|
}
|
|
8
8
|
declare const ASCENSION_PHASE_COUNT = 6;
|
|
9
9
|
declare const GAME_FONT_FAMILY = "\"HYWenHei 85W\", \"HYWenHei-85W\", Signika, ui-sans-serif, sans-serif";
|
|
10
|
-
declare const GAME_UNIT = "calc(min(100cqh / 1080, 100cqw / 1920) * var(--interface-scale))";
|
|
10
|
+
declare const GAME_UNIT = "calc(min(100cqh / 1080, 100cqw / var(--game-design-width, 1920)) * var(--interface-scale))";
|
|
11
11
|
declare const GAME_CANVAS_UNIT = "calc(min(100cqh / 900, 100cqw / 1600) * var(--interface-scale))";
|
|
12
12
|
declare const GAME_CANVAS_INSET = "min(var(--unit) * 71, (100cqw - min(100cqh * 16 / 9, 100cqw)) / 2)";
|
|
13
13
|
declare const MOBILE_INTERFACE_SCALE = 1.25;
|
|
@@ -16,16 +16,23 @@ declare const GAME_WHITE = "#fdfdfd";
|
|
|
16
16
|
declare const GAME_CREAM = "#ece5d8";
|
|
17
17
|
declare const GAME_INK = "#3b4354";
|
|
18
18
|
declare const GAME_GOLD = "#d3bc8e";
|
|
19
|
+
declare const GAME_BACKDROP_BLUR = "calc(var(--unit) * 16)";
|
|
20
|
+
declare const GAME_BACKDROP_KEEP = 0.65;
|
|
21
|
+
declare const GAME_BACKDROP_WASH = "linear-gradient(rgb(38 38 38) calc(var(--unit) * 340), rgb(64 64 64) calc(var(--unit) * 660), rgb(77 77 77) calc(var(--unit) * 820), rgb(89 89 89) calc(var(--unit) * 980))";
|
|
19
22
|
declare const GAME_CURSOR: string;
|
|
20
23
|
declare const ORNAMENT_MIDDLE_PATH = "M179.5 39h6l5.5 4.5 2 5 10 12 2 5 10 10 4 8v5l-4.5 5.5-13 7-4 1-3.5-2.5-3.5-4.5-2-1h-10l-7.5 5.5-15.5 17.5-2.5 1.5-6.5 7.5-10 9-3 2h-2l-21 15q-6.27 1.73-10 6l-9 2-4.5 3.5q-.5 4 2.5 4.5l9 4 4 4 17 8 8 6 9 4 14.5 12.5 6.5 7.5q2.25-.75 1.5 1.5l6.5 7.5 4.5 3.5q.63 3.87 3.5 5.5l5 3h9q1-2.5 3.5-2 .71-4.89 4.5-8l3-1 26.5-24.5 2.5-4.5 5-2 9-7 5-2 13.5-9.5 1.5-2.5q5.5-2 8.5-6.5v-3l-5-5v-3l3.5-4.5q2.25.75 1.5-1.5l5.5-6.5 6-3h11l26 14 5 5h3l6 2 3.5 3.5-1 4.5-4.5 2-5 1-7 6-4 1-12 7-5 5-10 3-8 7-4 1-5 4h-1.5l-1.5 3-24 16-5.5 5.5q.75 2.25-1.5 1.5l-20.5 18.5-2 4-13 14-9 13-3 6.5-2.5 1h-3l-1 1h-3l-6.5-3.5-4-11q-8.37-6.84-13-16.5l-3-1.5-4-5v-1.5h-2q1.13-2.67-1.5-2l-13-15-3.5-1v-1.5l-6.5-6.5-3-1-11-9-13-6-6-5-4-2-11-2-5-4-15-5-6-4-18-6h-30.5v-31h31.5l4-2h9l4.5-2q-1.13-2.67 1.5-2l7-4 8-1 9-3 7-6 12-4 3-3 16-8 4.5-3.5 3.5-4.5 4-2 12.5-12.5 5.5-7.5 3.5-2.5q4.3-7.7 11-13l7-12 13.5-16.5 2-1zm115 1h9q1.25 3.5 4.5 3l5 10.5 16 18 9.5 13.5q2.25-.75 1.5 1.5l6.5 7.5 5.5 4.5 2 4.5q9.2 2.9 14.5 11l6 3h2l9 7 12 4 10 7h2l3 2 10 2 2 2 6 3h2l2 2q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-3-17-3-6-4-9-1-6-3-9-1-11-4h-7l-4-2h-4l-1-1-14-2-5-2h-11q-1.25-2.25-6-1l-6.5-3.5 1-3.5 5.5-2h3l1-1h12l1-1h4l6-2 9-1 1-1h3l4-2h4l9-3h8l16-6h4l7-4q4 1 5-1h7l1-1h4l6-2 10-7 9-2 16-11 3-1 7-7 12-6z";
|
|
25
|
+
declare const ROLE_FLOURISH_PATH = "M146.5 35q9.03.97 12.5 7.5l1 2-1 2.5q-2.58-.75-3.5 1h-7l-2.5-1-1-2.5v-3l-1-1v-4.5l2.5-1z M96.5 49h25l1 1h6l11 4 7 1 8 3 7 6 7 3 8.5 7.5 3.5 4.5q4.75.75 5.5-2.5.87-4.62 4.5-6.5 2.5-2 8-1l6 4h3.5v11.5q.25.75-2.5.5l-7 9-7 2q-1-2-2 0h-6l-1 1h-12l-9-6-6-2h-3l-1-1h-3l-6-5-5-2-4.5 2.5q-.62 3.88-3.5 5.5-3.17 2.33-10 1-1-2-5-1l-6-3-2.5-2.5v-11l-1-3-2.5-2.5-3-1h-17l-7 5-6 2h-3l-1 1h-3l-1 1h-3l-5 3h-2l-4-2h-13l-1-1h-33.5v-14h12.5l1-1h8l1-1h24l5-2h6l1-1h6l1-1h9l9-5h12l1-1z";
|
|
22
26
|
declare const CHECK_MARK_PATH = "M237.5 26q5.25-1.75 3.5 3.5l-6 11-5 5-4 7-4 4-9 14-3 3-1 3-4 4-1 3-12 17-7 12-9 11-5 9-14 19-1 3-4 4-7 12-8 10-1 3-4 4-2 5-3 3v2l-3.5 4.5-6 2-11-6-2.5-2.5-3.5-4.5-16-11-13.5-12.5q-1.25-5.75-5.5-8.5l-7-2-5-3-13-12-8-3h-6l-3-1-2.5-2.5v-2l3-6 26.5-36.5 5-3h5l5.5 4.5q-.75 2.25 1.5 1.5l16.5 17.5 1 3 13 13 5.5 9.5 7 1 18-13 12-12 21-18 10-10 8-6 19.5-18.5 2.5-3.5 12-9q10.85-12.15 24-22z";
|
|
27
|
+
declare const BACK_ARROW_PATH = "M0 12 L11 1 L11 7 C19 7 26 11 28 20 C29 25 27 28 23 30 C25 25 24 19 19 16 C16 14 14 14 11 14 L11 19 Z";
|
|
23
28
|
declare const SERVER_MARK_DIAMOND_PATH = "M23.44 6.62l1 .63 1.44 1.31.43.56 1.69 1.44.56.69.32.19.56.68.81.69q-.09.28.19.19l1.75 2 .5.38h.19v.18l.62.75 2.94 2.94.68.56 1.32 1.44.44.31.56.69.44.31.68.82q.28-.1.19.18.54.28.37 1.25l-1.18 1.31-1.06.94-.82.94-2.18 2.06-4.32 4.56-.68.44-3.07 3.19-.93.81-2.44 2.56-.5.26h-.88l-.37-.13-.44-.44-.56-.69q-.28.1-.19-.18l-2.38-2.25-.18-.31-.69-.57-.56-.69-.31-.18-.19-.32-.94-.68-.69-.82q-.28.1-.18-.18l-2.32-2.44-2.81-2.56-1.44-1.56-.69-.57-2-2.12-.37-.5v-.5l.25-.5 1.69-1.69q.28.09.19-.19.43-.15.37-.56h.19l.5-.37 2.06-2.07.12-.43h.19l.81-.69.69-.81.31-.19 1.19-1.31.81-.69.19-.31.81-.69.32-.57.56-.24v-.19l.56-.57.56-.43.32-.44.68-.56.44-.57.56-.43.26-.57h.18l2.13-2 .75-.5z";
|
|
24
29
|
declare const SERVER_MARK_TICK_PATH = "M30.12 16.88l-.24.12-.38.62-2.5 2.63-1.75 1.63-1.25 1.37-.25.5h-.13l-.87.87q.13.26-.13.13l-.74.87-1.26 1-.37-.12-.63-.5-.5-.5-.5-.5-.5-.5-1.37-1.25-.75-.25h-.38l-.62.25q-.75.37-1 1.25v1.12l.25.63.5.63.37.12 2.63 3 .5.75 1.63 1.25h1l1-.75.37-.5.63-.5.37-.5.63-.5.5-.63.37-.24.63-.76.5-.37.37-.5.63-.5.24-.37.88-.76.38-.62.5-.38.37-.5.37-.24q.38-.38.63-.88l.75-.5.12-.25.76-.63 1.12-1.12q.25-.25.12-.75l.13-.13-.13-.74-.5-.63-.74-.75q-.63.12-.63-.12h-1.13z";
|
|
25
30
|
declare const SETTINGS_RING_CENTRE: readonly [24.05, 24.9];
|
|
26
31
|
declare const SETTINGS_RING_RADIUS = 9.85;
|
|
27
32
|
declare const SETTINGS_RING_WIDTH = 1.9;
|
|
28
33
|
declare const FIXTURE_VARIANT_SEPARATOR = "-";
|
|
34
|
+
declare const FIXTURE_IMAGE_NAME = "Index";
|
|
35
|
+
declare const APPROVE_ENVIRONMENT_VARIABLE = "GENSHIN_PARITY_APPROVE";
|
|
29
36
|
declare const INTERACTION_KEY_LABEL = "F";
|
|
30
37
|
declare const CONSTELLATION_NODE_PLACES: readonly {
|
|
31
38
|
left: number;
|
|
@@ -33,16 +40,26 @@ declare const CONSTELLATION_NODE_PLACES: readonly {
|
|
|
33
40
|
}[];
|
|
34
41
|
declare const INTERACTION_HOVER_MS = 50;
|
|
35
42
|
declare const INTERACTION_REST_MS = 100;
|
|
43
|
+
declare const INTERACTION_HOVER_DURATION = "50ms";
|
|
44
|
+
declare const INTERACTION_REST_DURATION = "100ms";
|
|
36
45
|
declare const INTERACTION_PILL_REST_MS = 200;
|
|
37
46
|
declare const INTERACTION_PRESS_MS = 167;
|
|
38
47
|
declare const GAME_SMOOTHSTEP_EASING = "cubic-bezier(0.333, 0, 0.667, 1)";
|
|
39
48
|
declare const GAME_ROW_HOVER = "rgb(255 255 255 / 0.2)";
|
|
40
49
|
declare const GAME_ROW_PRESS = "rgb(255 255 255 / 0.3)";
|
|
41
|
-
declare const GAME_REPLY_REST = "rgb(0 0 0 / 0.
|
|
50
|
+
declare const GAME_REPLY_REST = "rgb(0 0 0 / 0.26)";
|
|
42
51
|
declare const GAME_REPLY_HOVER = "rgb(255 255 255 / 0.85)";
|
|
43
52
|
declare const GAME_REPLY_HOVER_INK = "#3b4255";
|
|
53
|
+
declare const DIALOGUE_REPLY_REST = "rgb(32 40 57 / 0.72)";
|
|
54
|
+
declare const GAME_LIT_GOLD = "#ffeab4";
|
|
55
|
+
declare const GAME_LIT_GOLD_LABEL = "#d6cdb8";
|
|
56
|
+
declare const GAME_DIALOGUE_GOLD = "#ffc700";
|
|
44
57
|
declare const COOKING_ARC_CENTRE_X = 960;
|
|
45
58
|
declare const COOKING_ARC_CENTRE_Y = 832;
|
|
46
59
|
declare const COOKING_ARC_RADIUS_X = 435;
|
|
47
|
-
declare const
|
|
48
|
-
|
|
60
|
+
declare const COOKING_ZONE_RADIUS_Y = 90;
|
|
61
|
+
declare const MISMATCH_RATIO_BAR = 0.01;
|
|
62
|
+
declare const MISMATCH_MESSAGE = "Screenshot does not match the stored reference.";
|
|
63
|
+
declare const MISMATCH_DETAIL_REGEX: RegExp;
|
|
64
|
+
declare const MISSING_IMAGE_MESSAGE = "No existing reference screenshot found";
|
|
65
|
+
export { SETTINGS_RING_RADIUS as $, GAME_ROW_HOVER as A, INTERACTION_REST_DURATION as B, GAME_GOLD as C, GAME_REPLY_HOVER as D, GAME_LIT_GOLD_LABEL as E, INTERACTION_HOVER_DURATION as F, MISSING_IMAGE_MESSAGE as G, MISMATCH_DETAIL_REGEX as H, INTERACTION_HOVER_MS as I, ORNAMENT_MIDDLE_PATH as J, MOBILE_INTERFACE_SCALE as K, INTERACTION_KEY_LABEL as L, GAME_SMOOTHSTEP_EASING as M, GAME_UNIT as N, GAME_REPLY_HOVER_INK as O, GAME_WHITE as P, SETTINGS_RING_CENTRE as Q, INTERACTION_PILL_REST_MS as R, GAME_FONT_FAMILY as S, GAME_LIT_GOLD as T, MISMATCH_MESSAGE as U, INTERACTION_REST_MS as V, MISMATCH_RATIO_BAR as W, SERVER_MARK_DIAMOND_PATH as X, ROLE_FLOURISH_PATH as Y, SERVER_MARK_TICK_PATH as Z, GAME_CANVAS_RECT as _, CONSTELLATION_NODE_PLACES as a, GAME_CURSOR as b, COOKING_ARC_RADIUS_X as c, FIXTURE_IMAGE_NAME as d, SETTINGS_RING_WIDTH as et, FIXTURE_VARIANT_SEPARATOR as f, GAME_CANVAS_INSET as g, GAME_BACKDROP_WASH as h, CHECK_MARK_PATH as i, GAME_ROW_PRESS as j, GAME_REPLY_REST as k, COOKING_ZONE_RADIUS_Y as l, GAME_BACKDROP_KEEP as m, ASCENSION_PHASE_COUNT as n, COOKING_ARC_CENTRE_X as o, GAME_BACKDROP_BLUR as p, ORNAMENT_END_PATH as q, BACK_ARROW_PATH as r, COOKING_ARC_CENTRE_Y as s, APPROVE_ENVIRONMENT_VARIABLE as t, CanvasRect as tt, DIALOGUE_REPLY_REST as u, GAME_CANVAS_UNIT as v, GAME_INK as w, GAME_DIALOGUE_GOLD as x, GAME_CREAM as y, INTERACTION_PRESS_MS as z };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { ASCENSION_PHASE_COUNT, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X,
|
|
1
|
+
import { $ as SETTINGS_RING_RADIUS, A as GAME_ROW_HOVER, B as INTERACTION_REST_DURATION, C as GAME_GOLD, D as GAME_REPLY_HOVER, E as GAME_LIT_GOLD_LABEL, F as INTERACTION_HOVER_DURATION, G as MISSING_IMAGE_MESSAGE, H as MISMATCH_DETAIL_REGEX, I as INTERACTION_HOVER_MS, J as ORNAMENT_MIDDLE_PATH, K as MOBILE_INTERFACE_SCALE, L as INTERACTION_KEY_LABEL, M as GAME_SMOOTHSTEP_EASING, N as GAME_UNIT, O as GAME_REPLY_HOVER_INK, P as GAME_WHITE, Q as SETTINGS_RING_CENTRE, R as INTERACTION_PILL_REST_MS, S as GAME_FONT_FAMILY, T as GAME_LIT_GOLD, U as MISMATCH_MESSAGE, V as INTERACTION_REST_MS, W as MISMATCH_RATIO_BAR, X as SERVER_MARK_DIAMOND_PATH, Y as ROLE_FLOURISH_PATH, Z as SERVER_MARK_TICK_PATH, _ as GAME_CANVAS_RECT, a as CONSTELLATION_NODE_PLACES, b as GAME_CURSOR, c as COOKING_ARC_RADIUS_X, d as FIXTURE_IMAGE_NAME, et as SETTINGS_RING_WIDTH, f as FIXTURE_VARIANT_SEPARATOR, g as GAME_CANVAS_INSET, h as GAME_BACKDROP_WASH, i as CHECK_MARK_PATH, j as GAME_ROW_PRESS, k as GAME_REPLY_REST, l as COOKING_ZONE_RADIUS_Y, m as GAME_BACKDROP_KEEP, n as ASCENSION_PHASE_COUNT, o as COOKING_ARC_CENTRE_X, p as GAME_BACKDROP_BLUR, q as ORNAMENT_END_PATH, r as BACK_ARROW_PATH, s as COOKING_ARC_CENTRE_Y, t as APPROVE_ENVIRONMENT_VARIABLE, u as DIALOGUE_REPLY_REST, v as GAME_CANVAS_UNIT, w as GAME_INK, x as GAME_DIALOGUE_GOLD, y as GAME_CREAM, z as INTERACTION_PRESS_MS } from "./constants-CLLAons1.js";
|
|
2
|
+
export { APPROVE_ENVIRONMENT_VARIABLE, ASCENSION_PHASE_COUNT, BACK_ARROW_PATH, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X, COOKING_ZONE_RADIUS_Y, DIALOGUE_REPLY_REST, FIXTURE_IMAGE_NAME, FIXTURE_VARIANT_SEPARATOR, GAME_BACKDROP_BLUR, GAME_BACKDROP_KEEP, GAME_BACKDROP_WASH, GAME_CANVAS_INSET, GAME_CANVAS_RECT, GAME_CANVAS_UNIT, GAME_CREAM, GAME_CURSOR, GAME_DIALOGUE_GOLD, GAME_FONT_FAMILY, GAME_GOLD, GAME_INK, GAME_LIT_GOLD, GAME_LIT_GOLD_LABEL, GAME_REPLY_HOVER, GAME_REPLY_HOVER_INK, GAME_REPLY_REST, GAME_ROW_HOVER, GAME_ROW_PRESS, GAME_SMOOTHSTEP_EASING, GAME_UNIT, GAME_WHITE, INTERACTION_HOVER_DURATION, INTERACTION_HOVER_MS, INTERACTION_KEY_LABEL, INTERACTION_PILL_REST_MS, INTERACTION_PRESS_MS, INTERACTION_REST_DURATION, INTERACTION_REST_MS, MISMATCH_DETAIL_REGEX, MISMATCH_MESSAGE, MISMATCH_RATIO_BAR, MISSING_IMAGE_MESSAGE, MOBILE_INTERFACE_SCALE, ORNAMENT_END_PATH, ORNAMENT_MIDDLE_PATH, ROLE_FLOURISH_PATH, SERVER_MARK_DIAMOND_PATH, SERVER_MARK_TICK_PATH, SETTINGS_RING_CENTRE, SETTINGS_RING_RADIUS, SETTINGS_RING_WIDTH };
|
package/dist/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/services/constants.ts
|
|
2
2
|
const ASCENSION_PHASE_COUNT = 6;
|
|
3
3
|
const GAME_FONT_FAMILY = "\"HYWenHei 85W\", \"HYWenHei-85W\", Signika, ui-sans-serif, sans-serif";
|
|
4
|
-
const GAME_UNIT = "calc(min(100cqh / 1080, 100cqw / 1920) * var(--interface-scale))";
|
|
4
|
+
const GAME_UNIT = "calc(min(100cqh / 1080, 100cqw / var(--game-design-width, 1920)) * var(--interface-scale))";
|
|
5
5
|
const GAME_CANVAS_UNIT = "calc(min(100cqh / 900, 100cqw / 1600) * var(--interface-scale))";
|
|
6
6
|
const GAME_CANVAS_INSET = "min(var(--unit) * 71, (100cqw - min(100cqh * 16 / 9, 100cqw)) / 2)";
|
|
7
7
|
const MOBILE_INTERFACE_SCALE = 1.25;
|
|
@@ -16,17 +16,24 @@ const GAME_WHITE = "#fdfdfd";
|
|
|
16
16
|
const GAME_CREAM = "#ece5d8";
|
|
17
17
|
const GAME_INK = "#3b4354";
|
|
18
18
|
const GAME_GOLD = "#d3bc8e";
|
|
19
|
+
const GAME_BACKDROP_BLUR = "calc(var(--unit) * 16)";
|
|
20
|
+
const GAME_BACKDROP_KEEP = .65;
|
|
21
|
+
const GAME_BACKDROP_WASH = "linear-gradient(rgb(38 38 38) calc(var(--unit) * 340), rgb(64 64 64) calc(var(--unit) * 660), rgb(77 77 77) calc(var(--unit) * 820), rgb(89 89 89) calc(var(--unit) * 980))";
|
|
19
22
|
const GAME_CURSOR_SIZE = 26;
|
|
20
23
|
const GAME_CURSOR = `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="${GAME_CURSOR_SIZE}" height="${GAME_CURSOR_SIZE}" viewBox="-2 -2 66 66"><defs><radialGradient id="g" cx="28" cy="28" r="34" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffea00"/><stop offset="0.45" stop-color="#ffc800"/><stop offset="1" stop-color="#ffc100"/></radialGradient></defs><path d="M0 0q30.1 11.4 62 15-14.5 21.1-3 44-22.9-11.5-44 3-3.6-31.9-15-62z" fill="none" stroke="#2c3a4e" stroke-opacity="0.75" stroke-width="3" stroke-linejoin="round"/><path d="M0 0q30.1 11.4 62 15-14.5 21.1-3 44z" fill="#fff"/><path d="M0 0L59 59Q36.1 47.5 15 62Q11.4 30.1 0 0Z" fill="#f4f5e0"/><path d="M26 26q21.5 6 36-11-14.5 21.1-3 44-22.9-11.5-44 3 17-14.5 11-36z" fill="url(#g)"/></svg>`)}") 1 1, auto`;
|
|
21
24
|
const ORNAMENT_MIDDLE_PATH = "M179.5 39h6l5.5 4.5 2 5 10 12 2 5 10 10 4 8v5l-4.5 5.5-13 7-4 1-3.5-2.5-3.5-4.5-2-1h-10l-7.5 5.5-15.5 17.5-2.5 1.5-6.5 7.5-10 9-3 2h-2l-21 15q-6.27 1.73-10 6l-9 2-4.5 3.5q-.5 4 2.5 4.5l9 4 4 4 17 8 8 6 9 4 14.5 12.5 6.5 7.5q2.25-.75 1.5 1.5l6.5 7.5 4.5 3.5q.63 3.87 3.5 5.5l5 3h9q1-2.5 3.5-2 .71-4.89 4.5-8l3-1 26.5-24.5 2.5-4.5 5-2 9-7 5-2 13.5-9.5 1.5-2.5q5.5-2 8.5-6.5v-3l-5-5v-3l3.5-4.5q2.25.75 1.5-1.5l5.5-6.5 6-3h11l26 14 5 5h3l6 2 3.5 3.5-1 4.5-4.5 2-5 1-7 6-4 1-12 7-5 5-10 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.5q1.13 2.67-1.5 2-4.41 4.09-11 6l-13.5 11.5-1 3 1 1v7l-5.5 7.5-9 8-9 1-18-10-3-3-6-2-4-4-9-3-3.5-3.5 2.5-4.5 11-5 8-5h2l8-4 5-5 12-5 9-8 9-3 3.5-2.5 4.5-5.5 5-3 9-8 4-2 4.5-4.5 4.5-5.5 3-1 5.5-4.5 2-4.5 3-1.5 7-10 20-22 5-10.5 2.5-1z";
|
|
22
25
|
const ORNAMENT_END_PATH = "M210.5 53h6l7.5 6.5 3.5 5.5 10.5 8.5 4.5 5.5 7 3q3.17 4.83 9 7h4l1 1 6 1 15 7h10l1 1h8l1 1h7l1 1h7.5v30.5q-.12 1.13-5.5.5l-1 1h-6l-1 1h-17q-1 2-5 1l-15 7-3 1h-6q-6.5 2.5-10 8l-15 9-9.5 9.5-4.5 7.5-7 3h-6l-3-1-12.5-10.5q.75-2.25-1.5-1.5l-6-5q-8.22-1.78-13-7l-13-4-3-3-8-3-17-3-6-4-9-1-6-3-9-1-11-4h-7l-4-2h-4l-1-1-14-2-5-2h-11q-1.25-2.25-6-1l-6.5-3.5 1-3.5 5.5-2h3l1-1h12l1-1h4l6-2 9-1 1-1h3l4-2h4l9-3h8l16-6h4l7-4q4 1 5-1h7l1-1h4l6-2 10-7 9-2 16-11 3-1 7-7 12-6z";
|
|
26
|
+
const ROLE_FLOURISH_PATH = "M146.5 35q9.03.97 12.5 7.5l1 2-1 2.5q-2.58-.75-3.5 1h-7l-2.5-1-1-2.5v-3l-1-1v-4.5l2.5-1z M96.5 49h25l1 1h6l11 4 7 1 8 3 7 6 7 3 8.5 7.5 3.5 4.5q4.75.75 5.5-2.5.87-4.62 4.5-6.5 2.5-2 8-1l6 4h3.5v11.5q.25.75-2.5.5l-7 9-7 2q-1-2-2 0h-6l-1 1h-12l-9-6-6-2h-3l-1-1h-3l-6-5-5-2-4.5 2.5q-.62 3.88-3.5 5.5-3.17 2.33-10 1-1-2-5-1l-6-3-2.5-2.5v-11l-1-3-2.5-2.5-3-1h-17l-7 5-6 2h-3l-1 1h-3l-1 1h-3l-5 3h-2l-4-2h-13l-1-1h-33.5v-14h12.5l1-1h8l1-1h24l5-2h6l1-1h6l1-1h9l9-5h12l1-1z";
|
|
23
27
|
const CHECK_MARK_PATH = "M237.5 26q5.25-1.75 3.5 3.5l-6 11-5 5-4 7-4 4-9 14-3 3-1 3-4 4-1 3-12 17-7 12-9 11-5 9-14 19-1 3-4 4-7 12-8 10-1 3-4 4-2 5-3 3v2l-3.5 4.5-6 2-11-6-2.5-2.5-3.5-4.5-16-11-13.5-12.5q-1.25-5.75-5.5-8.5l-7-2-5-3-13-12-8-3h-6l-3-1-2.5-2.5v-2l3-6 26.5-36.5 5-3h5l5.5 4.5q-.75 2.25 1.5 1.5l16.5 17.5 1 3 13 13 5.5 9.5 7 1 18-13 12-12 21-18 10-10 8-6 19.5-18.5 2.5-3.5 12-9q10.85-12.15 24-22z";
|
|
28
|
+
const BACK_ARROW_PATH = "M0 12 L11 1 L11 7 C19 7 26 11 28 20 C29 25 27 28 23 30 C25 25 24 19 19 16 C16 14 14 14 11 14 L11 19 Z";
|
|
24
29
|
const SERVER_MARK_DIAMOND_PATH = "M23.44 6.62l1 .63 1.44 1.31.43.56 1.69 1.44.56.69.32.19.56.68.81.69q-.09.28.19.19l1.75 2 .5.38h.19v.18l.62.75 2.94 2.94.68.56 1.32 1.44.44.31.56.69.44.31.68.82q.28-.1.19.18.54.28.37 1.25l-1.18 1.31-1.06.94-.82.94-2.18 2.06-4.32 4.56-.68.44-3.07 3.19-.93.81-2.44 2.56-.5.26h-.88l-.37-.13-.44-.44-.56-.69q-.28.1-.19-.18l-2.38-2.25-.18-.31-.69-.57-.56-.69-.31-.18-.19-.32-.94-.68-.69-.82q-.28.1-.18-.18l-2.32-2.44-2.81-2.56-1.44-1.56-.69-.57-2-2.12-.37-.5v-.5l.25-.5 1.69-1.69q.28.09.19-.19.43-.15.37-.56h.19l.5-.37 2.06-2.07.12-.43h.19l.81-.69.69-.81.31-.19 1.19-1.31.81-.69.19-.31.81-.69.32-.57.56-.24v-.19l.56-.57.56-.43.32-.44.68-.56.44-.57.56-.43.26-.57h.18l2.13-2 .75-.5z";
|
|
25
30
|
const SERVER_MARK_TICK_PATH = "M30.12 16.88l-.24.12-.38.62-2.5 2.63-1.75 1.63-1.25 1.37-.25.5h-.13l-.87.87q.13.26-.13.13l-.74.87-1.26 1-.37-.12-.63-.5-.5-.5-.5-.5-.5-.5-1.37-1.25-.75-.25h-.38l-.62.25q-.75.37-1 1.25v1.12l.25.63.5.63.37.12 2.63 3 .5.75 1.63 1.25h1l1-.75.37-.5.63-.5.37-.5.63-.5.5-.63.37-.24.63-.76.5-.37.37-.5.63-.5.24-.37.88-.76.38-.62.5-.38.37-.5.37-.24q.38-.38.63-.88l.75-.5.12-.25.76-.63 1.12-1.12q.25-.25.12-.75l.13-.13-.13-.74-.5-.63-.74-.75q-.63.12-.63-.12h-1.13z";
|
|
26
31
|
const SETTINGS_RING_CENTRE = [24.05, 24.9];
|
|
27
32
|
const SETTINGS_RING_RADIUS = 9.85;
|
|
28
33
|
const SETTINGS_RING_WIDTH = 1.9;
|
|
29
34
|
const FIXTURE_VARIANT_SEPARATOR = "-";
|
|
35
|
+
const FIXTURE_IMAGE_NAME = "Index";
|
|
36
|
+
const APPROVE_ENVIRONMENT_VARIABLE = "GENSHIN_PARITY_APPROVE";
|
|
30
37
|
const INTERACTION_KEY_LABEL = "F";
|
|
31
38
|
const CONSTELLATION_NODE_PLACES = [
|
|
32
39
|
{
|
|
@@ -56,16 +63,26 @@ const CONSTELLATION_NODE_PLACES = [
|
|
|
56
63
|
];
|
|
57
64
|
const INTERACTION_HOVER_MS = 50;
|
|
58
65
|
const INTERACTION_REST_MS = 100;
|
|
66
|
+
const INTERACTION_HOVER_DURATION = `50ms`;
|
|
67
|
+
const INTERACTION_REST_DURATION = `100ms`;
|
|
59
68
|
const INTERACTION_PILL_REST_MS = 200;
|
|
60
69
|
const INTERACTION_PRESS_MS = 167;
|
|
61
70
|
const GAME_SMOOTHSTEP_EASING = "cubic-bezier(0.333, 0, 0.667, 1)";
|
|
62
71
|
const GAME_ROW_HOVER = "rgb(255 255 255 / 0.2)";
|
|
63
72
|
const GAME_ROW_PRESS = "rgb(255 255 255 / 0.3)";
|
|
64
|
-
const GAME_REPLY_REST = "rgb(0 0 0 / 0.
|
|
73
|
+
const GAME_REPLY_REST = "rgb(0 0 0 / 0.26)";
|
|
65
74
|
const GAME_REPLY_HOVER = "rgb(255 255 255 / 0.85)";
|
|
66
75
|
const GAME_REPLY_HOVER_INK = "#3b4255";
|
|
76
|
+
const DIALOGUE_REPLY_REST = "rgb(32 40 57 / 0.72)";
|
|
77
|
+
const GAME_LIT_GOLD = "#ffeab4";
|
|
78
|
+
const GAME_LIT_GOLD_LABEL = "#d6cdb8";
|
|
79
|
+
const GAME_DIALOGUE_GOLD = "#ffc700";
|
|
67
80
|
const COOKING_ARC_CENTRE_X = 960;
|
|
68
81
|
const COOKING_ARC_CENTRE_Y = 832;
|
|
69
82
|
const COOKING_ARC_RADIUS_X = 435;
|
|
70
|
-
const
|
|
71
|
-
|
|
83
|
+
const COOKING_ZONE_RADIUS_Y = 90;
|
|
84
|
+
const MISMATCH_RATIO_BAR = .01;
|
|
85
|
+
const MISMATCH_MESSAGE = "Screenshot does not match the stored reference.";
|
|
86
|
+
const MISMATCH_DETAIL_REGEX = /(?<pixels>\d+) pixels \(ratio (?<ratio>[\d.]+)\) differ/u;
|
|
87
|
+
const MISSING_IMAGE_MESSAGE = "No existing reference screenshot found";
|
|
88
|
+
export { APPROVE_ENVIRONMENT_VARIABLE, ASCENSION_PHASE_COUNT, BACK_ARROW_PATH, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X, COOKING_ZONE_RADIUS_Y, DIALOGUE_REPLY_REST, FIXTURE_IMAGE_NAME, FIXTURE_VARIANT_SEPARATOR, GAME_BACKDROP_BLUR, GAME_BACKDROP_KEEP, GAME_BACKDROP_WASH, GAME_CANVAS_INSET, GAME_CANVAS_RECT, GAME_CANVAS_UNIT, GAME_CREAM, GAME_CURSOR, GAME_DIALOGUE_GOLD, GAME_FONT_FAMILY, GAME_GOLD, GAME_INK, GAME_LIT_GOLD, GAME_LIT_GOLD_LABEL, GAME_REPLY_HOVER, GAME_REPLY_HOVER_INK, GAME_REPLY_REST, GAME_ROW_HOVER, GAME_ROW_PRESS, GAME_SMOOTHSTEP_EASING, GAME_UNIT, GAME_WHITE, INTERACTION_HOVER_DURATION, INTERACTION_HOVER_MS, INTERACTION_KEY_LABEL, INTERACTION_PILL_REST_MS, INTERACTION_PRESS_MS, INTERACTION_REST_DURATION, INTERACTION_REST_MS, MISMATCH_DETAIL_REGEX, MISMATCH_MESSAGE, MISMATCH_RATIO_BAR, MISSING_IMAGE_MESSAGE, MOBILE_INTERFACE_SCALE, ORNAMENT_END_PATH, ORNAMENT_MIDDLE_PATH, ROLE_FLOURISH_PATH, SERVER_MARK_DIAMOND_PATH, SERVER_MARK_TICK_PATH, SETTINGS_RING_CENTRE, SETTINGS_RING_RADIUS, SETTINGS_RING_WIDTH };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFixtureImageName: (variant: string) => string;
|