✨ Finish to replace Anime with Motion One for page animations
Page intro animation and reveal that has now been simplified as Motion One manages an inView option (that uses IntersectionObserver)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { map } from '$utils/functions'
|
||||
import { reveal, fly } from '$animations/index'
|
||||
import reveal from '$animations/reveal'
|
||||
|
||||
export let tag: string
|
||||
export let label: string = undefined
|
||||
@@ -46,17 +46,15 @@
|
||||
|
||||
|
||||
const revealOptions = animate ? {
|
||||
animation: fly,
|
||||
children: '.char',
|
||||
animation: { y: ['-105%', 0] },
|
||||
options: {
|
||||
children: '.char',
|
||||
stagger: 60,
|
||||
duration: 1600,
|
||||
from: '-105%',
|
||||
opacity: false,
|
||||
delay: 200,
|
||||
stagger: 0.06,
|
||||
duration: 1.6,
|
||||
delay: 0.2,
|
||||
threshold: 0.2,
|
||||
},
|
||||
threshold: 0.2,
|
||||
} : {}
|
||||
} : null
|
||||
</script>
|
||||
|
||||
<svelte:window
|
||||
|
||||
Reference in New Issue
Block a user