player can switch between compilation
This commit is contained in:
@@ -1,40 +1,27 @@
|
||||
<template>
|
||||
<div class="container mx-auto p-4 inline-flex">
|
||||
<div class="compilation mx-auto p-4 inline-flex">
|
||||
<atropos-component ref="atropos" class="my-atropos" active-offset="80" shadow-scale="1.05">
|
||||
<img src="/zero/sky-a.jpg" data-atropos-offset="-8" />
|
||||
<img src="/zero/propeller-a.png" data-atropos-offset="-3" class="absolute inset-0 object-cover" />
|
||||
<img src="/zero/zero-a.png" data-atropos-offset="0" class="absolute inset-0 object-cover" />
|
||||
<img src="/logo.svg" data-atropos-offset="0" width="70%" class="logo absolute inset-0" />
|
||||
<slot class="absolute" ></slot>
|
||||
</atropos-component>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const atropos = ref(null);
|
||||
const atropos = ref(null)
|
||||
|
||||
onMounted(() => {
|
||||
atropos.value.addEventListener('enter', () => {
|
||||
console.log('Entered');
|
||||
});
|
||||
atropos.value.addEventListener('leave', () => {
|
||||
console.log('Left');
|
||||
});
|
||||
atropos.value.addEventListener('rotate', (event) => {
|
||||
console.log('Rotate', event.detail);
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .my-atropos {
|
||||
width: 320px;
|
||||
height: 160px;
|
||||
} */
|
||||
.logo {
|
||||
filter: drop-shadow(4px 4px 0 rgb(0 0 0 / 0.8));
|
||||
filter: drop-shadow(4px 4px 0 rgb(0 0 0 / 0.5));
|
||||
left: 14%;
|
||||
top: 10%;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="container mx-auto p-4 inline-flex">
|
||||
<div class="compilation mx-auto p-4 inline-flex">
|
||||
<atropos-component ref="atropos" class="my-atropos" active-offset="80" shadow-scale="1.05">
|
||||
<img src="/zero/sky-b.jpg" data-atropos-offset="-8" />
|
||||
<img src="/zero/propeller-b.png" data-atropos-offset="-3" class="absolute inset-0 object-cover" />
|
||||
@@ -10,21 +10,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const atropos = ref(null);
|
||||
|
||||
onMounted(() => {
|
||||
atropos.value.addEventListener('enter', () => {
|
||||
console.log('Entered');
|
||||
});
|
||||
atropos.value.addEventListener('leave', () => {
|
||||
console.log('Left');
|
||||
});
|
||||
atropos.value.addEventListener('rotate', (event) => {
|
||||
console.log('Rotate', event.detail);
|
||||
});
|
||||
});
|
||||
const atropos = ref(null)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -33,7 +21,7 @@ onMounted(() => {
|
||||
height: 160px;
|
||||
} */
|
||||
.logo {
|
||||
filter: drop-shadow(4px 4px 0 rgb(0 0 0 / 0.8));
|
||||
filter: drop-shadow(4px 4px 0 rgb(0 0 0 / 0.5));
|
||||
left: 14%;
|
||||
top: 10%;
|
||||
}
|
||||
|
Reference in New Issue
Block a user