Skip to content

Commit

Permalink
Merge pull request #2 from zweidenker/Wider-Polly
Browse files Browse the repository at this point in the history
Making Polly wider, scale needleHeight accordingly
  • Loading branch information
christian2denker authored Oct 30, 2024
2 parents 2cb3649 + da61c50 commit 1574af1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@
<div class="slider-container">
<svg id="sliderSVG" viewBox="0 0 300 150" preserveAspectRatio="xMidYMid meet" overflow="visible">
<!-- Curved slider path -->
<path id="sliderPath" d="M 50 150 A 100 100 0 0 1 250 150" class="slider"></path>
<path id="sliderPath" d="M 25 150 A 125 125 0 0 1 275 150" class="slider"></path>

<!-- Tachometer needle -->
<line id="needle" x1="150" y1="150" x2="150" y2="75" class="needle"></line>
<line id="needle" x1="150" y1="150" x2="150" y2="50" class="needle"></line>

<!-- Slider thumb -->
<circle id="thumb" cx="150" cy="50" r="13" class="thumb">
<circle id="thumb" cx="150" cy="25" r="13" class="thumb">
<animate
attributeName="r"
values="13; 15; 13"
Expand All @@ -171,9 +171,9 @@
/>
</circle>
<g id="arrows" fill="#00447E">
<path transform="translate(113, 40) scale(0.6)" d="M25.2058 1.77375C25.7575 1.74713 26.2262 2.17274 26.2529 2.72439C26.2795 3.27603 25.8539 3.7448 25.3022 3.77142L25.2058 1.77375ZM1.08967 10.6609C0.56142 10.4998 0.263828 9.94092 0.42498 9.41267L3.0511 0.80433C3.21225 0.27608 3.77112 -0.0215123 4.29938 0.13964C4.82763 0.300791 5.12522 0.859662 4.96407 1.38791L2.62974 9.03977L10.2816 11.3741C10.8098 11.5353 11.1074 12.0941 10.9463 12.6224C10.7851 13.1506 10.2263 13.4482 9.69801 13.2871L1.08967 10.6609ZM25.254 2.77258C25.3022 3.77142 25.3023 3.77141 25.3025 3.77141C25.3025 3.77141 25.3025 3.77141 25.3026 3.7714C25.3026 3.7714 25.3025 3.77141 25.3024 3.77141C25.3022 3.77142 25.3016 3.77145 25.3007 3.7715C25.2989 3.77159 25.2958 3.77175 25.2914 3.77198C25.2827 3.77244 25.2689 3.77319 25.2501 3.77428C25.2126 3.77645 25.1554 3.77994 25.0793 3.7851C24.9271 3.79543 24.6998 3.81242 24.4054 3.83879C23.8164 3.89154 22.9593 3.98175 21.8977 4.13106C19.7731 4.42987 16.8373 4.96427 13.5966 5.90528L13.0389 3.98461C16.3917 3.01105 19.4241 2.45927 21.6192 2.15055C22.7175 1.99608 23.6082 1.90218 24.227 1.84677C24.5365 1.81905 24.7781 1.80095 24.9439 1.78969C25.0268 1.78407 25.0907 1.78016 25.1347 1.77761C25.1567 1.77634 25.1737 1.77541 25.1856 1.77478C25.1915 1.77447 25.1962 1.77423 25.1996 1.77405C25.2013 1.77397 25.2026 1.7739 25.2037 1.77385C25.2042 1.77382 25.2046 1.7738 25.205 1.77379C25.2052 1.77378 25.2054 1.77377 25.2055 1.77376C25.2057 1.77375 25.2058 1.77375 25.254 2.77258ZM13.5966 5.90528C10.3544 6.84671 7.4132 8.01906 5.27984 8.95795C4.21434 9.42687 3.35321 9.8363 2.76016 10.1276C2.4637 10.2732 2.23441 10.3892 2.08027 10.4683C2.0032 10.5078 1.94493 10.5381 1.90646 10.5582C1.88723 10.5683 1.87295 10.5758 1.86374 10.5806C1.85913 10.5831 1.8558 10.5848 1.85375 10.5859C1.85272 10.5865 1.85202 10.5868 1.85164 10.587C1.85145 10.5871 1.85134 10.5872 1.85131 10.5872C1.8513 10.5872 1.85134 10.5872 1.85133 10.5872C1.85139 10.5872 1.85147 10.5871 1.38146 9.70446C0.911455 8.8218 0.911576 8.82173 0.911717 8.82166C0.911791 8.82162 0.911953 8.82153 0.912101 8.82145C0.912398 8.8213 0.912777 8.82109 0.913237 8.82085C0.914157 8.82036 0.915402 8.8197 0.91697 8.81887C0.920106 8.81721 0.924535 8.81486 0.930242 8.81185C0.941654 8.80583 0.958177 8.79713 0.979684 8.78589C1.0227 8.76339 1.08566 8.73068 1.16756 8.68868C1.33135 8.60467 1.57097 8.48346 1.87842 8.33245C2.49318 8.03049 3.37984 7.60901 4.47421 7.12738C6.66061 6.16515 9.68753 4.95775 13.0389 3.98461L13.5966 5.90528Z" ></path>
<path transform="translate(113, 15) scale(0.6)" d="M25.2058 1.77375C25.7575 1.74713 26.2262 2.17274 26.2529 2.72439C26.2795 3.27603 25.8539 3.7448 25.3022 3.77142L25.2058 1.77375ZM1.08967 10.6609C0.56142 10.4998 0.263828 9.94092 0.42498 9.41267L3.0511 0.80433C3.21225 0.27608 3.77112 -0.0215123 4.29938 0.13964C4.82763 0.300791 5.12522 0.859662 4.96407 1.38791L2.62974 9.03977L10.2816 11.3741C10.8098 11.5353 11.1074 12.0941 10.9463 12.6224C10.7851 13.1506 10.2263 13.4482 9.69801 13.2871L1.08967 10.6609ZM25.254 2.77258C25.3022 3.77142 25.3023 3.77141 25.3025 3.77141C25.3025 3.77141 25.3025 3.77141 25.3026 3.7714C25.3026 3.7714 25.3025 3.77141 25.3024 3.77141C25.3022 3.77142 25.3016 3.77145 25.3007 3.7715C25.2989 3.77159 25.2958 3.77175 25.2914 3.77198C25.2827 3.77244 25.2689 3.77319 25.2501 3.77428C25.2126 3.77645 25.1554 3.77994 25.0793 3.7851C24.9271 3.79543 24.6998 3.81242 24.4054 3.83879C23.8164 3.89154 22.9593 3.98175 21.8977 4.13106C19.7731 4.42987 16.8373 4.96427 13.5966 5.90528L13.0389 3.98461C16.3917 3.01105 19.4241 2.45927 21.6192 2.15055C22.7175 1.99608 23.6082 1.90218 24.227 1.84677C24.5365 1.81905 24.7781 1.80095 24.9439 1.78969C25.0268 1.78407 25.0907 1.78016 25.1347 1.77761C25.1567 1.77634 25.1737 1.77541 25.1856 1.77478C25.1915 1.77447 25.1962 1.77423 25.1996 1.77405C25.2013 1.77397 25.2026 1.7739 25.2037 1.77385C25.2042 1.77382 25.2046 1.7738 25.205 1.77379C25.2052 1.77378 25.2054 1.77377 25.2055 1.77376C25.2057 1.77375 25.2058 1.77375 25.254 2.77258ZM13.5966 5.90528C10.3544 6.84671 7.4132 8.01906 5.27984 8.95795C4.21434 9.42687 3.35321 9.8363 2.76016 10.1276C2.4637 10.2732 2.23441 10.3892 2.08027 10.4683C2.0032 10.5078 1.94493 10.5381 1.90646 10.5582C1.88723 10.5683 1.87295 10.5758 1.86374 10.5806C1.85913 10.5831 1.8558 10.5848 1.85375 10.5859C1.85272 10.5865 1.85202 10.5868 1.85164 10.587C1.85145 10.5871 1.85134 10.5872 1.85131 10.5872C1.8513 10.5872 1.85134 10.5872 1.85133 10.5872C1.85139 10.5872 1.85147 10.5871 1.38146 9.70446C0.911455 8.8218 0.911576 8.82173 0.911717 8.82166C0.911791 8.82162 0.911953 8.82153 0.912101 8.82145C0.912398 8.8213 0.912777 8.82109 0.913237 8.82085C0.914157 8.82036 0.915402 8.8197 0.91697 8.81887C0.920106 8.81721 0.924535 8.81486 0.930242 8.81185C0.941654 8.80583 0.958177 8.79713 0.979684 8.78589C1.0227 8.76339 1.08566 8.73068 1.16756 8.68868C1.33135 8.60467 1.57097 8.48346 1.87842 8.33245C2.49318 8.03049 3.37984 7.60901 4.47421 7.12738C6.66061 6.16515 9.68753 4.95775 13.0389 3.98461L13.5966 5.90528Z" ></path>

<path transform="translate(170, 40) scale(0.6)" d="m1.4295 1.7738c-0.5517-0.02662-1.0204 0.39899-1.0471 0.95064-0.0266 0.55164 0.399 1.0204 0.9507 1.047zm24.116 8.8872c0.52825-0.1611 0.82584-0.71998 0.66469-1.2482l-2.6261-8.6083c-0.16115-0.52825-0.72002-0.82584-1.2483-0.66469-0.52825 0.16115-0.82584 0.72002-0.66469 1.2483l2.3343 7.6519-7.6519 2.3343c-0.5282 0.1612-0.8258 0.72-0.6647 1.2483 0.1612 0.5282 0.72 0.8258 1.2483 0.6647zm-24.164-7.8883c-0.0482 0.99884-0.0483 0.99883-0.0485 0.99883l-1e-4 -1e-5s1e-4 1e-5 2e-4 1e-5c2e-4 1e-5 8e-4 4e-5 0.0017 9e-5 0.0018 9e-5 0.0049 2.5e-4 0.0093 4.8e-4 0.0087 4.6e-4 0.0225 0.00121 0.0413 0.0023 0.0375 0.00217 0.0947 0.00566 0.1708 0.01082 0.1522 0.01033 0.3795 0.02732 0.6739 0.05369 0.589 0.05275 1.4461 0.14296 2.5077 0.29227 2.1246 0.29881 5.0604 0.83321 8.3011 1.7742l0.5577-1.9207c-3.3528-0.97356-6.3852-1.5253-8.5803-1.8341-1.0983-0.15447-1.989-0.24837-2.6078-0.30378-0.3095-0.02772-0.5511-0.04582-0.7169-0.05708-0.0829-0.00562-0.1468-0.00953-0.1908-0.01208-0.022-0.00127-0.039-0.0022-0.0509-0.00283-0.0059-3.1e-4 -0.0106-5.5e-4 -0.014-7.3e-4 -0.0017-8e-5 -3e-3 -1.5e-4 -0.0041-2e-4 -5e-4 -3e-5 -9e-4 -5e-5 -0.0013-6e-5 -2e-4 -1e-5 -4e-4 -2e-5 -5e-4 -3e-5 -2e-4 -1e-5 -3e-4 -1e-5 -0.0485 0.99882zm11.657 3.1327c3.2422 0.94143 6.1834 2.1138 8.3168 3.0527 1.0655 0.46892 1.9266 0.87835 2.5197 1.1696 0.29646 0.1456 0.52575 0.2616 0.67989 0.3407 0.07707 0.0395 0.13534 0.0698 0.17381 0.0899 0.01923 0.0101 0.03351 0.0176 0.04272 0.0224 0.0046 0.0025 0.0079 0.0042 0.01 0.0053 1e-3 6e-4 0.0017 9e-4 0.0021 0.0011 1.9e-4 1e-4 3e-4 2e-4 3.3e-4 2e-4h-2e-5c-6e-5 0-1.4e-4 -1e-4 0.46987-0.88274 0.47-0.88266 0.46988-0.88273 0.46974-0.8828-7.4e-5 -4e-5 -2.36e-4 -1.3e-4 -3.84e-4 -2.1e-4 -2.97e-4 -1.5e-4 -6.76e-4 -3.6e-4 -0.0011-6e-4 -9.2e-4 -4.9e-4 -0.0022-0.00115-0.0037-0.00198-0.0031-0.00166-0.0076-0.00401-0.01327-0.00702-0.01141-0.00602-0.02793-0.01472-0.04944-0.02596-0.04302-0.0225-0.10598-0.05521-0.18788-0.09721-0.16379-0.08401-0.40341-0.20522-0.71086-0.35623-0.61476-0.30196-1.5014-0.72344-2.5958-1.2051-2.1864-0.96223-5.2133-2.1696-8.5647-3.1428z" ></path>
<path transform="translate(170, 15) scale(0.6)" d="m1.4295 1.7738c-0.5517-0.02662-1.0204 0.39899-1.0471 0.95064-0.0266 0.55164 0.399 1.0204 0.9507 1.047zm24.116 8.8872c0.52825-0.1611 0.82584-0.71998 0.66469-1.2482l-2.6261-8.6083c-0.16115-0.52825-0.72002-0.82584-1.2483-0.66469-0.52825 0.16115-0.82584 0.72002-0.66469 1.2483l2.3343 7.6519-7.6519 2.3343c-0.5282 0.1612-0.8258 0.72-0.6647 1.2483 0.1612 0.5282 0.72 0.8258 1.2483 0.6647zm-24.164-7.8883c-0.0482 0.99884-0.0483 0.99883-0.0485 0.99883l-1e-4 -1e-5s1e-4 1e-5 2e-4 1e-5c2e-4 1e-5 8e-4 4e-5 0.0017 9e-5 0.0018 9e-5 0.0049 2.5e-4 0.0093 4.8e-4 0.0087 4.6e-4 0.0225 0.00121 0.0413 0.0023 0.0375 0.00217 0.0947 0.00566 0.1708 0.01082 0.1522 0.01033 0.3795 0.02732 0.6739 0.05369 0.589 0.05275 1.4461 0.14296 2.5077 0.29227 2.1246 0.29881 5.0604 0.83321 8.3011 1.7742l0.5577-1.9207c-3.3528-0.97356-6.3852-1.5253-8.5803-1.8341-1.0983-0.15447-1.989-0.24837-2.6078-0.30378-0.3095-0.02772-0.5511-0.04582-0.7169-0.05708-0.0829-0.00562-0.1468-0.00953-0.1908-0.01208-0.022-0.00127-0.039-0.0022-0.0509-0.00283-0.0059-3.1e-4 -0.0106-5.5e-4 -0.014-7.3e-4 -0.0017-8e-5 -3e-3 -1.5e-4 -0.0041-2e-4 -5e-4 -3e-5 -9e-4 -5e-5 -0.0013-6e-5 -2e-4 -1e-5 -4e-4 -2e-5 -5e-4 -3e-5 -2e-4 -1e-5 -3e-4 -1e-5 -0.0485 0.99882zm11.657 3.1327c3.2422 0.94143 6.1834 2.1138 8.3168 3.0527 1.0655 0.46892 1.9266 0.87835 2.5197 1.1696 0.29646 0.1456 0.52575 0.2616 0.67989 0.3407 0.07707 0.0395 0.13534 0.0698 0.17381 0.0899 0.01923 0.0101 0.03351 0.0176 0.04272 0.0224 0.0046 0.0025 0.0079 0.0042 0.01 0.0053 1e-3 6e-4 0.0017 9e-4 0.0021 0.0011 1.9e-4 1e-4 3e-4 2e-4 3.3e-4 2e-4h-2e-5c-6e-5 0-1.4e-4 -1e-4 0.46987-0.88274 0.47-0.88266 0.46988-0.88273 0.46974-0.8828-7.4e-5 -4e-5 -2.36e-4 -1.3e-4 -3.84e-4 -2.1e-4 -2.97e-4 -1.5e-4 -6.76e-4 -3.6e-4 -0.0011-6e-4 -9.2e-4 -4.9e-4 -0.0022-0.00115-0.0037-0.00198-0.0031-0.00166-0.0076-0.00401-0.01327-0.00702-0.01141-0.00602-0.02793-0.01472-0.04944-0.02596-0.04302-0.0225-0.10598-0.05521-0.18788-0.09721-0.16379-0.08401-0.40341-0.20522-0.71086-0.35623-0.61476-0.30196-1.5014-0.72344-2.5958-1.2051-2.1864-0.96223-5.2133-2.1696-8.5647-3.1428z" ></path>
</g>
<!-- Slider root -->
<circle id="root" cx="150" cy="150" r="10" class="root"></circle>
Expand All @@ -182,18 +182,18 @@
<text id="valueDisplay" x="150" y="10" text-anchor="middle" font-size="6" style="visibility: hidden;">Value: 0</text>

<!-- Display 1/3 value -->
<rect id="background1_3" x="80" y="112" width="20" height="10" fill="white" filter="url(#blur)" style="visibility: hidden;"></rect>
<text id="valueDisplay1_3" x="90" y="120" text-anchor="middle" font-size="9" font-weight="bold"></text>
<rect id="background1_3" x="55" y="112" width="20" height="10" fill="white" filter="url(#blur)" style="visibility: hidden;"></rect>
<text id="valueDisplay1_3" x="65" y="120" text-anchor="middle" font-size="9" font-weight="bold"></text>


<!-- Display 2/3 value -->
<rect id="background2_3" x="140" y="72" width="20" height="10" fill="white" filter="url(#blur)" style="visibility: hidden;"></rect>
<text id="valueDisplay2_3" x="150" y="80" text-anchor="middle" font-size="9" font-weight="bold"></text>
<rect id="background2_3" x="140" y="47" width="20" height="10" fill="white" filter="url(#blur)" style="visibility: hidden;"></rect>
<text id="valueDisplay2_3" x="150" y="55" text-anchor="middle" font-size="9" font-weight="bold"></text>


<!-- Display 3/3 value -->
<rect id="background3_3" x="200" y="112" width="20" height="10" fill="white" filter="url(#blur)" style="visibility: hidden;"></rect>
<text id="valueDisplay3_3" x="210" y="120" text-anchor="middle" font-size="9" font-weight="bold" fill="black"></text>
<rect id="background3_3" x="225" y="112" width="20" height="10" fill="white" filter="url(#blur)" style="visibility: hidden;"></rect>
<text id="valueDisplay3_3" x="235" y="120" text-anchor="middle" font-size="9" font-weight="bold" fill="black"></text>

<defs>
<filter id="blur" x="-100%" y="-100%" width="300%" height="300%">
Expand Down Expand Up @@ -225,7 +225,7 @@
let isSubmitting = false;
let hasSubmitted = false;
let lastThumbPosition = { x: 150, y: 50 };
const needleLength = 75; // Constant length for the needle
const needleLength = 100; // Constant length for the needle
let entity = null; // apptive entitiy

// Desktop Event
Expand Down

0 comments on commit 1574af1

Please sign in to comment.