<script>
import { tweened } from 'svelte/motion'
import { quartInOut } from 'svelte/easing'
import { onMount } from 'svelte'
import { get } from 'svelte/store'
import Step from './Step.svelte'
const easing = quartInOut
const duration = 1000
const timeline = [
{
label: '#1',
tween: tweened(0, {duration: 1000, easing})
},
{
label: '#2',
tween: tweened(0, {duration: 1000, easing})
},
{
label: '#3',
tween: tweened(0, {duration: 1000, easing})
},
{
label: '#4',
tween: tweened(0, {duration: 1000, easing})
}
]
const pos = tweened(0, {duration: duration * timeline.length})
let current
let mode = 'playing'
$: currentIndex = Math.floor($pos)
$: current = timeline[currentIndex]
$: {