evilSpins v1
This commit is contained in:
@@ -3,11 +3,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useUiStore } from '~/store/ui'
|
||||
import { useDataStore } from '~/store/data'
|
||||
import { usePlayerStore } from '~/store/player'
|
||||
|
||||
// Configuration du layout
|
||||
definePageMeta({
|
||||
@@ -23,13 +21,8 @@ onMounted(async () => {
|
||||
const idParam = Array.isArray(route.params.id) ? route.params.id[0] : route.params.id
|
||||
if (typeof idParam === 'string' && idParam.length > 0) {
|
||||
uiStore.selectBox(idParam)
|
||||
|
||||
// Lire automatiquement la box si on est sur la page d'une box
|
||||
const box = dataStore.boxes.find(b => b.id === idParam)
|
||||
if (box) {
|
||||
const player = usePlayerStore()
|
||||
player.playBox(box).catch(console.error)
|
||||
}
|
||||
// player.playBox(box).catch(console.error)
|
||||
// }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
45
app/pages/defaultDev.vue
Normal file
45
app/pages/defaultDev.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="deck">
|
||||
<card
|
||||
v-for="track in tracks"
|
||||
:key="track.id"
|
||||
:track="track"
|
||||
:is-face-up="track.isFaceUp"
|
||||
@click="flipCard(track)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useDataStore } from '~/store/data'
|
||||
const tracks = ref([])
|
||||
definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
const dataStore = useDataStore()
|
||||
await dataStore.loadData()
|
||||
tracks.value = dataStore.getTracksByboxId('ES2025')
|
||||
})
|
||||
|
||||
function flipCard(track) {
|
||||
track.isFaceUp = !track.isFaceUp
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.logo {
|
||||
filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 0.7));
|
||||
}
|
||||
|
||||
.deck {
|
||||
position: relative;
|
||||
height: 80vh;
|
||||
|
||||
.card {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
190
app/pages/dev.vue
Normal file
190
app/pages/dev.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<div>
|
||||
<button
|
||||
class="fixed bottom-4 right-4 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-full shadow-lg z-50 transition-colors"
|
||||
title="Ranger les cartes"
|
||||
@click="arrangeCards"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-6 w-6"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M4 6h16M4 12h16m-7 6h7"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div ref="deck" class="deck">
|
||||
<card
|
||||
v-for="track in tracks"
|
||||
:key="track.id"
|
||||
:track="track"
|
||||
:class="['card', 'id-' + track.id, { dragging: dragging === track }]"
|
||||
:style="{
|
||||
top: track.y + 'px',
|
||||
left: track.x + 'px',
|
||||
zIndex: track.zIndex || 1,
|
||||
transform: `rotate(${track.rotation || 0}deg)`
|
||||
}"
|
||||
:is-face-up="track.isFaceUp"
|
||||
@mousedown="startDrag($event, track)"
|
||||
@click="flipCard(track)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useDataStore } from '~/store/data'
|
||||
|
||||
const tracks = ref([])
|
||||
const deck = ref(null)
|
||||
let zIndexCounter = 1
|
||||
|
||||
let dragging = null
|
||||
let offset = { x: 0, y: 0 }
|
||||
let velocity = { x: 0, y: 0 }
|
||||
let lastTime = 0
|
||||
|
||||
const dataStore = useDataStore()
|
||||
|
||||
definePageMeta({ layout: 'default' })
|
||||
|
||||
onMounted(async () => {
|
||||
await dataStore.loadData()
|
||||
tracks.value = dataStore.getTracksByboxId('ES2025').map((t, i) => ({
|
||||
...t,
|
||||
x: t.x ?? 50 + i * 20,
|
||||
y: t.y ?? 50 + i * 20,
|
||||
zIndex: t.zIndex ?? i + 1,
|
||||
rotation: 0,
|
||||
isFaceUp: t.isFaceUp ?? false
|
||||
}))
|
||||
|
||||
window.addEventListener('mousemove', onDrag)
|
||||
window.addEventListener('mouseup', stopDrag)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('mousemove', onDrag)
|
||||
window.removeEventListener('mouseup', stopDrag)
|
||||
})
|
||||
|
||||
function startDrag(e, track) {
|
||||
dragging = track
|
||||
const rect = deck.value.getBoundingClientRect()
|
||||
offset.x = e.clientX - rect.left - track.x
|
||||
offset.y = e.clientY - rect.top - track.y
|
||||
lastTime = performance.now()
|
||||
velocity = { x: 0, y: 0 }
|
||||
|
||||
zIndexCounter += 1
|
||||
track.zIndex = zIndexCounter
|
||||
}
|
||||
|
||||
function onDrag(e) {
|
||||
if (!dragging) return
|
||||
|
||||
const rect = deck.value.getBoundingClientRect()
|
||||
const newX = e.clientX - rect.left - offset.x
|
||||
const newY = e.clientY - rect.top - offset.y
|
||||
|
||||
const now = performance.now()
|
||||
const dt = now - lastTime
|
||||
velocity.x = (newX - dragging.x) / dt
|
||||
velocity.y = (newY - dragging.y) / dt
|
||||
lastTime = now
|
||||
|
||||
dragging.x = newX
|
||||
dragging.y = newY
|
||||
|
||||
// Rotation dynamique selon la position horizontale
|
||||
const centerX = rect.width / 2
|
||||
const dx = dragging.x - centerX
|
||||
dragging.rotation = dx * 0.05
|
||||
}
|
||||
|
||||
function stopDrag() {
|
||||
if (!dragging) return
|
||||
const track = dragging
|
||||
dragging = null
|
||||
|
||||
// Inertie douce
|
||||
const decay = 0.95
|
||||
function animateInertia() {
|
||||
if (Math.abs(velocity.x) < 0.02 && Math.abs(velocity.y) < 0.02) return
|
||||
track.x += velocity.x * 16
|
||||
track.y += velocity.y * 16
|
||||
velocity.x *= decay
|
||||
velocity.y *= decay
|
||||
requestAnimationFrame(animateInertia)
|
||||
}
|
||||
animateInertia()
|
||||
}
|
||||
|
||||
function flipCard(track) {
|
||||
track.isFaceUp = true
|
||||
}
|
||||
|
||||
function arrangeCards() {
|
||||
const deckRect = deck.value.getBoundingClientRect()
|
||||
const cardWidth = 224
|
||||
const cardHeight = 320
|
||||
const padding = 20
|
||||
const cardsPerRow = Math.max(
|
||||
1,
|
||||
Math.floor((deckRect.width - padding * 2) / (cardWidth + padding))
|
||||
)
|
||||
|
||||
tracks.value.forEach((track, index) => {
|
||||
const row = Math.floor(index / cardsPerRow)
|
||||
const col = index % cardsPerRow
|
||||
|
||||
track.x = padding + col * (cardWidth + padding)
|
||||
track.y = padding + row * (cardHeight / 3)
|
||||
track.zIndex = index + 1
|
||||
track.rotation = 0
|
||||
|
||||
zIndexCounter = Math.max(zIndexCounter, track.zIndex)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.deck {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 80vh;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: absolute;
|
||||
cursor: grab;
|
||||
transition:
|
||||
transform 0.1s ease,
|
||||
box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.card:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.card.dragging {
|
||||
z-index: 999;
|
||||
cursor: grabbing;
|
||||
transform: scale(1.05) rotate(0deg);
|
||||
/* rotation sera remplacée dynamiquement */
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
</style>
|
||||
130
app/pages/draggable.vue
Normal file
130
app/pages/draggable.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div class="deck">
|
||||
<draggable
|
||||
v-model="tracks"
|
||||
item-key="id"
|
||||
class="draggable-container"
|
||||
@start="drag = true"
|
||||
@end="onDragEnd"
|
||||
>
|
||||
<template #item="{ element: track }">
|
||||
<card
|
||||
:key="track.id"
|
||||
:track="track"
|
||||
tabindex="0"
|
||||
:is-face-up="track.isFaceUp"
|
||||
class="draggable-item"
|
||||
@click="flipCard(track)"
|
||||
/>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useDataStore } from '~/store/data'
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
const drag = ref(false)
|
||||
const tracks = ref([])
|
||||
// Configuration du layout
|
||||
definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
const dataStore = useDataStore()
|
||||
await dataStore.loadData()
|
||||
tracks.value = dataStore.getTracksByboxId('ES2025')
|
||||
})
|
||||
|
||||
function flipCard(track) {
|
||||
track.isFaceUp = !track.isFaceUp
|
||||
}
|
||||
|
||||
function onDragEnd() {
|
||||
drag.value = false
|
||||
// Ici vous pouvez ajouter une logique supplémentaire après le drop si nécessaire
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.logo {
|
||||
filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 0.7));
|
||||
}
|
||||
|
||||
.deck {
|
||||
position: relative;
|
||||
height: 80vh;
|
||||
|
||||
.draggable-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
padding: 1rem;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.draggable-item {
|
||||
cursor: grab;
|
||||
transition: transform 0.2s;
|
||||
|
||||
&:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
&.sortable-ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
&.sortable-drag {
|
||||
transform: rotate(2deg);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* noise tools */
|
||||
$size: 130px;
|
||||
$scale: 1.05;
|
||||
$border-radius: calc($size / 2);
|
||||
$grad-position: 100% 0;
|
||||
$grad-start: 25%;
|
||||
$grad-stop: 65%;
|
||||
$duration: 3.5s;
|
||||
$noise: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAMAAAC5KTl3AAAAgVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABtFS1lAAAAK3RSTlMWi3QSa1uQOKBWCTwcb6V4gWInTWYOqQSGfa6XLyszmyABlFFJXySxQ0BGn2PQBgAAC4NJREFUWMMV1kWO5UAQRdFk5kwzs/33v8Cunr7ZUehKAdaRUAse99ozDjF5BqswrPKm7btzJ2tRziN3rMYXC236humIV5Our7nHWnVdFOBojW2XVnkeu1IZHNJH5OPHj9TjgVxBGBwAAmp60WoA1gBBvg3XMFhxUQ4KuLqx0CritYZPPXinsOqB7I76+OHaZlPzLEcftrqOlOwjeXvuEuH6t6emkaofgVUDIb4fEZB6CmRAeFCTq11lxbAgUyx4rXkqlH9I4bTUDRRVD1xjbqb9HyUBn7rhtr1x+x9Y0e3BdX31/loYvZaLxqnjbRuokz+pPG7WebnSNKE3yE6Tka4aDEDMVYr6Neq126c+ZR2nzzm3yyiC7PGWG/1uueqZudrVGYNdsgOMDvt1cI8CXu63QIcPvYNY8z870WwYazTS7DqpDEknZqS0AFXObWUxTaw0q5pnHlq4oQImakpLfJkmErdvAfhsc7lod0DVT4tuob25C0tQjzdi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gEP79adK8fmFCWNYC+ahzVNcRH79E8dA1iqX/N0qq22xcOc20ALxLDspEj4QCFBQMgaIwoKbxr0Bd7Sbws6GiRK6tqoPfpiCle23axejRLyO1I+ahsEpWrzT5ZsCyS5RcY9jMfENFxSnhKsrfW8JHH6/rdQUMfmQPT3Uz9gY0C/pu1yuCnrPUvio0a1qMEosA/EwIzzid7cqsAAAAASUVORK5CYII=');
|
||||
|
||||
@mixin dithered-gradient($position, $start, $stop, $color) {
|
||||
background: radial-gradient(circle at $position, transparent $start, $color $stop);
|
||||
mask: $noise, radial-gradient(circle at $position, transparent $start, #000 ($stop + 10%));
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&::before {
|
||||
@include dithered-gradient(50%, 30%, 60%, #6cc8ff);
|
||||
}
|
||||
|
||||
&::after {
|
||||
mask-image:
|
||||
$noise, linear-gradient(45deg, #000 0%, transparent 25%, transparent 75%, #000 100%);
|
||||
background: linear-gradient(45deg, #6d6dff 10%, transparent 25%, transparent 75%, #6af789 90%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,17 +4,19 @@
|
||||
<div class="flex flex-col-reverse bg-gradient-to-r from-primary to-primary-dark">
|
||||
<div class="mt-8 flex flex-wrap justify-center">
|
||||
<!-- <box :box="box" /> -->
|
||||
<div class="devtool absolute right-4 text-white bg-black rounded-2xl px-4 py-2">
|
||||
<div class="devtool absolute right-4 text-white bg-black rounded-2xl px-4 py-2">
|
||||
<!-- <button @click="currentPosition = boxPositions.side">side</button>
|
||||
<button @click="currentPosition = boxPositions.front">front</button>
|
||||
<button @click="currentPosition = boxPositions.back">back</button> -->
|
||||
<div class="w-full block">
|
||||
<input class="w-1/2" type="color" name="color1" id="color1" v-model="box.color1">
|
||||
<input class="w-1/2" type="color" name="color1" id="color1" v-model="box.color2">
|
||||
<div class="block w-full h-32" :style="{
|
||||
background: `linear-gradient(to top, ${box.color1}, ${box.color2})`
|
||||
}">
|
||||
</div>
|
||||
<input class="w-1/2" type="color" name="color1" id="color1" v-model="box.color1" />
|
||||
<input class="w-1/2" type="color" name="color1" id="color1" v-model="box.color2" />
|
||||
<div
|
||||
class="block w-full h-32"
|
||||
:style="{
|
||||
background: `linear-gradient(to top, ${box.color1}, ${box.color2})`
|
||||
}"
|
||||
></div>
|
||||
<!-- <label class="block">
|
||||
size: {{ size }}
|
||||
<input v-model.number="size" type="range" step="1" min="1" max="14">
|
||||
@@ -62,15 +64,15 @@ const track = ref<Track>({
|
||||
title: 'The grinding wheel',
|
||||
artist: {
|
||||
id: 0,
|
||||
name: 'L\'Efondras',
|
||||
name: "L'Efondras",
|
||||
url: '',
|
||||
coverId: '0024705317',
|
||||
coverId: '0024705317'
|
||||
},
|
||||
start: 0,
|
||||
url: 'https://arakirecords.bandcamp.com/track/the-grinding-wheel',
|
||||
coverId: 'a3236746052',
|
||||
type: 'compilation',
|
||||
type: 'compilation'
|
||||
})
|
||||
|
||||
//from-slate-800 to-zinc-900
|
||||
//from-slate-800 to-zinc-900
|
||||
</script>
|
||||
|
||||
@@ -26,7 +26,7 @@ onMounted(async () => {
|
||||
if (track) {
|
||||
// Open the box containing this track without changing global UI flow/animations
|
||||
uiStore.selectBox(track.boxId)
|
||||
playerStore.playTrack(track)
|
||||
playerStore.loadTrack(track)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user