Merge remote-tracking branch 'origin/main' into feat-shader-background

This commit is contained in:
2024-05-22 10:33:06 +02:00
25 changed files with 108 additions and 52 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
DOCKER_ORG: legonzaur DOCKER_ORG: heronfief
DOCKER_LATEST: nightly DOCKER_LATEST: nightly
ENDPOINT: git.legonzaur.fr ENDPOINT: git.legonzaur.fr
+2 -2
View File
@@ -22,8 +22,8 @@ void main(){
q=q*.5+.5; q=q*.5+.5;
vec2 r=vec2(0.); vec2 r=vec2(0.);
r.x=fbm(st+1.*q+vec2(1.7,9.2)+.0115*u_time); r.x=fbm(st+1.*q+vec2(1.7,9.2)+.00515*u_time);
r.y=fbm(st+1.*q+vec2(8.3,2.8)+.0226*u_time); r.y=fbm(st+1.*q+vec2(8.3,2.8)+.0126*u_time);
r=r*.5+.5; r=r*.5+.5;
float f=fbm(st+r); float f=fbm(st+r);
+2
View File
@@ -105,6 +105,8 @@ function showWinnerScreen() {
#market { #market {
grid-area: market; grid-area: market;
background-image: url("/images/bg-sand.png"); background-image: url("/images/bg-sand.png");
border-bottom: 3px solid black;
;
} }
#current_player { #current_player {
+3 -1
View File
@@ -7,7 +7,7 @@ const displayOptions = ref(false)
<template> <template>
<div :class="`card_overlay`" ref="card"> <div :class="`card_overlay`" ref="card">
<button class="settings_button" @click="displayOptions = true">bite</button> <img class="settings_button" src="/settings.png" alt="settings" @click="displayOptions = true"/>
</div> </div>
<OptionsDialog :isVisible="displayOptions" @close="displayOptions = false" /> <OptionsDialog :isVisible="displayOptions" @close="displayOptions = false" />
</template> </template>
@@ -25,5 +25,7 @@ const displayOptions = ref(false)
.settings_button { .settings_button {
pointer-events: all; pointer-events: all;
width: 30px;
padding: 5px;
} }
</style> </style>
+44 -14
View File
@@ -1,5 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Player } from '~/netcode/Player';
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore()
@@ -20,28 +19,49 @@ watch(() => settingsStore.shaderQuality, async () => {
console.log(settingsStore.shaderQuality) console.log(settingsStore.shaderQuality)
}) })
const switchCardStyle = () => {
if (settingsStore.cardStyle === 'heron') {
settingsStore.cardStyle = 'original'
} else {
settingsStore.cardStyle = 'heron'
}
}
</script> </script>
<template> <template>
<div v-if="isVisible" class="dialog-overlay" @click="close"> <div v-if="isVisible" class="dialog-overlay" @click="close">
<div class="dialog-box" @click.stop> <div class="dialog-box" @click.stop>
<div class="dialog-header"> <div class="dialog-header">
<h3>Options</h3> <h3>Visuals</h3>
</div>
<div class="dialog-header">
<span>Toggle Card Style</span>
</div> </div>
<div class="dialog-body"> <div class="dialog-body">
<button @click="switchCardStyle">Toggle Card style</button> <button @click="settingsStore.switchCardStyles">Toggle Card style</button>
</div>
<div class="dialog-header">
<h3>Graphics</h3>
</div>
<div class="dialog-header">
<span>Shader Quality</span>
</div> </div>
<div class="dialog-body"> <div class="dialog-body">
<input type="range" min="0" max="10" v-model="settingsStore.shaderQuality"> <input type="range" min="0" max="10" v-model="settingsStore.shaderQuality">
</div> </div>
<div class="dialog-footer">
<span>
<template v-if="settingsStore.shaderQuality == 0">
Disabled
</template>
<template v-if="settingsStore.shaderQuality > 0">
{{ settingsStore.shaderQuality }}
</template>
</span>
</div>
<div class="dialog-header">
<span>Shader Framerate</span>
</div>
<div class="dialog-body">
<input type="range" min="10" max="60" step="5" v-model="settingsStore.shaderFramerate"
:disabled="settingsStore.shaderQuality == 0">
</div>
<div class="dialog-footer">
<span>{{ settingsStore.shaderFramerate }} fps</span>
</div>
</div> </div>
</div> </div>
</template> </template>
@@ -58,6 +78,8 @@ const switchCardStyle = () => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
z-index: 1000; z-index: 1000;
display: grid;
} }
.dialog-box { .dialog-box {
@@ -70,9 +92,8 @@ const switchCardStyle = () => {
color: white; color: white;
text-align: center; text-align: center;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
display: flex; display: grid;
justify-content: center; grid-template-columns: 33% 33% 33%;
flex-direction: column;
} }
.dialog-box h3 { .dialog-box h3 {
@@ -93,7 +114,16 @@ const switchCardStyle = () => {
padding: 10px 0; padding: 10px 0;
} }
.dialog-header {
grid-column-start: 1;
}
.dialog-body { .dialog-body {
padding: 10px 0; padding: 10px 0;
grid-column-start: 2;
}
.dialog-footer {
grid-column-start: 3;
} }
</style> </style>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 130 B

BIN
View File
Binary file not shown.
+16 -6
View File
@@ -1,14 +1,24 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
const CARDS_COOKIE_NAME = 'cards_type'; enum CardStyles {
const CARDS_DEFAULT_VALUE = 'heron'; HERON = "heron",
ORIGINAL = "original"
}
export const useSettingsStore = defineStore("settingstore", { export const useSettingsStore = defineStore("settingstore", {
state: () => ({ state: () => ({
cardStyle: "heron", cardStyle: CardStyles.HERON,
shaderQuality: 6, shaderQuality: 0,
shaderFramerate: 60, shaderFramerate: 10,
}), }),
actions: {
switchCardStyles() {
if (this.cardStyle === CardStyles.HERON) {
this.cardStyle = CardStyles.ORIGINAL
} else {
this.cardStyle = CardStyles.HERON
}
}
},
persist: true persist: true
}); });