@open-slot-ui/pixi 0.4.1 → 0.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/dist/OpenUIPixi-D4Z7emFO.d.cts +202 -0
- package/dist/OpenUIPixi-D4Z7emFO.d.ts +202 -0
- package/dist/art.cjs +269 -0
- package/dist/art.cjs.map +1 -0
- package/dist/art.d.cts +125 -0
- package/dist/art.d.ts +125 -0
- package/dist/art.js +222 -0
- package/dist/art.js.map +1 -0
- package/dist/chunk-PYXZIGXG.js +3733 -0
- package/dist/chunk-PYXZIGXG.js.map +1 -0
- package/dist/index.cjs +147 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -185
- package/dist/index.d.ts +16 -185
- package/dist/index.js +16 -3621
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
package/dist/art.d.ts
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { S as SpinSkinFactory, O as OpenUIIcons } from './OpenUIPixi-D4Z7emFO.js';
|
|
2
|
+
import { Texture } from 'pixi.js';
|
|
3
|
+
import '@open-slot-ui/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Shared SVG→texture helpers for the built-in default icon art (`./art/*`). Kept in
|
|
7
|
+
* their own module so a game that imports a single icon loader pulls in only this
|
|
8
|
+
* helper + that one SVG string — the rest tree-shakes away (Charter B2/B5).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Rasterize an SVG string to a Texture using the browser's SVG engine (so drop
|
|
12
|
+
* shadows + clip paths render exactly), at `resolution`× the SVG's intrinsic size.
|
|
13
|
+
* Returns `undefined` when there is no DOM (SSR / tests without a document), so
|
|
14
|
+
* callers keep whatever placeholder the view already drew.
|
|
15
|
+
*/
|
|
16
|
+
declare function svgToTexture(svg: string, resolution?: number): Promise<Texture | undefined>;
|
|
17
|
+
/** Slice a vertically-stacked N-frame sheet into N equal-height frame textures. */
|
|
18
|
+
declare function sliceRows(tex: Texture, rows: number): Texture[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Turbo button art — a 2-frame vertical sheet: OFF (white coin, black » bolt) over
|
|
22
|
+
* ON (gold coin, black » bolt). The sheet is a clean 120×240 so slicing it into two
|
|
23
|
+
* 120px rows centres the circle IDENTICALLY in both frames (off cy=60, on cy=180) —
|
|
24
|
+
* the button never jumps vertically when it toggles off↔on. Edit this string, never
|
|
25
|
+
* redraw by hand.
|
|
26
|
+
*/
|
|
27
|
+
declare const turboSvg = "<svg width=\"120\" height=\"240\" viewBox=\"0 0 120 240\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#turbo_off_shadow)\">\n<circle cx=\"60\" cy=\"60\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"60\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<g clip-path=\"url(#turbo_off_clip)\">\n<path d=\"M44.2619 60.2005L67.8115 40.1768C68.3388 39.7284 69.1329 40.1954 69.0052 40.8789L66.0165 56.8784C65.9326 57.3274 66.2687 57.7449 66.7219 57.7546L75.2806 57.9357C75.9717 57.9503 76.2609 58.8324 75.7146 59.2595L49.3755 79.8417C48.814 80.2805 48.0235 79.7387 48.2218 79.051L52.9604 62.6106C53.095 62.1437 52.7536 61.6752 52.2714 61.665L44.7195 61.5052C44.0433 61.4909 43.745 60.6402 44.2619 60.2005Z\" fill=\"black\"/>\n</g>\n<g filter=\"url(#turbo_on_shadow)\">\n<circle cx=\"60\" cy=\"180\" r=\"38.5\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"180\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<g clip-path=\"url(#turbo_on_clip)\">\n<path d=\"M44.2619 180.2005L67.8115 160.1768C68.3388 159.7284 69.1329 160.1954 69.0052 160.8789L66.0165 176.8784C65.9326 177.3274 66.2687 177.7449 66.7219 177.7546L75.2806 177.9357C75.9717 177.9503 76.2609 178.8324 75.7146 179.2595L49.3755 199.8417C48.814 200.2805 48.0235 199.7387 48.2218 199.051L52.9604 182.6106C53.095 182.1437 52.7536 181.6752 52.2714 181.665L44.7195 181.5052C44.0433 181.4909 43.745 180.6402 44.2619 180.2005Z\" fill=\"black\"/>\n</g>\n<defs>\n<filter id=\"turbo_off_shadow\" x=\"20\" y=\"20\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\n<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n<feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/>\n<feOffset dx=\"1\" dy=\"8\"/>\n<feGaussianBlur stdDeviation=\"0.5\"/>\n<feComposite in2=\"hardAlpha\" operator=\"out\"/>\n<feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/>\n<feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow\"/>\n<feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow\" result=\"shape\"/>\n</filter>\n<filter id=\"turbo_on_shadow\" x=\"20\" y=\"140\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\n<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n<feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/>\n<feOffset dx=\"1\" dy=\"8\"/>\n<feGaussianBlur stdDeviation=\"0.5\"/>\n<feComposite in2=\"hardAlpha\" operator=\"out\"/>\n<feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/>\n<feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow\"/>\n<feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow\" result=\"shape\"/>\n</filter>\n<clipPath id=\"turbo_off_clip\"><rect width=\"32\" height=\"40\" fill=\"white\" transform=\"translate(44 40)\"/></clipPath>\n<clipPath id=\"turbo_on_clip\"><rect width=\"32\" height=\"40\" fill=\"white\" transform=\"translate(44 160)\"/></clipPath>\n</defs>\n</svg>";
|
|
28
|
+
/** Rasterize the turbo sheet and slice it into the off + on frame textures. */
|
|
29
|
+
declare function loadTurboArt(): Promise<{
|
|
30
|
+
off: Texture;
|
|
31
|
+
on: Texture;
|
|
32
|
+
} | undefined>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Autoplay button art — a 4-frame vertical sheet (idle ▶ · stop ◼ · active ▶ (gold) ·
|
|
36
|
+
* "100"). The view uses frame 0 as the idle look and frame 2 as the engaged look.
|
|
37
|
+
* Edit this string, never redraw by hand.
|
|
38
|
+
*/
|
|
39
|
+
declare const autoplaySvg = "<svg width=\"120\" height=\"438\" viewBox=\"0 0 120 438\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#auto_s0)\">\n<circle cx=\"60\" cy=\"60\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"60\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<path d=\"M48 78.0536L48.0007 41.9565C48.0007 40.4404 49.6026 39.5008 50.8591 40.28L79.088 57.7871C80.2877 58.5312 80.3076 60.3219 79.1249 61.1009L50.8953 79.6908C49.6401 80.5174 48 79.5899 48 78.0536Z\" fill=\"black\"/>\n<g filter=\"url(#auto_s1)\">\n<circle cx=\"60\" cy=\"166\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"166\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<g clip-path=\"url(#auto_c0)\">\n<path d=\"M64.2791 187.251L38.7551 161.726C37.683 160.654 38.1513 158.857 39.5908 158.519L71.931 150.938C73.3055 150.615 74.5858 151.868 74.3003 153.255L67.484 186.361C67.181 187.833 65.3653 188.337 64.2791 187.251Z\" fill=\"black\"/>\n</g>\n<g filter=\"url(#auto_s2)\">\n<circle cx=\"60\" cy=\"378\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"378\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<path d=\"M41.3672 386V371.168L43.7912 373.472H38.4872V369.2H47.0312V386H41.3672ZM56.7024 386.384C55.2144 386.384 53.8944 386.04 52.7424 385.352C51.6064 384.664 50.7104 383.664 50.0544 382.352C49.4144 381.04 49.0944 379.456 49.0944 377.6C49.0944 375.744 49.4144 374.16 50.0544 372.848C50.7104 371.536 51.6064 370.536 52.7424 369.848C53.8944 369.16 55.2144 368.816 56.7024 368.816C58.1904 368.816 59.5024 369.16 60.6384 369.848C61.7904 370.536 62.6864 371.536 63.3264 372.848C63.9824 374.16 64.3104 375.744 64.3104 377.6C64.3104 379.456 63.9824 381.04 63.3264 382.352C62.6864 383.664 61.7904 384.664 60.6384 385.352C59.5024 386.04 58.1904 386.384 56.7024 386.384ZM56.7024 381.848C57.0704 381.848 57.3984 381.72 57.6864 381.464C57.9744 381.208 58.1984 380.768 58.3584 380.144C58.5344 379.52 58.6224 378.672 58.6224 377.6C58.6224 376.512 58.5344 375.664 58.3584 375.056C58.1984 374.432 57.9744 373.992 57.6864 373.736C57.3984 373.48 57.0704 373.352 56.7024 373.352C56.3344 373.352 56.0064 373.48 55.7184 373.736C55.4304 373.992 55.1984 374.432 55.0224 375.056C54.8624 375.664 54.7824 376.512 54.7824 377.6C54.7824 378.672 54.8624 379.52 55.0224 380.144C55.1984 380.768 55.4304 381.208 55.7184 381.464C56.0064 381.72 56.3344 381.848 56.7024 381.848ZM73.3196 386.384C71.8316 386.384 70.5116 386.04 69.3596 385.352C68.2236 384.664 67.3276 383.664 66.6716 382.352C66.0316 381.04 65.7116 379.456 65.7116 377.6C65.7116 375.744 66.0316 374.16 66.6716 372.848C67.3276 371.536 68.2236 370.536 69.3596 369.848C70.5116 369.16 71.8316 368.816 73.3196 368.816C74.8076 368.816 76.1196 369.16 77.2556 369.848C78.4076 370.536 79.3036 371.536 79.9436 372.848C80.5996 374.16 80.9276 375.744 80.9276 377.6C80.9276 379.456 80.5996 381.04 79.9436 382.352C79.3036 383.664 78.4076 384.664 77.2556 385.352C76.1196 386.04 74.8076 386.384 73.3196 386.384ZM73.3196 381.848C73.6876 381.848 74.0156 381.72 74.3036 381.464C74.5916 381.208 74.8156 380.768 74.9756 380.144C75.1516 379.52 75.2396 378.672 75.2396 377.6C75.2396 376.512 75.1516 375.664 74.9756 375.056C74.8156 374.432 74.5916 373.992 74.3036 373.736C74.0156 373.48 73.6876 373.352 73.3196 373.352C72.9516 373.352 72.6236 373.48 72.3356 373.736C72.0476 373.992 71.8156 374.432 71.6396 375.056C71.4796 375.664 71.3996 376.512 71.3996 377.6C71.3996 378.672 71.4796 379.52 71.6396 380.144C71.8156 380.768 72.0476 381.208 72.3356 381.464C72.6236 381.72 72.9516 381.848 73.3196 381.848Z\" fill=\"black\"/>\n<g filter=\"url(#auto_s3)\">\n<circle cx=\"60\" cy=\"272\" r=\"38.5\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"272\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<path d=\"M48 290.054L48.0007 253.957C48.0007 252.44 49.6026 251.501 50.8591 252.28L79.088 269.787C80.2877 270.531 80.3076 272.322 79.1249 273.101L50.8953 291.691C49.6401 292.517 48 291.59 48 290.054Z\" fill=\"black\"/>\n<defs>\n<filter id=\"auto_s0\" x=\"20\" y=\"20\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<filter id=\"auto_s1\" x=\"20\" y=\"126\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<filter id=\"auto_s2\" x=\"20\" y=\"338\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<filter id=\"auto_s3\" x=\"20\" y=\"232\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<clipPath id=\"auto_c0\"><rect width=\"40\" height=\"40\" fill=\"white\" transform=\"translate(31.7148 166) rotate(-45)\"/></clipPath>\n</defs>\n</svg>";
|
|
40
|
+
/** Rasterize the autoplay sheet → { idle: frame 0, active: frame 2 } (matching the view). */
|
|
41
|
+
declare function loadAutoplayArt(): Promise<{
|
|
42
|
+
idle: Texture;
|
|
43
|
+
active: Texture;
|
|
44
|
+
} | undefined>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Buy-feature (bonus) coin — the Figma "Bonus" icon (node 147:4928): a gold coin
|
|
48
|
+
* (#FFC935, black ring, soft drop shadow) stamped with a black admit-one TICKET — a
|
|
49
|
+
* rounded bar with a concave notch bitten out of the LEFT edge and a top/bottom-centre
|
|
50
|
+
* perforation — carrying a gold STAR in its upper right. The notches + star are drawn
|
|
51
|
+
* in the coin's gold so they read as cut-outs of the black ticket. Edit this string,
|
|
52
|
+
* never redraw by hand.
|
|
53
|
+
*/
|
|
54
|
+
declare const bonusSvg = "<svg width=\"122\" height=\"131\" viewBox=\"0 0 122 131\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#bonus_shadow)\">\n<circle cx=\"61\" cy=\"60\" r=\"58\" fill=\"#FFC935\"/>\n<circle cx=\"61\" cy=\"60\" r=\"56\" stroke=\"black\" stroke-width=\"8\"/>\n</g>\n<g>\n<rect x=\"33\" y=\"44\" width=\"54\" height=\"34\" rx=\"8\" fill=\"black\"/>\n<circle cx=\"33\" cy=\"61\" r=\"8\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"44\" r=\"5.5\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"78\" r=\"5.5\" fill=\"#FFC935\"/>\n<path d=\"M72 46.5L74.12 52.09L80.08 52.37L75.42 56.11L77 61.88L72 58.6L67 61.88L68.58 56.11L63.92 52.37L69.88 52.09Z\" fill=\"#FFC935\"/>\n</g>\n<defs>\n<filter id=\"bonus_shadow\" x=\"0\" y=\"0\" width=\"122\" height=\"131\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dy=\"10\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>";
|
|
55
|
+
/** Rasterize the buy-feature coin. Undefined with no DOM (SSR/tests). */
|
|
56
|
+
declare function loadBonusTexture(): Promise<Texture | undefined>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Bet stepper art — the + and − coins (62×69, white coin, black ring, black glyph,
|
|
60
|
+
* soft drop shadow). Edit these strings, never redraw by hand.
|
|
61
|
+
*/
|
|
62
|
+
declare const betPlusSvg = "<svg width=\"62\" height=\"69\" viewBox=\"0 0 62 69\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#betplus_shadow)\">\n<circle cx=\"30\" cy=\"30\" r=\"28.8\" fill=\"white\"/>\n<circle cx=\"30\" cy=\"30\" r=\"27.5\" stroke=\"black\" stroke-width=\"5\"/>\n</g>\n<path d=\"M30 19L30 41\" stroke=\"black\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n<path d=\"M19 30L41 30\" stroke=\"black\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n<defs>\n<filter id=\"betplus_shadow\" x=\"0\" y=\"0\" width=\"62\" height=\"69\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>";
|
|
63
|
+
declare const betMinusSvg = "<svg width=\"62\" height=\"69\" viewBox=\"0 0 62 69\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#betminus_shadow)\">\n<circle cx=\"30\" cy=\"30\" r=\"28.8\" fill=\"white\"/>\n<circle cx=\"30\" cy=\"30\" r=\"27.5\" stroke=\"black\" stroke-width=\"5\"/>\n</g>\n<path d=\"M19 30L41 30\" stroke=\"black\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n<defs>\n<filter id=\"betminus_shadow\" x=\"0\" y=\"0\" width=\"62\" height=\"69\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>";
|
|
64
|
+
/** Rasterize the bet + coin. Undefined with no DOM (SSR/tests). */
|
|
65
|
+
declare function loadBetPlusTexture(): Promise<Texture | undefined>;
|
|
66
|
+
/** Rasterize the bet − coin. Undefined with no DOM (SSR/tests). */
|
|
67
|
+
declare function loadBetMinusTexture(): Promise<Texture | undefined>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Spin button art — two 203×213 artboards (circle centred at 100,100, r≈100): the
|
|
71
|
+
* default rotating-arrows look and the autoplay "AUTO" look. Feed both to
|
|
72
|
+
* {@link svgSpinSkin} (or use {@link builtinSpinSkin}). Edit these strings, never
|
|
73
|
+
* redraw by hand.
|
|
74
|
+
*/
|
|
75
|
+
declare const spinDefaultSvg = "<svg width=\"203\" height=\"213\" viewBox=\"0 0 203 213\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#spin_def_shadow)\">\n<circle cx=\"100\" cy=\"100\" r=\"98\" fill=\"white\"/>\n<circle cx=\"100\" cy=\"100\" r=\"96\" stroke=\"black\" stroke-width=\"8\"/>\n</g>\n<path d=\"M54.1507 71.3327L57.8179 73.7414C58.4592 74.1626 59.3176 73.9815 59.7568 73.3509C78.7409 46.0883 125.822 38.4153 145.861 81.1383C146.557 82.6238 144.468 83.7079 143.427 82.4416C116.582 49.786 82.2561 67.6489 76.3548 84.0593C76.1693 84.5752 76.34 85.1374 76.7517 85.498L79.9422 88.2919C80.6791 88.9374 80.5395 90.125 79.6731 90.5803L56.342 102.839C55.4592 103.303 54.3915 102.711 54.3124 101.714L52.0047 72.6115C51.913 71.4554 53.1841 70.698 54.1507 71.3327Z\" fill=\"black\" stroke=\"black\" stroke-width=\"0.672329\"/>\n<path d=\"M145.849 128.667L142.182 126.259C141.541 125.837 140.682 126.018 140.243 126.649C121.259 153.912 74.1779 161.585 54.1394 118.862C53.4426 117.376 55.5319 116.292 56.5728 117.558C83.4179 150.214 117.744 132.351 123.645 115.941C123.831 115.425 123.66 114.863 123.248 114.502L120.058 111.708C119.321 111.063 119.461 109.875 120.327 109.42L143.658 97.1605C144.541 96.6967 145.609 97.2889 145.688 98.2863L147.995 127.388C148.087 128.545 146.816 129.302 145.849 128.667Z\" fill=\"black\" stroke=\"black\" stroke-width=\"0.672329\"/>\n<defs>\n<filter id=\"spin_def_shadow\" x=\"0\" y=\"0\" width=\"203\" height=\"213\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"2\" dy=\"12\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>";
|
|
76
|
+
declare const spinAutoSvg = "<svg width=\"203\" height=\"213\" viewBox=\"0 0 203 213\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#spin_auto_shadow)\">\n<circle cx=\"100\" cy=\"100\" r=\"98\" fill=\"white\"/>\n<circle cx=\"100\" cy=\"100\" r=\"96\" stroke=\"black\" stroke-width=\"8\"/>\n</g>\n<path d=\"M69.0446 74.448C67.402 74.448 65.8153 74.2613 64.2846 73.888C62.754 73.5147 61.494 73.0293 60.5046 72.432L62.6326 67.616C63.566 68.1573 64.602 68.596 65.7406 68.932C66.898 69.2493 68.018 69.408 69.1006 69.408C69.7353 69.408 70.23 69.3707 70.5846 69.296C70.958 69.2027 71.2286 69.0813 71.3966 68.932C71.5646 68.764 71.6486 68.568 71.6486 68.344C71.6486 67.9893 71.4526 67.7093 71.0606 67.504C70.6686 67.2987 70.146 67.1307 69.4926 67C68.858 66.8507 68.158 66.7013 67.3926 66.552C66.6273 66.384 65.8526 66.1693 65.0686 65.908C64.3033 65.6467 63.594 65.3013 62.9406 64.872C62.306 64.4427 61.7926 63.8827 61.4006 63.192C61.0086 62.4827 60.8126 61.6053 60.8126 60.56C60.8126 59.3467 61.1486 58.2453 61.8206 57.256C62.5113 56.248 63.5286 55.4453 64.8726 54.848C66.2353 54.2507 67.9246 53.952 69.9406 53.952C71.266 53.952 72.5726 54.092 73.8606 54.372C75.1486 54.652 76.306 55.0813 77.3326 55.66L75.3446 60.448C74.374 59.9627 73.4313 59.5987 72.5166 59.356C71.6206 59.1133 70.7433 58.992 69.8846 58.992C69.25 58.992 68.746 59.048 68.3726 59.16C67.9993 59.272 67.7286 59.4213 67.5606 59.608C67.4113 59.7947 67.3366 60 67.3366 60.224C67.3366 60.56 67.5326 60.8307 67.9246 61.036C68.3166 61.2227 68.83 61.3813 69.4646 61.512C70.118 61.6427 70.8273 61.7827 71.5926 61.932C72.3766 62.0813 73.1513 62.2867 73.9166 62.548C74.682 62.8093 75.382 63.1547 76.0166 63.584C76.67 64.0133 77.1926 64.5733 77.5846 65.264C77.9766 65.9547 78.1726 66.8133 78.1726 67.84C78.1726 69.0347 77.8273 70.136 77.1366 71.144C76.4646 72.1333 75.4566 72.936 74.1126 73.552C72.7686 74.1493 71.0793 74.448 69.0446 74.448ZM84.1215 74V59.524H78.3815V54.4H96.4695V59.524H90.7295V74H84.1215ZM108.188 74.448C106.602 74.448 105.127 74.196 103.764 73.692C102.42 73.188 101.254 72.4787 100.264 71.564C99.2751 70.6307 98.5004 69.5387 97.9404 68.288C97.3991 67.0373 97.1284 65.6747 97.1284 64.2C97.1284 62.7067 97.3991 61.344 97.9404 60.112C98.5004 58.8613 99.2751 57.7787 100.264 56.864C101.254 55.9307 102.42 55.212 103.764 54.708C105.127 54.204 106.602 53.952 108.188 53.952C109.794 53.952 111.268 54.204 112.612 54.708C113.956 55.212 115.123 55.9307 116.112 56.864C117.102 57.7787 117.867 58.8613 118.408 60.112C118.968 61.344 119.248 62.7067 119.248 64.2C119.248 65.6747 118.968 67.0373 118.408 68.288C117.867 69.5387 117.102 70.6307 116.112 71.564C115.123 72.4787 113.956 73.188 112.612 73.692C111.268 74.196 109.794 74.448 108.188 74.448ZM108.188 69.1C108.804 69.1 109.374 68.988 109.896 68.764C110.438 68.54 110.904 68.2227 111.296 67.812C111.707 67.3827 112.024 66.8693 112.248 66.272C112.472 65.656 112.584 64.9653 112.584 64.2C112.584 63.4347 112.472 62.7533 112.248 62.156C112.024 61.54 111.707 61.0267 111.296 60.616C110.904 60.1867 110.438 59.86 109.896 59.636C109.374 59.412 108.804 59.3 108.188 59.3C107.572 59.3 106.994 59.412 106.452 59.636C105.93 59.86 105.463 60.1867 105.052 60.616C104.66 61.0267 104.352 61.54 104.128 62.156C103.904 62.7533 103.792 63.4347 103.792 64.2C103.792 64.9653 103.904 65.656 104.128 66.272C104.352 66.8693 104.66 67.3827 105.052 67.812C105.463 68.2227 105.93 68.54 106.452 68.764C106.994 68.988 107.572 69.1 108.188 69.1ZM121.647 74V54.4H131.083C132.912 54.4 134.489 54.6987 135.815 55.296C137.159 55.8933 138.195 56.752 138.923 57.872C139.651 58.9733 140.015 60.28 140.015 61.792C140.015 63.304 139.651 64.6107 138.923 65.712C138.195 66.8133 137.159 67.672 135.815 68.288C134.489 68.8853 132.912 69.184 131.083 69.184H125.315L128.255 66.356V74H121.647ZM128.255 67.084L125.315 64.088H130.663C131.577 64.088 132.249 63.8827 132.679 63.472C133.127 63.0613 133.351 62.5013 133.351 61.792C133.351 61.0827 133.127 60.5227 132.679 60.112C132.249 59.7013 131.577 59.496 130.663 59.496H125.315L128.255 56.5V67.084Z\" fill=\"black\"/>\n<path d=\"M74.972 139.96C72.492 139.96 70.092 139.66 67.772 139.06C65.492 138.5 63.552 137.7 61.952 136.66L67.052 126.76C68.292 127.64 69.532 128.24 70.772 128.56C72.052 128.84 73.352 128.98 74.672 128.98C77.512 128.98 79.772 128.14 81.452 126.46C83.172 124.74 84.032 122.26 84.032 119.02C84.032 118.42 84.032 117.84 84.032 117.28C84.032 116.68 84.032 116.08 84.032 115.48L87.272 117.82C86.512 119.18 85.572 120.34 84.452 121.3C83.372 122.22 82.092 122.94 80.612 123.46C79.132 123.94 77.412 124.18 75.452 124.18C72.892 124.18 70.512 123.64 68.312 122.56C66.152 121.44 64.392 119.88 63.032 117.88C61.712 115.84 61.052 113.46 61.052 110.74C61.052 107.74 61.812 105.14 63.332 102.94C64.852 100.74 66.892 99.04 69.452 97.84C72.052 96.64 74.932 96.04 78.092 96.04C82.092 96.04 85.592 96.82 88.592 98.38C91.632 99.9 93.992 102.18 95.672 105.22C97.392 108.26 98.252 112.08 98.252 116.68C98.252 121.6 97.272 125.8 95.312 129.28C93.352 132.72 90.632 135.36 87.152 137.2C83.672 139.04 79.612 139.96 74.972 139.96ZM79.052 114.4C79.892 114.4 80.632 114.22 81.272 113.86C81.952 113.5 82.472 113 82.832 112.36C83.192 111.72 83.372 110.96 83.372 110.08C83.372 109.2 83.192 108.44 82.832 107.8C82.472 107.16 81.952 106.68 81.272 106.36C80.632 106 79.892 105.82 79.052 105.82C78.212 105.82 77.472 106 76.832 106.36C76.192 106.68 75.672 107.16 75.272 107.8C74.912 108.44 74.732 109.2 74.732 110.08C74.732 111.4 75.132 112.46 75.932 113.26C76.772 114.02 77.812 114.4 79.052 114.4ZM114.64 139.96C112.16 139.96 109.76 139.66 107.44 139.06C105.16 138.5 103.22 137.7 101.62 136.66L106.72 126.76C107.96 127.64 109.2 128.24 110.44 128.56C111.72 128.84 113.02 128.98 114.34 128.98C117.18 128.98 119.44 128.14 121.12 126.46C122.84 124.74 123.7 122.26 123.7 119.02C123.7 118.42 123.7 117.84 123.7 117.28C123.7 116.68 123.7 116.08 123.7 115.48L126.94 117.82C126.18 119.18 125.24 120.34 124.12 121.3C123.04 122.22 121.76 122.94 120.28 123.46C118.8 123.94 117.08 124.18 115.12 124.18C112.56 124.18 110.18 123.64 107.98 122.56C105.82 121.44 104.06 119.88 102.7 117.88C101.38 115.84 100.72 113.46 100.72 110.74C100.72 107.74 101.48 105.14 103 102.94C104.52 100.74 106.56 99.04 109.12 97.84C111.72 96.64 114.6 96.04 117.76 96.04C121.76 96.04 125.26 96.82 128.26 98.38C131.3 99.9 133.66 102.18 135.34 105.22C137.06 108.26 137.92 112.08 137.92 116.68C137.92 121.6 136.94 125.8 134.98 129.28C133.02 132.72 130.3 135.36 126.82 137.2C123.34 139.04 119.28 139.96 114.64 139.96ZM118.72 114.4C119.56 114.4 120.3 114.22 120.94 113.86C121.62 113.5 122.14 113 122.5 112.36C122.86 111.72 123.04 110.96 123.04 110.08C123.04 109.2 122.86 108.44 122.5 107.8C122.14 107.16 121.62 106.68 120.94 106.36C120.3 106 119.56 105.82 118.72 105.82C117.88 105.82 117.14 106 116.5 106.36C115.86 106.68 115.34 107.16 114.94 107.8C114.58 108.44 114.4 109.2 114.4 110.08C114.4 111.4 114.8 112.46 115.6 113.26C116.44 114.02 117.48 114.4 118.72 114.4Z\" fill=\"black\"/>\n<defs>\n<filter id=\"spin_auto_shadow\" x=\"0\" y=\"0\" width=\"203\" height=\"213\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"2\" dy=\"12\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>";
|
|
77
|
+
/** Rasterize the two spin artboards into { default, auto } textures. */
|
|
78
|
+
declare function loadSpinArt(): Promise<{
|
|
79
|
+
default: Texture;
|
|
80
|
+
auto: Texture;
|
|
81
|
+
} | undefined>;
|
|
82
|
+
/** One-call spin skin from the built-in art — pass straight to `mountHud({ spinSkin })`.
|
|
83
|
+
* Resolves to `undefined` with no DOM, so the caller keeps the drawn placeholder skin. */
|
|
84
|
+
declare function builtinSpinSkin(): Promise<SpinSkinFactory | undefined>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* `@open-slot-ui/pixi/art` — the library's built-in default ICON ART: the reference
|
|
88
|
+
* Figma SVGs, bundled as strings and rasterized to textures on demand.
|
|
89
|
+
*
|
|
90
|
+
* Tree-shakeable by design (Charter B2/B5): each icon lives in its own module, so a
|
|
91
|
+
* game that needs just one — say the buy-feature coin —
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* import { loadBonusTexture } from '@open-slot-ui/pixi/art';
|
|
95
|
+
* const bonus = await loadBonusTexture();
|
|
96
|
+
* mountHud(app, spec, { icons: { bonus } });
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* bundles only that one SVG; nothing here is referenced by `mountHud` itself, so a
|
|
100
|
+
* game that ships its own art pays for none of it. For the whole designed set in one
|
|
101
|
+
* call, use {@link loadBuiltinArt}.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
/** The full designed art set, ready to hand straight to `mountHud`. */
|
|
105
|
+
interface BuiltinArt {
|
|
106
|
+
/** Button icons — spread into `mountHud(app, spec, { icons })`. */
|
|
107
|
+
icons: OpenUIIcons;
|
|
108
|
+
/** Spin-button skin — pass as `mountHud(app, spec, { spinSkin })`. */
|
|
109
|
+
spinSkin?: SpinSkinFactory;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Load the ENTIRE built-in icon set at once (turbo, autoplay, buy, bet ±, spin) and
|
|
113
|
+
* return it shaped for `mountHud`. Referencing every icon, this pulls the whole art
|
|
114
|
+
* bundle — use it for a zero-config "give me the designed HUD"; import the per-icon
|
|
115
|
+
* loaders instead when you only need a few (so the rest tree-shakes away). Resolves
|
|
116
|
+
* with empty art when there is no DOM (SSR/tests), so mounting still succeeds.
|
|
117
|
+
*
|
|
118
|
+
* ```ts
|
|
119
|
+
* const { icons, spinSkin } = await loadBuiltinArt();
|
|
120
|
+
* mountHud(app, spec, { icons, spinSkin });
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
declare function loadBuiltinArt(): Promise<BuiltinArt>;
|
|
124
|
+
|
|
125
|
+
export { type BuiltinArt, autoplaySvg, betMinusSvg, betPlusSvg, bonusSvg, builtinSpinSkin, loadAutoplayArt, loadBetMinusTexture, loadBetPlusTexture, loadBonusTexture, loadBuiltinArt, loadSpinArt, loadTurboArt, sliceRows, spinAutoSvg, spinDefaultSvg, svgToTexture, turboSvg };
|
package/dist/art.js
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { svgSpinSkin } from './chunk-PYXZIGXG.js';
|
|
2
|
+
import { CanvasSource, Texture, Rectangle } from 'pixi.js';
|
|
3
|
+
|
|
4
|
+
async function svgToTexture(svg, resolution = 3) {
|
|
5
|
+
if (typeof document === "undefined" || typeof Image === "undefined") return void 0;
|
|
6
|
+
const blob = new Blob([svg], { type: "image/svg+xml" });
|
|
7
|
+
const url = URL.createObjectURL(blob);
|
|
8
|
+
try {
|
|
9
|
+
const img = new Image();
|
|
10
|
+
img.src = url;
|
|
11
|
+
await img.decode();
|
|
12
|
+
const w = Math.max(1, Math.round((img.naturalWidth || 100) * resolution));
|
|
13
|
+
const h = Math.max(1, Math.round((img.naturalHeight || 100) * resolution));
|
|
14
|
+
const canvas = document.createElement("canvas");
|
|
15
|
+
canvas.width = w;
|
|
16
|
+
canvas.height = h;
|
|
17
|
+
const ctx = canvas.getContext("2d");
|
|
18
|
+
if (!ctx) return void 0;
|
|
19
|
+
ctx.drawImage(img, 0, 0, w, h);
|
|
20
|
+
const source = new CanvasSource({ resource: canvas, resolution });
|
|
21
|
+
source.scaleMode = "linear";
|
|
22
|
+
return new Texture({ source });
|
|
23
|
+
} finally {
|
|
24
|
+
URL.revokeObjectURL(url);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function sliceRows(tex, rows) {
|
|
28
|
+
const src = tex.source;
|
|
29
|
+
const rh = src.height / rows;
|
|
30
|
+
return Array.from({ length: rows }, (_, i) => new Texture({ source: src, frame: new Rectangle(0, i * rh, src.width, rh) }));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// src/art/turbo.ts
|
|
34
|
+
var turboSvg = `<svg width="120" height="240" viewBox="0 0 120 240" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
35
|
+
<g filter="url(#turbo_off_shadow)">
|
|
36
|
+
<circle cx="60" cy="60" r="38.5" fill="white"/>
|
|
37
|
+
<circle cx="60" cy="60" r="37" stroke="black" stroke-width="6"/>
|
|
38
|
+
</g>
|
|
39
|
+
<g clip-path="url(#turbo_off_clip)">
|
|
40
|
+
<path d="M44.2619 60.2005L67.8115 40.1768C68.3388 39.7284 69.1329 40.1954 69.0052 40.8789L66.0165 56.8784C65.9326 57.3274 66.2687 57.7449 66.7219 57.7546L75.2806 57.9357C75.9717 57.9503 76.2609 58.8324 75.7146 59.2595L49.3755 79.8417C48.814 80.2805 48.0235 79.7387 48.2218 79.051L52.9604 62.6106C53.095 62.1437 52.7536 61.6752 52.2714 61.665L44.7195 61.5052C44.0433 61.4909 43.745 60.6402 44.2619 60.2005Z" fill="black"/>
|
|
41
|
+
</g>
|
|
42
|
+
<g filter="url(#turbo_on_shadow)">
|
|
43
|
+
<circle cx="60" cy="180" r="38.5" fill="#FFC935"/>
|
|
44
|
+
<circle cx="60" cy="180" r="37" stroke="black" stroke-width="6"/>
|
|
45
|
+
</g>
|
|
46
|
+
<g clip-path="url(#turbo_on_clip)">
|
|
47
|
+
<path d="M44.2619 180.2005L67.8115 160.1768C68.3388 159.7284 69.1329 160.1954 69.0052 160.8789L66.0165 176.8784C65.9326 177.3274 66.2687 177.7449 66.7219 177.7546L75.2806 177.9357C75.9717 177.9503 76.2609 178.8324 75.7146 179.2595L49.3755 199.8417C48.814 200.2805 48.0235 199.7387 48.2218 199.051L52.9604 182.6106C53.095 182.1437 52.7536 181.6752 52.2714 181.665L44.7195 181.5052C44.0433 181.4909 43.745 180.6402 44.2619 180.2005Z" fill="black"/>
|
|
48
|
+
</g>
|
|
49
|
+
<defs>
|
|
50
|
+
<filter id="turbo_off_shadow" x="20" y="20" width="82" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
51
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
52
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
53
|
+
<feOffset dx="1" dy="8"/>
|
|
54
|
+
<feGaussianBlur stdDeviation="0.5"/>
|
|
55
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
56
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
57
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
58
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
59
|
+
</filter>
|
|
60
|
+
<filter id="turbo_on_shadow" x="20" y="140" width="82" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
61
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
62
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
63
|
+
<feOffset dx="1" dy="8"/>
|
|
64
|
+
<feGaussianBlur stdDeviation="0.5"/>
|
|
65
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
66
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
67
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
68
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
69
|
+
</filter>
|
|
70
|
+
<clipPath id="turbo_off_clip"><rect width="32" height="40" fill="white" transform="translate(44 40)"/></clipPath>
|
|
71
|
+
<clipPath id="turbo_on_clip"><rect width="32" height="40" fill="white" transform="translate(44 160)"/></clipPath>
|
|
72
|
+
</defs>
|
|
73
|
+
</svg>`;
|
|
74
|
+
async function loadTurboArt() {
|
|
75
|
+
const tex = await svgToTexture(turboSvg);
|
|
76
|
+
if (!tex) return void 0;
|
|
77
|
+
const [off, on] = sliceRows(tex, 2);
|
|
78
|
+
return { off, on };
|
|
79
|
+
}
|
|
80
|
+
var autoplaySvg = `<svg width="120" height="438" viewBox="0 0 120 438" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
81
|
+
<g filter="url(#auto_s0)">
|
|
82
|
+
<circle cx="60" cy="60" r="38.5" fill="white"/>
|
|
83
|
+
<circle cx="60" cy="60" r="37" stroke="black" stroke-width="6"/>
|
|
84
|
+
</g>
|
|
85
|
+
<path d="M48 78.0536L48.0007 41.9565C48.0007 40.4404 49.6026 39.5008 50.8591 40.28L79.088 57.7871C80.2877 58.5312 80.3076 60.3219 79.1249 61.1009L50.8953 79.6908C49.6401 80.5174 48 79.5899 48 78.0536Z" fill="black"/>
|
|
86
|
+
<g filter="url(#auto_s1)">
|
|
87
|
+
<circle cx="60" cy="166" r="38.5" fill="white"/>
|
|
88
|
+
<circle cx="60" cy="166" r="37" stroke="black" stroke-width="6"/>
|
|
89
|
+
</g>
|
|
90
|
+
<g clip-path="url(#auto_c0)">
|
|
91
|
+
<path d="M64.2791 187.251L38.7551 161.726C37.683 160.654 38.1513 158.857 39.5908 158.519L71.931 150.938C73.3055 150.615 74.5858 151.868 74.3003 153.255L67.484 186.361C67.181 187.833 65.3653 188.337 64.2791 187.251Z" fill="black"/>
|
|
92
|
+
</g>
|
|
93
|
+
<g filter="url(#auto_s2)">
|
|
94
|
+
<circle cx="60" cy="378" r="38.5" fill="white"/>
|
|
95
|
+
<circle cx="60" cy="378" r="37" stroke="black" stroke-width="6"/>
|
|
96
|
+
</g>
|
|
97
|
+
<path d="M41.3672 386V371.168L43.7912 373.472H38.4872V369.2H47.0312V386H41.3672ZM56.7024 386.384C55.2144 386.384 53.8944 386.04 52.7424 385.352C51.6064 384.664 50.7104 383.664 50.0544 382.352C49.4144 381.04 49.0944 379.456 49.0944 377.6C49.0944 375.744 49.4144 374.16 50.0544 372.848C50.7104 371.536 51.6064 370.536 52.7424 369.848C53.8944 369.16 55.2144 368.816 56.7024 368.816C58.1904 368.816 59.5024 369.16 60.6384 369.848C61.7904 370.536 62.6864 371.536 63.3264 372.848C63.9824 374.16 64.3104 375.744 64.3104 377.6C64.3104 379.456 63.9824 381.04 63.3264 382.352C62.6864 383.664 61.7904 384.664 60.6384 385.352C59.5024 386.04 58.1904 386.384 56.7024 386.384ZM56.7024 381.848C57.0704 381.848 57.3984 381.72 57.6864 381.464C57.9744 381.208 58.1984 380.768 58.3584 380.144C58.5344 379.52 58.6224 378.672 58.6224 377.6C58.6224 376.512 58.5344 375.664 58.3584 375.056C58.1984 374.432 57.9744 373.992 57.6864 373.736C57.3984 373.48 57.0704 373.352 56.7024 373.352C56.3344 373.352 56.0064 373.48 55.7184 373.736C55.4304 373.992 55.1984 374.432 55.0224 375.056C54.8624 375.664 54.7824 376.512 54.7824 377.6C54.7824 378.672 54.8624 379.52 55.0224 380.144C55.1984 380.768 55.4304 381.208 55.7184 381.464C56.0064 381.72 56.3344 381.848 56.7024 381.848ZM73.3196 386.384C71.8316 386.384 70.5116 386.04 69.3596 385.352C68.2236 384.664 67.3276 383.664 66.6716 382.352C66.0316 381.04 65.7116 379.456 65.7116 377.6C65.7116 375.744 66.0316 374.16 66.6716 372.848C67.3276 371.536 68.2236 370.536 69.3596 369.848C70.5116 369.16 71.8316 368.816 73.3196 368.816C74.8076 368.816 76.1196 369.16 77.2556 369.848C78.4076 370.536 79.3036 371.536 79.9436 372.848C80.5996 374.16 80.9276 375.744 80.9276 377.6C80.9276 379.456 80.5996 381.04 79.9436 382.352C79.3036 383.664 78.4076 384.664 77.2556 385.352C76.1196 386.04 74.8076 386.384 73.3196 386.384ZM73.3196 381.848C73.6876 381.848 74.0156 381.72 74.3036 381.464C74.5916 381.208 74.8156 380.768 74.9756 380.144C75.1516 379.52 75.2396 378.672 75.2396 377.6C75.2396 376.512 75.1516 375.664 74.9756 375.056C74.8156 374.432 74.5916 373.992 74.3036 373.736C74.0156 373.48 73.6876 373.352 73.3196 373.352C72.9516 373.352 72.6236 373.48 72.3356 373.736C72.0476 373.992 71.8156 374.432 71.6396 375.056C71.4796 375.664 71.3996 376.512 71.3996 377.6C71.3996 378.672 71.4796 379.52 71.6396 380.144C71.8156 380.768 72.0476 381.208 72.3356 381.464C72.6236 381.72 72.9516 381.848 73.3196 381.848Z" fill="black"/>
|
|
98
|
+
<g filter="url(#auto_s3)">
|
|
99
|
+
<circle cx="60" cy="272" r="38.5" fill="#FFC935"/>
|
|
100
|
+
<circle cx="60" cy="272" r="37" stroke="black" stroke-width="6"/>
|
|
101
|
+
</g>
|
|
102
|
+
<path d="M48 290.054L48.0007 253.957C48.0007 252.44 49.6026 251.501 50.8591 252.28L79.088 269.787C80.2877 270.531 80.3076 272.322 79.1249 273.101L50.8953 291.691C49.6401 292.517 48 291.59 48 290.054Z" fill="black"/>
|
|
103
|
+
<defs>
|
|
104
|
+
<filter id="auto_s0" x="20" y="20" width="82" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="1" dy="8"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
105
|
+
<filter id="auto_s1" x="20" y="126" width="82" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="1" dy="8"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
106
|
+
<filter id="auto_s2" x="20" y="338" width="82" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="1" dy="8"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
107
|
+
<filter id="auto_s3" x="20" y="232" width="82" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="1" dy="8"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
108
|
+
<clipPath id="auto_c0"><rect width="40" height="40" fill="white" transform="translate(31.7148 166) rotate(-45)"/></clipPath>
|
|
109
|
+
</defs>
|
|
110
|
+
</svg>`;
|
|
111
|
+
async function loadAutoplayArt() {
|
|
112
|
+
const tex = await svgToTexture(autoplaySvg);
|
|
113
|
+
if (!tex) return void 0;
|
|
114
|
+
const frames = sliceRows(tex, 4);
|
|
115
|
+
return { idle: frames[0], active: frames[2] };
|
|
116
|
+
}
|
|
117
|
+
var bonusSvg = `<svg width="122" height="131" viewBox="0 0 122 131" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
118
|
+
<g filter="url(#bonus_shadow)">
|
|
119
|
+
<circle cx="61" cy="60" r="58" fill="#FFC935"/>
|
|
120
|
+
<circle cx="61" cy="60" r="56" stroke="black" stroke-width="8"/>
|
|
121
|
+
</g>
|
|
122
|
+
<g>
|
|
123
|
+
<rect x="33" y="44" width="54" height="34" rx="8" fill="black"/>
|
|
124
|
+
<circle cx="33" cy="61" r="8" fill="#FFC935"/>
|
|
125
|
+
<circle cx="60" cy="44" r="5.5" fill="#FFC935"/>
|
|
126
|
+
<circle cx="60" cy="78" r="5.5" fill="#FFC935"/>
|
|
127
|
+
<path d="M72 46.5L74.12 52.09L80.08 52.37L75.42 56.11L77 61.88L72 58.6L67 61.88L68.58 56.11L63.92 52.37L69.88 52.09Z" fill="#FFC935"/>
|
|
128
|
+
</g>
|
|
129
|
+
<defs>
|
|
130
|
+
<filter id="bonus_shadow" x="0" y="0" width="122" height="131" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="10"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
131
|
+
</defs>
|
|
132
|
+
</svg>`;
|
|
133
|
+
function loadBonusTexture() {
|
|
134
|
+
return svgToTexture(bonusSvg);
|
|
135
|
+
}
|
|
136
|
+
var betPlusSvg = `<svg width="62" height="69" viewBox="0 0 62 69" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
137
|
+
<g filter="url(#betplus_shadow)">
|
|
138
|
+
<circle cx="30" cy="30" r="28.8" fill="white"/>
|
|
139
|
+
<circle cx="30" cy="30" r="27.5" stroke="black" stroke-width="5"/>
|
|
140
|
+
</g>
|
|
141
|
+
<path d="M30 19L30 41" stroke="black" stroke-width="6" stroke-linecap="round"/>
|
|
142
|
+
<path d="M19 30L41 30" stroke="black" stroke-width="6" stroke-linecap="round"/>
|
|
143
|
+
<defs>
|
|
144
|
+
<filter id="betplus_shadow" x="0" y="0" width="62" height="69" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="1" dy="8"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
145
|
+
</defs>
|
|
146
|
+
</svg>`;
|
|
147
|
+
var betMinusSvg = `<svg width="62" height="69" viewBox="0 0 62 69" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
148
|
+
<g filter="url(#betminus_shadow)">
|
|
149
|
+
<circle cx="30" cy="30" r="28.8" fill="white"/>
|
|
150
|
+
<circle cx="30" cy="30" r="27.5" stroke="black" stroke-width="5"/>
|
|
151
|
+
</g>
|
|
152
|
+
<path d="M19 30L41 30" stroke="black" stroke-width="6" stroke-linecap="round"/>
|
|
153
|
+
<defs>
|
|
154
|
+
<filter id="betminus_shadow" x="0" y="0" width="62" height="69" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="1" dy="8"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
155
|
+
</defs>
|
|
156
|
+
</svg>`;
|
|
157
|
+
function loadBetPlusTexture() {
|
|
158
|
+
return svgToTexture(betPlusSvg);
|
|
159
|
+
}
|
|
160
|
+
function loadBetMinusTexture() {
|
|
161
|
+
return svgToTexture(betMinusSvg);
|
|
162
|
+
}
|
|
163
|
+
var spinDefaultSvg = `<svg width="203" height="213" viewBox="0 0 203 213" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
164
|
+
<g filter="url(#spin_def_shadow)">
|
|
165
|
+
<circle cx="100" cy="100" r="98" fill="white"/>
|
|
166
|
+
<circle cx="100" cy="100" r="96" stroke="black" stroke-width="8"/>
|
|
167
|
+
</g>
|
|
168
|
+
<path d="M54.1507 71.3327L57.8179 73.7414C58.4592 74.1626 59.3176 73.9815 59.7568 73.3509C78.7409 46.0883 125.822 38.4153 145.861 81.1383C146.557 82.6238 144.468 83.7079 143.427 82.4416C116.582 49.786 82.2561 67.6489 76.3548 84.0593C76.1693 84.5752 76.34 85.1374 76.7517 85.498L79.9422 88.2919C80.6791 88.9374 80.5395 90.125 79.6731 90.5803L56.342 102.839C55.4592 103.303 54.3915 102.711 54.3124 101.714L52.0047 72.6115C51.913 71.4554 53.1841 70.698 54.1507 71.3327Z" fill="black" stroke="black" stroke-width="0.672329"/>
|
|
169
|
+
<path d="M145.849 128.667L142.182 126.259C141.541 125.837 140.682 126.018 140.243 126.649C121.259 153.912 74.1779 161.585 54.1394 118.862C53.4426 117.376 55.5319 116.292 56.5728 117.558C83.4179 150.214 117.744 132.351 123.645 115.941C123.831 115.425 123.66 114.863 123.248 114.502L120.058 111.708C119.321 111.063 119.461 109.875 120.327 109.42L143.658 97.1605C144.541 96.6967 145.609 97.2889 145.688 98.2863L147.995 127.388C148.087 128.545 146.816 129.302 145.849 128.667Z" fill="black" stroke="black" stroke-width="0.672329"/>
|
|
170
|
+
<defs>
|
|
171
|
+
<filter id="spin_def_shadow" x="0" y="0" width="203" height="213" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="2" dy="12"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
172
|
+
</defs>
|
|
173
|
+
</svg>`;
|
|
174
|
+
var spinAutoSvg = `<svg width="203" height="213" viewBox="0 0 203 213" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
175
|
+
<g filter="url(#spin_auto_shadow)">
|
|
176
|
+
<circle cx="100" cy="100" r="98" fill="white"/>
|
|
177
|
+
<circle cx="100" cy="100" r="96" stroke="black" stroke-width="8"/>
|
|
178
|
+
</g>
|
|
179
|
+
<path d="M69.0446 74.448C67.402 74.448 65.8153 74.2613 64.2846 73.888C62.754 73.5147 61.494 73.0293 60.5046 72.432L62.6326 67.616C63.566 68.1573 64.602 68.596 65.7406 68.932C66.898 69.2493 68.018 69.408 69.1006 69.408C69.7353 69.408 70.23 69.3707 70.5846 69.296C70.958 69.2027 71.2286 69.0813 71.3966 68.932C71.5646 68.764 71.6486 68.568 71.6486 68.344C71.6486 67.9893 71.4526 67.7093 71.0606 67.504C70.6686 67.2987 70.146 67.1307 69.4926 67C68.858 66.8507 68.158 66.7013 67.3926 66.552C66.6273 66.384 65.8526 66.1693 65.0686 65.908C64.3033 65.6467 63.594 65.3013 62.9406 64.872C62.306 64.4427 61.7926 63.8827 61.4006 63.192C61.0086 62.4827 60.8126 61.6053 60.8126 60.56C60.8126 59.3467 61.1486 58.2453 61.8206 57.256C62.5113 56.248 63.5286 55.4453 64.8726 54.848C66.2353 54.2507 67.9246 53.952 69.9406 53.952C71.266 53.952 72.5726 54.092 73.8606 54.372C75.1486 54.652 76.306 55.0813 77.3326 55.66L75.3446 60.448C74.374 59.9627 73.4313 59.5987 72.5166 59.356C71.6206 59.1133 70.7433 58.992 69.8846 58.992C69.25 58.992 68.746 59.048 68.3726 59.16C67.9993 59.272 67.7286 59.4213 67.5606 59.608C67.4113 59.7947 67.3366 60 67.3366 60.224C67.3366 60.56 67.5326 60.8307 67.9246 61.036C68.3166 61.2227 68.83 61.3813 69.4646 61.512C70.118 61.6427 70.8273 61.7827 71.5926 61.932C72.3766 62.0813 73.1513 62.2867 73.9166 62.548C74.682 62.8093 75.382 63.1547 76.0166 63.584C76.67 64.0133 77.1926 64.5733 77.5846 65.264C77.9766 65.9547 78.1726 66.8133 78.1726 67.84C78.1726 69.0347 77.8273 70.136 77.1366 71.144C76.4646 72.1333 75.4566 72.936 74.1126 73.552C72.7686 74.1493 71.0793 74.448 69.0446 74.448ZM84.1215 74V59.524H78.3815V54.4H96.4695V59.524H90.7295V74H84.1215ZM108.188 74.448C106.602 74.448 105.127 74.196 103.764 73.692C102.42 73.188 101.254 72.4787 100.264 71.564C99.2751 70.6307 98.5004 69.5387 97.9404 68.288C97.3991 67.0373 97.1284 65.6747 97.1284 64.2C97.1284 62.7067 97.3991 61.344 97.9404 60.112C98.5004 58.8613 99.2751 57.7787 100.264 56.864C101.254 55.9307 102.42 55.212 103.764 54.708C105.127 54.204 106.602 53.952 108.188 53.952C109.794 53.952 111.268 54.204 112.612 54.708C113.956 55.212 115.123 55.9307 116.112 56.864C117.102 57.7787 117.867 58.8613 118.408 60.112C118.968 61.344 119.248 62.7067 119.248 64.2C119.248 65.6747 118.968 67.0373 118.408 68.288C117.867 69.5387 117.102 70.6307 116.112 71.564C115.123 72.4787 113.956 73.188 112.612 73.692C111.268 74.196 109.794 74.448 108.188 74.448ZM108.188 69.1C108.804 69.1 109.374 68.988 109.896 68.764C110.438 68.54 110.904 68.2227 111.296 67.812C111.707 67.3827 112.024 66.8693 112.248 66.272C112.472 65.656 112.584 64.9653 112.584 64.2C112.584 63.4347 112.472 62.7533 112.248 62.156C112.024 61.54 111.707 61.0267 111.296 60.616C110.904 60.1867 110.438 59.86 109.896 59.636C109.374 59.412 108.804 59.3 108.188 59.3C107.572 59.3 106.994 59.412 106.452 59.636C105.93 59.86 105.463 60.1867 105.052 60.616C104.66 61.0267 104.352 61.54 104.128 62.156C103.904 62.7533 103.792 63.4347 103.792 64.2C103.792 64.9653 103.904 65.656 104.128 66.272C104.352 66.8693 104.66 67.3827 105.052 67.812C105.463 68.2227 105.93 68.54 106.452 68.764C106.994 68.988 107.572 69.1 108.188 69.1ZM121.647 74V54.4H131.083C132.912 54.4 134.489 54.6987 135.815 55.296C137.159 55.8933 138.195 56.752 138.923 57.872C139.651 58.9733 140.015 60.28 140.015 61.792C140.015 63.304 139.651 64.6107 138.923 65.712C138.195 66.8133 137.159 67.672 135.815 68.288C134.489 68.8853 132.912 69.184 131.083 69.184H125.315L128.255 66.356V74H121.647ZM128.255 67.084L125.315 64.088H130.663C131.577 64.088 132.249 63.8827 132.679 63.472C133.127 63.0613 133.351 62.5013 133.351 61.792C133.351 61.0827 133.127 60.5227 132.679 60.112C132.249 59.7013 131.577 59.496 130.663 59.496H125.315L128.255 56.5V67.084Z" fill="black"/>
|
|
180
|
+
<path d="M74.972 139.96C72.492 139.96 70.092 139.66 67.772 139.06C65.492 138.5 63.552 137.7 61.952 136.66L67.052 126.76C68.292 127.64 69.532 128.24 70.772 128.56C72.052 128.84 73.352 128.98 74.672 128.98C77.512 128.98 79.772 128.14 81.452 126.46C83.172 124.74 84.032 122.26 84.032 119.02C84.032 118.42 84.032 117.84 84.032 117.28C84.032 116.68 84.032 116.08 84.032 115.48L87.272 117.82C86.512 119.18 85.572 120.34 84.452 121.3C83.372 122.22 82.092 122.94 80.612 123.46C79.132 123.94 77.412 124.18 75.452 124.18C72.892 124.18 70.512 123.64 68.312 122.56C66.152 121.44 64.392 119.88 63.032 117.88C61.712 115.84 61.052 113.46 61.052 110.74C61.052 107.74 61.812 105.14 63.332 102.94C64.852 100.74 66.892 99.04 69.452 97.84C72.052 96.64 74.932 96.04 78.092 96.04C82.092 96.04 85.592 96.82 88.592 98.38C91.632 99.9 93.992 102.18 95.672 105.22C97.392 108.26 98.252 112.08 98.252 116.68C98.252 121.6 97.272 125.8 95.312 129.28C93.352 132.72 90.632 135.36 87.152 137.2C83.672 139.04 79.612 139.96 74.972 139.96ZM79.052 114.4C79.892 114.4 80.632 114.22 81.272 113.86C81.952 113.5 82.472 113 82.832 112.36C83.192 111.72 83.372 110.96 83.372 110.08C83.372 109.2 83.192 108.44 82.832 107.8C82.472 107.16 81.952 106.68 81.272 106.36C80.632 106 79.892 105.82 79.052 105.82C78.212 105.82 77.472 106 76.832 106.36C76.192 106.68 75.672 107.16 75.272 107.8C74.912 108.44 74.732 109.2 74.732 110.08C74.732 111.4 75.132 112.46 75.932 113.26C76.772 114.02 77.812 114.4 79.052 114.4ZM114.64 139.96C112.16 139.96 109.76 139.66 107.44 139.06C105.16 138.5 103.22 137.7 101.62 136.66L106.72 126.76C107.96 127.64 109.2 128.24 110.44 128.56C111.72 128.84 113.02 128.98 114.34 128.98C117.18 128.98 119.44 128.14 121.12 126.46C122.84 124.74 123.7 122.26 123.7 119.02C123.7 118.42 123.7 117.84 123.7 117.28C123.7 116.68 123.7 116.08 123.7 115.48L126.94 117.82C126.18 119.18 125.24 120.34 124.12 121.3C123.04 122.22 121.76 122.94 120.28 123.46C118.8 123.94 117.08 124.18 115.12 124.18C112.56 124.18 110.18 123.64 107.98 122.56C105.82 121.44 104.06 119.88 102.7 117.88C101.38 115.84 100.72 113.46 100.72 110.74C100.72 107.74 101.48 105.14 103 102.94C104.52 100.74 106.56 99.04 109.12 97.84C111.72 96.64 114.6 96.04 117.76 96.04C121.76 96.04 125.26 96.82 128.26 98.38C131.3 99.9 133.66 102.18 135.34 105.22C137.06 108.26 137.92 112.08 137.92 116.68C137.92 121.6 136.94 125.8 134.98 129.28C133.02 132.72 130.3 135.36 126.82 137.2C123.34 139.04 119.28 139.96 114.64 139.96ZM118.72 114.4C119.56 114.4 120.3 114.22 120.94 113.86C121.62 113.5 122.14 113 122.5 112.36C122.86 111.72 123.04 110.96 123.04 110.08C123.04 109.2 122.86 108.44 122.5 107.8C122.14 107.16 121.62 106.68 120.94 106.36C120.3 106 119.56 105.82 118.72 105.82C117.88 105.82 117.14 106 116.5 106.36C115.86 106.68 115.34 107.16 114.94 107.8C114.58 108.44 114.4 109.2 114.4 110.08C114.4 111.4 114.8 112.46 115.6 113.26C116.44 114.02 117.48 114.4 118.72 114.4Z" fill="black"/>
|
|
181
|
+
<defs>
|
|
182
|
+
<filter id="spin_auto_shadow" x="0" y="0" width="203" height="213" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="2" dy="12"/><feGaussianBlur stdDeviation="0.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="e"/><feBlend mode="normal" in="SourceGraphic" in2="e" result="shape"/></filter>
|
|
183
|
+
</defs>
|
|
184
|
+
</svg>`;
|
|
185
|
+
async function loadSpinArt() {
|
|
186
|
+
const [def, auto] = await Promise.all([svgToTexture(spinDefaultSvg), svgToTexture(spinAutoSvg)]);
|
|
187
|
+
if (!def || !auto) return void 0;
|
|
188
|
+
return { default: def, auto };
|
|
189
|
+
}
|
|
190
|
+
async function builtinSpinSkin() {
|
|
191
|
+
const art = await loadSpinArt();
|
|
192
|
+
return art ? () => svgSpinSkin(art) : void 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// src/art/index.ts
|
|
196
|
+
async function loadBuiltinArt() {
|
|
197
|
+
const [turbo, auto, bonus, plus, minus, spinSkin] = await Promise.all([
|
|
198
|
+
loadTurboArt(),
|
|
199
|
+
loadAutoplayArt(),
|
|
200
|
+
loadBonusTexture(),
|
|
201
|
+
loadBetPlusTexture(),
|
|
202
|
+
loadBetMinusTexture(),
|
|
203
|
+
builtinSpinSkin()
|
|
204
|
+
]);
|
|
205
|
+
const icons = {};
|
|
206
|
+
if (turbo) {
|
|
207
|
+
icons.turboOff = turbo.off;
|
|
208
|
+
icons.turboOn = turbo.on;
|
|
209
|
+
}
|
|
210
|
+
if (auto) {
|
|
211
|
+
icons.autoIdle = auto.idle;
|
|
212
|
+
icons.autoActive = auto.active;
|
|
213
|
+
}
|
|
214
|
+
if (bonus) icons.bonus = bonus;
|
|
215
|
+
if (plus) icons.betPlus = plus;
|
|
216
|
+
if (minus) icons.betMinus = minus;
|
|
217
|
+
return { icons, spinSkin };
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export { autoplaySvg, betMinusSvg, betPlusSvg, bonusSvg, builtinSpinSkin, loadAutoplayArt, loadBetMinusTexture, loadBetPlusTexture, loadBonusTexture, loadBuiltinArt, loadSpinArt, loadTurboArt, sliceRows, spinAutoSvg, spinDefaultSvg, svgToTexture, turboSvg };
|
|
221
|
+
//# sourceMappingURL=art.js.map
|
|
222
|
+
//# sourceMappingURL=art.js.map
|
package/dist/art.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/art/raster.ts","../src/art/turbo.ts","../src/art/autoplay.ts","../src/art/bonus.ts","../src/art/bet.ts","../src/art/spin.ts","../src/art/index.ts"],"names":[],"mappings":"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","file":"art.js","sourcesContent":["import { Texture, Rectangle, CanvasSource } from 'pixi.js';\n\n/**\n * Shared SVG→texture helpers for the built-in default icon art (`./art/*`). Kept in\n * their own module so a game that imports a single icon loader pulls in only this\n * helper + that one SVG string — the rest tree-shakes away (Charter B2/B5).\n */\n\n/**\n * Rasterize an SVG string to a Texture using the browser's SVG engine (so drop\n * shadows + clip paths render exactly), at `resolution`× the SVG's intrinsic size.\n * Returns `undefined` when there is no DOM (SSR / tests without a document), so\n * callers keep whatever placeholder the view already drew.\n */\nexport async function svgToTexture(svg: string, resolution = 3): Promise<Texture | undefined> {\n if (typeof document === 'undefined' || typeof Image === 'undefined') return undefined;\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const url = URL.createObjectURL(blob);\n try {\n const img = new Image();\n img.src = url;\n await img.decode();\n const w = Math.max(1, Math.round((img.naturalWidth || 100) * resolution));\n const h = Math.max(1, Math.round((img.naturalHeight || 100) * resolution));\n const canvas = document.createElement('canvas');\n canvas.width = w;\n canvas.height = h;\n const ctx = canvas.getContext('2d');\n if (!ctx) return undefined;\n ctx.drawImage(img, 0, 0, w, h);\n // Tag the source with the DPR so it reports the SVG's LOGICAL size (matching a\n // host's `Assets.load({ data: { resolution } })`) — the skins size off that.\n const source = new CanvasSource({ resource: canvas, resolution });\n source.scaleMode = 'linear';\n return new Texture({ source });\n } finally {\n URL.revokeObjectURL(url);\n }\n}\n\n/** Slice a vertically-stacked N-frame sheet into N equal-height frame textures. */\nexport function sliceRows(tex: Texture, rows: number): Texture[] {\n const src = tex.source;\n const rh = src.height / rows;\n return Array.from({ length: rows }, (_, i) => new Texture({ source: src, frame: new Rectangle(0, i * rh, src.width, rh) }));\n}\n","import { type Texture } from 'pixi.js';\nimport { svgToTexture, sliceRows } from './raster';\n\n/**\n * Turbo button art — a 2-frame vertical sheet: OFF (white coin, black » bolt) over\n * ON (gold coin, black » bolt). The sheet is a clean 120×240 so slicing it into two\n * 120px rows centres the circle IDENTICALLY in both frames (off cy=60, on cy=180) —\n * the button never jumps vertically when it toggles off↔on. Edit this string, never\n * redraw by hand.\n */\nexport const turboSvg = `<svg width=\"120\" height=\"240\" viewBox=\"0 0 120 240\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#turbo_off_shadow)\">\n<circle cx=\"60\" cy=\"60\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"60\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<g clip-path=\"url(#turbo_off_clip)\">\n<path d=\"M44.2619 60.2005L67.8115 40.1768C68.3388 39.7284 69.1329 40.1954 69.0052 40.8789L66.0165 56.8784C65.9326 57.3274 66.2687 57.7449 66.7219 57.7546L75.2806 57.9357C75.9717 57.9503 76.2609 58.8324 75.7146 59.2595L49.3755 79.8417C48.814 80.2805 48.0235 79.7387 48.2218 79.051L52.9604 62.6106C53.095 62.1437 52.7536 61.6752 52.2714 61.665L44.7195 61.5052C44.0433 61.4909 43.745 60.6402 44.2619 60.2005Z\" fill=\"black\"/>\n</g>\n<g filter=\"url(#turbo_on_shadow)\">\n<circle cx=\"60\" cy=\"180\" r=\"38.5\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"180\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<g clip-path=\"url(#turbo_on_clip)\">\n<path d=\"M44.2619 180.2005L67.8115 160.1768C68.3388 159.7284 69.1329 160.1954 69.0052 160.8789L66.0165 176.8784C65.9326 177.3274 66.2687 177.7449 66.7219 177.7546L75.2806 177.9357C75.9717 177.9503 76.2609 178.8324 75.7146 179.2595L49.3755 199.8417C48.814 200.2805 48.0235 199.7387 48.2218 199.051L52.9604 182.6106C53.095 182.1437 52.7536 181.6752 52.2714 181.665L44.7195 181.5052C44.0433 181.4909 43.745 180.6402 44.2619 180.2005Z\" fill=\"black\"/>\n</g>\n<defs>\n<filter id=\"turbo_off_shadow\" x=\"20\" y=\"20\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\n<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n<feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/>\n<feOffset dx=\"1\" dy=\"8\"/>\n<feGaussianBlur stdDeviation=\"0.5\"/>\n<feComposite in2=\"hardAlpha\" operator=\"out\"/>\n<feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/>\n<feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow\"/>\n<feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow\" result=\"shape\"/>\n</filter>\n<filter id=\"turbo_on_shadow\" x=\"20\" y=\"140\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\n<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n<feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/>\n<feOffset dx=\"1\" dy=\"8\"/>\n<feGaussianBlur stdDeviation=\"0.5\"/>\n<feComposite in2=\"hardAlpha\" operator=\"out\"/>\n<feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/>\n<feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow\"/>\n<feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow\" result=\"shape\"/>\n</filter>\n<clipPath id=\"turbo_off_clip\"><rect width=\"32\" height=\"40\" fill=\"white\" transform=\"translate(44 40)\"/></clipPath>\n<clipPath id=\"turbo_on_clip\"><rect width=\"32\" height=\"40\" fill=\"white\" transform=\"translate(44 160)\"/></clipPath>\n</defs>\n</svg>`;\n\n/** Rasterize the turbo sheet and slice it into the off + on frame textures. */\nexport async function loadTurboArt(): Promise<{ off: Texture; on: Texture } | undefined> {\n const tex = await svgToTexture(turboSvg);\n if (!tex) return undefined;\n const [off, on] = sliceRows(tex, 2) as [Texture, Texture];\n return { off, on };\n}\n","import { type Texture } from 'pixi.js';\nimport { svgToTexture, sliceRows } from './raster';\n\n/**\n * Autoplay button art — a 4-frame vertical sheet (idle ▶ · stop ◼ · active ▶ (gold) ·\n * \"100\"). The view uses frame 0 as the idle look and frame 2 as the engaged look.\n * Edit this string, never redraw by hand.\n */\nexport const autoplaySvg = `<svg width=\"120\" height=\"438\" viewBox=\"0 0 120 438\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#auto_s0)\">\n<circle cx=\"60\" cy=\"60\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"60\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<path d=\"M48 78.0536L48.0007 41.9565C48.0007 40.4404 49.6026 39.5008 50.8591 40.28L79.088 57.7871C80.2877 58.5312 80.3076 60.3219 79.1249 61.1009L50.8953 79.6908C49.6401 80.5174 48 79.5899 48 78.0536Z\" fill=\"black\"/>\n<g filter=\"url(#auto_s1)\">\n<circle cx=\"60\" cy=\"166\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"166\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<g clip-path=\"url(#auto_c0)\">\n<path d=\"M64.2791 187.251L38.7551 161.726C37.683 160.654 38.1513 158.857 39.5908 158.519L71.931 150.938C73.3055 150.615 74.5858 151.868 74.3003 153.255L67.484 186.361C67.181 187.833 65.3653 188.337 64.2791 187.251Z\" fill=\"black\"/>\n</g>\n<g filter=\"url(#auto_s2)\">\n<circle cx=\"60\" cy=\"378\" r=\"38.5\" fill=\"white\"/>\n<circle cx=\"60\" cy=\"378\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<path d=\"M41.3672 386V371.168L43.7912 373.472H38.4872V369.2H47.0312V386H41.3672ZM56.7024 386.384C55.2144 386.384 53.8944 386.04 52.7424 385.352C51.6064 384.664 50.7104 383.664 50.0544 382.352C49.4144 381.04 49.0944 379.456 49.0944 377.6C49.0944 375.744 49.4144 374.16 50.0544 372.848C50.7104 371.536 51.6064 370.536 52.7424 369.848C53.8944 369.16 55.2144 368.816 56.7024 368.816C58.1904 368.816 59.5024 369.16 60.6384 369.848C61.7904 370.536 62.6864 371.536 63.3264 372.848C63.9824 374.16 64.3104 375.744 64.3104 377.6C64.3104 379.456 63.9824 381.04 63.3264 382.352C62.6864 383.664 61.7904 384.664 60.6384 385.352C59.5024 386.04 58.1904 386.384 56.7024 386.384ZM56.7024 381.848C57.0704 381.848 57.3984 381.72 57.6864 381.464C57.9744 381.208 58.1984 380.768 58.3584 380.144C58.5344 379.52 58.6224 378.672 58.6224 377.6C58.6224 376.512 58.5344 375.664 58.3584 375.056C58.1984 374.432 57.9744 373.992 57.6864 373.736C57.3984 373.48 57.0704 373.352 56.7024 373.352C56.3344 373.352 56.0064 373.48 55.7184 373.736C55.4304 373.992 55.1984 374.432 55.0224 375.056C54.8624 375.664 54.7824 376.512 54.7824 377.6C54.7824 378.672 54.8624 379.52 55.0224 380.144C55.1984 380.768 55.4304 381.208 55.7184 381.464C56.0064 381.72 56.3344 381.848 56.7024 381.848ZM73.3196 386.384C71.8316 386.384 70.5116 386.04 69.3596 385.352C68.2236 384.664 67.3276 383.664 66.6716 382.352C66.0316 381.04 65.7116 379.456 65.7116 377.6C65.7116 375.744 66.0316 374.16 66.6716 372.848C67.3276 371.536 68.2236 370.536 69.3596 369.848C70.5116 369.16 71.8316 368.816 73.3196 368.816C74.8076 368.816 76.1196 369.16 77.2556 369.848C78.4076 370.536 79.3036 371.536 79.9436 372.848C80.5996 374.16 80.9276 375.744 80.9276 377.6C80.9276 379.456 80.5996 381.04 79.9436 382.352C79.3036 383.664 78.4076 384.664 77.2556 385.352C76.1196 386.04 74.8076 386.384 73.3196 386.384ZM73.3196 381.848C73.6876 381.848 74.0156 381.72 74.3036 381.464C74.5916 381.208 74.8156 380.768 74.9756 380.144C75.1516 379.52 75.2396 378.672 75.2396 377.6C75.2396 376.512 75.1516 375.664 74.9756 375.056C74.8156 374.432 74.5916 373.992 74.3036 373.736C74.0156 373.48 73.6876 373.352 73.3196 373.352C72.9516 373.352 72.6236 373.48 72.3356 373.736C72.0476 373.992 71.8156 374.432 71.6396 375.056C71.4796 375.664 71.3996 376.512 71.3996 377.6C71.3996 378.672 71.4796 379.52 71.6396 380.144C71.8156 380.768 72.0476 381.208 72.3356 381.464C72.6236 381.72 72.9516 381.848 73.3196 381.848Z\" fill=\"black\"/>\n<g filter=\"url(#auto_s3)\">\n<circle cx=\"60\" cy=\"272\" r=\"38.5\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"272\" r=\"37\" stroke=\"black\" stroke-width=\"6\"/>\n</g>\n<path d=\"M48 290.054L48.0007 253.957C48.0007 252.44 49.6026 251.501 50.8591 252.28L79.088 269.787C80.2877 270.531 80.3076 272.322 79.1249 273.101L50.8953 291.691C49.6401 292.517 48 291.59 48 290.054Z\" fill=\"black\"/>\n<defs>\n<filter id=\"auto_s0\" x=\"20\" y=\"20\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<filter id=\"auto_s1\" x=\"20\" y=\"126\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<filter id=\"auto_s2\" x=\"20\" y=\"338\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<filter id=\"auto_s3\" x=\"20\" y=\"232\" width=\"82\" height=\"89\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n<clipPath id=\"auto_c0\"><rect width=\"40\" height=\"40\" fill=\"white\" transform=\"translate(31.7148 166) rotate(-45)\"/></clipPath>\n</defs>\n</svg>`;\n\n/** Rasterize the autoplay sheet → { idle: frame 0, active: frame 2 } (matching the view). */\nexport async function loadAutoplayArt(): Promise<{ idle: Texture; active: Texture } | undefined> {\n const tex = await svgToTexture(autoplaySvg);\n if (!tex) return undefined;\n const frames = sliceRows(tex, 4);\n return { idle: frames[0]!, active: frames[2]! };\n}\n","import { type Texture } from 'pixi.js';\nimport { svgToTexture } from './raster';\n\n/**\n * Buy-feature (bonus) coin — the Figma \"Bonus\" icon (node 147:4928): a gold coin\n * (#FFC935, black ring, soft drop shadow) stamped with a black admit-one TICKET — a\n * rounded bar with a concave notch bitten out of the LEFT edge and a top/bottom-centre\n * perforation — carrying a gold STAR in its upper right. The notches + star are drawn\n * in the coin's gold so they read as cut-outs of the black ticket. Edit this string,\n * never redraw by hand.\n */\nexport const bonusSvg = `<svg width=\"122\" height=\"131\" viewBox=\"0 0 122 131\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#bonus_shadow)\">\n<circle cx=\"61\" cy=\"60\" r=\"58\" fill=\"#FFC935\"/>\n<circle cx=\"61\" cy=\"60\" r=\"56\" stroke=\"black\" stroke-width=\"8\"/>\n</g>\n<g>\n<rect x=\"33\" y=\"44\" width=\"54\" height=\"34\" rx=\"8\" fill=\"black\"/>\n<circle cx=\"33\" cy=\"61\" r=\"8\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"44\" r=\"5.5\" fill=\"#FFC935\"/>\n<circle cx=\"60\" cy=\"78\" r=\"5.5\" fill=\"#FFC935\"/>\n<path d=\"M72 46.5L74.12 52.09L80.08 52.37L75.42 56.11L77 61.88L72 58.6L67 61.88L68.58 56.11L63.92 52.37L69.88 52.09Z\" fill=\"#FFC935\"/>\n</g>\n<defs>\n<filter id=\"bonus_shadow\" x=\"0\" y=\"0\" width=\"122\" height=\"131\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dy=\"10\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>`;\n\n/** Rasterize the buy-feature coin. Undefined with no DOM (SSR/tests). */\nexport function loadBonusTexture(): Promise<Texture | undefined> {\n return svgToTexture(bonusSvg);\n}\n","import { type Texture } from 'pixi.js';\nimport { svgToTexture } from './raster';\n\n/**\n * Bet stepper art — the + and − coins (62×69, white coin, black ring, black glyph,\n * soft drop shadow). Edit these strings, never redraw by hand.\n */\nexport const betPlusSvg = `<svg width=\"62\" height=\"69\" viewBox=\"0 0 62 69\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#betplus_shadow)\">\n<circle cx=\"30\" cy=\"30\" r=\"28.8\" fill=\"white\"/>\n<circle cx=\"30\" cy=\"30\" r=\"27.5\" stroke=\"black\" stroke-width=\"5\"/>\n</g>\n<path d=\"M30 19L30 41\" stroke=\"black\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n<path d=\"M19 30L41 30\" stroke=\"black\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n<defs>\n<filter id=\"betplus_shadow\" x=\"0\" y=\"0\" width=\"62\" height=\"69\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>`;\n\nexport const betMinusSvg = `<svg width=\"62\" height=\"69\" viewBox=\"0 0 62 69\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#betminus_shadow)\">\n<circle cx=\"30\" cy=\"30\" r=\"28.8\" fill=\"white\"/>\n<circle cx=\"30\" cy=\"30\" r=\"27.5\" stroke=\"black\" stroke-width=\"5\"/>\n</g>\n<path d=\"M19 30L41 30\" stroke=\"black\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n<defs>\n<filter id=\"betminus_shadow\" x=\"0\" y=\"0\" width=\"62\" height=\"69\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"1\" dy=\"8\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>`;\n\n/** Rasterize the bet + coin. Undefined with no DOM (SSR/tests). */\nexport function loadBetPlusTexture(): Promise<Texture | undefined> {\n return svgToTexture(betPlusSvg);\n}\n\n/** Rasterize the bet − coin. Undefined with no DOM (SSR/tests). */\nexport function loadBetMinusTexture(): Promise<Texture | undefined> {\n return svgToTexture(betMinusSvg);\n}\n","import { type Texture } from 'pixi.js';\nimport { svgToTexture } from './raster';\nimport { svgSpinSkin } from '../skin/svgSpinSkin';\nimport { type SpinSkinFactory } from '../skin/SpinSkin';\n\n/**\n * Spin button art — two 203×213 artboards (circle centred at 100,100, r≈100): the\n * default rotating-arrows look and the autoplay \"AUTO\" look. Feed both to\n * {@link svgSpinSkin} (or use {@link builtinSpinSkin}). Edit these strings, never\n * redraw by hand.\n */\nexport const spinDefaultSvg = `<svg width=\"203\" height=\"213\" viewBox=\"0 0 203 213\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#spin_def_shadow)\">\n<circle cx=\"100\" cy=\"100\" r=\"98\" fill=\"white\"/>\n<circle cx=\"100\" cy=\"100\" r=\"96\" stroke=\"black\" stroke-width=\"8\"/>\n</g>\n<path d=\"M54.1507 71.3327L57.8179 73.7414C58.4592 74.1626 59.3176 73.9815 59.7568 73.3509C78.7409 46.0883 125.822 38.4153 145.861 81.1383C146.557 82.6238 144.468 83.7079 143.427 82.4416C116.582 49.786 82.2561 67.6489 76.3548 84.0593C76.1693 84.5752 76.34 85.1374 76.7517 85.498L79.9422 88.2919C80.6791 88.9374 80.5395 90.125 79.6731 90.5803L56.342 102.839C55.4592 103.303 54.3915 102.711 54.3124 101.714L52.0047 72.6115C51.913 71.4554 53.1841 70.698 54.1507 71.3327Z\" fill=\"black\" stroke=\"black\" stroke-width=\"0.672329\"/>\n<path d=\"M145.849 128.667L142.182 126.259C141.541 125.837 140.682 126.018 140.243 126.649C121.259 153.912 74.1779 161.585 54.1394 118.862C53.4426 117.376 55.5319 116.292 56.5728 117.558C83.4179 150.214 117.744 132.351 123.645 115.941C123.831 115.425 123.66 114.863 123.248 114.502L120.058 111.708C119.321 111.063 119.461 109.875 120.327 109.42L143.658 97.1605C144.541 96.6967 145.609 97.2889 145.688 98.2863L147.995 127.388C148.087 128.545 146.816 129.302 145.849 128.667Z\" fill=\"black\" stroke=\"black\" stroke-width=\"0.672329\"/>\n<defs>\n<filter id=\"spin_def_shadow\" x=\"0\" y=\"0\" width=\"203\" height=\"213\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"2\" dy=\"12\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>`;\n\nexport const spinAutoSvg = `<svg width=\"203\" height=\"213\" viewBox=\"0 0 203 213\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g filter=\"url(#spin_auto_shadow)\">\n<circle cx=\"100\" cy=\"100\" r=\"98\" fill=\"white\"/>\n<circle cx=\"100\" cy=\"100\" r=\"96\" stroke=\"black\" stroke-width=\"8\"/>\n</g>\n<path d=\"M69.0446 74.448C67.402 74.448 65.8153 74.2613 64.2846 73.888C62.754 73.5147 61.494 73.0293 60.5046 72.432L62.6326 67.616C63.566 68.1573 64.602 68.596 65.7406 68.932C66.898 69.2493 68.018 69.408 69.1006 69.408C69.7353 69.408 70.23 69.3707 70.5846 69.296C70.958 69.2027 71.2286 69.0813 71.3966 68.932C71.5646 68.764 71.6486 68.568 71.6486 68.344C71.6486 67.9893 71.4526 67.7093 71.0606 67.504C70.6686 67.2987 70.146 67.1307 69.4926 67C68.858 66.8507 68.158 66.7013 67.3926 66.552C66.6273 66.384 65.8526 66.1693 65.0686 65.908C64.3033 65.6467 63.594 65.3013 62.9406 64.872C62.306 64.4427 61.7926 63.8827 61.4006 63.192C61.0086 62.4827 60.8126 61.6053 60.8126 60.56C60.8126 59.3467 61.1486 58.2453 61.8206 57.256C62.5113 56.248 63.5286 55.4453 64.8726 54.848C66.2353 54.2507 67.9246 53.952 69.9406 53.952C71.266 53.952 72.5726 54.092 73.8606 54.372C75.1486 54.652 76.306 55.0813 77.3326 55.66L75.3446 60.448C74.374 59.9627 73.4313 59.5987 72.5166 59.356C71.6206 59.1133 70.7433 58.992 69.8846 58.992C69.25 58.992 68.746 59.048 68.3726 59.16C67.9993 59.272 67.7286 59.4213 67.5606 59.608C67.4113 59.7947 67.3366 60 67.3366 60.224C67.3366 60.56 67.5326 60.8307 67.9246 61.036C68.3166 61.2227 68.83 61.3813 69.4646 61.512C70.118 61.6427 70.8273 61.7827 71.5926 61.932C72.3766 62.0813 73.1513 62.2867 73.9166 62.548C74.682 62.8093 75.382 63.1547 76.0166 63.584C76.67 64.0133 77.1926 64.5733 77.5846 65.264C77.9766 65.9547 78.1726 66.8133 78.1726 67.84C78.1726 69.0347 77.8273 70.136 77.1366 71.144C76.4646 72.1333 75.4566 72.936 74.1126 73.552C72.7686 74.1493 71.0793 74.448 69.0446 74.448ZM84.1215 74V59.524H78.3815V54.4H96.4695V59.524H90.7295V74H84.1215ZM108.188 74.448C106.602 74.448 105.127 74.196 103.764 73.692C102.42 73.188 101.254 72.4787 100.264 71.564C99.2751 70.6307 98.5004 69.5387 97.9404 68.288C97.3991 67.0373 97.1284 65.6747 97.1284 64.2C97.1284 62.7067 97.3991 61.344 97.9404 60.112C98.5004 58.8613 99.2751 57.7787 100.264 56.864C101.254 55.9307 102.42 55.212 103.764 54.708C105.127 54.204 106.602 53.952 108.188 53.952C109.794 53.952 111.268 54.204 112.612 54.708C113.956 55.212 115.123 55.9307 116.112 56.864C117.102 57.7787 117.867 58.8613 118.408 60.112C118.968 61.344 119.248 62.7067 119.248 64.2C119.248 65.6747 118.968 67.0373 118.408 68.288C117.867 69.5387 117.102 70.6307 116.112 71.564C115.123 72.4787 113.956 73.188 112.612 73.692C111.268 74.196 109.794 74.448 108.188 74.448ZM108.188 69.1C108.804 69.1 109.374 68.988 109.896 68.764C110.438 68.54 110.904 68.2227 111.296 67.812C111.707 67.3827 112.024 66.8693 112.248 66.272C112.472 65.656 112.584 64.9653 112.584 64.2C112.584 63.4347 112.472 62.7533 112.248 62.156C112.024 61.54 111.707 61.0267 111.296 60.616C110.904 60.1867 110.438 59.86 109.896 59.636C109.374 59.412 108.804 59.3 108.188 59.3C107.572 59.3 106.994 59.412 106.452 59.636C105.93 59.86 105.463 60.1867 105.052 60.616C104.66 61.0267 104.352 61.54 104.128 62.156C103.904 62.7533 103.792 63.4347 103.792 64.2C103.792 64.9653 103.904 65.656 104.128 66.272C104.352 66.8693 104.66 67.3827 105.052 67.812C105.463 68.2227 105.93 68.54 106.452 68.764C106.994 68.988 107.572 69.1 108.188 69.1ZM121.647 74V54.4H131.083C132.912 54.4 134.489 54.6987 135.815 55.296C137.159 55.8933 138.195 56.752 138.923 57.872C139.651 58.9733 140.015 60.28 140.015 61.792C140.015 63.304 139.651 64.6107 138.923 65.712C138.195 66.8133 137.159 67.672 135.815 68.288C134.489 68.8853 132.912 69.184 131.083 69.184H125.315L128.255 66.356V74H121.647ZM128.255 67.084L125.315 64.088H130.663C131.577 64.088 132.249 63.8827 132.679 63.472C133.127 63.0613 133.351 62.5013 133.351 61.792C133.351 61.0827 133.127 60.5227 132.679 60.112C132.249 59.7013 131.577 59.496 130.663 59.496H125.315L128.255 56.5V67.084Z\" fill=\"black\"/>\n<path d=\"M74.972 139.96C72.492 139.96 70.092 139.66 67.772 139.06C65.492 138.5 63.552 137.7 61.952 136.66L67.052 126.76C68.292 127.64 69.532 128.24 70.772 128.56C72.052 128.84 73.352 128.98 74.672 128.98C77.512 128.98 79.772 128.14 81.452 126.46C83.172 124.74 84.032 122.26 84.032 119.02C84.032 118.42 84.032 117.84 84.032 117.28C84.032 116.68 84.032 116.08 84.032 115.48L87.272 117.82C86.512 119.18 85.572 120.34 84.452 121.3C83.372 122.22 82.092 122.94 80.612 123.46C79.132 123.94 77.412 124.18 75.452 124.18C72.892 124.18 70.512 123.64 68.312 122.56C66.152 121.44 64.392 119.88 63.032 117.88C61.712 115.84 61.052 113.46 61.052 110.74C61.052 107.74 61.812 105.14 63.332 102.94C64.852 100.74 66.892 99.04 69.452 97.84C72.052 96.64 74.932 96.04 78.092 96.04C82.092 96.04 85.592 96.82 88.592 98.38C91.632 99.9 93.992 102.18 95.672 105.22C97.392 108.26 98.252 112.08 98.252 116.68C98.252 121.6 97.272 125.8 95.312 129.28C93.352 132.72 90.632 135.36 87.152 137.2C83.672 139.04 79.612 139.96 74.972 139.96ZM79.052 114.4C79.892 114.4 80.632 114.22 81.272 113.86C81.952 113.5 82.472 113 82.832 112.36C83.192 111.72 83.372 110.96 83.372 110.08C83.372 109.2 83.192 108.44 82.832 107.8C82.472 107.16 81.952 106.68 81.272 106.36C80.632 106 79.892 105.82 79.052 105.82C78.212 105.82 77.472 106 76.832 106.36C76.192 106.68 75.672 107.16 75.272 107.8C74.912 108.44 74.732 109.2 74.732 110.08C74.732 111.4 75.132 112.46 75.932 113.26C76.772 114.02 77.812 114.4 79.052 114.4ZM114.64 139.96C112.16 139.96 109.76 139.66 107.44 139.06C105.16 138.5 103.22 137.7 101.62 136.66L106.72 126.76C107.96 127.64 109.2 128.24 110.44 128.56C111.72 128.84 113.02 128.98 114.34 128.98C117.18 128.98 119.44 128.14 121.12 126.46C122.84 124.74 123.7 122.26 123.7 119.02C123.7 118.42 123.7 117.84 123.7 117.28C123.7 116.68 123.7 116.08 123.7 115.48L126.94 117.82C126.18 119.18 125.24 120.34 124.12 121.3C123.04 122.22 121.76 122.94 120.28 123.46C118.8 123.94 117.08 124.18 115.12 124.18C112.56 124.18 110.18 123.64 107.98 122.56C105.82 121.44 104.06 119.88 102.7 117.88C101.38 115.84 100.72 113.46 100.72 110.74C100.72 107.74 101.48 105.14 103 102.94C104.52 100.74 106.56 99.04 109.12 97.84C111.72 96.64 114.6 96.04 117.76 96.04C121.76 96.04 125.26 96.82 128.26 98.38C131.3 99.9 133.66 102.18 135.34 105.22C137.06 108.26 137.92 112.08 137.92 116.68C137.92 121.6 136.94 125.8 134.98 129.28C133.02 132.72 130.3 135.36 126.82 137.2C123.34 139.04 119.28 139.96 114.64 139.96ZM118.72 114.4C119.56 114.4 120.3 114.22 120.94 113.86C121.62 113.5 122.14 113 122.5 112.36C122.86 111.72 123.04 110.96 123.04 110.08C123.04 109.2 122.86 108.44 122.5 107.8C122.14 107.16 121.62 106.68 120.94 106.36C120.3 106 119.56 105.82 118.72 105.82C117.88 105.82 117.14 106 116.5 106.36C115.86 106.68 115.34 107.16 114.94 107.8C114.58 108.44 114.4 109.2 114.4 110.08C114.4 111.4 114.8 112.46 115.6 113.26C116.44 114.02 117.48 114.4 118.72 114.4Z\" fill=\"black\"/>\n<defs>\n<filter id=\"spin_auto_shadow\" x=\"0\" y=\"0\" width=\"203\" height=\"213\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dx=\"2\" dy=\"12\"/><feGaussianBlur stdDeviation=\"0.5\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"e\"/><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"e\" result=\"shape\"/></filter>\n</defs>\n</svg>`;\n\n/** Rasterize the two spin artboards into { default, auto } textures. */\nexport async function loadSpinArt(): Promise<{ default: Texture; auto: Texture } | undefined> {\n const [def, auto] = await Promise.all([svgToTexture(spinDefaultSvg), svgToTexture(spinAutoSvg)]);\n if (!def || !auto) return undefined;\n return { default: def, auto };\n}\n\n/** One-call spin skin from the built-in art — pass straight to `mountHud({ spinSkin })`.\n * Resolves to `undefined` with no DOM, so the caller keeps the drawn placeholder skin. */\nexport async function builtinSpinSkin(): Promise<SpinSkinFactory | undefined> {\n const art = await loadSpinArt();\n return art ? () => svgSpinSkin(art) : undefined;\n}\n","/**\n * `@open-slot-ui/pixi/art` — the library's built-in default ICON ART: the reference\n * Figma SVGs, bundled as strings and rasterized to textures on demand.\n *\n * Tree-shakeable by design (Charter B2/B5): each icon lives in its own module, so a\n * game that needs just one — say the buy-feature coin —\n *\n * ```ts\n * import { loadBonusTexture } from '@open-slot-ui/pixi/art';\n * const bonus = await loadBonusTexture();\n * mountHud(app, spec, { icons: { bonus } });\n * ```\n *\n * bundles only that one SVG; nothing here is referenced by `mountHud` itself, so a\n * game that ships its own art pays for none of it. For the whole designed set in one\n * call, use {@link loadBuiltinArt}.\n */\nimport { type SpinSkinFactory } from '../skin/SpinSkin';\nimport { type OpenUIIcons } from '../OpenUIPixi';\nimport { loadTurboArt } from './turbo';\nimport { loadAutoplayArt } from './autoplay';\nimport { loadBonusTexture } from './bonus';\nimport { loadBetPlusTexture, loadBetMinusTexture } from './bet';\nimport { builtinSpinSkin } from './spin';\n\nexport { svgToTexture, sliceRows } from './raster';\nexport { turboSvg, loadTurboArt } from './turbo';\nexport { autoplaySvg, loadAutoplayArt } from './autoplay';\nexport { bonusSvg, loadBonusTexture } from './bonus';\nexport { betPlusSvg, betMinusSvg, loadBetPlusTexture, loadBetMinusTexture } from './bet';\nexport { spinDefaultSvg, spinAutoSvg, loadSpinArt, builtinSpinSkin } from './spin';\n\n/** The full designed art set, ready to hand straight to `mountHud`. */\nexport interface BuiltinArt {\n /** Button icons — spread into `mountHud(app, spec, { icons })`. */\n icons: OpenUIIcons;\n /** Spin-button skin — pass as `mountHud(app, spec, { spinSkin })`. */\n spinSkin?: SpinSkinFactory;\n}\n\n/**\n * Load the ENTIRE built-in icon set at once (turbo, autoplay, buy, bet ±, spin) and\n * return it shaped for `mountHud`. Referencing every icon, this pulls the whole art\n * bundle — use it for a zero-config \"give me the designed HUD\"; import the per-icon\n * loaders instead when you only need a few (so the rest tree-shakes away). Resolves\n * with empty art when there is no DOM (SSR/tests), so mounting still succeeds.\n *\n * ```ts\n * const { icons, spinSkin } = await loadBuiltinArt();\n * mountHud(app, spec, { icons, spinSkin });\n * ```\n */\nexport async function loadBuiltinArt(): Promise<BuiltinArt> {\n const [turbo, auto, bonus, plus, minus, spinSkin] = await Promise.all([\n loadTurboArt(),\n loadAutoplayArt(),\n loadBonusTexture(),\n loadBetPlusTexture(),\n loadBetMinusTexture(),\n builtinSpinSkin(),\n ]);\n const icons: OpenUIIcons = {};\n if (turbo) {\n icons.turboOff = turbo.off;\n icons.turboOn = turbo.on;\n }\n if (auto) {\n icons.autoIdle = auto.idle;\n icons.autoActive = auto.active;\n }\n if (bonus) icons.bonus = bonus;\n if (plus) icons.betPlus = plus;\n if (minus) icons.betMinus = minus;\n return { icons, spinSkin };\n}\n"]}
|