game-village-politics-frontend/app/components/village/Bird.vue

17 lines
617 B
Vue
Raw Normal View History

<script setup lang="ts">
defineProps<{ d: string; dur: number; begin: number; size: number }>()
</script>
<!-- A bird crossing the land, two flat wings beating. -->
<template>
<g>
<g :transform="`scale(${size})`">
<g>
<animateTransform attributeName="transform" type="scale" values="1 1;1 -0.6;1 1" keyTimes="0;0.5;1" dur="0.45s" :begin="`${begin}s`" repeatCount="indefinite" />
<path d="M0 0L-3.2 -1.4L-1.4 0.2zM0 0L3.2 -1.4L1.4 0.2z" fill="#2f2620" />
</g>
</g>
<animateMotion :dur="`${dur}s`" :begin="`${begin}s`" repeatCount="indefinite" :path="d" />
</g>
</template>