@everymatrix/lottery-program-wof 1.22.5 → 1.22.7
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/lottery-program-wof.js +1197 -1889
- package/dist/lottery-program-wof.js.map +1 -1
- package/package.json +2 -2
- package/src/LotteryProgramWof.svelte +7 -6
- package/src/calc.point.ts +1 -112
- package/src/calc.ts +0 -6
- package/src/class.svgcalc.ts +10 -155
- package/src/images/{areaSec.svg → themePointerArea.svg} +37 -4
- package/src/images/themeShadow.svg +27 -0
- package/src/private.item.svelte +12 -16
- package/src/private.item.svg.scss +179 -20
- package/src/private.item.svg.svelte +72 -199
- package/src/private.message.svelte +13 -1
- package/src/private.outcomes.svelte +1 -0
- package/src/themes.image.center.ts +40 -13
- package/src/themes.ts +2 -229
- package/src/translations.js +1 -1
- package/src/business.dom.test.ts +0 -34
- package/src/business.dom.ts +0 -21
- package/src/images/area.svg +0 -11
- package/src/images/areaV1.svg +0 -18
- package/src/images/areaV2.svg +0 -17
- package/src/images/backgroundShadow.svg +0 -22
- package/src/themes.image.base.ts +0 -13
- package/src/themes.image.pointer.ts +0 -29
- package/src/themes.partitions.ts +0 -222
- /package/src/images/{pointerArrow.svg → theme2Arrow.svg} +0 -0
- /package/src/images/{pointerArrow3.svg → theme3Arrow.svg} +0 -0
- /package/src/images/{pointerArrow6.svg → theme7Arrow.svg} +0 -0
- /package/src/images/{light.svg → themePartitionLight.svg} +0 -0
|
@@ -37,24 +37,6 @@ svg {
|
|
|
37
37
|
transition: opacity 0.3s;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.HighLightArea {
|
|
41
|
-
mix-blend-mode: color-dodge;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.HighLightAreaBackground {
|
|
45
|
-
mix-blend-mode: screen;
|
|
46
|
-
opacity: 0.41;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.HighLightAreaV1 {
|
|
50
|
-
background: radial-gradient(72.02% 62.64% at 50% 84.62%, rgba(255, 184, 47, 0.7) 0%, rgba(255, 184, 47, 0.384271) 30.52%, rgba(255, 184, 47, 0.165346) 52.4%, rgba(255, 184, 47, 0) 100%);
|
|
51
|
-
filter: blur(9px);
|
|
52
|
-
}
|
|
53
|
-
.HighLightAreaV2 {
|
|
54
|
-
background: radial-gradient(87.18% 75.82% at 50% 84.62%, rgba(255, 248, 186, 0.7) 0%, rgba(255, 248, 186, 0.384271) 29.48%, rgba(255, 248, 186, 0) 100%);
|
|
55
|
-
filter: blur(9px);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
40
|
.FortuneContainer {
|
|
59
41
|
width: 100%;
|
|
60
42
|
display: flex;
|
|
@@ -64,10 +46,10 @@ svg {
|
|
|
64
46
|
|
|
65
47
|
.Center {
|
|
66
48
|
cursor: pointer;
|
|
67
|
-
|
|
49
|
+
|
|
68
50
|
transition: filter;
|
|
69
51
|
transition-duration: 1s;
|
|
70
|
-
|
|
52
|
+
|
|
71
53
|
&.disabled {
|
|
72
54
|
filter: grayscale(80%);
|
|
73
55
|
}
|
|
@@ -127,3 +109,180 @@ svg {
|
|
|
127
109
|
.PartitionTextEntity.Anticlockwise {
|
|
128
110
|
text-align: end;
|
|
129
111
|
}
|
|
112
|
+
|
|
113
|
+
// Themed Bottom
|
|
114
|
+
|
|
115
|
+
.theme1, .theme4, .theme5 {
|
|
116
|
+
foreignObject.Bottom {
|
|
117
|
+
background-image: var(--img-theme1-bg3), var(--img-theme-BgBlackRing), var(--img-theme-BgHalo);
|
|
118
|
+
background-position: center, center, center;
|
|
119
|
+
background-size: calc(var(--radius) * 2px + var(--ratio) * 7px), calc(var(--radius) * 2px + var(--ratio) * 37px), calc(var(--radius) * 2px + var(--ratio) * 130px);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.theme2, .theme6 {
|
|
124
|
+
foreignObject.Bottom {
|
|
125
|
+
background-image: var(--img-theme2-bg3), var(--img-theme-BgHalo), var(--img-theme-BgBlackRing);
|
|
126
|
+
background-position: center, center, center;
|
|
127
|
+
background-size: calc(var(--radius) * 2px + var(--ratio) * 8px), calc(var(--radius) * 2px + var(--ratio) * 123px), calc(var(--radius) * 2px + var(--ratio) * 37px);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.theme3 {
|
|
132
|
+
foreignObject.Bottom {
|
|
133
|
+
background-image: var(--img-theme3-bg2), var(--img-theme3-bg1);
|
|
134
|
+
background-position: center, center;
|
|
135
|
+
background-size: calc(var(--radius) * 2px + var(--ratio) * 57px), calc(var(--radius) * 2px + var(--ratio) * 125px);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.theme7 {
|
|
140
|
+
foreignObject.Bottom {
|
|
141
|
+
background-image: var(--img-theme7-bg3), var(--img-theme7-bg2), var(--img-theme7-bg1);
|
|
142
|
+
background-position: center, center calc(var(--size) * 1px - var(--ratio) * 95px), calc(var(--ratio) * 42px) calc(var(--ratio) * -5px);
|
|
143
|
+
background-size: calc(var(--radius) * 2px + 35px), calc(var(--radius) * 2px * 0.6), calc(var(--radius) * 2.7px);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Themed Middle
|
|
148
|
+
.theme1, .theme4 {
|
|
149
|
+
foreignObject.Middle {
|
|
150
|
+
background-image: var(--img-theme-center1);
|
|
151
|
+
background-position: center;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.theme2 {
|
|
156
|
+
foreignObject.Middle {
|
|
157
|
+
background-image: var(--img-theme2-center), var(--img-theme2-arrow);
|
|
158
|
+
background-position: center, center 60px;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.theme3 {
|
|
163
|
+
foreignObject.Middle {
|
|
164
|
+
background-image: var(--img-theme3-center), var(--img-theme3-arrow);
|
|
165
|
+
background-position: center, center 39px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.theme5, .theme6 {
|
|
170
|
+
foreignObject.Middle {
|
|
171
|
+
background-image: var(--img-theme-center2);
|
|
172
|
+
background-position: center;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.theme7 {
|
|
177
|
+
foreignObject.Middle {
|
|
178
|
+
background-image: var(--img-theme7-center), var(--img-theme7-arrow);
|
|
179
|
+
background-position: center, center 36px;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Themed Top
|
|
184
|
+
.theme7 {
|
|
185
|
+
foreignObject.Top {
|
|
186
|
+
background-image: var(--img-theme7-light);
|
|
187
|
+
background-position: 294px 135px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.theme1, .theme2, .theme3, .theme4, .theme5, .theme6 {
|
|
192
|
+
foreignObject.Top {
|
|
193
|
+
background-image: var(--img-theme-shadow);
|
|
194
|
+
background-position: center;
|
|
195
|
+
mix-blend-mode: multiply;
|
|
196
|
+
background-size: calc(var(--radius) * 2px);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Themed Partition
|
|
201
|
+
|
|
202
|
+
.theme2 {
|
|
203
|
+
foreignObject.Partition1 {
|
|
204
|
+
background-image: var(--img-theme-partition-light);
|
|
205
|
+
background-position: center calc((var(--size) / 2 - var(--radius)) * 1px - calc(var(--ratio) * 22px));
|
|
206
|
+
transform: rotate(calc(var(--index) * 360deg / var(--length)));
|
|
207
|
+
}
|
|
208
|
+
foreignObject.Partition2 {
|
|
209
|
+
background-image: var(--img-theme-partition-light), var(--img-theme-partition-light);
|
|
210
|
+
background-position: center calc((var(--size) / 2 - var(--radius)) * 1px - calc(var(--ratio) * 22px));
|
|
211
|
+
transform: rotate(calc((var(--index) + 0.5) * 360deg / var(--length)));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
foreignObject.PointerArea {
|
|
216
|
+
background-image: var(--img-theme-pointer-area);
|
|
217
|
+
background-position: center -3px;
|
|
218
|
+
mix-blend-mode: screen;
|
|
219
|
+
background-size: 51%;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
foreignObject.Partition1, foreignObject.Partition2 {
|
|
223
|
+
transform-origin: center;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
foreignObject.Customable {
|
|
227
|
+
overflow: visible;
|
|
228
|
+
background-repeat: no-repeat;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.PartitionBackground {
|
|
232
|
+
background-size: calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);
|
|
233
|
+
background-position: center;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.theme1, .theme2 {
|
|
237
|
+
.PartitionBackground:nth-child(4n+1) { background-image: radial-gradient(#009C9C 0%, #002634 100%) }
|
|
238
|
+
.PartitionBackground:nth-child(4n+2) { background-image: radial-gradient(#AA00BF 0%, #3B0031 100%) }
|
|
239
|
+
.PartitionBackground:nth-child(4n+3) { background-image: radial-gradient(#0068CD 0%, #150D42 100%) }
|
|
240
|
+
.PartitionBackground:nth-child(4n+4) { background-image: radial-gradient(#DA005B 0%, #400021 100%) }
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.theme3 {
|
|
244
|
+
.PartitionBackground:nth-child(4n+1) { background-image: radial-gradient(#066 0%, #007F76 13%, #00B59B 42%, #00DDB5 67.01%, #00F6C6 88.01%, #0FC 100.01%) }
|
|
245
|
+
.PartitionBackground:nth-child(4n+2) { background-image: radial-gradient(#580065 22.67%, #D453FF 91.3%) }
|
|
246
|
+
.PartitionBackground:nth-child(4n+3) { background-image: radial-gradient(#FFE767 -0.01%, #F28F00 100%) }
|
|
247
|
+
.PartitionBackground:nth-child(4n+4) { background-image: radial-gradient(#900A42 22.59%, #960A44 23.94%, #B60B53 31.36%, #D00C5E 39.45%, #E40D67 48.22%, #F30D6E 57.66%, #FB0D71 69.8%, #FE0E73 90.03%) }
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.theme4, .theme5, .theme6 {
|
|
251
|
+
.PartitionBackground:nth-child(4n+1) { background: radial-gradient(#3B0031 0%, #7E008E 100.01%) }
|
|
252
|
+
.PartitionBackground:nth-child(4n+2) { background: radial-gradient(#5A005F 22.67%, #EA53FF 91.3%) }
|
|
253
|
+
.PartitionBackground:nth-child(4n+3) { background: radial-gradient(#B300C3 -0.01%, #4D003B 100%) }
|
|
254
|
+
.PartitionBackground:nth-child(4n+4) { background: radial-gradient(#59007B 22.59%, #B753FF 90.03%) }
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.theme7 {
|
|
258
|
+
.PartitionBackground:nth-child(2n+1) { background: linear-gradient(90.23deg, #F6AD3F 16.59%, #AF8531 99.8%) }
|
|
259
|
+
.PartitionBackground:nth-child(2n+2) { background: linear-gradient(90deg, #323234 -0.01%, #272425 54.99%, #231F1F 99.99%) }
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.PartitionBackground {
|
|
263
|
+
transform-origin: center;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
// Themed Partition Background Stroke
|
|
268
|
+
.PartitionBackgroundStroke {
|
|
269
|
+
fill: transparent;
|
|
270
|
+
stroke-width: 0.5px;
|
|
271
|
+
stroke-dasharray: var(--radius) calc(2 * pi / var(--length) * var(--radius));
|
|
272
|
+
}
|
|
273
|
+
.theme1, .theme2 {
|
|
274
|
+
.PartitionBackgroundStroke {
|
|
275
|
+
stroke: #FCD755;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.PointerPartitionFrame {
|
|
280
|
+
stroke: #FFDD64;
|
|
281
|
+
fill: transparent;
|
|
282
|
+
stroke-dasharray: var(--radius) calc(2 * pi / var(--length) * var(--radius));
|
|
283
|
+
stroke-width: 0px;
|
|
284
|
+
|
|
285
|
+
&.active {
|
|
286
|
+
stroke-width: 3px;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { api } from './business';
|
|
9
9
|
import { onMountMessageLifeCycle, _postMessage } from './message';
|
|
10
10
|
import type { LotteryProgramForPlayer } from './types.business';
|
|
11
|
-
import {
|
|
11
|
+
import { themes } from './themes';
|
|
12
12
|
import { setProps } from './util';
|
|
13
13
|
import { Spinner } from './class.spinner';
|
|
14
14
|
import { SvgCalc } from './class.svgcalc';
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
import { _ } from './i18n';
|
|
17
17
|
import { setClientStyling } from './widget';
|
|
18
18
|
import { defines } from './themes.image.center';
|
|
19
|
-
import { themedCssPointer } from './themes.image.pointer';
|
|
20
19
|
|
|
21
20
|
// properties common
|
|
22
21
|
export let lang: Lang = Lang.en
|
|
@@ -25,19 +24,20 @@
|
|
|
25
24
|
export let clientstyling:string = ''
|
|
26
25
|
export let contentdirection: keyof typeof ContentDirection = 'anticlockwise'
|
|
27
26
|
export let partitiondivisor: string = ''
|
|
28
|
-
|
|
27
|
+
|
|
29
28
|
let rootContainer: HTMLElement
|
|
30
29
|
$: clientstyling && rootContainer && setClientStyling(rootContainer, clientstyling);
|
|
31
30
|
|
|
32
31
|
// properties
|
|
33
32
|
export let id: string = undefined
|
|
34
33
|
export let size: string = ''
|
|
34
|
+
export let radius: string = ''
|
|
35
35
|
|
|
36
36
|
let bonus: LotteryProgramForPlayer
|
|
37
37
|
const updateOptions = async () => {
|
|
38
38
|
if(!options.length){
|
|
39
39
|
options = await getOptions(bonus, lang)
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
_postMessage({ type: 'wof-private-options-ready', id })
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -66,12 +66,13 @@
|
|
|
66
66
|
let shownFirstCheck = false
|
|
67
67
|
|
|
68
68
|
let speed: number = 0
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
$: themeIndex = bonus?.program?.metadata?.template || 0
|
|
71
71
|
$: theme = themes[themeIndex] || themes[0]
|
|
72
72
|
$: calc = new SvgCalc({
|
|
73
|
-
size,
|
|
74
|
-
|
|
73
|
+
size,
|
|
74
|
+
radius,
|
|
75
|
+
options,
|
|
75
76
|
themeIndex,
|
|
76
77
|
contentdirection,
|
|
77
78
|
})
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
|
|
91
92
|
const setImageProps = () => {
|
|
92
93
|
if(!rootContainer) return;
|
|
93
|
-
|
|
94
|
+
|
|
94
95
|
for ( let index = 0; index <= options.length; index++ ) {
|
|
95
96
|
const image = rootContainer.querySelector(`.PartitionImage.PartitionImage${index} image`)
|
|
96
97
|
if(image) {
|
|
@@ -119,14 +120,16 @@
|
|
|
119
120
|
modeValue: bonus.next
|
|
120
121
|
})
|
|
121
122
|
}else{
|
|
122
|
-
process.setMessage(
|
|
123
|
+
process.setMessage({
|
|
124
|
+
mode: 'NoNext',
|
|
125
|
+
})
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
$: process = new Process({
|
|
128
|
-
id,
|
|
129
|
-
afterSetMessage: () => messageShown = true,
|
|
131
|
+
id,
|
|
132
|
+
afterSetMessage: () => messageShown = true,
|
|
130
133
|
halter: (index, cb) => spinner.halt(calc.getDeg(index), cb),
|
|
131
134
|
afterSuccess: () => isShowPrizeArea = true,
|
|
132
135
|
fetcher: async (guid) => await api.draw(endpoint, session, id, guid, options)
|
|
@@ -156,7 +159,7 @@
|
|
|
156
159
|
},
|
|
157
160
|
'wof-private-message-close': (data) => {
|
|
158
161
|
if(data.id !== id) return;
|
|
159
|
-
|
|
162
|
+
|
|
160
163
|
isSpinning = false
|
|
161
164
|
setTimeout(() => updateSpinable(), 1)
|
|
162
165
|
messageShown = false
|
|
@@ -174,10 +177,10 @@
|
|
|
174
177
|
$: sizeProps = { height: size, width: size}
|
|
175
178
|
</script>
|
|
176
179
|
|
|
177
|
-
<div
|
|
178
|
-
class={`WheelContainer theme${Number(themeIndex) + 1}`}
|
|
180
|
+
<div
|
|
181
|
+
class={`WheelContainer theme${Number(themeIndex) + 1}`}
|
|
179
182
|
bind:this={rootContainer}
|
|
180
|
-
style={defines()}
|
|
183
|
+
style={`${defines()} --length: ${options.length}; --radius: ${radius}; --ratio: ${Number(size) / 480}; --size: ${size}`}
|
|
181
184
|
>
|
|
182
185
|
{#if size && options.length}
|
|
183
186
|
<svg
|
|
@@ -187,126 +190,97 @@
|
|
|
187
190
|
style:opacity={messageShown ? '.3': ''}
|
|
188
191
|
>
|
|
189
192
|
<foreignObject {...sizeProps} class="Bottom Customable" />
|
|
190
|
-
|
|
193
|
+
|
|
191
194
|
<g class="PartitionsContainer" {...calc.getSpinnerProps()}>
|
|
192
195
|
<g class="PartitionsBackgrounds">
|
|
193
196
|
{#each options as option, index}
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
<foreignObject
|
|
198
|
+
clip-path={`url(#clip${index})`}
|
|
199
|
+
class="PartitionBackground Customable"
|
|
200
|
+
style={`--index: ${index}`}
|
|
201
|
+
width={size}
|
|
202
|
+
height={size}
|
|
197
203
|
/>
|
|
198
204
|
{/each}
|
|
199
205
|
</g>
|
|
206
|
+
<g class="PartitionsBackgroundStrokes">
|
|
207
|
+
{#each options as option, index}
|
|
208
|
+
<path
|
|
209
|
+
class="PartitionBackgroundStroke"
|
|
210
|
+
{...calc.getPartitionDraw(index)}
|
|
211
|
+
width={size}
|
|
212
|
+
height={size}
|
|
213
|
+
/>
|
|
214
|
+
{/each}
|
|
215
|
+
</g>
|
|
200
216
|
|
|
201
|
-
<g class="Partitions">
|
|
217
|
+
<g class="Partitions" style:filter={optionFilter}>
|
|
202
218
|
{#each options as option,index}
|
|
203
219
|
|
|
204
220
|
{#if option.image}
|
|
205
221
|
<g
|
|
206
222
|
class={`PartitionImage PartitionImage${index}`}
|
|
207
223
|
use:renderImage={index}
|
|
208
|
-
style:filter={optionFilter}
|
|
209
224
|
/>
|
|
210
225
|
{/if}
|
|
211
226
|
|
|
212
227
|
{#if option.name}
|
|
213
|
-
<foreignObject
|
|
228
|
+
<foreignObject
|
|
214
229
|
class="PartitionText"
|
|
215
230
|
{...calc.getSvgTextPropsAdjustedByImage(index)}
|
|
216
|
-
style:filter={optionFilter}
|
|
217
231
|
>
|
|
218
232
|
<div class="PartitionTextEntityContainer">
|
|
219
233
|
<p class={`PartitionTextEntity${calc.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`}>{option.name}</p>
|
|
220
234
|
</div>
|
|
221
235
|
</foreignObject>
|
|
222
236
|
{/if}
|
|
237
|
+
|
|
223
238
|
{/each}
|
|
224
239
|
</g>
|
|
225
|
-
|
|
226
|
-
{#if themeIndex != 6}
|
|
227
|
-
<defs>
|
|
228
|
-
<radialGradient
|
|
229
|
-
id="shadow-fill"
|
|
230
|
-
gradientUnits="userSpaceOnUse"
|
|
231
|
-
{...calc.getShadowSize()}
|
|
232
|
-
>
|
|
233
|
-
{#each shadowSteps as step}
|
|
234
|
-
<stop offset={step.offset} stop-color={step.color}/>
|
|
235
|
-
{/each}
|
|
236
|
-
</radialGradient>
|
|
237
|
-
</defs>
|
|
238
|
-
<circle
|
|
239
|
-
{...calc.getShadowSize()}
|
|
240
|
-
fill="url(#shadow-fill)"
|
|
241
|
-
style="mix-blend-mode:multiply"
|
|
242
|
-
/>
|
|
243
|
-
{/if}
|
|
244
|
-
|
|
240
|
+
|
|
245
241
|
</g>
|
|
246
242
|
|
|
243
|
+
<g class="PartitionsCustomable1">
|
|
244
|
+
{#each options as option,index}
|
|
245
|
+
<foreignObject
|
|
246
|
+
class="Partition1 Customable"
|
|
247
|
+
style={`--index: ${index}`}
|
|
248
|
+
{...sizeProps}
|
|
249
|
+
/>
|
|
250
|
+
{/each}
|
|
251
|
+
</g>
|
|
252
|
+
<g class="PartitionsCustomable2">
|
|
253
|
+
{#each options as option,index}
|
|
254
|
+
<foreignObject
|
|
255
|
+
class="Partition2 Customable"
|
|
256
|
+
style={`--index: ${index}`}
|
|
257
|
+
{...sizeProps}
|
|
258
|
+
/>
|
|
259
|
+
{/each}
|
|
260
|
+
</g>
|
|
247
261
|
|
|
248
262
|
{#if theme.pointerMode === PointerMode.Partition}
|
|
249
263
|
<g class="PointerContainer" {...calc.getSpinnerProps()}>
|
|
250
|
-
|
|
251
|
-
<foreignObject
|
|
252
|
-
|
|
253
|
-
width={size}
|
|
254
|
-
height={size}
|
|
255
|
-
/>
|
|
256
|
-
{/if}
|
|
257
|
-
<image
|
|
258
|
-
{...{
|
|
259
|
-
class: "HighLightAreaBackground",
|
|
260
|
-
...calc.getBackgroundImageProps(0),
|
|
261
|
-
}}
|
|
262
|
-
/>
|
|
263
|
-
<image
|
|
264
|
-
{...{
|
|
265
|
-
class: "HighLightArea",
|
|
266
|
-
...calc.getBackgroundImageProps(1),
|
|
267
|
-
}}
|
|
268
|
-
/>
|
|
269
|
-
|
|
264
|
+
|
|
265
|
+
<foreignObject class="PointerArea Customable" {...sizeProps} />
|
|
266
|
+
|
|
270
267
|
<path
|
|
271
268
|
class="PointerPartitionFrame"
|
|
272
|
-
{
|
|
273
|
-
{...
|
|
274
|
-
/>
|
|
275
|
-
</g>
|
|
276
|
-
{/if}
|
|
277
|
-
|
|
278
|
-
<foreignObject
|
|
279
|
-
class="Top Customable"
|
|
280
|
-
width={size}
|
|
281
|
-
height={size}
|
|
282
|
-
/>
|
|
283
|
-
|
|
284
|
-
{#if theme.pointerMode === PointerMode.Arrow}
|
|
285
|
-
<g class="PointerContainer" {...calc.getSpinnerProps()}>
|
|
286
|
-
<foreignObject
|
|
287
|
-
class="Customable"
|
|
288
|
-
width={size}
|
|
289
|
-
height={size}
|
|
290
|
-
style={themedCssPointer(Number(themeIndex))}
|
|
269
|
+
class:active={isShowPrizeArea}
|
|
270
|
+
{...calc.getPartitionDraw(0)}
|
|
291
271
|
/>
|
|
292
272
|
</g>
|
|
293
273
|
{/if}
|
|
294
274
|
|
|
295
|
-
<foreignObject
|
|
296
|
-
|
|
297
|
-
width={size}
|
|
298
|
-
height={size}
|
|
299
|
-
/>
|
|
275
|
+
<foreignObject class="Middle Customable" {...sizeProps} />
|
|
276
|
+
<foreignObject class="Top Customable" {...sizeProps} />
|
|
300
277
|
|
|
301
278
|
<g
|
|
302
279
|
class="Center"
|
|
303
280
|
class:disabled={isSpinning}
|
|
304
|
-
x="240"
|
|
305
|
-
y="240"
|
|
306
281
|
on:click={() => eventSpin()}
|
|
307
282
|
>
|
|
308
|
-
<foreignObject
|
|
309
|
-
class="Customable"
|
|
283
|
+
<foreignObject
|
|
310
284
|
x={Number(size)/2 - 100/2}
|
|
311
285
|
y={Number(size)/2 - 100/2}
|
|
312
286
|
width={100}
|
|
@@ -314,119 +288,18 @@
|
|
|
314
288
|
/>
|
|
315
289
|
</g>
|
|
316
290
|
|
|
317
|
-
|
|
318
|
-
<g
|
|
319
|
-
{#each options as option,index}
|
|
320
|
-
|
|
321
|
-
<
|
|
291
|
+
<!-- defs -->
|
|
292
|
+
<g>
|
|
293
|
+
{#each options as option, index}
|
|
294
|
+
<clipPath {...{id: `clip${index}`}}>
|
|
295
|
+
<path {...calc.getPartitionDraw(index)} />
|
|
296
|
+
</clipPath>
|
|
322
297
|
{/each}
|
|
323
298
|
</g>
|
|
324
|
-
{/if}
|
|
325
|
-
|
|
326
|
-
<!-- defs -->
|
|
327
|
-
|
|
328
|
-
{#each calc.getDefs() as def}
|
|
329
|
-
<defs>
|
|
330
|
-
<linearGradient {...def.props}>
|
|
331
|
-
{#each def.steps as step}
|
|
332
|
-
<stop offset={step.offset} stop-color={step.color} />
|
|
333
|
-
{/each}
|
|
334
|
-
</linearGradient>
|
|
335
|
-
</defs>
|
|
336
|
-
{/each}
|
|
337
|
-
<defs>
|
|
338
|
-
<linearGradient id="GPointerPartitionFrame" x1="50.7564" y1="-9.24463" x2="50.7564" y2="115.67" gradientUnits="userSpaceOnUse">
|
|
339
|
-
<stop offset="0" stop-color="#E7A60D"/>
|
|
340
|
-
<stop offset="0.378125" stop-color="#FFDD64"/>
|
|
341
|
-
<stop offset="1" stop-color="#FFF100"/>
|
|
342
|
-
</linearGradient>
|
|
343
|
-
</defs>
|
|
344
299
|
</svg>
|
|
345
300
|
{/if}
|
|
346
301
|
</div>
|
|
347
302
|
|
|
348
303
|
<style lang="scss">
|
|
349
304
|
@import './private.item.svg.scss';
|
|
350
|
-
|
|
351
|
-
// Themed Bottom
|
|
352
|
-
|
|
353
|
-
.theme1, .theme4, .theme5 {
|
|
354
|
-
foreignObject.Bottom {
|
|
355
|
-
background-image: var(--img-theme1-bg3), var(--img-theme-BgBlackRing), var(--img-theme-BgHalo);
|
|
356
|
-
background-position: center, center, center;
|
|
357
|
-
background-size: 68%, 77%, 98%;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.theme2, .theme6 {
|
|
362
|
-
foreignObject.Bottom {
|
|
363
|
-
background-image: var(--img-theme2-bg3), var(--img-theme-BgHalo), var(--img-theme-BgBlackRing);
|
|
364
|
-
background-position: center, center, center;
|
|
365
|
-
background-size: 69%, 92%, 76%;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.theme3 {
|
|
370
|
-
foreignObject.Bottom {
|
|
371
|
-
background-image: var(--img-theme3-bg2), var(--img-theme3-bg1);
|
|
372
|
-
background-position: center, center;
|
|
373
|
-
background-size: 78%, 93%;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.theme7 {
|
|
378
|
-
foreignObject.Bottom {
|
|
379
|
-
background-image: var(--img-theme7-bg3), var(--img-theme7-bg2), var(--img-theme7-bg1);
|
|
380
|
-
background-position: center, center 404px, 13px -31px;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
// Themed Middle
|
|
385
|
-
.theme1, .theme4 {
|
|
386
|
-
foreignObject.Middle {
|
|
387
|
-
background-image: var(--img-theme-center1);
|
|
388
|
-
background-position: center;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.theme2 {
|
|
393
|
-
foreignObject.Middle {
|
|
394
|
-
background-image: var(--img-theme2-center);
|
|
395
|
-
background-position: center;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.theme3 {
|
|
400
|
-
foreignObject.Middle {
|
|
401
|
-
background-image: var(--img-theme3-center);
|
|
402
|
-
background-position: center;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.theme5, .theme6 {
|
|
407
|
-
foreignObject.Middle {
|
|
408
|
-
background-image: var(--img-theme-center2);
|
|
409
|
-
background-position: center;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.theme7 {
|
|
414
|
-
foreignObject.Middle {
|
|
415
|
-
background-image: var(--img-theme7-center);
|
|
416
|
-
background-position: center;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// Themed Top
|
|
421
|
-
.theme7 {
|
|
422
|
-
foreignObject.Top {
|
|
423
|
-
background-image: var(--img-theme7-light);
|
|
424
|
-
background-position: 303px 135px;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
foreignObject.Customable {
|
|
429
|
-
overflow: visible;
|
|
430
|
-
background-repeat: no-repeat;
|
|
431
|
-
}
|
|
432
|
-
</style>
|
|
305
|
+
</style>
|
|
@@ -79,6 +79,14 @@
|
|
|
79
79
|
|
|
80
80
|
$: prizeSrc = modeValue?.prizeSrc || giftimagesrc || giftSvg
|
|
81
81
|
|
|
82
|
+
const handlerTC = () => _postMessage({ type: "OnTCClicked", WofProgramID: id })
|
|
83
|
+
|
|
84
|
+
let holderTC: HTMLElement
|
|
85
|
+
const bindEventTC = () => {
|
|
86
|
+
holderTC.querySelector('a').addEventListener('click', handlerTC)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
$: holderTC && bindEventTC()
|
|
82
90
|
</script>
|
|
83
91
|
|
|
84
92
|
|
|
@@ -102,6 +110,10 @@
|
|
|
102
110
|
<p>{@html $_('wof.ShowNext', {values: { startTime }})}</p>
|
|
103
111
|
{/if}
|
|
104
112
|
|
|
113
|
+
{#if mode === 'NoNext'}
|
|
114
|
+
<p bind:this={holderTC}>{@html $_(`wof.NoNext`)}</p>
|
|
115
|
+
{/if}
|
|
116
|
+
|
|
105
117
|
{#if mode === 'gift'}
|
|
106
118
|
<p>
|
|
107
119
|
<img src={prizeSrc} alt="" class="GiftImage">
|
|
@@ -123,7 +135,7 @@
|
|
|
123
135
|
<p>{@html $_('wof.Loss')}</p>
|
|
124
136
|
{/if}
|
|
125
137
|
|
|
126
|
-
{#if !['init-failed', 'show-next'].includes(mode)
|
|
138
|
+
{#if !['init-failed', 'show-next', 'NoNext'].includes(mode)}
|
|
127
139
|
<div>
|
|
128
140
|
<button
|
|
129
141
|
class="MessagePanelButton"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
export let endpoint: string = ''
|
|
16
16
|
export let session: string = ''
|
|
17
17
|
export let clientstyling:string = ''
|
|
18
|
+
export let id: string = ''
|
|
18
19
|
|
|
19
20
|
let rootContainer: HTMLElement
|
|
20
21
|
$: clientstyling && rootContainer && setClientStyling(rootContainer, clientstyling);
|