DmitrMakeev
commited on
Commit
•
b94e502
1
Parent(s):
be6d463
Update koleso.html
Browse files- koleso.html +5 -5
koleso.html
CHANGED
@@ -78,13 +78,13 @@ body {
|
|
78 |
<script>
|
79 |
|
80 |
const sectors = [
|
81 |
-
{ color: '#f82', label: '
|
82 |
{ color: '#0bf', label: '10', probability: 20 },
|
83 |
{ color: '#fb0', label: '200', probability: 15 },
|
84 |
{ color: '#0fb', label: '50', probability: 20 },
|
85 |
{ color: '#b0f', label: '100', probability: 15 },
|
86 |
-
{ color: '#f0b', label: '5', probability:
|
87 |
-
{ color: '#bf0', label: '500', probability:
|
88 |
]
|
89 |
|
90 |
const rand = (m, M) => Math.random() * (M - m) + m
|
@@ -118,7 +118,7 @@ function drawSector(sector, i) {
|
|
118 |
ctx.rotate(ang + arc / 2)
|
119 |
ctx.textAlign = 'right'
|
120 |
ctx.fillStyle = '#fff'
|
121 |
-
ctx.font = 'bold
|
122 |
ctx.fillText(sector.label, rad - 10, 10)
|
123 |
//
|
124 |
ctx.restore()
|
@@ -127,7 +127,7 @@ function drawSector(sector, i) {
|
|
127 |
function rotate() {
|
128 |
const sector = sectors[getIndex()]
|
129 |
ctx.canvas.style.transform = `rotate(${ang - PI / 2}rad)`
|
130 |
-
spinEl.textContent = !angVel ? '
|
131 |
spinEl.style.background = sector.color
|
132 |
}
|
133 |
|
|
|
78 |
<script>
|
79 |
|
80 |
const sectors = [
|
81 |
+
{ color: '#f82', label: 'Stack', probability: 10 },
|
82 |
{ color: '#0bf', label: '10', probability: 20 },
|
83 |
{ color: '#fb0', label: '200', probability: 15 },
|
84 |
{ color: '#0fb', label: '50', probability: 20 },
|
85 |
{ color: '#b0f', label: '100', probability: 15 },
|
86 |
+
{ color: '#f0b', label: '5', probability: 10 },
|
87 |
+
{ color: '#bf0', label: '500', probability: 10 }
|
88 |
]
|
89 |
|
90 |
const rand = (m, M) => Math.random() * (M - m) + m
|
|
|
118 |
ctx.rotate(ang + arc / 2)
|
119 |
ctx.textAlign = 'right'
|
120 |
ctx.fillStyle = '#fff'
|
121 |
+
ctx.font = 'bold 39px sans-serif' // Увеличенный размер шрифта на 30%
|
122 |
ctx.fillText(sector.label, rad - 10, 10)
|
123 |
//
|
124 |
ctx.restore()
|
|
|
127 |
function rotate() {
|
128 |
const sector = sectors[getIndex()]
|
129 |
ctx.canvas.style.transform = `rotate(${ang - PI / 2}rad)`
|
130 |
+
spinEl.textContent = !angVel ? 'SPIN' : sector.label
|
131 |
spinEl.style.background = sector.color
|
132 |
}
|
133 |
|