-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><script async src="https://www.googletagmanager.com/gtag/js?id=G-5899C1DJM0"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5899C1DJM0");</script><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link rel="apple-touch-icon" sizes="57x57" href="/roulette/apple-icon-57x57.d2489b05.png"><link rel="apple-touch-icon" sizes="60x60" href="/roulette/apple-icon-60x60.c256c4c3.png"><link rel="apple-touch-icon" sizes="72x72" href="/roulette/apple-icon-72x72.3c7457a3.png"><link rel="apple-touch-icon" sizes="76x76" href="/roulette/apple-icon-76x76.c458ac0e.png"><link rel="apple-touch-icon" sizes="114x114" href="/roulette/apple-icon-114x114.2a406841.png"><link rel="apple-touch-icon" sizes="120x120" href="/roulette/apple-icon-120x120.baa4374c.png"><link rel="apple-touch-icon" sizes="144x144" href="/roulette/apple-icon-144x144.b352f2ad.png"><link rel="apple-touch-icon" sizes="152x152" href="/roulette/apple-icon-152x152.3ed1a2e0.png"><link rel="apple-touch-icon" sizes="180x180" href="/roulette/apple-icon-180x180.1794adb6.png"><link rel="icon" type="image/png" sizes="192x192" href="/roulette/android-icon-192x192.1cb445bf.png"><link rel="icon" type="image/png" sizes="32x32" href="/roulette/favicon-32x32.ca213894.png"><link rel="icon" type="image/png" sizes="96x96" href="/roulette/favicon-96x96.0b3c763e.png"><link rel="icon" type="image/png" sizes="16x16" href="/roulette/favicon-16x16.e4bfc49f.png"><link rel="manifest" href="/roulette/assets/manifest.webmanifest"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/roulette/assets/ms-icon-144x144.png"><meta name="theme-color" content="#ffffff"><title>Marble Roulette</title><style>*{box-sizing:border-box}canvas{width:100%;height:100%;position:fixed;inset:0}.settings{-webkit-backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;z-index:10;background:#0006;border:2px solid #90ee90;border-radius:.75em;padding:1rem;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:1rem;font-weight:700;position:absolute;inset:1rem 1rem auto;box-shadow:inset 0 0 6rem 4px green}.hide{display:none!important}.settings:focus-within{box-shadow:inset 0 0 2rem 4px green}.settings textarea{width:100%;min-height:4rem;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}.settings .actions{text-align:right;font-size:.8rem}.settings .actions label{margin-bottom:.5rem;display:block}.settings .text{color:#90ee90;margin-top:0;font-size:.8rem;font-weight:400}input[type=number]{width:3rem;text-align:center;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}@media screen and (min-width:768px){.settings{max-width:50%;top:auto;bottom:24px}#inGame{width:-moz-fit-content;width:-moz-fit-content;width:fit-content}.settings .actions label{margin:0 .5rem;display:inline-block}}div.copyright{color:#fff;z-index:999;font-size:12px;position:fixed;bottom:0;left:50%;transform:translate(-50%)}div.copyright a{color:#fff}#btnShake{font-size:2em}div#notice{z-index:999;max-width:100%;width:40em;background:#fffc;flex-direction:column;padding:1em;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}div#notice button{width:50%;align-self:flex-end;padding:1em}div#notice dt{font-weight:700}div#notice dd{padding-bottom:.5em;list-style:disc}</style></head><body> <script type="module" src="/roulette/index.e48b2f95.js"></script> <script type="text/javascript">function getNames(){return document.querySelector("#in_names").value.trim().split(/[,\r\n]/g).map((e=>e.trim())).filter((e=>!!e))}function parseName(e){const t=/(\/\d+)/,n=/(\*\d+)/,o=t.test(e),r=n.test(e);return{name:/^\s*([^\/*]+)?/.exec(e)[1],weight:o?parseInt(t.exec(e)[1].replace("/","")):1,count:r?parseInt(n.exec(e)[1].replace("*","")):1}}function getReady(){const e=getNames();window.roullete.setMarbles(e),ready=e.length>0}function setWinnerRank(e){document.querySelector("#in_winningRank").value=e,window.options.winningRank=e-1,window.roullete.setWinningRank(window.options.winningRank)}let ready=!1;document.addEventListener("DOMContentLoaded",(()=>{document.querySelector("#in_names").addEventListener("input",(()=>{getReady()})),document.querySelector("#in_names").addEventListener("blur",(()=>{const e=getNames(),t=new Set,n={};e.forEach((e=>{const o=parseName(e),r=o.weight>1?`${o.name}/${o.weight}`:o.name;t.has(r)||(t.add(r),n[r]=0),n[r]+=o.count}));const o=[];Object.keys(n).forEach((e=>{n[e]>1?o.push(`${e}*${n[e]}`):o.push(e)})),document.querySelector("#in_names").value=o.join(","),getReady()})),document.querySelector("#btnShuffle").addEventListener("click",(()=>{getReady()})),document.querySelector("#btnStop").addEventListener("click",(()=>{window.roullete.reset(),ready=!1})),document.querySelector("#btnStart").addEventListener("click",(()=>{ready&&(gtag("event","start",{event_category:"roulette",event_label:"start",value:window.roullete.getCount()}),window.roullete.start(),document.querySelector("#settings").classList.add("hide"))})),document.querySelector("#chkSkill").addEventListener("change",(e=>{window.options.useSkills=e.target.matches(":checked"),window.roullete.setWinningRank(window.options.winningRank)})),document.querySelector("#in_winningRank").addEventListener("change",(e=>{const t=parseInt(e.target.value,10);setWinnerRank(isNaN(t)?0:t)})),document.querySelector("#btnRandomWinner").addEventListener("click",(()=>{const e=window.roullete.getCount();setWinnerRank(Math.floor(Math.random()*e+1))})),document.querySelector("#btnShake").addEventListener("click",(()=>{window.roullete.shake(),gtag("event","shake",{event_category:"roulette",event_label:"shake",value:1})})),window.roullete.addEventListener("goal",(()=>{ready=!1,document.querySelector("#settings").classList.remove("hide")})),window.roullete.addEventListener("shakeAvailableChanged",(e=>{document.querySelector("#inGame").classList.toggle("hide",!e.detail)})),document.querySelector("#btnShuffle").click();const e=20230802;parseInt(localStorage.getItem("noticeClose")||"0",10)<e&&document.querySelector("#notice").classList.remove("hide"),document.querySelector("#btnNoticeClose").addEventListener("click",(()=>{document.querySelector("#notice").classList.add("hide"),localStorage.setItem("noticeClose",String(e))}))}));</script> <div id="notice" class="hide"> <h3>Change logs</h3> <dl> <dt>2023-08-02</dt> <dd>Now the names will not cover the whole screen if there are many. You can scroll the names with your mouse wheel.</dd> <dt>2023-07-29</dt> <dd>Adjusted the map to prevent a marble stays too long in a specific place.</dd> <dt>2023-07-21</dt> <dd>Show change logs when there is a new update.</dd> <dd>Improve the performance when there are too many marbles in the game.</dd> <dd>Fixed the issue that the slow motion is not smooth.</dd> <dd>Now end the game immediately if only one marble survives and the winning rank is the last.</dd> <dt>2023-05-29</dt> <dd>Now you can shake the game if the marbles are stuck for over 3 seconds.</dd> </dl> <button type="button" id="btnNoticeClose">Close</button> </div> <div id="settings" class="settings"> <p class="text"> You can set weight values for each member by putting a number after each name with a slash. (ex: Tom/2, Jane/5)<br> You can set the count of each member by putting a number after each name with a star. (ex: Tom*2, Jane*5) </p> <textarea id="in_names" placeholder="Input names saparated by commas or line feed here">짱구*5, 짱아*10, 흰둥이*3</textarea> <div class="actions"> <label> The winner is #<input type="number" id="in_winningRank" value="1" min="1"> </label> <button id="btnRandomWinner">Random Winner</button> <label> <input type="checkbox" id="chkSkill" checked> Using skills </label> <button id="btnStop">Stop</button> <button id="btnStart">Start</button> <button id="btnShuffle">Shuffle</button> </div> </div> <div id="inGame" class="hide settings"> <button id="btnShake">Shake!</button> </div> <div class="copyright">© 2023.<a href="https://lazygyu.net" target="_blank">lazygyu</a></div> </body></html> | ||
<!DOCTYPE html><html lang="en"><head><script async src="https://www.googletagmanager.com/gtag/js?id=G-5899C1DJM0"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5899C1DJM0");</script><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link rel="apple-touch-icon" sizes="57x57" href="/roulette/apple-icon-57x57.d2489b05.png"><link rel="apple-touch-icon" sizes="60x60" href="/roulette/apple-icon-60x60.c256c4c3.png"><link rel="apple-touch-icon" sizes="72x72" href="/roulette/apple-icon-72x72.3c7457a3.png"><link rel="apple-touch-icon" sizes="76x76" href="/roulette/apple-icon-76x76.c458ac0e.png"><link rel="apple-touch-icon" sizes="114x114" href="/roulette/apple-icon-114x114.2a406841.png"><link rel="apple-touch-icon" sizes="120x120" href="/roulette/apple-icon-120x120.baa4374c.png"><link rel="apple-touch-icon" sizes="144x144" href="/roulette/apple-icon-144x144.b352f2ad.png"><link rel="apple-touch-icon" sizes="152x152" href="/roulette/apple-icon-152x152.3ed1a2e0.png"><link rel="apple-touch-icon" sizes="180x180" href="/roulette/apple-icon-180x180.1794adb6.png"><link rel="icon" type="image/png" sizes="192x192" href="/roulette/android-icon-192x192.1cb445bf.png"><link rel="icon" type="image/png" sizes="32x32" href="/roulette/favicon-32x32.ca213894.png"><link rel="icon" type="image/png" sizes="96x96" href="/roulette/favicon-96x96.0b3c763e.png"><link rel="icon" type="image/png" sizes="16x16" href="/roulette/favicon-16x16.e4bfc49f.png"><link rel="manifest" href="/roulette/assets/manifest.webmanifest"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/roulette/assets/ms-icon-144x144.png"><meta name="theme-color" content="#ffffff"><title>Marble Roulette</title><style>*{box-sizing:border-box}canvas{width:100%;height:100%;position:fixed;inset:0}.settings{-webkit-backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;z-index:10;background:#0006;border:2px solid #90ee90;border-radius:.75em;padding:1rem;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:1rem;font-weight:700;position:absolute;inset:1rem 1rem auto;box-shadow:inset 0 0 6rem 4px green}.hide{display:none!important}.settings:focus-within{box-shadow:inset 0 0 2rem 4px green}.settings textarea{width:100%;min-height:4rem;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}.settings .actions{text-align:right;font-size:.8rem}.settings .actions label{margin-bottom:.5rem;display:block}.settings .text{color:#90ee90;margin-top:0;font-size:.8rem;font-weight:400}input[type=number]{width:3rem;text-align:center;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}@media screen and (min-width:768px){.settings{max-width:50%;top:auto;bottom:24px}#inGame{width:-moz-fit-content;width:-moz-fit-content;width:fit-content}.settings .actions label{margin:0 .5rem;display:inline-block}}div.copyright{color:#fff;z-index:999;font-size:12px;position:fixed;bottom:0;left:50%;transform:translate(-50%)}div.copyright a{color:#fff}#btnShake{font-size:2em}div#notice{z-index:999;max-width:100%;width:40em;background:#fffc;flex-direction:column;padding:1em;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}div#notice button{width:50%;align-self:flex-end;padding:1em}div#notice dt{font-weight:700}div#notice dd{padding-bottom:.5em;list-style:disc}</style></head><body> <script type="module" src="/roulette/index.e48b2f95.js"></script> <script type="text/javascript">function getNames(){return document.querySelector("#in_names").value.trim().split(/[,\r\n]/g).map((e=>e.trim())).filter((e=>!!e))}function parseName(e){const t=/(\/\d+)/,n=/(\*\d+)/,o=t.test(e),r=n.test(e);return{name:/^\s*([^\/*]+)?/.exec(e)[1],weight:o?parseInt(t.exec(e)[1].replace("/","")):1,count:r?parseInt(n.exec(e)[1].replace("*","")):1}}function getReady(){const e=getNames();window.roullete.setMarbles(e),ready=e.length>0}function setWinnerRank(e){document.querySelector("#in_winningRank").value=e,window.options.winningRank=e-1,window.roullete.setWinningRank(window.options.winningRank)}let ready=!1;document.addEventListener("DOMContentLoaded",(()=>{document.querySelector("#in_names").addEventListener("input",(()=>{getReady()})),document.querySelector("#in_names").addEventListener("blur",(()=>{const e=getNames(),t=new Set,n={};e.forEach((e=>{const o=parseName(e),r=o.weight>1?`${o.name}/${o.weight}`:o.name;t.has(r)||(t.add(r),n[r]=0),n[r]+=o.count}));const o=[];Object.keys(n).forEach((e=>{n[e]>1?o.push(`${e}*${n[e]}`):o.push(e)})),document.querySelector("#in_names").value=o.join(","),getReady()})),document.querySelector("#btnShuffle").addEventListener("click",(()=>{getReady()})),document.querySelector("#btnStop").addEventListener("click",(()=>{window.roullete.reset(),ready=!1})),document.querySelector("#btnStart").addEventListener("click",(()=>{ready&&(gtag("event","start",{event_category:"roulette",event_label:"start",value:window.roullete.getCount()}),window.roullete.start(),document.querySelector("#settings").classList.add("hide"))})),document.querySelector("#chkSkill").addEventListener("change",(e=>{window.options.useSkills=e.target.matches(":checked"),window.roullete.setWinningRank(window.options.winningRank)})),document.querySelector("#in_winningRank").addEventListener("change",(e=>{const t=parseInt(e.target.value,10);setWinnerRank(isNaN(t)?0:t)})),document.querySelector("#btnRandomWinner").addEventListener("click",(()=>{const e=window.roullete.getCount();setWinnerRank(Math.floor(Math.random()*e+1))})),document.querySelector("#btnLastWinner").addEventListener("click",(()=>{setWinnerRank(window.roullete.getCount())})),document.querySelector("#btnShake").addEventListener("click",(()=>{window.roullete.shake(),gtag("event","shake",{event_category:"roulette",event_label:"shake",value:1})})),window.roullete.addEventListener("goal",(()=>{ready=!1,document.querySelector("#settings").classList.remove("hide")})),window.roullete.addEventListener("shakeAvailableChanged",(e=>{document.querySelector("#inGame").classList.toggle("hide",!e.detail)})),document.querySelector("#btnShuffle").click();const e=20230922;parseInt(localStorage.getItem("noticeClose")||"0",10)<e&&document.querySelector("#notice").classList.remove("hide"),document.querySelector("#btnNoticeClose").addEventListener("click",(()=>{document.querySelector("#notice").classList.add("hide"),localStorage.setItem("noticeClose",String(e))}))}));</script> <div id="notice" class="hide"> <h3>Change logs</h3> <dl> <dt>2023-09-22</dt> <dd>Add a button that sets the last one to the winner.</dd> <dt>2023-08-02</dt> <dd>Now the names will not cover the whole screen if there are many. You can scroll the names with your mouse wheel.</dd> <dt>2023-07-29</dt> <dd>Adjusted the map to prevent a marble stays too long in a specific place.</dd> <dt>2023-07-21</dt> <dd>Show change logs when there is a new update.</dd> <dd>Improve the performance when there are too many marbles in the game.</dd> <dd>Fixed the issue that the slow motion is not smooth.</dd> <dd>Now end the game immediately if only one marble survives and the winning rank is the last.</dd> <dt>2023-05-29</dt> <dd>Now you can shake the game if the marbles are stuck for over 3 seconds.</dd> </dl> <button type="button" id="btnNoticeClose">Close</button> </div> <div id="settings" class="settings"> <p class="text"> You can set weight values for each member by putting a number after each name with a slash. (ex: Tom/2, Jane/5)<br> You can set the count of each member by putting a number after each name with a star. (ex: Tom*2, Jane*5) </p> <textarea id="in_names" placeholder="Input names saparated by commas or line feed here">짱구*5, 짱아*10, 흰둥이*3</textarea> <div class="actions"> <label> The winner is #<input type="number" id="in_winningRank" value="1" min="1"> </label> <button id="btnRandomWinner">Random</button> <button id="btnLastWinner">Last</button> <label> <input type="checkbox" id="chkSkill" checked> Using skills </label> <button id="btnStop">Stop</button> <button id="btnStart">Start</button> <button id="btnShuffle">Shuffle</button> </div> </div> <div id="inGame" class="hide settings"> <button id="btnShake">Shake!</button> </div> <div class="copyright">© 2023.<a href="https://lazygyu.net" target="_blank">lazygyu</a></div> </body></html> |