-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
4c47cb6
commit b1549d8
Showing
33 changed files
with
535 additions
and
179 deletions.
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 |
---|---|---|
@@ -0,0 +1,171 @@ | ||
<!DOCTYPE HTML> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Star</title> | ||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet"> | ||
<style> | ||
body { | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
.sheet-container { | ||
max-width: 1000px; | ||
margin: auto; | ||
} | ||
|
||
.rotating-stars-input-container { | ||
display: flex; | ||
justify-content: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.star-input-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin: 10px; | ||
} | ||
|
||
.star-input-group { | ||
display: flex; | ||
justify-content: flex-start; | ||
align-items: center; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.star-input-group label { | ||
flex: none; | ||
width: 150px; | ||
white-space: nowrap; | ||
text-align: right; | ||
margin-right: 20px; | ||
font-weight: 500; | ||
} | ||
|
||
.star-input-group input { | ||
flex: none; | ||
width: 150px; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
#starCanvas { | ||
display: block; | ||
margin: 20px auto; | ||
} | ||
|
||
.operation-selection { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin-bottom: 10px; | ||
margin-top: 20px; | ||
font-size: 20px; | ||
} | ||
|
||
.operation-selection label { | ||
flex: none; | ||
width: 150px; | ||
white-space: nowrap; | ||
text-align: right; | ||
margin-right: 20px; | ||
font-size: 20px; | ||
font-weight: 500; | ||
} | ||
|
||
.operation-selection select { | ||
-webkit-appearance: none; | ||
padding-left: 4px; | ||
flex: none; | ||
width: 150px; | ||
font-size: 20px; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="sheet-container"> | ||
<script type="text/javascript"> | ||
// in different environments the path is different | ||
const paths = [ | ||
'../js/overlay/stars.js', | ||
'./js/overlay/stars.js', | ||
'/js/overlay/stars.js' | ||
]; | ||
async function fileExists(path) { | ||
try { | ||
const response = await fetch(path, { method: 'HEAD' }); | ||
return response.ok; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
(async () => { | ||
for (const path of paths) { | ||
if (await fileExists(path)) { | ||
const script = document.createElement('script'); | ||
script.type = 'module'; | ||
script.src = path; | ||
script.defer = true; | ||
document.head.appendChild(script); | ||
break; | ||
} | ||
} | ||
})(); | ||
</script> | ||
<div class="rotating-stars-input-container"> | ||
<div class="star-input-container"> | ||
<h3 id="subject-star" class="title">Subject Star</h3> | ||
<div class="star-input-group"> | ||
<label for="subjFirstRadius">First Radius: </label> | ||
<input type="range" id="subjFirstRadius" min="10" max="100" value="60"> | ||
</div> | ||
<div class="star-input-group"> | ||
<label for="subjSecondRadius">Second Radius: </label> | ||
<input type="range" id="subjSecondRadius" min="10" max="100" value="30"> | ||
</div> | ||
<div class="star-input-group"> | ||
<label for="subjRotationSpeed">Rotation Speed: </label> | ||
<input type="range" id="subjRotationSpeed" min="1" max="100" value="5"> | ||
</div> | ||
<div class="star-input-group"> | ||
<label for="subjAngleCount">Corners Count: </label> | ||
<input type="range" id="subjAngleCount" min="3" max="24" value="7"> | ||
</div> | ||
</div> | ||
<div class="star-input-container"> | ||
<h3 id="clip-star" class="title">Clip Star</h3> | ||
<div class="star-input-group"> | ||
<label for="clipFirstRadius">First Radius: </label> | ||
<input type="range" id="clipFirstRadius" min="10" max="100" value="60"> | ||
</div> | ||
<div class="star-input-group"> | ||
<label for="clipSecondRadius">Second Radius: </label> | ||
<input type="range" id="clipSecondRadius" min="10" max="100" value="30"> | ||
</div> | ||
<div class="star-input-group"> | ||
<label for="clipRotationSpeed">Rotation Speed: </label> | ||
<input type="range" id="clipRotationSpeed" min="1" max="100" value="5"> | ||
</div> | ||
<div class="star-input-group"> | ||
<label for="clipAngleCount">Corners Count: </label> | ||
<input type="range" id="clipAngleCount" min="3" max="24" value="7"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="operation-selection"> | ||
<label for="operationType">Operation: </label> | ||
<select id="operationType"> | ||
<option value="Xor">Xor</option> | ||
<option value="Union">Union</option> | ||
<option value="Intersect">Intersect</option> | ||
<option value="Difference">Difference</option> | ||
<option value="InverseDifference">InverseDifference</option> | ||
<option value="Subject">Subject</option> | ||
<option value="Clip">Clip</option> | ||
</select> | ||
</div> | ||
<canvas id="starCanvas" width="750" height="750"></canvas> | ||
</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.