a few fixes, new game

This commit is contained in:
sky 2024-01-02 17:38:21 -05:00
parent 17d9a97d5a
commit a4bb28727d
30 changed files with 785 additions and 176 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 54 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 50 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

BIN
bit-planes/bitplanes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.9 KiB

112
bit-planes/index.html Normal file
View File

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond&display=swap" rel="stylesheet">
<title>Bit Planes</title>
<link href="styles.css?d7118c4f7ffc03840b96" rel="stylesheet"></head>
<body>
<main>
<section class="welcome">
<!-- <div class="ribbon right green">-->
<!-- <a href="https://github.com/antonmedv/bit-planes" tabindex="-1">Fork me on GitHub</a>-->
<!-- </div>-->
<h1>
<i class="logo"></i>
Bit Planes
<i class="logo"></i>
</h1>
<p>
<strong>Controls:</strong><br>
</p>
<ul>
<li>Arrows <kbd></kbd><kbd></kbd> — thrust level.</li>
<li>Arrows <kbd></kbd><kbd></kbd> — elevator controls.</li>
<li><kbd>Space</kbd> — fire a gun. <kbd>X</kbd> — deploy a missile.</li>
<li><kbd>C</kbd> — catapult / parachute and get new plane at the barn.</li>
</ul>
<form id="game">
<label>
<input type="text" name="nickname" placeholder="Nickname">
</label>
<p>
<strong>Game mode:</strong>
</p>
<div class="game-modes">
<div>
<label title="Everyone against everyone."><input type="radio" name="mode" value="death-match" checked autofocus> Death match</label>
</div>
<div>
<label title="Fight between teams."><input type="radio" name="mode" value="teams"> Teams</label>
</div>
<div>
<label title="One on one duel."><input type="radio" name="mode" value="duel"> Duel</label>
</div>
<div>
<label title="Survive with a waives of enemies."><input type="radio" name="mode" value="survival"> Survival</label>
</div>
</div>
<div class="action">
<button class="btn">‣ Start</button>
</div>
</form>
<div class="stats"></div>
<canvas class="demo"></canvas>
</section>
</main>
<div class="ui">
<div class="cockpit">
<div class="missile-capacity">
<div class="missile"></div>
<div class="missile"></div>
</div>
<div class="thrust">
<div class="thrust-level"></div>
</div>
<div class="ammo-capacity">
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
<div class="ammo"></div>
</div>
</div>
<canvas class="minimap"></canvas>
<div class="log"></div>
</div>
<canvas id="canvas"></canvas>
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(94977381, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/94977381" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script type="text/javascript" src="index.js?d7118c4f7ffc03840b96"></script></body>
</html>

1
bit-planes/index.js Normal file

File diff suppressed because one or more lines are too long

419
bit-planes/styles.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -1179,5 +1179,10 @@
"name": "Minecraft Classic",
"directory": "mcclassic",
"image": "assets/textures/previews/2.png"
},
{
"name": "Bit Planes",
"directory": "bit-planes",
"image": "bitplanes.png"
}
]

View File

@ -11,6 +11,21 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.9.0/cdn/themes/dark.css" />
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.9.0/cdn/shoelace-autoloader.js"></script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://selenite.cc",
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://selenite.cc/projects.html?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
}
</script>
<!-- initialize my stuff -->

View File

@ -2,9 +2,12 @@ $.getJSON("/games.json", function (data) {
if (document.readyState === "complete") {
loadGames(data);
} else {
document.addEventListener("DOMContentLoaded", () => {
let areGamesReady = setInterval(() => {
if (document.readyState === "complete") {
loadGames(data);
});
clearInterval(areGamesReady);
}
}, 50);
}
});
@ -15,7 +18,6 @@ function loadGames(data) {
} else {
starredgames = JSON.parse(starredgames);
}
console.log(starredgames);
$("#gamesearch").prop({
placeholder: "Click here to search through our " + data.length + " games!",
});
@ -26,7 +28,7 @@ function loadGames(data) {
.attr({
class: "game",
id: data[i].directory,
recommended: data[i].recommended
recommended: data[i].recommended,
})
.data("recommended", data[i].recommended)
.append(
@ -58,6 +60,21 @@ function loadGames(data) {
}
$("#games #message").remove();
if ((search = 1)) {
var txt = $("#gamesearch").val();
if (txt == "") {
$("#games .suggest").show();
} else {
$("#games .suggest").hide();
}
$("#games .game").hide();
$("#games .game").each(function () {
if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1 || $(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1) {
$(this).show();
}
});
}
// starred games
let starred;
$(document).on("click", ".game", function (event) {
@ -157,7 +174,7 @@ function selectRandomGame() {
let viewrecommended = 0;
function recommendedGames() {
if(viewrecommended == 0) {
if (viewrecommended == 0) {
$("#games .game").hide();
$("#games .game").each(function () {
if ($(this).attr("recommended")) {

View File

@ -92,6 +92,10 @@ function copyToClipboard(text) {
function setTheme(theme) {
localStorage.setItem("selenite.theme", theme);
document.body.setAttribute("theme", theme);
if(theme != "custom") {
document.getElementById("customMenu").style.display = "none";
document.body.style = "";
}
}
function setPanicMode() {
if (!$("#panic").val().startsWith("https")) {
@ -100,10 +104,6 @@ function setPanicMode() {
}
document.cookie = "panicurl=" + $("#panic").val();
}
function customTheme() {
const customMenu = document.querySelector("#customMenu");
customMenu.removeAttribute("display");
}
if (location.hostname.includes(".vercel.app") && (location.hostname.includes("selenite-beta") || location.hostname.includes("space-lovers") || location.hostname.includes("school-education"))) {
alert("IMPORTANT:\nVercel links will be taken offline eventually. Please move to a new link. You can find these in the Discord at discord.gg/7jyufnwJNf, or you can try a few of the ones listed\nselenite.cc\nselenite.pages.dev\nselenite.skysthelimit.dev\nall-about-science.onrender.com");
}

View File

@ -1,16 +1,30 @@
$(document).ready(function () {
$("#gamesearch").on("input propertychange paste", function () {
function searchGames() {
search = 1;
var txt = $("#gamesearch").val();
if(txt == "") {
if (txt == "") {
$("#games .suggest").show();
} else {
$("#games .suggest").hide();
}
$("#games .game").hide();
$("#games .game").each(function () {
if (($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1) || ($(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1)) {
if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1 || $(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1) {
$(this).show();
}
});
}
document.addEventListener("DOMContentLoaded", () => {
let urlParams = new URLSearchParams(window.location.search);
let q = urlParams.get("q");
if (q) {
document.getElementById("gamesearch").value = q;
searchGames();
urlParams.delete("q");
window.history.replaceState({}, document.title, location.pathname);
}
$("#gamesearch").on("input propertychange paste", function () {
searchGames();
});
});

View File

@ -108,15 +108,15 @@
</div>
<div id="customMenu" style="display: none;">
<p>Input BG Color</p>
<input type="color" id="inputbg" value="#ffffff" />
<input type="color" id="inputbg"/>
<p>Input Border Color</p>
<input type="color" id="inputborder" value="#ffffff" />
<input type="color" id="inputborder"/>
<p>UI Background Color</p>
<input type="color" id="uibg" value="#ffffff" />
<input type="color" id="uibg"/>
<p>Text Color</p>
<input type="color" id="textcolor" value="#ffffff" />
<input type="color" id="textcolor"/>
<p>Background</p>
<input type="color" id="bg" value="#ffffff" />
<input type="color" id="bg"/>
<p>or select an image (click enter to set)</p>
<input type="text" id="bgimg" placeholder="https://selenite.cc/" /><br />
<!-- --inputbg: #000000;

View File

@ -5,6 +5,13 @@ body {
--textcolor: #000;
--bg: #000000;
}
body[theme=custom] {
--inputbg: #3c096c;
--inputborder: #5a189a;
--uibg: #240046;
--textcolor: #fff;
--bg: #10002b;
}
body[theme=main] {
--inputbg: #3c096c;
--inputborder: #5a189a;