diff --git a/Controls.js b/Controls.js index a0e7510..eb0addf 100644 --- a/Controls.js +++ b/Controls.js @@ -78,6 +78,8 @@ class Controls extends EventDispatcher { function onDown() { + this.touchStartX = event.touches ? event.touches[ 0 ].clientX : event.clientX; + this.touchStartY = event.touches ? event.touches[ 0 ].clientY : event.clientY; this.isActive = true; } diff --git a/game.js b/game.js index e357387..84160be 100644 --- a/game.js +++ b/game.js @@ -16,7 +16,7 @@ let clock = new THREE.Clock(); let isLoading = true; let answer = undefined; let score = 0; -let difficulty = 100; +let difficulty = 500; let verifiedLevels = fetch("https://grab-tools.live/stats_data/all_verified.json").then(response => response.json()); let materialList = [ @@ -469,7 +469,10 @@ async function loadSearch() { const query = document.getElementById("search").value; document.getElementById("cards").innerHTML = ""; verifiedLevels.then(levels => { - let results = levels.filter(l => l.title.toLowerCase().replace(" ", "").includes(query.toLowerCase().replace(" ", ""))); + let results = levels.filter(l => ( + l.title.toLowerCase().replace(" ", "").includes(query.toLowerCase().replace(" ", "")) || + (l?.creators || []).toString().toLowerCase().replace(" ", "").includes(query.toLowerCase().replace(" ", "")) + )); if (results.length > 0) { for (let i = 0; i < Math.min(results.length, 100); i++) { let card = document.createElement("div"); diff --git a/index.html b/index.html index e8fee75..9e0656e 100644 --- a/index.html +++ b/index.html @@ -38,6 +38,7 @@
+ Score: 0 diff --git a/style.css b/style.css index 1abc00b..a4472dd 100644 --- a/style.css +++ b/style.css @@ -16,35 +16,39 @@ body { #main-controls { display: flex; gap: 10px; - justify-content: center; + justify-content: space-between; align-items: center; flex-direction: row; - width: calc(100svw - 20px); + width: 100svw; height: fit-content; position: fixed; top: 0; right: 0; - padding: 20px; + padding: 0 5px; z-index: 10; + border-bottom: 1px solid rgb(255, 255, 255); + background: rgba(0, 0, 0, 0.1); + color: rgb(255, 255, 255); } menu button { - width: 50px; - height: 50px; + width: 40px; + height: 40px; margin: 0; cursor: pointer; - padding: 12px 6px; - border: 1px solid rgb(255, 255, 255); - border-radius: 4px; - background: rgba(0, 0, 0, 0.1); - color: rgb(255, 255, 255); + padding: 0; font: 13px sans-serif; text-align: center; opacity: 0.5; outline: none; + border: none; + border-radius: 4px; + background: transparent; + color: rgb(255, 255, 255); } menu svg { height: 24px; width: 24px; + color: white; } #guessing { display: grid; @@ -167,9 +171,6 @@ menu svg { gap: 10px; padding: 10px; margin: 0; - position: fixed; - top: 0; - left: 0; color: white; } #difficulty {