Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sgnls/085a4d30c04457e634302b9b629ae07d to your computer and use it in GitHub Desktop.
Save sgnls/085a4d30c04457e634302b9b629ae07d to your computer and use it in GitHub Desktop.
<div id="wheel" ref="wheelContainer" :style="styles.wheel">
<img :style="styles.ticker"
ref="ticker"
:src="settings.ticker.url"/>
<div id="inner-wheel">
<img v-if="settings.centerImage.enabled"
:src="settings.centerImage.url"
:style="styles.centerImage" />
<svg viewBox="-1 -1 2 2"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
:style="'transform: rotate(' + rotation + 'rad)'">
<defs>
<pattern id="img1" patternUnits="userSpaceOnUse" width="1" height="1">
<image xlink:href="https://i.imgur.com/DHzWJAq.png" width="1" height="1" />
</pattern>
</defs>
<path v-for="(range, index) in ranges"
:id="'prize-' + (index + 1)"
:d="range.d"
:fill="'url(#img' + (index + 1) + ')'"
stroke="black"
stroke-width="0.01"
class="pie-section"></path>
</svg>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment